From 46833abf0ba686619911de8c42844b5a0f84ecc9 Mon Sep 17 00:00:00 2001 From: Linzolle Date: Thu, 27 May 2021 19:34:00 -0500 Subject: [PATCH 1/3] add cult_permitted area flag --- code/__DEFINES/_flags/_flags.dm | 4 ++-- code/_globalvars/bitfields.dm | 2 +- code/game/area/Space_Station_13_areas.dm | 23 ++++++++----------- code/game/area/areas.dm | 2 +- code/game/area/areas/centcom.dm | 2 +- code/game/area/areas/holodeck.dm | 1 - code/game/area/areas/shuttles.dm | 4 ++-- .../items/stacks/sheets/sheet_types.dm | 2 +- .../clock_scriptures/scripture_drivers.dm | 2 +- .../clock_scriptures/scripture_judgement.dm | 2 +- .../clockcult/clock_structures/stargazer.dm | 2 +- code/modules/antagonists/cult/ritual.dm | 2 +- 12 files changed, 22 insertions(+), 26 deletions(-) diff --git a/code/__DEFINES/_flags/_flags.dm b/code/__DEFINES/_flags/_flags.dm index 0d97634a66..bd6ae98594 100644 --- a/code/__DEFINES/_flags/_flags.dm +++ b/code/__DEFINES/_flags/_flags.dm @@ -56,8 +56,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define UNUSED_RESERVATION_TURF_1 (1<<1) /// If a turf can be made dirty at roundstart. This is also used in areas. #define CAN_BE_DIRTY_1 (1<<2) -/// If blood cultists can draw runes or build structures on this turf -#define CULT_PERMITTED_1 (1<<3) /// Blocks lava rivers being generated on the turf #define NO_LAVA_GEN_1 (1<<6) /// Blocks ruins spawning on the turf @@ -92,6 +90,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ABDUCTOR_PROOF (1<<11) /// If an area should be hidden from power consoles, power/atmosphere alerts, etc. #define NO_ALERTS (1<<12) +/// If blood cultists can draw runes or build structures on this AREA. +#define CULT_PERMITTED (1<<13) /* These defines are used specifically with the atom/pass_flags bitmask diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 9c6f16e724..781fa38b94 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -15,7 +15,7 @@ GLOBAL_LIST_INIT(bitfields, list( "ABDUCTOR_PROOF" = ABDUCTOR_PROOF, "BLOBS_ALLOWED" = BLOBS_ALLOWED, "BLOCK_SUICIDE" = BLOCK_SUICIDE, - // "CULT_PERMITTED" = CULT_PERMITTED, + "CULT_PERMITTED" = CULT_PERMITTED, "FLORA_ALLOWED" = FLORA_ALLOWED, "HIDDEN_AREA" = HIDDEN_AREA, "MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED, diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index a27f4b291e..57f4fdb8de 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -209,7 +209,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station name = "Generic Maintenance" // ambience_index = AMBIENCE_MAINT ambientsounds = MAINTENANCE - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED // airlock_wires = /datum/wires/airlock/maint sound_environment = SOUND_AREA_TUNNEL_ENCLOSED @@ -294,7 +294,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" - area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | XENOBIOLOGY_COMPATIBLE + area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | XENOBIOLOGY_COMPATIBLE | CULT_PERMITTED //Maintenance - Generic @@ -598,11 +598,11 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/commons name = "Crew Quarters" sound_environment = SOUND_AREA_STANDARD_STATION + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED /area/commons/dorms name = "Dormitories" icon_state = "dorms" - area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA /area/commons/dorms/barracks name = "Sleep Barracks" @@ -899,7 +899,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station // mood_bonus = 5 // mood_message = "I love being in the library!\n" // mood_trait = TRAIT_INTROVERT - flags_1 = CULT_PERMITTED_1 + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED sound_environment = SOUND_AREA_LARGE_SOFTFLOOR /area/service/library/lounge @@ -926,7 +926,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/service/library/abandoned name = "Abandoned Library" icon_state = "abandoned_library" - flags_1 = CULT_PERMITTED_1 nightshift_public_area = NIGHTSHIFT_AREA_NONE /area/service/chapel @@ -973,8 +972,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/service/janitor name = "Custodial Closet" icon_state = "janitor" - flags_1 = CULT_PERMITTED_1 sound_environment = SOUND_AREA_SMALL_ENCLOSED + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED /area/service/janitor/aux name = "Auxiliary Custodial Closet" @@ -1027,7 +1026,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engineering/atmos name = "Atmospherics" icon_state = "atmos" - flags_1 = CULT_PERMITTED_1 /area/engineering/atmos/upper name = "Upper Atmospherics" @@ -1035,7 +1033,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engineering/atmospherics_engine name = "Atmospherics Engine" icon_state = "atmos_engine" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED /area/engineering/lobby name = "Engineering Lobby" @@ -1044,7 +1042,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engineering/supermatter name = "Supermatter Engine" icon_state = "engine_sm" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED sound_environment = SOUND_AREA_SMALL_ENCLOSED /area/engineering/break_room @@ -1084,7 +1082,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engineering/storage/tcomms name = "Telecomms Storage" icon_state = "tcom" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED clockwork_warp_allowed = FALSE //Engineering - Construction @@ -1314,7 +1312,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/medical/virology name = "Virology" icon_state = "virology" - flags_1 = CULT_PERMITTED_1 /area/medical/morgue name = "Morgue" @@ -1608,7 +1605,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/science/test_area name = "Toxins Test Area" icon_state = "tox_test" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED /area/science/mixing name = "Toxins Mixing Lab" @@ -1617,7 +1614,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" - area_flags = BLOBS_ALLOWED | UNIQUE_AREA + area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED /area/science/misc_lab name = "Testing Lab" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index bc7a802df5..2a21d72119 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -13,7 +13,7 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT invisibility = INVISIBILITY_LIGHTING - var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA + var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED var/fire = null ///Whether there is an atmos alarm in this area diff --git a/code/game/area/areas/centcom.dm b/code/game/area/areas/centcom.dm index 09adaf72f9..0befe0bd86 100644 --- a/code/game/area/areas/centcom.dm +++ b/code/game/area/areas/centcom.dm @@ -11,7 +11,7 @@ dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE has_gravity = STANDARD_GRAVITY - area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT + area_flags = UNIQUE_AREA | NOTELEPORT flags_1 = NONE /area/centcom/control diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm index c639080775..49b06e5c23 100644 --- a/code/game/area/areas/holodeck.dm +++ b/code/game/area/areas/holodeck.dm @@ -3,7 +3,6 @@ icon_state = "Holodeck" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED flags_1 = NONE - area_flags = VALID_TERRITORY | UNIQUE_AREA sound_environment = SOUND_ENVIRONMENT_PADDED_CELL var/obj/machinery/computer/holodeck/linked diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index 78bf7a1311..c8ee2973c4 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -157,10 +157,10 @@ /area/shuttle/escape name = "Emergency Shuttle" - area_flags = BLOBS_ALLOWED + area_flags = BLOBS_ALLOWED | CULT_PERMITTED // area_limited_icon_smoothing = /area/shuttle/escape canSmoothWithAreas = /area/shuttle/escape - flags_1 = CAN_BE_DIRTY_1 // | CULT_PERMITTED_1 + flags_1 = CAN_BE_DIRTY_1 /area/shuttle/escape/backup name = "Backup Emergency Shuttle" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index ffcd15c39e..42efddb1df 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -593,7 +593,7 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \ return var/turf/T = get_turf(user) //we may have moved. adjust as needed... var/area/A = get_area(user) - if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.flags_1 & CULT_PERMITTED_1))) + if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & CULT_PERMITTED))) to_chat(user, "The veil is not weak enough here.") return FALSE return ..() diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm index 6b6dd64f72..41c82bb45e 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm @@ -25,7 +25,7 @@ /datum/clockwork_scripture/create_object/stargazer/check_special_requirements() var/area/A = get_area(invoker) var/turf/T = get_turf(invoker) - if(!is_station_level(invoker.z) || isspaceturf(T) || !(A.area_flags & VALID_TERRITORY)) + if(!is_station_level(invoker.z) || isspaceturf(T) || !(A?.area_flags & CULT_PERMITTED)) to_chat(invoker, "Stargazers can't be built off-station.") return return ..() diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_judgement.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_judgement.dm index 6802576bd6..caa45d55d2 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_judgement.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_judgement.dm @@ -34,7 +34,7 @@ return FALSE var/area/A = get_area(invoker) var/turf/T = get_turf(invoker) - if(!is_station_level(T.z) || isspaceturf(T) || !(A.area_flags & VALID_TERRITORY) || isshuttleturf(T)) + if(!is_station_level(T.z) || isspaceturf(T) || !(A?.area_flags & CULT_PERMITTED) || isshuttleturf(T)) to_chat(invoker, "You must be on the station to activate the Ark!") return FALSE if(GLOB.clockwork_gateway_activated) diff --git a/code/modules/antagonists/clockcult/clock_structures/stargazer.dm b/code/modules/antagonists/clockcult/clock_structures/stargazer.dm index 88a29f14f1..dea8f428ba 100644 --- a/code/modules/antagonists/clockcult/clock_structures/stargazer.dm +++ b/code/modules/antagonists/clockcult/clock_structures/stargazer.dm @@ -52,7 +52,7 @@ break if(has_starlight && anchored) var/area/A = get_area(src) - if(A.outdoors || A.map_name == "Space" || !(A.area_flags & VALID_TERRITORY)) + if(A.outdoors || A.map_name == "Space" || !(A?.area_flags & CULT_PERMITTED)) has_starlight = FALSE if(old_status != has_starlight) if(has_starlight) diff --git a/code/modules/antagonists/cult/ritual.dm b/code/modules/antagonists/cult/ritual.dm index 1aef9654e3..98889169c6 100644 --- a/code/modules/antagonists/cult/ritual.dm +++ b/code/modules/antagonists/cult/ritual.dm @@ -148,7 +148,7 @@ This file contains the cult dagger and rune list code to_chat(user, "There is already a rune here.") return FALSE var/area/A = get_area(T) - if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & VALID_TERRITORY)) + if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & CULT_PERMITTED)) to_chat(user, "The veil is not weak enough here.") return FALSE return TRUE From 0cf7c5070d3fe35b16ba5d3b68178cb0abadd329 Mon Sep 17 00:00:00 2001 From: Linzolle Date: Thu, 27 May 2021 19:45:12 -0500 Subject: [PATCH 2/3] parentheses --- code/game/objects/items/stacks/sheets/sheet_types.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 42efddb1df..592b2e42cc 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -593,7 +593,7 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \ return var/turf/T = get_turf(user) //we may have moved. adjust as needed... var/area/A = get_area(user) - if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & CULT_PERMITTED))) + if((!is_station_level(T.z) && !is_mining_level(T.z)) || !(A?.area_flags & CULT_PERMITTED)) to_chat(user, "The veil is not weak enough here.") return FALSE return ..() From ed86a6628abb7b841634d85d0ed0f0e68e8f041e Mon Sep 17 00:00:00 2001 From: Linzolle Date: Thu, 27 May 2021 19:53:55 -0500 Subject: [PATCH 3/3] THIS SHOULD REALLY BE THE OTHER WAY AROUND --- code/modules/antagonists/cult/cult.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index 30ccb731c3..0cc0ed133e 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -419,7 +419,7 @@ 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.area_flags & VALID_TERRITORY)) + if(summon && is_station_level(summon.z) && (summon.area_flags & VALID_TERRITORY)) summon_spots += summon sanity++ update_explanation_text()