From 183c5af2e4888521a05d9fa6f0acc188f2292a92 Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Sat, 22 Nov 2025 14:24:41 -0500 Subject: [PATCH] Adds flag for virtual areas, fixes being able to send funds from virtualspace to real accounts (#94071) ## About The Pull Request Fixes https://github.com/tgstation/tgstation/issues/90641 Fixes https://github.com/tgstation/tgstation/issues/88366 Eliminates worries over virtualspace currency being sent to real accounts. When I was looking into why there were no flags for bitrunning areas. Then I saw this mess: Code_2we2QjDyFp Not having enough space / being too lazy to refactor this is a silly reason to not include flags for something like these virtual areas where it can be quite helpful. Fortunately I am not too lazy ~~in this moment~~ so here we go: It was fairly logical to move over some of these to a separate flag, which I've called `area_flags_mapping` since they pertain to maploading things and terrain generation mostly. `area_flags` stays reserved for general properties and now has more room than it did before for you people to fill it with. In doing this it's also neatened up the code quit a bit, as UNIQUE_AREA was kind of everywhere and now that it's implied by default less areas need to have it defined (or explicitly un-defined).
Working as intended dreamseeker_p0Qts36tG1 dreamseeker_Ek7TXCcpbA
## Why It's Good For The Game Fixes an exploit, improves the area flags situation slightly. ## Changelog :cl: fix: you can no longer send money from virtualspace to a real account code: adds a flag for virtual areas so they can easily be checked, as well as an easy helper proc, 'is_area_virtual(your_area)' /:cl: --- code/__DEFINES/_flags.dm | 59 ++++++++++--------- code/__DEFINES/is_helpers.dm | 1 + code/_globalvars/bitfields.dm | 34 +++++++---- code/controllers/subsystem/mapping.dm | 2 +- .../subsystem/persistence/engravings.dm | 2 +- code/datums/mapgen/CaveGenerator.dm | 18 +++--- code/datums/mapgen/biomes/_biome.dm | 1 - code/game/area/areas.dm | 7 ++- code/game/area/areas/away_content.dm | 5 +- code/game/area/areas/centcom.dm | 18 +++--- code/game/area/areas/mining.dm | 52 ++++++++-------- code/game/area/areas/misc.dm | 2 +- code/game/area/areas/ruins/_ruins.dm | 2 +- code/game/area/areas/ruins/icemoon.dm | 4 +- code/game/area/areas/ruins/lavaland.dm | 1 + code/game/area/areas/ruins/space.dm | 14 ++--- code/game/area/areas/shuttles.dm | 13 +--- code/game/area/areas/station/common.dm | 2 +- code/game/area/areas/station/engineering.dm | 8 +-- code/game/area/areas/station/hallway.dm | 2 +- code/game/area/areas/station/maintenance.dm | 4 +- code/game/area/areas/station/misc.dm | 2 +- code/game/area/areas/station/science.dm | 8 +-- code/game/area/areas/station/security.dm | 2 +- code/game/area/areas/station/service.dm | 4 +- code/game/area/areas/station/solars.dm | 6 +- .../sacrifice_knowledge/sacrifice_map.dm | 2 +- .../voidwalker/voidwalker_kidnap.dm | 2 +- code/modules/awaymissions/cordon.dm | 2 +- .../basketball/basketball_map_loading.dm | 2 +- code/modules/bitrunning/areas.dm | 33 ++++++++--- .../bitrunning/components/virtual_entity.dm | 2 +- code/modules/deathmatch/deathmatch_mapping.dm | 2 +- .../ruins/spaceruin_code/anomalyresearch.dm | 2 +- .../ruins/spaceruin_code/forgottenship.dm | 2 +- .../ruins/spaceruin_code/hilbertshotel.dm | 6 +- code/modules/mining/equipment/survival_pod.dm | 2 +- .../modules/mob/living/silicon/ai/multicam.dm | 2 +- .../file_system/programs/nt_pay.dm | 5 ++ 39 files changed, 184 insertions(+), 153 deletions(-) diff --git a/code/__DEFINES/_flags.dm b/code/__DEFINES/_flags.dm index 6fcac62c8cb..8b2ea7bf320 100644 --- a/code/__DEFINES/_flags.dm +++ b/code/__DEFINES/_flags.dm @@ -100,52 +100,55 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 /// This atom is a pseudo-floor that blocks map generation's checkPlaceAtom() from placing things like trees ontop of it. #define TURF_BLOCKS_POPULATE_TERRAIN_FLORAFEATURES (1<<8) - ////////////////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 CAVES_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) +#define NOTELEPORT (1<<2) /// 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) +#define HIDDEN_AREA (1<<3) /// If people are allowed to suicide in it. Mostly for OOC stuff like minigames -#define BLOCK_SUICIDE (1<<9) +#define BLOCK_SUICIDE (1<<5) /// If set, this area will be innately traversable by Xenobiology camera consoles. -#define XENOBIOLOGY_COMPATIBLE (1<<10) +#define XENOBIOLOGY_COMPATIBLE (1<<6) /// If blood cultists can draw runes or build structures on this AREA. -#define CULT_PERMITTED (1<<11) -/// If engravings are persistent in this area -#define PERSISTENT_ENGRAVINGS (1<<12) +#define CULT_PERMITTED (1<<7) /// Mobs that die in this area don't produce a dead chat message -#define NO_DEATH_MESSAGE (1<<13) +#define NO_DEATH_MESSAGE (1<<8) /// This area should have extra shielding from certain event effects -#define EVENT_PROTECTED (1<<14) +#define EVENT_PROTECTED (1<<9) /// This Area Doesn't have Flood or Bomb Admin Messages, but will still log -#define QUIET_LOGS (1<<15) -/// This area does not allow virtual entities to enter. -#define VIRTUAL_SAFE_AREA (1<<16) +#define QUIET_LOGS (1<<10) /// This area does not allow the Binary channel -#define BINARY_JAMMING (1<<17) +#define BINARY_JAMMING (1<<11) /// This area prevents Bag of Holding rifts from being opened. -#define NO_BOH (1<<18) +#define NO_BOH (1<<12) /// This area prevents fishing from removing unique/limited loot from sources that're also used outside of it. -#define UNLIMITED_FISHING (1<<19) +#define UNLIMITED_FISHING (1<<13) /// This area is prevented from having gravity (ie. space, nearstation, or outside solars) -#define NO_GRAVITY (1<<20) +#define NO_GRAVITY (1<<14) /// This area can be teleported in, but -only- to locations within that same area. -#define LOCAL_TELEPORT (1<<21) +#define LOCAL_TELEPORT (1<<15) + +////////////////Area Mapping Flags\\\\\\\\\\\\\\ +/// If false, loading multiple maps with this area type will create multiple instances. +#define UNIQUE_AREA (1<<0) +/// If mining tunnel generation is allowed in this area +#define CAVES_ALLOWED (1<<1) +/// If flora are allowed to spawn in this area randomly through tunnel generation +#define FLORA_ALLOWED (1<<2) +/// If mobs can be spawned by natural random generation +#define MOB_SPAWN_ALLOWED (1<<3) +/// If megafauna can be spawned by natural random generation +#define MEGAFAUNA_SPAWN_ALLOWED (1<<4) +/// If engravings are persistent in this area +#define PERSISTENT_ENGRAVINGS (1<<5) +/// This is a virtual/bitrunning area +#define VIRTUAL_AREA (1<<6) +/// This area does not allow virtual entities to enter. +#define VIRTUAL_SAFE_AREA (1<<7) /* These defines are used specifically with the atom/pass_flags bitmask diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 50c1a054b77..41339199d34 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -350,3 +350,4 @@ GLOBAL_LIST_INIT(book_types, typecacheof(list( #define is_multi_tile_object(atom) (atom.bound_width > ICON_SIZE_X || atom.bound_height > ICON_SIZE_Y) #define is_area_nearby_station(checked_area) (istype(checked_area, /area/space) || istype(checked_area, /area/space/nearstation) || istype(checked_area, /area/station/asteroid)) +#define is_area_virtual(checked_area) (GLOB.virtual_areas && GLOB.virtual_areas[(checked_area).type]) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index f031c8d7b79..1abddde7448 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -61,22 +61,32 @@ DEFINE_BITFIELD(appearance_flags, list( )) DEFINE_BITFIELD(area_flags, list( - "BLOBS_ALLOWED" = BLOBS_ALLOWED, - "BLOCK_SUICIDE" = BLOCK_SUICIDE, - "CAVES_ALLOWED" = CAVES_ALLOWED, - "CULT_PERMITTED" = CULT_PERMITTED, - "FLORA_ALLOWED" = FLORA_ALLOWED, - "HIDDEN_AREA" = HIDDEN_AREA, - "MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED, - "MOB_SPAWN_ALLOWED" = MOB_SPAWN_ALLOWED, - "NOTELEPORT" = NOTELEPORT, - "NO_DEATH_MESSAGE" = NO_DEATH_MESSAGE, - "PERSISTENT_ENGRAVINGS" = PERSISTENT_ENGRAVINGS, - "UNIQUE_AREA" = UNIQUE_AREA, "VALID_TERRITORY" = VALID_TERRITORY, + "BLOBS_ALLOWED" = BLOBS_ALLOWED, + "NOTELEPORT" = NOTELEPORT, + "HIDDEN_AREA" = HIDDEN_AREA, + "BLOCK_SUICIDE" = BLOCK_SUICIDE, "XENOBIOLOGY_COMPATIBLE" = XENOBIOLOGY_COMPATIBLE, + "CULT_PERMITTED" = CULT_PERMITTED, + "NO_DEATH_MESSAGE" = NO_DEATH_MESSAGE, + "EVENT_PROTECTED" = EVENT_PROTECTED, + "QUIET_LOGS" = QUIET_LOGS, + "BINARY_JAMMING" = BINARY_JAMMING, "NO_BOH" = NO_BOH, "UNLIMITED_FISHING" = UNLIMITED_FISHING, + "NO_GRAVITY" = NO_GRAVITY, + "LOCAL_TELEPORT" = LOCAL_TELEPORT, +)) + +DEFINE_BITFIELD(area_flags_mapping, list( + "UNIQUE_AREA" = UNIQUE_AREA, + "CAVES_ALLOWED" = CAVES_ALLOWED, + "FLORA_ALLOWED" = FLORA_ALLOWED, + "MOB_SPAWN_ALLOWED" = MOB_SPAWN_ALLOWED, + "MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED, + "PERSISTENT_ENGRAVINGS" = PERSISTENT_ENGRAVINGS, + "VIRTUAL_AREA" = VIRTUAL_AREA, + "VIRTUAL_SAFE_AREA" = VIRTUAL_SAFE_AREA, )) DEFINE_BITFIELD(turf_flags, list( diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 754aa17880b..caec055f21f 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -486,7 +486,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) /// Generates the global station area list, filling it with typepaths of unique areas found on the station Z. /datum/controller/subsystem/mapping/proc/generate_station_area_list() for(var/area/station/station_area in GLOB.areas) - if (!(station_area.area_flags & UNIQUE_AREA)) + if (!(station_area.area_flags_mapping & UNIQUE_AREA)) continue if (is_station_level(station_area.z)) GLOB.the_station_areas += station_area.type diff --git a/code/controllers/subsystem/persistence/engravings.dm b/code/controllers/subsystem/persistence/engravings.dm index ad00c7909d7..c60f5ae524b 100644 --- a/code/controllers/subsystem/persistence/engravings.dm +++ b/code/controllers/subsystem/persistence/engravings.dm @@ -62,7 +62,7 @@ if(!engraving.persistent_save) continue var/area/engraved_area = get_area(engraving.parent) - if(!(engraved_area.area_flags & PERSISTENT_ENGRAVINGS)) + if(!(engraved_area.area_flags_mapping & PERSISTENT_ENGRAVINGS)) continue saved_data["entries"] += engraving.save_persistent() diff --git a/code/datums/mapgen/CaveGenerator.dm b/code/datums/mapgen/CaveGenerator.dm index ec27a7d4b8f..3641edb4d93 100644 --- a/code/datums/mapgen/CaveGenerator.dm +++ b/code/datums/mapgen/CaveGenerator.dm @@ -104,7 +104,7 @@ /datum/map_generator/cave_generator/generate_terrain(list/turfs, area/generate_in) . = ..() - if(!(generate_in.area_flags & CAVES_ALLOWED)) + if(!(generate_in.area_flags_mapping & CAVES_ALLOWED)) return if(length(possible_biomes)) @@ -138,7 +138,7 @@ * you're probably doing something wrong. */ /datum/map_generator/cave_generator/proc/generate_terrain_with_biomes(list/turfs, area/generate_in) - if(!(generate_in.area_flags & CAVES_ALLOWED)) + if(!(generate_in.area_flags_mapping & CAVES_ALLOWED)) return var/humidity_seed = rand(0, 50000) @@ -212,10 +212,10 @@ return populate_terrain_with_biomes(turfs, generate_in) // Area var pullouts to make accessing in the loop faster - var/flora_allowed = (generate_in.area_flags & FLORA_ALLOWED) && length(flora_spawn_list) - var/feature_allowed = (generate_in.area_flags & FLORA_ALLOWED) && length(feature_spawn_list) - var/mobs_allowed = (generate_in.area_flags & MOB_SPAWN_ALLOWED) && length(mob_spawn_list) - var/megas_allowed = (generate_in.area_flags & MEGAFAUNA_SPAWN_ALLOWED) && length(megafauna_spawn_list) + var/flora_allowed = (generate_in.area_flags_mapping & FLORA_ALLOWED) && length(flora_spawn_list) + var/feature_allowed = (generate_in.area_flags_mapping & FLORA_ALLOWED) && length(feature_spawn_list) + var/mobs_allowed = (generate_in.area_flags_mapping & MOB_SPAWN_ALLOWED) && length(mob_spawn_list) + var/megas_allowed = (generate_in.area_flags_mapping & MEGAFAUNA_SPAWN_ALLOWED) && length(megafauna_spawn_list) var/start_time = REALTIMEOFDAY @@ -310,9 +310,9 @@ */ /datum/map_generator/cave_generator/proc/populate_terrain_with_biomes(list/turfs, area/generate_in) // Area var pullouts to make accessing in the loop faster - var/flora_allowed = (generate_in.area_flags & FLORA_ALLOWED) - var/features_allowed = (generate_in.area_flags & FLORA_ALLOWED) - var/fauna_allowed = (generate_in.area_flags & MOB_SPAWN_ALLOWED) + var/flora_allowed = (generate_in.area_flags_mapping & FLORA_ALLOWED) + var/features_allowed = (generate_in.area_flags_mapping & FLORA_ALLOWED) + var/fauna_allowed = (generate_in.area_flags_mapping & MOB_SPAWN_ALLOWED) var/start_time = REALTIMEOFDAY diff --git a/code/datums/mapgen/biomes/_biome.dm b/code/datums/mapgen/biomes/_biome.dm index a0672059d93..bda1029f431 100644 --- a/code/datums/mapgen/biomes/_biome.dm +++ b/code/datums/mapgen/biomes/_biome.dm @@ -136,7 +136,6 @@ if(!(flora_allowed && length(flora_types)) && !(features_allowed && length(feature_types)) && !(fauna_allowed && length(fauna_types))) return - for(var/turf/target_turf as anything in target_turfs) // We do the CHECK_TICK here because there's a bunch of continue calls // in this. diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 6334466534c..c9692021a01 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -24,7 +24,10 @@ /// This uses the same nested list format as turfs_by_zlevel var/list/list/turf/turfs_to_uncontain_by_zlevel = list() - var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + /// General flag for area properties + var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | CULT_PERMITTED + /// Flag for mapping related area properties (such as cavegen) + var/area_flags_mapping = UNIQUE_AREA ///Do we have an active fire alarm? var/fire = FALSE @@ -165,7 +168,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 (area_flags & UNIQUE_AREA) + if (area_flags_mapping & UNIQUE_AREA) GLOB.areas_by_type[type] = src GLOB.areas += src energy_usage = new /list(AREA_USAGE_LEN) // Some atoms would like to use power in Initialize() diff --git a/code/game/area/areas/away_content.dm b/code/game/area/areas/away_content.dm index 648ef4c8d31..39d7ebce1db 100644 --- a/code/game/area/areas/away_content.dm +++ b/code/game/area/areas/away_content.dm @@ -11,7 +11,6 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30" default_gravity = STANDARD_GRAVITY ambience_index = AMBIENCE_AWAY sound_environment = SOUND_ENVIRONMENT_ROOM - area_flags = UNIQUE_AREA /area/awaymission/museum name = "Nanotrasen Museum" @@ -33,11 +32,11 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30" name = "Super Secret Room" static_lighting = FALSE base_lighting_alpha = 255 - area_flags = UNIQUE_AREA|NOTELEPORT + area_flags = NOTELEPORT default_gravity = STANDARD_GRAVITY /area/awaymission/secret - area_flags = UNIQUE_AREA|NOTELEPORT|HIDDEN_AREA + area_flags = NOTELEPORT|HIDDEN_AREA /area/awaymission/secret/unpowered always_unpowered = TRUE diff --git a/code/game/area/areas/centcom.dm b/code/game/area/areas/centcom.dm index 06a87345f9c..58d0439eed3 100644 --- a/code/game/area/areas/centcom.dm +++ b/code/game/area/areas/centcom.dm @@ -8,7 +8,7 @@ static_lighting = TRUE requires_power = FALSE default_gravity = STANDARD_GRAVITY - area_flags = UNIQUE_AREA | NOTELEPORT + area_flags = NOTELEPORT flags_1 = NONE // This is just to define the category @@ -142,7 +142,6 @@ name = "Thunderdome Observation" icon_state = "thunder_observe" - // ENEMY // Wizard @@ -152,16 +151,15 @@ static_lighting = TRUE requires_power = FALSE default_gravity = STANDARD_GRAVITY - area_flags = UNIQUE_AREA | NOTELEPORT + area_flags = NOTELEPORT flags_1 = NONE - //Abductors /area/centcom/abductor_ship name = "Abductor Ship" icon_state = "abductor_ship" requires_power = FALSE - area_flags = UNIQUE_AREA | NOTELEPORT + area_flags = NOTELEPORT static_lighting = FALSE base_lighting_alpha = 255 default_gravity = STANDARD_GRAVITY @@ -173,7 +171,7 @@ icon_state = "syndie-ship" requires_power = FALSE default_gravity = STANDARD_GRAVITY - area_flags = UNIQUE_AREA | NOTELEPORT + area_flags = NOTELEPORT flags_1 = NONE ambience_index = AMBIENCE_DANGER @@ -218,12 +216,11 @@ name = "Mafia Minigame" icon_state = "mafia" static_lighting = FALSE - base_lighting_alpha = 255 requires_power = FALSE default_gravity = STANDARD_GRAVITY flags_1 = NONE - area_flags = BLOCK_SUICIDE | UNIQUE_AREA + area_flags = BLOCK_SUICIDE //CAPTURE THE FLAG /area/centcom/ctf @@ -234,7 +231,7 @@ base_lighting_alpha = 255 default_gravity = STANDARD_GRAVITY flags_1 = NONE - area_flags = UNIQUE_AREA | NOTELEPORT | NO_DEATH_MESSAGE | BLOCK_SUICIDE + area_flags = NOTELEPORT | NO_DEATH_MESSAGE | BLOCK_SUICIDE /area/centcom/ctf/control_room name = "Control Room A" @@ -278,7 +275,6 @@ icon_state = "asteroid" requires_power = FALSE default_gravity = STANDARD_GRAVITY - area_flags = UNIQUE_AREA ambience_index = AMBIENCE_MINING flags_1 = CAN_BE_DIRTY_1 sound_environment = SOUND_AREA_ASTEROID @@ -288,7 +284,7 @@ ambience_index = AMBIENCE_RUINS always_unpowered = FALSE requires_power = TRUE - area_flags = UNIQUE_AREA | BLOBS_ALLOWED + area_flags = BLOBS_ALLOWED /area/centcom/asteroid/nearstation/bomb_site name = "\improper Bomb Testing Asteroid" diff --git a/code/game/area/areas/mining.dm b/code/game/area/areas/mining.dm index 9f0bcfab8f6..3d97da72c39 100644 --- a/code/game/area/areas/mining.dm +++ b/code/game/area/areas/mining.dm @@ -3,7 +3,8 @@ icon = 'icons/area/areas_station.dmi' icon_state = "mining" default_gravity = STANDARD_GRAVITY - area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | CULT_PERMITTED + area_flags = VALID_TERRITORY | CULT_PERMITTED + area_flags_mapping = UNIQUE_AREA | FLORA_ALLOWED ambient_buzz = 'sound/ambience/lavaland/magma.ogg' /area/mine/lobby @@ -132,7 +133,7 @@ icon_state = "mining" default_gravity = STANDARD_GRAVITY flags_1 = NONE - area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED + area_flags = VALID_TERRITORY | FLORA_ALLOWED sound_environment = SOUND_AREA_LAVALAND ambient_buzz = 'sound/ambience/lavaland/magma.ogg' allow_shuttle_docking = TRUE @@ -146,7 +147,7 @@ power_light = FALSE requires_power = TRUE ambience_index = AMBIENCE_MINING - area_flags = VALID_TERRITORY | UNIQUE_AREA + area_flags = VALID_TERRITORY /area/lavaland/underground name = "Lavaland Caves" @@ -157,7 +158,6 @@ power_equip = FALSE power_light = FALSE ambience_index = AMBIENCE_MINING - area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED /area/lavaland/surface/outdoors name = "Lavaland Wastes" @@ -165,12 +165,14 @@ /area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here icon_state = "unexplored" - area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED + area_flags = VALID_TERRITORY + area_flags_mapping = UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED map_generator = /datum/map_generator/cave_generator/lavaland /area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here icon_state = "danger" - area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED + area_flags = VALID_TERRITORY + area_flags_mapping = parent_type::area_flags_mapping | MEGAFAUNA_SPAWN_ALLOWED /// Same thing as parent, but uses a different map generator for the icemoon ruin that needs it. /area/lavaland/surface/outdoors/unexplored/danger/no_ruins @@ -178,9 +180,7 @@ /area/lavaland/surface/outdoors/explored name = "Lavaland Labor Camp" - area_flags = VALID_TERRITORY | UNIQUE_AREA - - + area_flags = VALID_TERRITORY /**********************Ice Moon Areas**************************/ @@ -189,7 +189,7 @@ icon_state = "mining" default_gravity = STANDARD_GRAVITY flags_1 = NONE - area_flags = UNIQUE_AREA | FLORA_ALLOWED + area_flags_mapping = UNIQUE_AREA | FLORA_ALLOWED ambience_index = AMBIENCE_ICEMOON sound_environment = SOUND_AREA_ICEMOON ambient_buzz = 'sound/ambience/lavaland/magma.ogg' @@ -203,7 +203,6 @@ power_equip = FALSE power_light = FALSE requires_power = TRUE - area_flags = UNIQUE_AREA | FLORA_ALLOWED /area/icemoon/surface/outdoors // parent that defines if something is on the exterior of the station. name = "Icemoon Wastes" @@ -227,33 +226,33 @@ if(HAS_TRAIT(SSstation, STATION_TRAIT_FORESTED)) map_generator = /datum/map_generator/cave_generator/icemoon/surface/forested // flip this on, the generator has already disabled dangerous fauna - area_flags = MOB_SPAWN_ALLOWED | FLORA_ALLOWED + area_flags_mapping = MOB_SPAWN_ALLOWED | FLORA_ALLOWED /area/icemoon/surface/outdoors/always_forested icon_state = "forest" map_generator = /datum/map_generator/cave_generator/icemoon/surface/forested - area_flags = MOB_SPAWN_ALLOWED | FLORA_ALLOWED | CAVES_ALLOWED + area_flags_mapping = MOB_SPAWN_ALLOWED | FLORA_ALLOWED | CAVES_ALLOWED /area/icemoon/surface/outdoors/rocky icon_state = "rocky" map_generator = /datum/map_generator/cave_generator/icemoon/surface/rocky - area_flags = MOB_SPAWN_ALLOWED | FLORA_ALLOWED | CAVES_ALLOWED + area_flags_mapping = MOB_SPAWN_ALLOWED | FLORA_ALLOWED | CAVES_ALLOWED /area/icemoon/surface/outdoors/noteleport // for places like the cursed spring water - area_flags = UNIQUE_AREA | FLORA_ALLOWED | NOTELEPORT + area_flags_mapping = parent_type::area_flags_mapping | NOTELEPORT /area/icemoon/surface/outdoors/noruins // when you want random generation without the chance of getting ruins icon_state = "noruins" - area_flags = UNIQUE_AREA | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | CAVES_ALLOWED - map_generator = /datum/map_generator/cave_generator/icemoon/surface/noruins + area_flags_mapping = parent_type::area_flags_mapping | MOB_SPAWN_ALLOWED | CAVES_ALLOWED + map_generator = /datum/map_generator/cave_generator/icemoon/surface/noruins /area/icemoon/surface/outdoors/labor_camp name = "Icemoon Labor Camp" - area_flags = UNIQUE_AREA + area_flags_mapping = /area::area_flags_mapping /area/icemoon/surface/outdoors/unexplored //monsters and ruins spawn here icon_state = "unexplored" - area_flags = UNIQUE_AREA | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | CAVES_ALLOWED + area_flags_mapping = parent_type::area_flags_mapping | MOB_SPAWN_ALLOWED | CAVES_ALLOWED /area/icemoon/surface/outdoors/unexplored/rivers // rivers spawn here icon_state = "danger" @@ -263,10 +262,10 @@ . = ..() if(HAS_TRAIT(SSstation, STATION_TRAIT_FORESTED)) map_generator = /datum/map_generator/cave_generator/icemoon/surface/forested - area_flags |= MOB_SPAWN_ALLOWED //flip this on, the generator has already disabled dangerous fauna + area_flags_mapping |= MOB_SPAWN_ALLOWED //flip this on, the generator has already disabled dangerous fauna /area/icemoon/surface/outdoors/unexplored/rivers/no_monsters - area_flags = UNIQUE_AREA | FLORA_ALLOWED | CAVES_ALLOWED + area_flags_mapping = /area/icemoon/::area_flags_mapping | CAVES_ALLOWED /area/icemoon/underground name = "Icemoon Caves" @@ -276,16 +275,15 @@ power_environ = FALSE power_equip = FALSE power_light = FALSE - area_flags = UNIQUE_AREA | FLORA_ALLOWED /area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here name = "Icemoon Caves" icon_state = "unexplored" - area_flags = CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED + area_flags_mapping = CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED /area/icemoon/underground/unexplored/no_rivers icon_state = "norivers" - area_flags = CAVES_ALLOWED | FLORA_ALLOWED // same rules as "shoreline" turfs since we might need this to pull double-duty + area_flags_mapping = CAVES_ALLOWED | FLORA_ALLOWED // same rules as "shoreline" turfs since we might need this to pull double-duty map_generator = /datum/map_generator/cave_generator/icemoon /area/icemoon/underground/unexplored/rivers // rivers spawn here @@ -297,15 +295,15 @@ /area/icemoon/underground/unexplored/rivers/deep/shoreline //use this for when you don't want mobs to spawn in certain areas in the "deep" portions. Think adjacent to rivers or station structures. icon_state = "shore" - area_flags = UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED + area_flags_mapping = /area/icemoon/::area_flags_mapping | CAVES_ALLOWED /area/icemoon/underground/explored // ruins can't spawn here name = "Icemoon Underground" - area_flags = UNIQUE_AREA + area_flags_mapping = /area::area_flags_mapping /area/icemoon/underground/explored/graveyard name = "Graveyard" - area_flags = UNIQUE_AREA + area_flags_mapping = /area::area_flags_mapping ambience_index = AMBIENCE_SPOOKY icon = 'icons/area/areas_station.dmi' icon_state = "graveyard" diff --git a/code/game/area/areas/misc.dm b/code/game/area/areas/misc.dm index de1cbff381b..ac66943d5d1 100644 --- a/code/game/area/areas/misc.dm +++ b/code/game/area/areas/misc.dm @@ -10,7 +10,7 @@ power_light = FALSE power_equip = FALSE power_environ = FALSE - area_flags = UNIQUE_AREA|NO_GRAVITY + area_flags = NO_GRAVITY outdoors = TRUE ambience_index = AMBIENCE_SPACE flags_1 = CAN_BE_DIRTY_1 diff --git a/code/game/area/areas/ruins/_ruins.dm b/code/game/area/areas/ruins/_ruins.dm index f2ecc7ac73e..92fff19386d 100644 --- a/code/game/area/areas/ruins/_ruins.dm +++ b/code/game/area/areas/ruins/_ruins.dm @@ -5,7 +5,7 @@ icon = 'icons/area/areas_ruins.dmi' icon_state = "ruins" default_gravity = STANDARD_GRAVITY - area_flags = HIDDEN_AREA | UNIQUE_AREA + area_flags = HIDDEN_AREA ambience_index = AMBIENCE_RUINS flags_1 = CAN_BE_DIRTY_1 sound_environment = SOUND_ENVIRONMENT_STONEROOM diff --git a/code/game/area/areas/ruins/icemoon.dm b/code/game/area/areas/ruins/icemoon.dm index 7dff4bdba55..80f8f6bb33a 100644 --- a/code/game/area/areas/ruins/icemoon.dm +++ b/code/game/area/areas/ruins/icemoon.dm @@ -59,10 +59,10 @@ sound_environment = SOUND_AREA_SMALL_ENCLOSED ambience_index = AMBIENCE_DANGER area_flags = NOTELEPORT + area_flags_mapping = NONE mood_bonus = -10 mood_message = "What the fuck." - /area/ruin/planetengi name = "\improper Engineering Outpost" @@ -115,11 +115,13 @@ /area/ruin/outpost31/lab name = "\improper Outpost 31 Lab" area_flags = NOTELEPORT //megafauna arena + area_flags_mapping = NONE requires_power = FALSE /area/ruin/outpost31/lootroom name = "\improper Outpost 31 Secondary Storage" area_flags = NOTELEPORT //megafauna loot room + area_flags_mapping = NONE requires_power = FALSE /area/ruin/outpost31/recroom diff --git a/code/game/area/areas/ruins/lavaland.dm b/code/game/area/areas/ruins/lavaland.dm index 4e806bf1c10..cef9e3d308a 100644 --- a/code/game/area/areas/ruins/lavaland.dm +++ b/code/game/area/areas/ruins/lavaland.dm @@ -43,6 +43,7 @@ /area/ruin/unpowered/cultaltar name = "\improper Cult Altar" area_flags = CULT_PERMITTED + area_flags_mapping = NONE ambience_index = AMBIENCE_SPOOKY /area/ruin/thelizardsgas_lavaland diff --git a/code/game/area/areas/ruins/space.dm b/code/game/area/areas/ruins/space.dm index c2e32c86bee..24bd482633c 100644 --- a/code/game/area/areas/ruins/space.dm +++ b/code/game/area/areas/ruins/space.dm @@ -2,7 +2,8 @@ /area/ruin/space default_gravity = ZERO_GRAVITY - area_flags = UNIQUE_AREA + area_flags = NONE + area_flags_mapping = UNIQUE_AREA /area/ruin/space/unpowered always_unpowered = TRUE @@ -16,11 +17,10 @@ /area/ruin/space/has_grav/powered requires_power = FALSE - // Ruin solars define, /area/solars was moved to /area/station/solars, causing the solars specific areas to lose their properties /area/ruin/space/solars requires_power = FALSE - area_flags = UNIQUE_AREA + area_flags = NONE flags_1 = NONE ambience_index = AMBIENCE_ENGI airlock_wires = /datum/wires/airlock/engineering @@ -310,7 +310,7 @@ icon = 'icons/area/areas_ruins.dmi' // Solars inheriet areas_misc.dmi, not areas_ruin.dmi icon_state = "os_charlie_solars" requires_power = FALSE - area_flags = UNIQUE_AREA + area_flags = NONE sound_environment = SOUND_AREA_SPACE /area/ruin/space/ancientstation/charlie/storage @@ -534,7 +534,7 @@ /area/ruin/space/djstation/solars name = "\improper DJ Station Solars" icon_state = "DJ" - area_flags = UNIQUE_AREA + area_flags = NONE default_gravity = ZERO_GRAVITY /area/ruin/space/djstation/service @@ -582,7 +582,7 @@ /area/ruin/space/has_grav/hellfactoryoffice name = "\improper Hell Factory Office" - area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | NOTELEPORT + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | NOTELEPORT //Ruin of Spinward Smoothies @@ -600,7 +600,7 @@ /area/ruin/space/has_grav/powered/biooutpost name = "\improper Bioresearch Outpost" - area_flags = UNIQUE_AREA | NOTELEPORT + area_flags = NOTELEPORT /area/ruin/space/has_grav/powered/biooutpost/vault name = "\improper Bioresearch Outpost Secure Testing" diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index c37d53de151..9a651fb5e3d 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -10,6 +10,7 @@ always_unpowered = FALSE // Loading the same shuttle map at a different time will produce distinct area instances. area_flags = NONE + area_flags_mapping = NONE icon = 'icons/area/areas_station.dmi' icon_state = "shuttle" flags_1 = CAN_BE_DIRTY_1 @@ -120,11 +121,9 @@ static_lighting = FALSE base_lighting_alpha = 255 - /area/shuttle/arrival name = "Arrival Shuttle" - area_flags = UNIQUE_AREA// SSjob refers to this area for latejoiners - + area_flags_mapping = UNIQUE_AREA // SSjob refers to this area for latejoiners /area/shuttle/arrival/on_joining_game(mob/living/boarder) if(SSshuttle.arrivals?.mode == SHUTTLE_CALL) @@ -133,22 +132,17 @@ boarder.playsound_local(get_turf(boarder), 'sound/announcer/ApproachingTG.ogg', 25) boarder.update_parallax_teleport() - /area/shuttle/pod_1 name = "Escape Pod One" - area_flags = NONE /area/shuttle/pod_2 name = "Escape Pod Two" - area_flags = NONE /area/shuttle/pod_3 name = "Escape Pod Three" - area_flags = NONE /area/shuttle/pod_4 name = "Escape Pod Four" - area_flags = NONE /area/shuttle/mining name = "Mining Shuttle" @@ -166,10 +160,9 @@ /area/shuttle/escape name = "Emergency Shuttle" - area_flags = BLOBS_ALLOWED + area_flags = CULT_PERMITTED area_limited_icon_smoothing = /area/shuttle/escape flags_1 = CAN_BE_DIRTY_1 - area_flags = CULT_PERMITTED /area/shuttle/escape/backup name = "Backup Emergency Shuttle" diff --git a/code/game/area/areas/station/common.dm b/code/game/area/areas/station/common.dm index 2280215ab6e..1b6eba4dc25 100644 --- a/code/game/area/areas/station/common.dm +++ b/code/game/area/areas/station/common.dm @@ -2,7 +2,7 @@ name = "\improper Crew Facilities" icon_state = "commons" sound_environment = SOUND_AREA_STANDARD_STATION - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED /* * Dorm Areas diff --git a/code/game/area/areas/station/engineering.dm b/code/game/area/areas/station/engineering.dm index 71fe6024d88..feb565ecd53 100644 --- a/code/game/area/areas/station/engineering.dm +++ b/code/game/area/areas/station/engineering.dm @@ -26,7 +26,7 @@ /*outside atmos*/ /area/station/engineering/atmos/space_catwalk name = "\improper Atmospherics Space Catwalk" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED sound_environment = SOUND_AREA_SPACE ambience_index = AMBIENCE_SPACE @@ -63,7 +63,7 @@ /area/station/engineering/atmospherics_engine name = "\improper Atmospherics Engine" icon_state = "atmos_engine" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED /area/station/engineering/lobby name = "\improper Engineering Lobby" @@ -72,7 +72,7 @@ /area/station/engineering/supermatter name = "\improper Supermatter Engine" icon_state = "engine_sm" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED sound_environment = SOUND_AREA_SMALL_ENCLOSED /area/station/engineering/supermatter/waste @@ -119,7 +119,7 @@ /area/station/engineering/storage/tcomms name = "Telecomms Storage" icon_state = "tcom_storage" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED /* * Construction Areas diff --git a/code/game/area/areas/station/hallway.dm b/code/game/area/areas/station/hallway.dm index 9512f20c709..12a5ba6816b 100644 --- a/code/game/area/areas/station/hallway.dm +++ b/code/game/area/areas/station/hallway.dm @@ -83,7 +83,7 @@ /area/station/hallway/secondary/entry name = "\improper Arrival Shuttle Hallway" icon_state = "entry" - area_flags = UNIQUE_AREA | EVENT_PROTECTED + area_flags = EVENT_PROTECTED /area/station/hallway/secondary/dock name = "\improper Secondary Station Dock Hallway" diff --git a/code/game/area/areas/station/maintenance.dm b/code/game/area/areas/station/maintenance.dm index 5e636719e7a..93919536c58 100644 --- a/code/game/area/areas/station/maintenance.dm +++ b/code/game/area/areas/station/maintenance.dm @@ -1,7 +1,7 @@ /area/station/maintenance name = "Generic Maintenance" ambience_index = AMBIENCE_MAINT - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED | PERSISTENT_ENGRAVINGS + area_flags = BLOBS_ALLOWED | CULT_PERMITTED | PERSISTENT_ENGRAVINGS airlock_wires = /datum/wires/airlock/maint sound_environment = SOUND_AREA_TUNNEL_ENCLOSED forced_ambience = TRUE @@ -94,7 +94,7 @@ /area/station/maintenance/department/science/xenobiology name = "Xenobiology Maintenance" icon_state = "xenomaint" - area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | XENOBIOLOGY_COMPATIBLE | CULT_PERMITTED + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | XENOBIOLOGY_COMPATIBLE | CULT_PERMITTED /* * Generic Maintenance Tunnels diff --git a/code/game/area/areas/station/misc.dm b/code/game/area/areas/station/misc.dm index be99950c736..fde6b00bf5f 100644 --- a/code/game/area/areas/station/misc.dm +++ b/code/game/area/areas/station/misc.dm @@ -30,6 +30,6 @@ power_light = FALSE requires_power = TRUE ambience_index = AMBIENCE_MINING - area_flags = UNIQUE_AREA + area_flags = NONE outdoors = TRUE allow_shuttle_docking = TRUE diff --git a/code/game/area/areas/station/science.dm b/code/game/area/areas/station/science.dm index 57623ee6183..b64e7efe75a 100644 --- a/code/game/area/areas/station/science.dm +++ b/code/game/area/areas/station/science.dm @@ -114,23 +114,23 @@ /area/station/science/ordnance/burnchamber name = "\improper Ordnance Burn Chamber" icon_state = "ord_burn" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED /area/station/science/ordnance/freezerchamber name = "\improper Ordnance Freezer Chamber" icon_state = "ord_freeze" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED // Room for equipments and such /area/station/science/ordnance/testlab name = "\improper Ordnance Testing Lab" icon_state = "ord_test" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED /area/station/science/ordnance/bomb name = "\improper Ordnance Bomb Site" icon_state = "ord_boom" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED | NO_GRAVITY + area_flags = BLOBS_ALLOWED | CULT_PERMITTED | NO_GRAVITY /area/station/science/ordnance/bomb/planet area_flags = /area/station/science/ordnance/bomb::area_flags & ~NO_GRAVITY diff --git a/code/game/area/areas/station/security.dm b/code/game/area/areas/station/security.dm index e1226a6a9a5..8c15638c7f0 100644 --- a/code/game/area/areas/station/security.dm +++ b/code/game/area/areas/station/security.dm @@ -194,7 +194,7 @@ /area/station/security/prison name = "\improper Prison Wing" icon_state = "sec_prison" - area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED | PERSISTENT_ENGRAVINGS + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | CULT_PERMITTED | PERSISTENT_ENGRAVINGS //Rad proof /area/station/security/prison/toilet diff --git a/code/game/area/areas/station/service.dm b/code/game/area/areas/station/service.dm index 23fe166616d..35540656326 100644 --- a/code/game/area/areas/station/service.dm +++ b/code/game/area/areas/station/service.dm @@ -77,7 +77,7 @@ mood_bonus = 5 mood_message = "I love being in the library!" mood_trait = TRAIT_INTROVERT - area_flags = CULT_PERMITTED | BLOBS_ALLOWED | UNIQUE_AREA + area_flags = CULT_PERMITTED | BLOBS_ALLOWED sound_environment = SOUND_AREA_LARGE_SOFTFLOOR /area/station/service/library/garden @@ -180,7 +180,7 @@ /area/station/service/janitor name = "\improper Custodial Closet" icon_state = "janitor" - area_flags = CULT_PERMITTED | BLOBS_ALLOWED | UNIQUE_AREA + area_flags = CULT_PERMITTED | BLOBS_ALLOWED sound_environment = SOUND_AREA_SMALL_ENCLOSED /area/station/service/barber diff --git a/code/game/area/areas/station/solars.dm b/code/game/area/areas/station/solars.dm index 8d3a81420e7..569a7f0a169 100644 --- a/code/game/area/areas/station/solars.dm +++ b/code/game/area/areas/station/solars.dm @@ -5,7 +5,7 @@ /area/station/solars icon_state = "panels" requires_power = FALSE - area_flags = UNIQUE_AREA|NO_GRAVITY + area_flags = NO_GRAVITY flags_1 = NONE ambience_index = AMBIENCE_ENGI airlock_wires = /datum/wires/airlock/engineering @@ -44,7 +44,7 @@ /area/station/solars/starboard/fore/asteriod name = "\improper Starboard Bow Asteriod Solar Array" icon_state = "panelsFS" - area_flags = UNIQUE_AREA // solar areas directly on asteriod have gravity + area_flags = NONE // solar areas directly on asteriod have gravity /area/station/solars/port name = "\improper Port Solar Array" @@ -53,7 +53,7 @@ /area/station/solars/port/asteriod name = "\improper Port Asteriod Solar Array" icon_state = "panelsP" - area_flags = UNIQUE_AREA // solar areas directly on asteriod have gravity + area_flags = NONE // solar areas directly on asteriod have gravity /area/station/solars/port/aft name = "\improper Port Quarter Solar Array" diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm index 30d9f89a424..726665f97df 100644 --- a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm @@ -65,7 +65,7 @@ GLOBAL_LIST_EMPTY(heretic_sacrifice_landmarks) default_gravity = STANDARD_GRAVITY ambience_index = AMBIENCE_SPOOKY sound_environment = SOUND_ENVIRONMENT_CAVE - area_flags = UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA | BLOCK_SUICIDE | NO_BOH + area_flags = NOTELEPORT | HIDDEN_AREA | BLOCK_SUICIDE | NO_BOH /area/centcom/heretic_sacrifice/Initialize(mapload) if(!ambientsounds) diff --git a/code/modules/antagonists/voidwalker/voidwalker_kidnap.dm b/code/modules/antagonists/voidwalker/voidwalker_kidnap.dm index cada56a33eb..a0dad18436f 100644 --- a/code/modules/antagonists/voidwalker/voidwalker_kidnap.dm +++ b/code/modules/antagonists/voidwalker/voidwalker_kidnap.dm @@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(voidwalker_void) default_gravity = STANDARD_GRAVITY ambience_index = AMBIENCE_SPOOKY sound_environment = SOUND_ENVIRONMENT_CAVE - area_flags = UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA | BLOCK_SUICIDE + area_flags = NOTELEPORT | HIDDEN_AREA | BLOCK_SUICIDE /// Mini car where people drive around in in their mangled corpse to heal a bit before they get dumped back on station /obj/effect/wisp_mobile diff --git a/code/modules/awaymissions/cordon.dm b/code/modules/awaymissions/cordon.dm index 738efa1d7c2..5a84b4381da 100644 --- a/code/modules/awaymissions/cordon.dm +++ b/code/modules/awaymissions/cordon.dm @@ -58,7 +58,7 @@ icon_state = "cordon" static_lighting = FALSE base_lighting_alpha = 255 - area_flags = UNIQUE_AREA|NOTELEPORT|HIDDEN_AREA + area_flags = NOTELEPORT|HIDDEN_AREA requires_power = FALSE /area/misc/cordon/Entered(atom/movable/arrived, area/old_area) diff --git a/code/modules/basketball/basketball_map_loading.dm b/code/modules/basketball/basketball_map_loading.dm index 1dac2043668..319e3cbdc57 100644 --- a/code/modules/basketball/basketball_map_loading.dm +++ b/code/modules/basketball/basketball_map_loading.dm @@ -30,7 +30,7 @@ base_lighting_alpha = 255 default_gravity = STANDARD_GRAVITY flags_1 = NONE - area_flags = UNIQUE_AREA | NOTELEPORT | NO_DEATH_MESSAGE | BLOCK_SUICIDE + area_flags = NOTELEPORT | NO_DEATH_MESSAGE | BLOCK_SUICIDE /datum/lazy_template/basketball map_dir = "_maps/minigame/basketball" diff --git a/code/modules/bitrunning/areas.dm b/code/modules/bitrunning/areas.dm index 74c6aa3c15c..66060559a94 100644 --- a/code/modules/bitrunning/areas.dm +++ b/code/modules/bitrunning/areas.dm @@ -14,7 +14,8 @@ name = "Virtual Domain Ruins" icon_state = "bit_ruin" icon = 'icons/area/areas_station.dmi' - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING + area_flags = LOCAL_TELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING + area_flags_mapping = VIRTUAL_AREA default_gravity = STANDARD_GRAVITY requires_power = FALSE @@ -26,7 +27,8 @@ /area/virtual_domain/safehouse name = "Virtual Domain Safehouse" - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | VIRTUAL_SAFE_AREA | UNLIMITED_FISHING + area_flags = LOCAL_TELEPORT | EVENT_PROTECTED | UNLIMITED_FISHING + area_flags_mapping = UNIQUE_AREA | VIRTUAL_AREA | VIRTUAL_SAFE_AREA icon_state = "bit_safe" requires_power = FALSE sound_environment = SOUND_ENVIRONMENT_ROOM @@ -36,32 +38,49 @@ /area/lavaland/surface/outdoors/virtual_domain name = "Virtual Domain Lava Ruins" icon_state = "bit_ruin" - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING + area_flags = /area/virtual_domain::area_flags + area_flags_mapping = /area/virtual_domain::area_flags_mapping /area/icemoon/underground/explored/virtual_domain name = "Virtual Domain Ice Ruins" icon_state = "bit_ice" - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING + area_flags = /area/virtual_domain::area_flags + area_flags_mapping = /area/virtual_domain::area_flags_mapping /area/ruin/space/virtual_domain name = "Virtual Domain Unexplored Location" icon = 'icons/area/areas_station.dmi' icon_state = "bit_ruin" - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING + area_flags = /area/virtual_domain::area_flags + area_flags_mapping = /area/virtual_domain::area_flags_mapping /area/space/virtual_domain name = "Virtual Domain Space" icon = 'icons/area/areas_station.dmi' icon_state = "bit_space" - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | HIDDEN_AREA | UNLIMITED_FISHING + area_flags = /area/virtual_domain::area_flags + area_flags_mapping = /area/virtual_domain::area_flags_mapping ///Areas that virtual entities should not be in /area/virtual_domain/protected_space name = "Virtual Domain Safe Zone" - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | VIRTUAL_SAFE_AREA | UNLIMITED_FISHING + area_flags = /area/virtual_domain/safehouse::area_flags + area_flags_mapping = /area/virtual_domain/safehouse::area_flags_mapping icon_state = "bit_safe" /area/virtual_domain/protected_space/fullbright static_lighting = FALSE base_lighting_alpha = 255 + +/// A hash lookup list of all the virtual area types +GLOBAL_LIST_INIT_TYPED(virtual_areas, /area, populate_virtual_areas()) + +/// Constructs the list of virtual areas +/proc/populate_virtual_areas() + RETURN_TYPE(/list/area) + var/list/area/virtual_areas = list() + for(var/area/area_type as anything in subtypesof(/area)) + if (area_type::area_flags_mapping & VIRTUAL_AREA) + virtual_areas[area_type] = TRUE + return virtual_areas diff --git a/code/modules/bitrunning/components/virtual_entity.dm b/code/modules/bitrunning/components/virtual_entity.dm index 52a259a6d04..77e387adc1d 100644 --- a/code/modules/bitrunning/components/virtual_entity.dm +++ b/code/modules/bitrunning/components/virtual_entity.dm @@ -38,7 +38,7 @@ stack_trace("Virtual entity entered a location with no area!") return - if(location_area.area_flags & VIRTUAL_SAFE_AREA) + if(location_area.area_flags_mapping & VIRTUAL_SAFE_AREA) source.balloon_alert(source, "out of bounds!") COOLDOWN_START(src, OOB_cooldown, 2 SECONDS) return COMPONENT_MOVABLE_BLOCK_PRE_MOVE diff --git a/code/modules/deathmatch/deathmatch_mapping.dm b/code/modules/deathmatch/deathmatch_mapping.dm index 97c73fd5e9a..2c335fe0788 100644 --- a/code/modules/deathmatch/deathmatch_mapping.dm +++ b/code/modules/deathmatch/deathmatch_mapping.dm @@ -2,7 +2,7 @@ name = "Deathmatch Arena" requires_power = FALSE default_gravity = STANDARD_GRAVITY - area_flags = UNIQUE_AREA | LOCAL_TELEPORT | EVENT_PROTECTED | QUIET_LOGS | NO_DEATH_MESSAGE | BINARY_JAMMING + area_flags = LOCAL_TELEPORT | EVENT_PROTECTED | QUIET_LOGS | NO_DEATH_MESSAGE | BINARY_JAMMING /area/deathmatch/fullbright static_lighting = FALSE diff --git a/code/modules/mapfluff/ruins/spaceruin_code/anomalyresearch.dm b/code/modules/mapfluff/ruins/spaceruin_code/anomalyresearch.dm index 8a1e4c760e9..6aaba88a89b 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/anomalyresearch.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/anomalyresearch.dm @@ -75,7 +75,7 @@ icon = 'icons/area/areas_ruins.dmi' icon_state = "anomaly_research" requires_power = FALSE - area_flags = HIDDEN_AREA | UNIQUE_AREA + area_flags = HIDDEN_AREA default_gravity = ZERO_GRAVITY /obj/item/reagent_containers/cup/bottle/wittel diff --git a/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm b/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm index 419d25d6517..2fb0633bf53 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/forgottenship.dm @@ -120,4 +120,4 @@ GLOBAL_VAR_INIT(fscpassword, generate_password()) name = "Syndicate Forgotten Vault" icon_state = "syndie-ship" ambientsounds = list('sound/ambience/engineering/ambitech2.ogg', 'sound/ambience/engineering/ambitech3.ogg') - area_flags = NOTELEPORT | UNIQUE_AREA + area_flags = NOTELEPORT diff --git a/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm index 3dedfd93b41..a706dcf9ca6 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm @@ -394,6 +394,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) requires_power = FALSE default_gravity = STANDARD_GRAVITY area_flags = NOTELEPORT | HIDDEN_AREA + area_flags_mapping = NONE static_lighting = TRUE ambientsounds = list('sound/ambience/ruin/servicebell.ogg') var/roomnumber = 0 @@ -482,7 +483,8 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) icon = 'icons/area/areas_ruins.dmi' icon_state = "hilbertshotel" requires_power = FALSE - area_flags = HIDDEN_AREA | NOTELEPORT | UNIQUE_AREA + area_flags = HIDDEN_AREA | NOTELEPORT + area_flags_mapping = UNIQUE_AREA default_gravity = STANDARD_GRAVITY /obj/item/abstracthotelstorage @@ -516,7 +518,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) name = "Hilbert Research Facility" /area/ruin/space/has_grav/powered/hilbertresearchfacility/secretroom - area_flags = UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA + area_flags = NOTELEPORT | HIDDEN_AREA /obj/item/analyzer/hilbertsanalyzer name = "custom rigged analyzer" diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index be27975294b..7ba37130ebc 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -5,7 +5,7 @@ static_lighting = TRUE requires_power = FALSE default_gravity = STANDARD_GRAVITY - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED flags_1 = CAN_BE_DIRTY_1 //Survival Capsule diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 148980bd04a..f19defcc748 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -105,7 +105,7 @@ static_lighting = FALSE base_lighting_alpha = 255 - area_flags = NOTELEPORT | HIDDEN_AREA | UNIQUE_AREA + area_flags = NOTELEPORT | HIDDEN_AREA ambientsounds = null flags_1 = NONE diff --git a/code/modules/modular_computers/file_system/programs/nt_pay.dm b/code/modules/modular_computers/file_system/programs/nt_pay.dm index 7fcb42f567c..3138567d448 100644 --- a/code/modules/modular_computers/file_system/programs/nt_pay.dm +++ b/code/modules/modular_computers/file_system/programs/nt_pay.dm @@ -60,6 +60,11 @@ SEND_SIGNAL(computer, COMSIG_MODULAR_COMPUTER_NT_PAY_RESULT, payment_result) /datum/computer_file/program/nt_pay/proc/_pay(token, money_to_send, mob/user) + var/area/user_area = get_area(user) + if(user_area && is_area_virtual(user_area)) + to_chat(user, span_notice("You cannot send virtual money to real accounts.")) + return NT_PAY_STATUS_NO_ACCOUNT + money_to_send = round(money_to_send) if(IS_DEPARTMENTAL_ACCOUNT(current_user))