From 9c0d9a28497d5c24c92205dacd203755bf8f4eaa Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:58:26 -0600 Subject: [PATCH] Make LZ smoke admin only (#7556) # About the pull request This PR is a follow up to #7363 and #7535 where the LZ miasma hazard is now a toggleable flag during the first 3 minutes of round by admins. It is disabled by default (as in no longer LZ miasma smoke by default). # Explain why it's good for the game Although the LZ smoke is successful in getting survivors out of the landing zones, there is no longer the aspect of trying to push survivors closer to weedable areas now that everywhere is weedable. It is awkward for xenos if survivors back themselves up to the smoke and have no possible flank. The reason for making it a toggle is just because I think there can be events that utilize it, or if staff otherwise wants to experiment with this mechanic. # Testing Photographs and Procedure
Screenshots & Videos ![1](https://github.com/user-attachments/assets/f0cee1fd-caed-43f2-a562-6ec3313926ed) ![2](https://github.com/user-attachments/assets/6614d334-a775-4496-b1ee-054ce6d23959) ![3](https://github.com/user-attachments/assets/a77140fc-83f1-4c0e-ad5d-b11511a733de)
# Changelog :cl: Drathek balance: LZ smoke is now disabled by default on distress signal admin: Added game mode toggle to toggle LZ smoke during the first 3 minutes of the round (otherwise is locked in) /:cl: --- code/__DEFINES/mode.dm | 1 + code/_globalvars/bitfields.dm | 1 + .../colonialmarines/colonialmarines.dm | 4 ++++ code/modules/admin/admin_verbs.dm | 1 + code/modules/admin/tabs/admin_tab.dm | 23 +++++++++++++++++++ 5 files changed, 30 insertions(+) diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm index 6cf38a0b3858..64a889f23a96 100644 --- a/code/__DEFINES/mode.dm +++ b/code/__DEFINES/mode.dm @@ -75,6 +75,7 @@ #define MODE_DISABLE_JOE_RESPAWN (1<<12) // Toggles if ghosts can respawn as Working Joes after dying as one when 15 minutes have passed. Off by default #define MODE_INDESTRUCTIBLE_SPLINTS (1<<13) //Toggle is splints are to become nanosplints #define MODE_NO_INTERNAL_BLEEDING (1<<14) // Toggles all internal bleeding behavior to cause normal bleeding instead +#define MODE_LZ_HAZARD_ACTIVATED (1<<15) // Distress Signal: Spawns miasma 3 minutes after round start #define ROUNDSTATUS_FOG_DOWN 1 diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 6db0d5c550bd..c90f970d4471 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -435,6 +435,7 @@ DEFINE_BITFIELD(toggleable_flags, list( "MODE_DISPOSABLE_MOBS" = MODE_DISPOSABLE_MOBS, "MODE_BYPASS_JOE" = MODE_BYPASS_JOE, "MODE_DISABLE_JOE_RESPAWN" = MODE_DISABLE_JOE_RESPAWN, + "MODE_LZ_HAZARD_ACTIVATED" = MODE_LZ_HAZARD_ACTIVATED )) DEFINE_BITFIELD(state, list( diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm index 073b9ab29106..9fb0553a35c2 100644 --- a/code/game/gamemodes/colonialmarines/colonialmarines.dm +++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm @@ -212,6 +212,10 @@ /datum/game_mode/colonialmarines/proc/start_lz_hazards() if(SSobjectives.first_drop_complete) return // Just for sanity + if(!MODE_HAS_TOGGLEABLE_FLAG(MODE_LZ_HAZARD_ACTIVATED)) + return + + log_game("Distress Signal LZ hazards active!") INVOKE_ASYNC(src, PROC_REF(warn_lz_hazard), locate(/obj/structure/machinery/computer/shuttle/dropship/flight/lz1)) INVOKE_ASYNC(src, PROC_REF(warn_lz_hazard), locate(/obj/structure/machinery/computer/shuttle/dropship/flight/lz2)) addtimer(CALLBACK(src, PROC_REF(spawn_lz_hazards)), OB_TRAVEL_TIMING + 1 SECONDS) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 9e7482714a3d..e2096bcdac7b 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -146,6 +146,7 @@ GLOBAL_LIST_INIT(admin_verbs_minor_event, list( /client/proc/toggle_hardcore_perma, /client/proc/toggle_bypass_joe_restriction, /client/proc/toggle_joe_respawns, + /client/proc/toggle_lz_hazards, /datum/admins/proc/open_shuttlepanel, /client/proc/get_whitelisted_clients, )) diff --git a/code/modules/admin/tabs/admin_tab.dm b/code/modules/admin/tabs/admin_tab.dm index cf8fe41b66d7..ecc1471b69a3 100644 --- a/code/modules/admin/tabs/admin_tab.dm +++ b/code/modules/admin/tabs/admin_tab.dm @@ -886,3 +886,26 @@ SSticker.mode.toggleable_flags ^= MODE_DISABLE_JOE_RESPAWN message_admins("[src] has [MODE_HAS_TOGGLEABLE_FLAG(MODE_DISABLE_JOE_RESPAWN) ? "disabled" : "enabled"] Working Joe respawns.") + +/client/proc/toggle_lz_hazards() + set name = "Toggle LZ Hazards" + set category = "Admin.Flags" + set desc = "Distress Signal: Whether miasma smoke is spawned 3 minutes after the start of the round." + + if(!admin_holder || !check_rights(R_EVENT, TRUE)) + return + + if(!SSticker.mode) + to_chat(usr, SPAN_WARNING("A mode hasn't been selected yet!")) + return + + if(!istype(SSticker.mode, /datum/game_mode/colonialmarines)) + to_chat(usr, SPAN_WARNING("LZ hazards are only applicable to distress signal!")) + return + + if(ROUND_TIME > LZ_HAZARD_START) + to_chat(usr, SPAN_WARNING("Its too late to toggle this!")) + return + + SSticker.mode.toggleable_flags ^= MODE_LZ_HAZARD_ACTIVATED + message_admins("[src] has [MODE_HAS_TOGGLEABLE_FLAG(MODE_LZ_HAZARD_ACTIVATED) ? "enabled" : "disabled"] LZ hazards.")