Skip to content

Commit

Permalink
Make LZ smoke admin only (#7556)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>


![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)

</details>


# 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:
  • Loading branch information
Drulikar authored Nov 12, 2024
1 parent 157667e commit 9c0d9a2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
))
Expand Down
23 changes: 23 additions & 0 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

0 comments on commit 9c0d9a2

Please sign in to comment.