Simplify checks for valid nuke detonation sites. (#21518)

* Simplify checks for valid nuke detonation sites.

* falsy check was replaced with equality so this needs to be exact

* Use SSmapping.existing_station_areas instead

* swap to guard clause

* Update code/game/gamemodes/nuclear/nuclearbomb.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* switch to switch

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
warriorstar-orion
2023-08-21 19:28:52 +01:00
committed by GitHub
co-authored by Contrabang
parent 76d0428022
commit e2a647188e
4 changed files with 81 additions and 50 deletions
+12
View File
@@ -52,3 +52,15 @@
#define SPECIAL_ROLE_XENOMORPH_SENTINEL "Xenomorph Sentinel"
#define SPECIAL_ROLE_XENOMORPH_LARVA "Xenomorph Larva"
#define SPECIAL_ROLE_EVENTMISC "Event Role"
// Constants used by code which checks the status of nuclear blasts during a
// round, regardless of original game mode, e.g. setting the ending cinematic.
/// The bomb is on-station.
#define NUKE_SITE_ON_STATION 0
/// The bomb is on station z-level, but not a station tile.
#define NUKE_SITE_ON_STATION_ZLEVEL 1
/// The bomb is off station z-level.
#define NUKE_SITE_OFF_STATION_ZLEVEL 2
/// The bomb's location cannot be found.
#define NUKE_SITE_INVALID 3