From 79daec60164b06c47db8ebac9e36a6f78de2b951 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 5 Aug 2022 02:00:13 +0200 Subject: [PATCH] [MIRROR] add some tests for if empty space is present [MDB IGNORE] (#15394) * add some tests for if empty space is present (#68582) About The Pull Request Fixes: #62140 Fixes part of: #53689 Why It's Good For The Game Aurora Caelus should no longer run on icebox as intended. Station goal on stations without space shouldn't get station goals that require space. Changelog cl fix: Added a test in Aurora Caelus event for if the station has the ability to show it. fix: Stations without space should no longer receive station objectives that require space to be present. /cl * add some tests for if empty space is present Co-authored-by: Mooshimi <85910816+Mooshimi@users.noreply.github.com> --- code/game/gamemodes/game_mode.dm | 5 +++++ code/modules/events/aurora_caelus.dm | 4 ++-- code/modules/station_goals/shield.dm | 1 + code/modules/station_goals/station_goal.dm | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 388f56311a6..1688bd2ba82 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -185,6 +185,11 @@ /datum/game_mode/proc/generate_station_goals(greenshift) var/goal_budget = greenshift ? INFINITY : CONFIG_GET(number/station_goal_budget) var/list/possible = subtypesof(/datum/station_goal) + if(!(SSmapping.empty_space)) + for(var/datum/station_goal/goal in possible) + if(goal.requires_space) + ///Removes all goals that require space if space is not present + possible -= goal var/goal_weights = 0 while(possible.len && goal_weights < goal_budget) var/datum/station_goal/picked = pick_n_take(possible) diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 3f15ab2e842..f1d0c2ebb6d 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -6,7 +6,7 @@ earliest_start = 5 MINUTES /datum/round_event_control/aurora_caelus/canSpawnEvent(players) - if(!CONFIG_GET(flag/starlight)) + if(!CONFIG_GET(flag/starlight)&&!(SSmapping.empty_space)) return FALSE return ..() @@ -46,7 +46,7 @@ if(seymour.mind && istype(seymour.mind.assigned_role, /datum/job/cook)) seymour.say("My roast is ruined!!!", forced = "ruined roast") seymour.emote("scream") - + /datum/round_event/aurora_caelus/tick() if(activeFor % 5 == 0) diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 6ce8ed814d9..058606f1ac8 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -4,6 +4,7 @@ /datum/station_goal/station_shield name = "Station Shield" var/coverage_goal = 500 + requires_space = TRUE /datum/station_goal/station_shield/get_report() return {"The station is located in a zone full of space debris. diff --git a/code/modules/station_goals/station_goal.dm b/code/modules/station_goals/station_goal.dm index 49274165b46..1afd6a6cded 100644 --- a/code/modules/station_goals/station_goal.dm +++ b/code/modules/station_goals/station_goal.dm @@ -5,6 +5,7 @@ GLOBAL_LIST_EMPTY_TYPED(station_goals, /datum/station_goal) var/name = "Generic Goal" var/weight = 1 //In case of multiple goals later. var/required_crew = 10 + var/requires_space = FALSE var/completed = FALSE var/report_message = "Complete this goal."