mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Fixes gravity surge event affecting capsule shelters on maps without gravity generators (#11969)
Co-authored-by: Ryumi <ghosttehspychecka@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ae54169ed8
commit
268c2003e2
@@ -119,6 +119,7 @@
|
||||
#define AREA_BLOCK_TRACKING 0x1000 // If camera tracking is blocked in the area.
|
||||
#define AREA_BLOCK_GHOST_SIGHT 0x2000 // If an area blocks sight for ghosts
|
||||
#define AREA_BLOCK_INSTANT_BUILDING 0x4000 // If an area blocks the usage of instant building creation items/mechanics such as shelter capsules
|
||||
#define AREA_ALWAYS_HAS_GRAVITY 0x8000 // If an area should always have gravity, even during events that would otherwise remove it.
|
||||
// The 0x800000 is blocked by INITIALIZED, do NOT use it!
|
||||
|
||||
#define PHASE_SHIELDED 0x100000 // A less rough way to prevent phase shifting without blocking access //VOREStation Note: Not implemented on VS. Used downstream.
|
||||
|
||||
@@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(areas_by_type)
|
||||
var/static_environ = 0
|
||||
|
||||
var/music = null
|
||||
var/has_gravity = 1 // Don't check this var directly; use get_gravity() instead
|
||||
var/has_gravity = TRUE // Don't check this var directly; use get_gravity() instead
|
||||
var/obj/machinery/power/apc/apc = null
|
||||
var/no_air = null
|
||||
// var/list/lights // list of all lights on this area
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
GG.charge_count = 10
|
||||
else
|
||||
for(var/area/A in world)
|
||||
if(A.flags & AREA_ALWAYS_HAS_GRAVITY)
|
||||
continue
|
||||
if(A.z in zLevels)
|
||||
A.gravitychange(GLOB.gravity_is_on)
|
||||
|
||||
@@ -54,6 +56,8 @@
|
||||
did_anything = TRUE
|
||||
else
|
||||
for(var/area/A in world)
|
||||
if(A.flags & AREA_ALWAYS_HAS_GRAVITY)
|
||||
continue
|
||||
if(A.z in zLevels)
|
||||
A.gravitychange(GLOB.gravity_is_on)
|
||||
did_anything = TRUE
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
|
||||
/datum/event2/event/gravity/start()
|
||||
for(var/area/A in world)
|
||||
if(A.z in get_location_z_levels(space_only = TRUE))
|
||||
if(!(A.flags & AREA_ALWAYS_HAS_GRAVITY) && A.z in get_location_z_levels(space_only = TRUE))
|
||||
A.gravitychange(FALSE)
|
||||
|
||||
/datum/event2/event/gravity/end()
|
||||
for(var/area/A in world)
|
||||
if(A.z in get_location_z_levels(space_only = TRUE))
|
||||
if(!(A.flags & AREA_ALWAYS_HAS_GRAVITY) && A.z in get_location_z_levels(space_only = TRUE))
|
||||
A.gravitychange(TRUE)
|
||||
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
|
||||
@@ -6,11 +6,12 @@ GLOBAL_LIST_EMPTY(unique_deployable)
|
||||
dynamic_lighting = TRUE
|
||||
requires_power = FALSE
|
||||
has_gravity = TRUE
|
||||
flags = AREA_ALWAYS_HAS_GRAVITY
|
||||
|
||||
/area/survivalpod/dorms
|
||||
name = "\improper Emergency Shelter Dorm"
|
||||
icon_state = "away1"
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED | AREA_FLAG_IS_NOT_PERSISTENT | AREA_FORBID_EVENTS | AREA_FORBID_SINGULO | AREA_SOUNDPROOF | AREA_ALLOW_LARGE_SIZE | AREA_BLOCK_SUIT_SENSORS | AREA_BLOCK_TRACKING
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED | AREA_FLAG_IS_NOT_PERSISTENT | AREA_FORBID_EVENTS | AREA_FORBID_SINGULO | AREA_SOUNDPROOF | AREA_ALLOW_LARGE_SIZE | AREA_BLOCK_SUIT_SENSORS | AREA_BLOCK_TRACKING | AREA_ALWAYS_HAS_GRAVITY
|
||||
|
||||
/area/survivalpod/dorms/bathroom
|
||||
name = "\improper Emergency Shelter Bathroom"
|
||||
|
||||
Reference in New Issue
Block a user