From 9ec7de98fad6c98b4eb3175e62dea62d73e4532c Mon Sep 17 00:00:00 2001 From: Mahtra Date: Mon, 21 Oct 2024 10:33:59 +1300 Subject: [PATCH 1/2] [scripts][dependency] Blacklisting 5713 from being available as a safe room --- dependency.lic | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dependency.lic b/dependency.lic index f1aad9429f..8707c4ec81 100644 --- a/dependency.lic +++ b/dependency.lic @@ -10,7 +10,7 @@ require 'ostruct' require 'digest/sha1' require 'monitor' -$DEPENDENCY_VERSION = '1.7.2' +$DEPENDENCY_VERSION = '1.7.3' $MIN_RUBY_VERSION = '3.2.2' no_pause_all @@ -1287,6 +1287,14 @@ class SetupFiles settings.hometown ||= UserVars.hometown settings.hometown = $HOMETOWN if $HOMETOWN + # Blacklist Empath courtyard as a safe room + if settings.safe_room == 5713 || settings.safe_room_id == 5713 + _respond("5713 is not a valid safe room setting.") + _respond("Exiting.") + _respond("Please edit your yaml to use a different safe room.") + exit + end + # If these room settings are defined as maps with a # room id configured per town, then grab the hometown room id # and assign it directly to the setting. From 608316afafc984de76e76d349166487f94ae090b Mon Sep 17 00:00:00 2001 From: Mahtra Date: Mon, 21 Oct 2024 10:38:07 +1300 Subject: [PATCH 2/2] making it scale --- dependency.lic | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dependency.lic b/dependency.lic index 8707c4ec81..57aff3351c 100644 --- a/dependency.lic +++ b/dependency.lic @@ -1287,9 +1287,10 @@ class SetupFiles settings.hometown ||= UserVars.hometown settings.hometown = $HOMETOWN if $HOMETOWN - # Blacklist Empath courtyard as a safe room - if settings.safe_room == 5713 || settings.safe_room_id == 5713 - _respond("5713 is not a valid safe room setting.") + # Denylist for rooms we don't support being used as safe_rooms + disallowed_safe_rooms = [5713] + if disallowed_safe_rooms.include?(settings.safe_room) || disallowed_safe_rooms.include?(settings.safe_room_id) + _respond("#{settings.safe_room} is not a valid safe room setting.") _respond("Exiting.") _respond("Please edit your yaml to use a different safe room.") exit