diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 85319b48a59..61104d84d8f 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -4,6 +4,7 @@ #define ALL (~0) //For convenience. #define NONE 0 + GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768)) // for /datum/var/datum_flags @@ -57,6 +58,30 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 /// Blocks ruins spawning on the turf #define NO_RUINS_1 (1<<10) +////////////////Area flags\\\\\\\\\\\\\\ +/// If it's a valid territory for cult summoning or the CRAB-17 phone to spawn +#define VALID_TERRITORY (1<<0) +/// If blobs can spawn there and if it counts towards their score. +#define BLOBS_ALLOWED (1<<1) +/// If mining tunnel generation is allowed in this area +#define TUNNELS_ALLOWED (1<<2) +/// If flora are allowed to spawn in this area randomly through tunnel generation +#define FLORA_ALLOWED (1<<3) +/// If mobs can be spawned by natural random generation +#define MOB_SPAWN_ALLOWED (1<<4) +/// If megafauna can be spawned by natural random generation +#define MEGAFAUNA_SPAWN_ALLOWED (1<<5) +/// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter) +#define NOTELEPORT (1<<6) +/// Hides area from player Teleport function. +#define HIDDEN_AREA (1<<7) +/// If false, loading multiple maps with this area type will create multiple instances. +#define UNIQUE_AREA (1<<8) +/// If people are allowed to suicide in it. Mostly for OOC stuff like minigames +#define BLOCK_SUICIDE (1<<9) +/// Can the Xenobio management console transverse this area by default? +#define XENOBIOLOGY_COMPATIBLE (1<<10) + /* These defines are used specifically with the atom/pass_flags bitmask the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example) diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index 2d49a32a0de..34e00c7af22 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/eng var/area/place = get_area(turfs[i]) if(blacklisted_areas[place.type]) continue - if(!place.requires_power || place.noteleport || place.hidden) + if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA)) continue // No expanding powerless rooms etc areas[place.name] = place var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index d57374df3c7..81092440d45 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1006,7 +1006,7 @@ B --><-- A var/I = rand(1, L.len) var/turf/T = L[I] var/area/X = get_area(T) - if(!T.density && X.valid_territory) + if(!T.density && (X.area_flags & VALID_TERRITORY)) var/clear = TRUE for(var/obj/O in T) if(O.density) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 480cd9b6f98..676da9db96d 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -33,6 +33,19 @@ GLOBAL_LIST_INIT(bitfields, list( "USES_TGUI" = USES_TGUI, "FROZEN" = FROZEN, ), + "area_flags" = list( + "VALID_TERRITORY" = VALID_TERRITORY, + "BLOBS_ALLOWED" = BLOBS_ALLOWED, + "TUNNELS_ALLOWED" = TUNNELS_ALLOWED, + "FLORA_ALLOWED" = FLORA_ALLOWED, + "MOB_SPAWN_ALLOWED" = MOB_SPAWN_ALLOWED, + "MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED, + "NOTELEPORT" = NOTELEPORT, + "HIDDEN_AREA" = HIDDEN_AREA, + "UNIQUE_AREA" = UNIQUE_AREA, + "BLOCK_SUICIDE" = BLOCK_SUICIDE, + "XENOBIOLOGY_COMPATIBLE" = XENOBIOLOGY_COMPATIBLE, + ), "datum_flags" = list( "DF_USE_TAG" = DF_USE_TAG, "DF_VAR_EDITED" = DF_VAR_EDITED, diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 94e40948979..18f9de9a6d1 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -293,7 +293,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) for(var/area/A in world) if (is_type_in_typecache(A, station_areas_blacklist)) continue - if (!A.contents.len || !A.unique) + if (!A.contents.len || !(A.area_flags & UNIQUE_AREA)) continue var/turf/picked = A.contents[1] if (is_station_level(picked.z)) diff --git a/code/datums/action.dm b/code/datums/action.dm index 012b951bc40..3db51fe640d 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -336,7 +336,7 @@ /datum/action/item_action/vortex_recall/IsAvailable() var/turf/current_location = get_turf(target) var/area/current_area = current_location.loc - if(current_area.noteleport) + if(current_area.area_flags & NOTELEPORT) to_chat(target, "[src] fizzles uselessly.") return if(istype(target, /obj/item/hierophant_club)) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index aafa230b3fd..f550005b8c7 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -66,7 +66,7 @@ var/area/A = get_area(curturf) var/area/B = get_area(destturf) - if(!forced && (HAS_TRAIT(teleatom, TRAIT_NO_TELEPORT) || A.noteleport || B.noteleport)) + if(!forced && (HAS_TRAIT(teleatom, TRAIT_NO_TELEPORT) || (A.area_flags & NOTELEPORT) || (B.area_flags & NOTELEPORT))) return FALSE if(SEND_SIGNAL(destturf, COMSIG_ATOM_INTERCEPT_TELEPORT, channel, curturf, destturf)) @@ -156,7 +156,7 @@ if(T.is_transition_turf()) continue // Avoid picking these. var/area/A = T.loc - if(!A.noteleport) + if(!(A.area_flags & NOTELEPORT)) posturfs.Add(T) return posturfs diff --git a/code/datums/wires/airalarm.dm b/code/datums/wires/airalarm.dm index c46e06a4adf..87c17a1b451 100644 --- a/code/datums/wires/airalarm.dm +++ b/code/datums/wires/airalarm.dm @@ -47,7 +47,7 @@ A.apply_mode(usr) if(WIRE_ALARM) // Clear alarms. var/area/AA = get_area(A) - if(AA.atmosalert(0, holder)) + if(AA.atmosalert(FALSE, holder)) A.post_alert(0) A.update_icon() @@ -69,6 +69,6 @@ A.apply_mode(usr) if(WIRE_ALARM) // Post alarm. var/area/AA = get_area(A) - if(AA.atmosalert(2, holder)) + if(AA.atmosalert(TRUE, holder)) A.post_alert(2) A.update_icon() diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index a9e90b4165b..6ac12c4fe6e 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -28,10 +28,9 @@ NOTE: there are two lists of areas in the end of this file: centcom and station power_light = FALSE power_equip = FALSE power_environ = FALSE - valid_territory = FALSE + area_flags = UNIQUE_AREA outdoors = TRUE ambientsounds = SPACE - blob_allowed = FALSE //Eating up space doesn't count for victory as a blob. flags_1 = CAN_BE_DIRTY_1 /area/space/nearstation @@ -58,8 +57,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "asteroid" requires_power = FALSE has_gravity = STANDARD_GRAVITY - blob_allowed = FALSE //Nope, no winning on the asteroid as a blob. Gotta eat the station. - valid_territory = FALSE + area_flags = UNIQUE_AREA ambientsounds = MINING flags_1 = CAN_BE_DIRTY_1 @@ -68,7 +66,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station ambientsounds = RUINS always_unpowered = FALSE requires_power = TRUE - blob_allowed = TRUE + area_flags = UNIQUE_AREA | BLOBS_ALLOWED /area/asteroid/nearstation/bomb_site name = "Bomb Testing Asteroid" @@ -79,7 +77,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/maintenance ambientsounds = MAINTENANCE - valid_territory = FALSE + area_flags = BLOBS_ALLOWED | UNIQUE_AREA airlock_wires = /datum/wires/airlock/maint //Departments @@ -158,7 +156,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/maintenance/department/science/xenobiology name = "Xenobiology Maintenance" icon_state = "xenomaint" - xenobiology_compatible = TRUE + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | XENOBIOLOGY_COMPATIBLE //Maintenance - Generic @@ -360,7 +358,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/crew_quarters/dorms name = "Dormitories" icon_state = "dorms" - safe = TRUE + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA /area/crew_quarters/dorms/barracks name = "Sleep Barracks" @@ -547,7 +545,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engine/atmospherics_engine name = "Atmospherics Engine" icon_state = "atmos_engine" - valid_territory = FALSE + area_flags = BLOBS_ALLOWED | UNIQUE_AREA /area/engine/engine_room //donut station specific name = "Engine Room" @@ -564,7 +562,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engine/supermatter name = "Supermatter Engine" icon_state = "engine_sm" - valid_territory = FALSE + area_flags = BLOBS_ALLOWED | UNIQUE_AREA /area/engine/break_room name = "Engineering Foyer" @@ -592,8 +590,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/solar requires_power = FALSE dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT - valid_territory = FALSE - blob_allowed = FALSE + area_flags = UNIQUE_AREA flags_1 = NONE ambientsounds = ENGINEERING airlock_wires = /datum/wires/airlock/engineering @@ -1046,9 +1043,9 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "tox_storage" /area/science/test_area - valid_territory = FALSE name = "Toxins Test Area" icon_state = "tox_test" + area_flags = BLOBS_ALLOWED | UNIQUE_AREA /area/science/mixing name = "Toxins Mixing Lab" @@ -1057,7 +1054,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/science/mixing/chamber name = "Toxins Mixing Chamber" icon_state = "tox_mix_chamber" - valid_territory = FALSE + area_flags = BLOBS_ALLOWED | UNIQUE_AREA /area/science/genetics name = "Genetics Lab" @@ -1120,7 +1117,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/storage/tcom name = "Telecomms Storage" icon_state = "tcom" - valid_territory = FALSE + area_flags = BLOBS_ALLOWED | UNIQUE_AREA /area/storage/eva name = "EVA Storage" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index c6211c6dd54..8f58dcbb3fb 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -13,25 +13,10 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT invisibility = INVISIBILITY_LIGHTING - /// Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints. - var/map_name - - /// If it's a valid territory for cult summoning or the CRAB-17 phone to spawn - var/valid_territory = TRUE - /// If blobs can spawn there and if it counts towards their score. - var/blob_allowed = TRUE - - /// If mining tunnel generation is allowed in this area - var/tunnel_allowed = FALSE - /// If flora are allowed to spawn in this area randomly through tunnel generation - var/flora_allowed = FALSE - /// If mobs can be spawned by natural random generation - var/mob_spawn_allowed = FALSE - /// If megafauna can be spawned by natural random generation - var/megafauna_spawn_allowed = FALSE + var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA var/fire = null - var/atmos = TRUE + ///Whether there is an atmos alarm in this area var/atmosalm = FALSE var/poweralm = TRUE var/lightswitch = TRUE @@ -43,11 +28,7 @@ /// If a room is too big it doesn't have beauty. var/beauty_threshold = 150 - var/requires_power = TRUE - /// This gets overridden to 1 for space in area/Initialize(). - var/always_unpowered = FALSE - - /// For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room) + /// For space, the asteroid, lavaland, etc. Used with blueprints or with weather to determine if we are adding a new area (vs editing a station room) var/outdoors = FALSE /// Size of the area in open turfs, only calculated for indoors areas. @@ -58,23 +39,16 @@ /// Mood message for being here, only shows up if mood_bonus != 0 var/mood_message = "This area is pretty nice!\n" + ///Will objects this area be needing power? + var/requires_power = TRUE + /// This gets overridden to 1 for space in area/Initialize(). + var/always_unpowered = FALSE + var/power_equip = TRUE var/power_light = TRUE var/power_environ = TRUE - var/has_gravity = 0 - /// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter) - var/noteleport = FALSE - /// Hides area from player Teleport function. - var/hidden = FALSE - /// Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers - var/safe = FALSE - /// If false, loading multiple maps with this area type will create multiple instances. - var/unique = TRUE - /// If people are allowed to suicide in it. Mostly for OOC stuff like minigames - var/block_suicide = FALSE - - var/no_air = null + var/has_gravity = FALSE var/parallax_movedir = 0 @@ -85,8 +59,7 @@ var/list/cameras var/list/firealarms var/firedoors_last_closed_on = 0 - /// Can the Xenobio management console transverse this area by default? - var/xenobiology_compatible = FALSE + ///Boolean to limit the areas (subtypes included) that atoms in this area can smooth with. Used for shuttles. var/area_limited_icon_smoothing = FALSE @@ -116,7 +89,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) /proc/process_teleport_locs() for(var/V in GLOB.sortedAreas) var/area/AR = V - if(istype(AR, /area/shuttle) || AR.noteleport) + if(istype(AR, /area/shuttle) || AR.area_flags & NOTELEPORT) continue if(GLOB.teleportlocs[AR.name]) continue @@ -136,7 +109,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) /area/New() // This interacts with the map loader, so it needs to be set immediately // rather than waiting for atoms to initialize. - if (unique) + if (area_flags & UNIQUE_AREA) GLOB.areas_by_type[type] = src power_usage = new /list(AREA_USAGE_LEN) // Some atoms would like to use power in Initialize() return ..() @@ -151,8 +124,6 @@ GLOBAL_LIST_EMPTY(teleportlocs) */ /area/Initialize() icon_state = "" - layer = AREA_LAYER - map_name = name // Save the initial (the name set in the map) name of the area. if(requires_power) luminosity = 0 @@ -259,9 +230,9 @@ GLOBAL_LIST_EMPTY(teleportlocs) * * Sends to all ai players, alert consoles, drones and alarm monitor programs in the world */ -/area/proc/atmosalert(danger_level, obj/source) - if(danger_level != atmosalm) - if (danger_level==2) +/area/proc/atmosalert(isdangerous, obj/source) + if(isdangerous != atmosalm) + if(isdangerous==TRUE) for (var/item in GLOB.silicon_mobs) var/mob/living/silicon/aiPlayer = item @@ -276,7 +247,7 @@ GLOBAL_LIST_EMPTY(teleportlocs) var/datum/computer_file/program/alarm_monitor/p = item p.triggerAlarm("Atmosphere", src, cameras, source) - else if (src.atmosalm == 2) + else for (var/item in GLOB.silicon_mobs) var/mob/living/silicon/aiPlayer = item aiPlayer.cancelAlarm("Atmosphere", src, source) @@ -290,9 +261,9 @@ GLOBAL_LIST_EMPTY(teleportlocs) var/datum/computer_file/program/alarm_monitor/p = item p.cancelAlarm("Atmosphere", src, source) - src.atmosalm = danger_level - return 1 - return 0 + atmosalm = isdangerous + return TRUE + return FALSE /** * Try to close all the firedoors in the area @@ -613,8 +584,8 @@ GLOBAL_LIST_EMPTY(teleportlocs) power_light = FALSE power_environ = FALSE always_unpowered = FALSE - valid_territory = FALSE - blob_allowed = FALSE + area_flags &= ~VALID_TERRITORY + area_flags &= ~BLOBS_ALLOWED addSorted() /** * Set the area size of the area diff --git a/code/game/area/areas/centcom.dm b/code/game/area/areas/centcom.dm index 97602c1ba21..ba81401a72e 100644 --- a/code/game/area/areas/centcom.dm +++ b/code/game/area/areas/centcom.dm @@ -7,8 +7,7 @@ dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE has_gravity = STANDARD_GRAVITY - noteleport = TRUE - blob_allowed = FALSE //Should go without saying, no blobs should take over centcom as a win condition. + area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT flags_1 = NONE /area/centcom/control @@ -106,7 +105,7 @@ dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE has_gravity = STANDARD_GRAVITY - noteleport = TRUE + area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT flags_1 = NONE //Abductors @@ -114,7 +113,7 @@ name = "Abductor Ship" icon_state = "yellow" requires_power = FALSE - noteleport = TRUE + area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT has_gravity = STANDARD_GRAVITY flags_1 = NONE @@ -124,8 +123,7 @@ icon_state = "syndie-ship" requires_power = FALSE has_gravity = STANDARD_GRAVITY - noteleport = TRUE - blob_allowed = FALSE //Not... entirely sure this will ever come up... but if the bus makes blobs AND ops, it shouldn't aim for the ops to win. + area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT flags_1 = NONE ambientsounds = HIGHSEC diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm index 558efe943b5..cdd8564d6c8 100644 --- a/code/game/area/areas/holodeck.dm +++ b/code/game/area/areas/holodeck.dm @@ -2,8 +2,8 @@ name = "Holodeck" icon_state = "Holodeck" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - flags_1 = 0 - hidden = TRUE + flags_1 = NONE + area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA var/obj/machinery/computer/holodeck/linked var/restricted = 0 // if true, program goes on emag list @@ -15,11 +15,11 @@ /area/holodeck/powered(chan) if(!requires_power) - return 1 + return TRUE if(always_unpowered) - return 0 + return FALSE if(!linked) - return 0 + return FALSE var/area/A = get_area(linked) ASSERT(!istype(A, /area/holodeck)) return A.powered(chan) diff --git a/code/game/area/areas/mining.dm b/code/game/area/areas/mining.dm index 7326bdb9d90..851cb7f79b4 100644 --- a/code/game/area/areas/mining.dm +++ b/code/game/area/areas/mining.dm @@ -3,7 +3,7 @@ /area/mine icon_state = "mining" has_gravity = STANDARD_GRAVITY - flora_allowed = TRUE + area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED /area/mine/explored name = "Mine" @@ -17,7 +17,7 @@ outdoors = TRUE flags_1 = NONE ambientsounds = MINING - flora_allowed = FALSE + area_flags = VALID_TERRITORY | UNIQUE_AREA /area/mine/unexplored name = "Mine" @@ -31,7 +31,7 @@ outdoors = TRUE flags_1 = NONE ambientsounds = MINING - tunnel_allowed = TRUE + area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | TUNNELS_ALLOWED /area/mine/lobby name = "Mining Station" @@ -92,8 +92,7 @@ icon_state = "mining" has_gravity = STANDARD_GRAVITY flags_1 = NONE - flora_allowed = TRUE - blob_allowed = FALSE + area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED /area/lavaland/surface name = "Lavaland" @@ -124,16 +123,15 @@ /area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here icon_state = "unexplored" - tunnel_allowed = TRUE - mob_spawn_allowed = TRUE + area_flags = VALID_TERRITORY | UNIQUE_AREA | TUNNELS_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED /area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here icon_state = "danger" - megafauna_spawn_allowed = TRUE + area_flags = VALID_TERRITORY | UNIQUE_AREA | TUNNELS_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED /area/lavaland/surface/outdoors/explored name = "Lavaland Labor Camp" - flora_allowed = FALSE + area_flags = VALID_TERRITORY | UNIQUE_AREA @@ -143,9 +141,7 @@ icon_state = "mining" has_gravity = STANDARD_GRAVITY flags_1 = NONE - flora_allowed = TRUE - blob_allowed = FALSE - valid_territory = FALSE + area_flags = UNIQUE_AREA | FLORA_ALLOWED /area/icemoon/surface name = "Icemoon" @@ -164,18 +160,17 @@ /area/icemoon/surface/outdoors/labor_camp name = "Icemoon Labor Camp" - flora_allowed = FALSE + area_flags = UNIQUE_AREA /area/icemoon/surface/outdoors/unexplored //monsters and ruins spawn here icon_state = "unexplored" - tunnel_allowed = TRUE - mob_spawn_allowed = TRUE + area_flags = UNIQUE_AREA | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | TUNNELS_ALLOWED /area/icemoon/surface/outdoors/unexplored/rivers // rivers spawn here icon_state = "danger" /area/icemoon/surface/outdoors/unexplored/rivers/no_monsters - mob_spawn_allowed = FALSE + area_flags = UNIQUE_AREA | FLORA_ALLOWED | TUNNELS_ALLOWED /area/icemoon/underground name = "Icemoon Caves" @@ -191,13 +186,11 @@ /area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here name = "Icemoon Caves" icon_state = "unexplored" - tunnel_allowed = TRUE - mob_spawn_allowed = TRUE - megafauna_spawn_allowed = TRUE + area_flags = UNIQUE_AREA | TUNNELS_ALLOWED | FLORA_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED /area/icemoon/underground/unexplored/rivers // rivers spawn here icon_state = "danger" /area/icemoon/underground/explored // ruins can't spawn here name = "Icemoon Underground" - flora_allowed = FALSE + area_flags = UNIQUE_AREA diff --git a/code/game/area/areas/ruins/_ruins.dm b/code/game/area/areas/ruins/_ruins.dm index f76ac7894fc..9cd5622122b 100644 --- a/code/game/area/areas/ruins/_ruins.dm +++ b/code/game/area/areas/ruins/_ruins.dm @@ -4,10 +4,9 @@ name = "\improper Unexplored Location" icon_state = "away" has_gravity = STANDARD_GRAVITY - hidden = TRUE + area_flags = HIDDEN_AREA | BLOBS_ALLOWED dynamic_lighting = DYNAMIC_LIGHTING_FORCED ambientsounds = RUINS - blob_allowed = FALSE flags_1 = CAN_BE_DIRTY_1 diff --git a/code/game/area/areas/ruins/space.dm b/code/game/area/areas/ruins/space.dm index 9f171b15a3a..b898e22c621 100644 --- a/code/game/area/areas/ruins/space.dm +++ b/code/game/area/areas/ruins/space.dm @@ -2,7 +2,7 @@ /area/ruin/space has_gravity = FALSE - blob_allowed = FALSE //Nope, no winning in space as a blob. Gotta eat the station. + area_flags = UNIQUE_AREA /area/ruin/space/has_grav has_gravity = STANDARD_GRAVITY @@ -10,21 +10,6 @@ /area/ruin/space/has_grav/powered requires_power = FALSE - -/area/ruin/fakespace - icon_state = "space" - requires_power = TRUE - always_unpowered = TRUE - dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - has_gravity = FALSE - power_light = FALSE - power_equip = FALSE - power_environ = FALSE - valid_territory = FALSE - outdoors = TRUE - ambientsounds = SPACE - blob_allowed = FALSE - ///////////// /area/ruin/space/way_home @@ -428,4 +413,4 @@ /area/ruin/space/has_grav/hellfactoryoffice name = "Hell Factory Office" icon_state = "red" - noteleport = TRUE + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | NOTELEPORT diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index 1e12fb23316..15776cb57c9 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -8,11 +8,9 @@ dynamic_lighting = DYNAMIC_LIGHTING_FORCED has_gravity = STANDARD_GRAVITY always_unpowered = FALSE - valid_territory = FALSE - icon_state = "shuttle" // Loading the same shuttle map at a different time will produce distinct area instances. - unique = FALSE - blob_allowed = FALSE + area_flags = NONE + icon_state = "shuttle" flags_1 = CAN_BE_DIRTY_1 area_limited_icon_smoothing = TRUE @@ -95,30 +93,25 @@ desc = "Weeeeee" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED -/area/shuttle/custom - name = "Custom player shuttle" - blob_allowed = TRUE - flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1 - /area/shuttle/arrival name = "Arrival Shuttle" - unique = TRUE // SSjob refers to this area for latejoiners + area_flags = UNIQUE_AREA// SSjob refers to this area for latejoiners /area/shuttle/pod_1 name = "Escape Pod One" - blob_allowed = TRUE + area_flags = BLOBS_ALLOWED /area/shuttle/pod_2 name = "Escape Pod Two" - blob_allowed = TRUE + area_flags = BLOBS_ALLOWED /area/shuttle/pod_3 name = "Escape Pod Three" - blob_allowed = TRUE + area_flags = BLOBS_ALLOWED /area/shuttle/pod_4 name = "Escape Pod Four" - blob_allowed = TRUE + area_flags = BLOBS_ALLOWED /area/shuttle/mining name = "Mining Shuttle" @@ -132,11 +125,11 @@ /area/shuttle/supply name = "Supply Shuttle" - noteleport = TRUE + area_flags = NOTELEPORT /area/shuttle/escape name = "Emergency Shuttle" - blob_allowed = TRUE + area_flags = BLOBS_ALLOWED flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1 /area/shuttle/escape/backup @@ -144,11 +137,11 @@ /area/shuttle/escape/luxury name = "Luxurious Emergency Shuttle" - noteleport = TRUE + area_flags = NOTELEPORT /area/shuttle/escape/arena name = "The Arena" - noteleport = TRUE + area_flags = NOTELEPORT /area/shuttle/escape/meteor name = "\proper a meteor with engines strapped to it" diff --git a/code/game/machinery/bank_machine.dm b/code/game/machinery/bank_machine.dm index 9633ede69bb..75a71ea2875 100644 --- a/code/game/machinery/bank_machine.dm +++ b/code/game/machinery/bank_machine.dm @@ -56,7 +56,7 @@ D.adjust_money(-200) if(next_warning < world.time && prob(15)) var/area/A = get_area(loc) - var/message = "Unauthorized credit withdrawal underway in [A.map_name]!!" + var/message = "Unauthorized credit withdrawal underway in [initial(A.name)]!!" radio.talk_into(src, message, radio_channel) next_warning = world.time + minimum_time_between_warnings diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index 9307a0781d5..221bc8a96e3 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -174,6 +174,6 @@ if(is_centcom_level(T.z) || is_away_level(T.z)) return FALSE var/area/A = get_area(T) - if(!A || A.noteleport) + if(!A ||(A.area_flags & NOTELEPORT)) return FALSE return TRUE diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 1558b9f04e5..d90b99471f7 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -34,7 +34,7 @@ if(in_use) return var/area/A = get_area(usr) - if(A.noteleport) + if(A.area_flags & NOTELEPORT) to_chat(usr, "You cannot edit restricted areas.") return in_use = TRUE diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 3cc0579e5d5..8b2fa120ca9 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -132,7 +132,7 @@ C.drunkenness = min(C.drunkenness + 20, 50) var/turf/current_location = get_turf(user) var/area/current_area = current_location.loc //copied from hand tele code - if(current_location && current_area && current_area.noteleport) + if(current_location && current_area && (current_area.area_flags & NOTELEPORT)) to_chat(user, "There is no escape. No recall or intervention can work in this place.") else to_chat(user, "There is no escape. Although recall or intervention can work in this place, attempting to flee from [src]'s immense power would be futile.") diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index dab0204bf57..39c9fa100b4 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -140,27 +140,27 @@ /obj/item/hand_tele/attack_self(mob/user) var/turf/current_location = get_turf(user)//What turf is the user on? var/area/current_area = current_location.loc - if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf + if(!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf to_chat(user, "\The [src] is malfunctioning.") return - var/list/L = list( ) + var/list/L = list() for(var/obj/machinery/computer/teleporter/com in GLOB.machines) if(com.target) var/area/A = get_area(com.target) - if(!A || A.noteleport) + if(!A || (A.area_flags & NOTELEPORT)) continue if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged) L["[get_area(com.target)] (Active)"] = com.target else L["[get_area(com.target)] (Inactive)"] = com.target - var/list/turfs = list( ) + var/list/turfs = list() for(var/turf/T in urange(10, orange=1)) if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb if(T.y>world.maxy-8 || T.y<8) continue var/area/A = T.loc - if(A.noteleport) + if(A.area_flags & NOTELEPORT) continue turfs += T if(turfs.len) @@ -173,12 +173,12 @@ return var/atom/T = L[t1] var/area/A = get_area(T) - if(A.noteleport) + if(A.area_flags & NOTELEPORT) to_chat(user, "\The [src] is malfunctioning.") return current_location = get_turf(user) //Recheck. current_area = current_location.loc - if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf + if(!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf to_chat(user, "\The [src] is malfunctioning.") return user.show_message("Locked In.", MSG_AUDIBLE) diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm index 83345d16132..a9cd245d34c 100644 --- a/code/game/objects/structures/ai_core.dm +++ b/code/game/objects/structures/ai_core.dm @@ -81,7 +81,7 @@ return FALSE var/turf/T = get_turf(src) var/area/A = get_area(src) - if(!A.blob_allowed) + if(!(A.area_flags & BLOBS_ALLOWED)) return FALSE if(!A.power_equip) return FALSE diff --git a/code/game/turfs/open/floor/plating/asteroid.dm b/code/game/turfs/open/floor/plating/asteroid.dm index f1d724ec7d9..a52f6496617 100644 --- a/code/game/turfs/open/floor/plating/asteroid.dm +++ b/code/game/turfs/open/floor/plating/asteroid.dm @@ -159,7 +159,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me /// Terrain that can spawn in the tunnel, weighted list var/list/terrain_spawn_list /// If the tunnel should keep being created - var/sanity = 1 + var/sanity = TRUE /// Cave direction to move var/forward_cave_dir = 1 /// Backwards cave direction for tracking @@ -318,8 +318,8 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me if(i > 3 && prob(20)) if(isarea(tunnel.loc)) var/area/A = tunnel.loc - if(!A.tunnel_allowed) - sanity = 0 + if(!(A.area_flags & TUNNELS_ALLOWED)) + sanity = FALSE break var/stored_flags = 0 if(tunnel.flags_1 & NO_RUINS_1) @@ -347,7 +347,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me return if(isarea(T.loc)) var/area/A = T.loc - if(!A.tunnel_allowed) + if(!(A.area_flags & TUNNELS_ALLOWED)) sanity = 0 return if(choose_turf_type) @@ -372,13 +372,13 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me return var/area/A = loc if(prob(30)) - if(!A.mob_spawn_allowed) + if(!(A.area_flags & MOB_SPAWN_ALLOWED)) return var/randumb = pickweight(mob_spawn_list) if(!randumb) return while(randumb == SPAWN_MEGAFAUNA) - if(A.megafauna_spawn_allowed && megafauna_spawn_list && megafauna_spawn_list.len) //this is danger. it's boss time. + if((A.area_flags & MEGAFAUNA_SPAWN_ALLOWED) && megafauna_spawn_list && megafauna_spawn_list.len) //this is danger. it's boss time. var/maybe_boss = pickweight(megafauna_spawn_list) if(megafauna_spawn_list[maybe_boss]) randumb = maybe_boss @@ -409,7 +409,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me if(prob(12)) if(isarea(loc)) var/area/A = loc - if(!A.flora_allowed) + if(!(A.area_flags & FLORA_ALLOWED)) return var/randumb = pickweight(flora_spawn_list) if(!randumb) @@ -425,7 +425,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me if(prob(1)) if(isarea(loc)) var/area/A = loc - if(!A.flora_allowed) + if(!(A.area_flags & FLORA_ALLOWED)) return var/randumb = pickweight(terrain_spawn_list) if(!randumb) diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 2bdee0de699..583a9fb0067 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -93,7 +93,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) /mob/camera/blob/proc/is_valid_turf(turf/T) var/area/A = get_area(T) - if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T)) + if((A && !(A.area_flags & BLOBS_ALLOWED)) || !T || !is_station_level(T.z) || isspaceturf(T)) return FALSE return TRUE @@ -140,7 +140,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) var/area/Ablob = get_area(T) - if(!Ablob.blob_allowed) + if(!(Ablob.area_flags & BLOBS_ALLOWED)) continue if(!(ROLE_BLOB in L.faction)) @@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) for(var/area/A in GLOB.sortedAreas) if(!(A.type in GLOB.the_station_areas)) continue - if(!A.blob_allowed) + if(!(A.area_flags & BLOBS_ALLOWED)) continue A.color = blobstrain.color A.name = "blob" diff --git a/code/modules/antagonists/blob/powers.dm b/code/modules/antagonists/blob/powers.dm index 8425029cace..394306df0dd 100644 --- a/code/modules/antagonists/blob/powers.dm +++ b/code/modules/antagonists/blob/powers.dm @@ -29,7 +29,7 @@ to_chat(src, "This spot is too dense to place a blob core on!") return 0 var/area/A = get_area(T) - if(isspaceturf(T) || A && !A.blob_allowed) + if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED)) to_chat(src, "You cannot place your core here!") return 0 for(var/obj/O in T) @@ -93,7 +93,7 @@ return if(needsNode) var/area/A = get_area(src) - if(!A.blob_allowed) //factory and resource blobs must be legit + if(!(A.area_flags & BLOBS_ALLOWED)) //factory and resource blobs must be legit to_chat(src, "This type of blob must be placed on the station!") return if(nodes_required && !(locate(/obj/structure/blob/node) in orange(3, T)) && !(locate(/obj/structure/blob/core) in orange(4, T))) @@ -219,7 +219,7 @@ to_chat(src, "You have no core and are about to die! May you rest in peace.") return var/area/A = get_area(T) - if(isspaceturf(T) || A && !A.blob_allowed) + if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED)) to_chat(src, "You cannot relocate your core here!") return if(!can_buy(80)) diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index cf465806d1c..01a2a52d900 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -25,7 +25,7 @@ if(owner_overmind) overmind = owner_overmind var/area/Ablob = get_area(src) - if(Ablob.blob_allowed) //Is this area allowed for winning as blob? + if(Ablob.area_flags & BLOBS_ALLOWED) //Is this area allowed for winning as blob? overmind.blobs_legit += src GLOB.blobs += src //Keep track of the blob in the normal list either way setDir(pick(GLOB.cardinals)) diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index d9bc0ef102e..6ab1d073506 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -361,9 +361,9 @@ ..() var/sanity = 0 while(summon_spots.len < SUMMON_POSSIBILITIES && sanity < 100) - var/area/summon = pick(GLOB.sortedAreas - summon_spots) - if(summon && is_station_level(summon.z) && summon.valid_territory) - summon_spots += summon + var/area/summon_area = pick(GLOB.sortedAreas - summon_spots) + if(summon_area && is_station_level(summon_area.z) && (summon_area.area_flags & VALID_TERRITORY)) + summon_spots += summon_area sanity++ update_explanation_text() diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm index 95df4de39ac..65c7613a9c1 100644 --- a/code/modules/antagonists/cult/ritual.dm +++ b/code/modules/antagonists/cult/ritual.dm @@ -74,7 +74,7 @@ This file contains the cult dagger and rune list code A = get_area(src) if(!src || QDELETED(src) || !Adjacent(user) || user.incapacitated() || !check_rune_turf(Turf, user)) return - if(ispath(rune_to_scribe, /obj/effect/rune/summon) && (!is_station_level(Turf.z) || A.map_name == "Space")) + if(ispath(rune_to_scribe, /obj/effect/rune/summon) && (!is_station_level(Turf.z) || initial(A.name) == "Space")) to_chat(user, "The veil is not weak enough here to summon a cultist, you must be on station!") return if(ispath(rune_to_scribe, /obj/effect/rune/apocalypse)) @@ -113,7 +113,7 @@ This file contains the cult dagger and rune list code if(!(A in summon_objective.summon_spots)) // Check again to make sure they didn't move to_chat(user, "The Geometer can only be summoned where the veil is weak - in [english_list(summon_objective.summon_spots)]!") return - priority_announce("Figments from an eldritch god are being summoned by [user] into [A.map_name] from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/ai/spanomalies.ogg') + priority_announce("Figments from an eldritch god are being summoned by [user] into [initial(A.name)] from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/ai/spanomalies.ogg') for(var/B in spiral_range_turfs(1, user, 1)) var/obj/structure/emergency_shield/cult/narsie/N = new(B) shields += N diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 3e3675fbb18..428cae85fa4 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -417,7 +417,7 @@ structure_check() searches for nearby cultist structures required for the invoca actual_selected_rune.handle_portal("lava") else var/area/A = get_area(T) - if(A.map_name == "Space") + if(initial(A.name) == "Space") actual_selected_rune.handle_portal("space", T) if(movesuccess) target.visible_message("There is a boom of outrushing air as something appears above the rune!", null, "You hear a boom.") diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 2a65838dde2..3e6b52bbc31 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -426,12 +426,12 @@ . = TRUE if("alarm") var/area/A = get_area(src) - if(A.atmosalert(2, src)) + if(A.atmosalert(TRUE, src)) post_alert(2) . = TRUE if("reset") var/area/A = get_area(src) - if(A.atmosalert(0, src)) + if(A.atmosalert(FALSE, src)) post_alert(0) . = TRUE update_icon() @@ -705,7 +705,7 @@ var/new_area_danger_level = 0 for(var/obj/machinery/airalarm/AA in A) if (!(AA.machine_stat & (NOPOWER|BROKEN)) && !AA.shorted) - new_area_danger_level = max(new_area_danger_level,AA.danger_level) + new_area_danger_level = clamp(max(new_area_danger_level, AA.danger_level), 0,1) if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state post_alert(new_area_danger_level) diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index 19b12e4f473..b9c60c25843 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -242,7 +242,7 @@ /mob/living/proc/canSuicide() var/area/A = get_area(src) - if(A.block_suicide) + if(A.area_flags & BLOCK_SUICIDE) to_chat(src, "You can't commit suicide here! You can ghost if you'd like.") return switch(stat) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 01b3e7159a5..200c47eca93 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -18,8 +18,6 @@ var/list/head_announce = null //Bitflags for the job - var/flag = NONE //Deprecated - var/department_flag = NONE //Deprecated var/auto_deadmin_role_flags = NONE //Players will be allowed to spawn in as jobs that are set to "Station" diff --git a/code/modules/mafia/map_pieces.dm b/code/modules/mafia/map_pieces.dm index 028587ffdba..c367acc2a84 100644 --- a/code/modules/mafia/map_pieces.dm +++ b/code/modules/mafia/map_pieces.dm @@ -33,7 +33,7 @@ requires_power = FALSE has_gravity = STANDARD_GRAVITY flags_1 = NONE - block_suicide = TRUE + area_flags = BLOCK_SUICIDE | UNIQUE_AREA /datum/map_template/mafia var/description = "" diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index ed16f819d3d..a5d7d54fddf 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -5,7 +5,7 @@ dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE has_gravity = STANDARD_GRAVITY - valid_territory = FALSE + area_flags = BLOBS_ALLOWED | UNIQUE_AREA flags_1 = CAN_BE_DIRTY_1 //Survival Capsule diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index f4412c854c6..1951c8f764a 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -324,7 +324,7 @@ /obj/item/warp_cube/attack_self(mob/user) var/turf/current_location = get_turf(user) var/area/current_area = current_location.loc - if(!linked || current_area.noteleport) + if(!linked || (current_area.area_flags & NOTELEPORT)) to_chat(user, "[src] fizzles uselessly.") return if(teleporting) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 95654600fae..ee8548fb31c 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -409,7 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/list/filtered = list() for(var/V in GLOB.sortedAreas) var/area/A = V - if(!A.hidden) + if(!(A.area_flags & HIDDEN_AREA)) filtered += A var/area/thearea = input("Area to jump to", "BOOYEA") as null|anything in filtered diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 401f97fc730..a444b6e0f13 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -92,12 +92,8 @@ name = "ai_multicam_room" icon_state = "ai_camera_room" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - valid_territory = FALSE - ambientsounds = list() - blob_allowed = FALSE - noteleport = TRUE - hidden = TRUE - safe = TRUE + area_flags = NOTELEPORT | HIDDEN_AREA | UNIQUE_AREA + ambientsounds = null flags_1 = NONE GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index c8de00f5f5f..6971666b7e8 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -383,7 +383,7 @@ if(S.using_special) return var/area/A = get_area(S) - if(!A.valid_territory) + if(!(A.area_flags & VALID_TERRITORY)) to_chat(S, "You can't summon a rift here! Try summoning somewhere secure within the station!") return for(var/obj/structure/carp_rift/rift in S.rift_list) @@ -492,10 +492,10 @@ notify_ghosts("The carp rift can summon an additional carp!", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Carp Spawn Available") if(time_charged == (max_charge - 120)) var/area/A = get_area(src) - priority_announce("A rift is causing an unnaturally large energy flux in [A.map_name]. Stop it at all costs!", "Central Command Spatial Corps", 'sound/ai/spanomalies.ogg') + priority_announce("A rift is causing an unnaturally large energy flux in [initial(A.name)]. Stop it at all costs!", "Central Command Spatial Corps", 'sound/ai/spanomalies.ogg') if(time_charged == max_charge) var/area/A = get_area(src) - priority_announce("Spatial object has reached peak energy charge in [A.map_name], please stand-by.", "Central Command Spatial Corps") + priority_announce("Spatial object has reached peak energy charge in [initial(A.name)], please stand-by.", "Central Command Spatial Corps") obj_integrity = INFINITY desc = "A rift akin to the ones space carp use to travel long distances. This one is fully charged, and is capable of bringing many carp to the station's location." icon_state = "carp_rift_charged" diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index d12b97a21d8..c54540d24a2 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -12,7 +12,7 @@ /mob/camera/ai_eye/remote/xenobio/setLoc(t) var/area/new_area = get_area(t) - if(new_area && new_area.name == allowed_area || new_area && new_area.xenobiology_compatible) + if(new_area && new_area.name == allowed_area || new_area && (new_area.area_flags & XENOBIOLOGY_COMPATIBLE)) return ..() else return @@ -397,7 +397,7 @@ var/mob/living/C = user var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control var/area/mobarea = get_area(S.loc) - if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible) + if(mobarea.name == E.allowed_area || (mobarea & XENOBIOLOGY_COMPATIBLE)) slime_scan(S, C) //Feeds a potion to slime @@ -412,7 +412,7 @@ if(QDELETED(X.current_potion)) to_chat(C, "No potion loaded.") return - if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible) + if(mobarea.name == E.allowed_area ||(mobarea & XENOBIOLOGY_COMPATIBLE)) X.current_potion.attack(S, C) //Picks up slime @@ -424,7 +424,7 @@ var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin var/area/mobarea = get_area(S.loc) - if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible) + if(mobarea.name == E.allowed_area || (mobarea & XENOBIOLOGY_COMPATIBLE)) if(X.stored_slimes.len >= X.max_slimes) to_chat(C, "Slime storage is full.") return @@ -446,7 +446,7 @@ var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin var/area/turfarea = get_area(T) - if(turfarea.name == E.allowed_area || turfarea.xenobiology_compatible) + if(turfarea.name == E.allowed_area || (turfarea & XENOBIOLOGY_COMPATIBLE)) for(var/mob/living/simple_animal/slime/S in X.stored_slimes) S.forceMove(T) S.visible_message("[S] warps in!") @@ -461,7 +461,7 @@ var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin var/area/turfarea = get_area(T) - if(turfarea.name == E.allowed_area || turfarea.xenobiology_compatible) + if(turfarea.name == E.allowed_area || (turfarea & XENOBIOLOGY_COMPATIBLE)) if(X.monkeys >= 1) var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(T, TRUE, C) if (!QDELETED(food)) @@ -484,7 +484,7 @@ if(!X.connected_recycler) to_chat(C, "There is no connected monkey recycler. Use a multitool to link one.") return - if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible) + if(mobarea.name == E.allowed_area || (mobarea & XENOBIOLOGY_COMPATIBLE)) if(!M.stat) return M.visible_message("[M] vanishes as [p_theyre()] reclaimed for recycling!") diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 9684a16dd71..366d488b696 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -1072,5 +1072,5 @@ for(var/turf/T in A) T.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) T.add_atom_colour("#2956B2", FIXED_COLOUR_PRIORITY) - A.xenobiology_compatible = TRUE + A.area_flags |= XENOBIOLOGY_COMPATIBLE qdel(src) diff --git a/code/modules/ruins/spaceruin_code/forgottenship.dm b/code/modules/ruins/spaceruin_code/forgottenship.dm index 2dd4043b244..e46260adf81 100644 --- a/code/modules/ruins/spaceruin_code/forgottenship.dm +++ b/code/modules/ruins/spaceruin_code/forgottenship.dm @@ -123,7 +123,7 @@ GLOBAL_VAR_INIT(fscpassword, generate_password()) name = "Syndicate Forgotten Vault" icon_state = "syndie-ship" ambientsounds = list('sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg') - noteleport = TRUE + area_flags = NOTELEPORT | UNIQUE_AREA //Cybersun hardsuit diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 29baeae306f..a89d6f62fed 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -1,6 +1,7 @@ GLOBAL_VAR_INIT(hhStorageTurf, null) GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) +// Someone for the love of god kill whoever indented this with spaces /obj/item/hilbertshotel name = "Hilbert's Hotel" desc = "A sphere of what appears to be an intricate network of bluespace. Observing it in detail seems to give you a headache as you try to comprehend the infinite amount of infinitesimally distinct points on its surface." @@ -305,19 +306,17 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) qdel(src) /area/hilbertshotel - name = "Hilbert's Hotel Room" - icon_state = "hilbertshotel" - requires_power = FALSE - has_gravity = TRUE - noteleport = TRUE - hidden = TRUE - unique = FALSE - dynamic_lighting = DYNAMIC_LIGHTING_FORCED - ambientsounds = list('sound/ambience/servicebell.ogg') - var/roomnumber = 0 - var/obj/item/hilbertshotel/parentSphere - var/datum/turf_reservation/reservation - var/turf/storageTurf + name = "Hilbert's Hotel Room" + icon_state = "hilbertshotel" + requires_power = FALSE + has_gravity = TRUE + area_flags = NOTELEPORT | HIDDEN_AREA + dynamic_lighting = DYNAMIC_LIGHTING_FORCED + ambientsounds = list('sound/ambience/servicebell.ogg') + var/roomnumber = 0 + var/obj/item/hilbertshotel/parentSphere + var/datum/turf_reservation/reservation + var/turf/storageTurf /area/hilbertshotel/Entered(atom/movable/AM) . = ..() @@ -386,9 +385,8 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) name = "Hilbert's Hotel Storage Room" icon_state = "hilbertshotel" requires_power = FALSE + area_flags = HIDDEN_AREA | NOTELEPORT | UNIQUE_AREA has_gravity = TRUE - noteleport = TRUE - hidden = TRUE /obj/item/abstracthotelstorage anchored = TRUE