Skip to content

Commit

Permalink
[MIRROR] Prevent space-required station goals from running on planeta…
Browse files Browse the repository at this point in the history
…ry maps [MDB IGNORE] (#24569)

* Prevent space-required station goals from running on planetary maps (#79224)

## About The Pull Request

Someone forgot to put `as anything` on an iteration of an array
of typepaths. Easy fix.

## Changelog

:cl:
fix: You will no longer be asked to construct meteor shields on stations
which cannot be hit by meteors.
/:cl:

* Prevent space-required station goals from running on planetary maps

---------

Co-authored-by: Jacquerel <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Oct 24, 2023
1 parent 3dd52ac commit 8b09c5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@
/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)
// Remove all goals that require space if space is not present
if(SSmapping.is_planetary())
for(var/datum/station_goal/goal in possible)
if(goal.requires_space)
///Removes all goals that require space if space is not present
for(var/datum/station_goal/goal as anything in possible)
if(initial(goal.requires_space))
possible -= goal
var/goal_weights = 0
while(possible.len && goal_weights < goal_budget)
Expand Down

0 comments on commit 8b09c5e

Please sign in to comment.