Skip to content

Commit

Permalink
TGS Test Merge (#3633)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Feb 15, 2024
2 parents 43edf3c + 9e7c29b commit cb47890
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 11 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
#define MODE_HARDCORE_PERMA (1<<9) /// Toggles Hardcore for all marines, meaning they instantly perma upon death
#define MODE_DISPOSABLE_MOBS (1<<10) // Toggles if mobs fit in disposals or not. Off by default.
#define MODE_BYPASS_JOE (1<<11) // Toggles if ghosts can bypass Working Joe spawn limitations, does NOT bypass WL requirement. Off by default.
#define MODE_ALLOW_ZOMBIES (1<<12) /// Whether or not zombiism can spread through non admin means.

#define ROUNDSTATUS_FOG_DOWN 1
#define ROUNDSTATUS_PODDOORS_OPEN 2
Expand Down
25 changes: 15 additions & 10 deletions code/datums/diseases/black_goo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,21 @@
return FALSE
playsound(loc, 'sound/weapons/bladeslice.ogg', 25, 1, 5)

if(ishuman_strict(target))
var/mob/living/carbon/human/human = target

if(locate(/datum/disease/black_goo) in human.viruses)
to_chat(user, SPAN_XENOWARNING("<b>You sense your target is infected.</b>"))
else
var/bio_protected = max(CLOTHING_ARMOR_HARDCORE - human.getarmor(user.zone_selected, ARMOR_BIO), 0)
if(prob(bio_protected))
target.AddDisease(new /datum/disease/black_goo)
to_chat(user, SPAN_XENOWARNING("<b>You sense your target is now infected.</b>"))
if(SSticker.mode && MODE_HAS_TOGGLEABLE_FLAG(MODE_ALLOW_ZOMBIES))
if(ishuman_strict(target))
var/mob/living/carbon/human/human = target

if(locate(/datum/disease/black_goo) in human.viruses)
to_chat(user, SPAN_XENOWARNING("<b>You sense your target is infected.</b>"))
else
var/bio_protected = max(CLOTHING_ARMOR_HARDCORE - human.getarmor(user.zone_selected, ARMOR_BIO), 0)
if(prob(bio_protected))
target.AddDisease(new /datum/disease/black_goo)
to_chat(user, SPAN_XENOWARNING("<b>You sense your target is now infected.</b>"))
else
message_admins(SPAN_HIGHDANGER("[key_name(user)] [ADMIN_JMP(user)] tried to infect [key_name(target)] [ADMIN_JMP(target)] with black-goo!"))
return FALSE


target.apply_effect(2, SLOW)

Expand Down
4 changes: 4 additions & 0 deletions code/datums/diseases/mob_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

// This proc has some procs that should be extracted from it. I believe we can develop some helper procs from it - Rockdtben
/mob/proc/contract_disease(datum/disease/virus, skip_this = 0, force_species_check=1, spread_type = -5)
if(istype(virus, /datum/disease/black_goo) && (SSticker.mode && !MODE_HAS_TOGGLEABLE_FLAG(MODE_ALLOW_ZOMBIES)))
message_admins(SPAN_HIGHDANGER("Something attempted to infect [key_name(src)] [ADMIN_JMP(src)] with black-goo!"))
return FALSE

if(stat == DEAD)
return
if(istype(virus, /datum/disease/advance))
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/effects/decals/cleanable/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@
if(!istype(H)) return
if(H.species.name == "Human")
if(!H.shoes && prob(50))
if(SSticker.mode && !MODE_HAS_TOGGLEABLE_FLAG(MODE_ALLOW_ZOMBIES))
message_admins(SPAN_HIGHDANGER("[src] at [ADMIN_JMP(src)] tried to pass black-goo infection to [key_name(H)]!"))
return FALSE
H.contract_disease(new /datum/disease/black_goo)


Expand Down
4 changes: 3 additions & 1 deletion code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ GLOBAL_LIST_INIT(admin_verbs_major_event, list(
/client/proc/enable_podlauncher,
/client/proc/change_taskbar_icon,
/client/proc/change_weather,
/client/proc/admin_blurb
/client/proc/admin_blurb,
/client/proc/toggle_zombies
))

GLOBAL_LIST_INIT(admin_verbs_spawn, list(
Expand Down Expand Up @@ -216,6 +217,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
/datum/admins/proc/view_href_log, /*shows the server HREF log for this round*/
/datum/admins/proc/view_tgui_log, /*shows the server TGUI log for this round*/
/client/proc/admin_blurb,
/client/proc/toggle_zombies,
))

GLOBAL_LIST_INIT(admin_verbs_debug_advanced, list(
Expand Down
14 changes: 14 additions & 0 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -881,3 +881,17 @@

SSticker.mode.toggleable_flags ^= MODE_BYPASS_JOE
message_admins("[src] has [MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE) ? "allowed players to bypass (except whitelist)" : "prevented players from bypassing"] Working Joe spawn conditions.")

/client/proc/toggle_zombies()
set name = "Toggle Zombie Spread"
set category = "Admin.Flags"

if(!admin_holder || !check_rights(R_DEBUG|R_EVENT))
return

if(!SSticker.mode)
to_chat(usr, SPAN_WARNING("A mode hasn't been selected yet!"))
return

SSticker.mode.toggleable_flags ^= MODE_ALLOW_ZOMBIES
message_admins("[src] has [MODE_HAS_TOGGLEABLE_FLAG(MODE_ALLOW_ZOMBIES) ? "allowed" : "forbidden"] zombiism to spread.")
3 changes: 3 additions & 0 deletions code/modules/reagents/chemistry_properties/prop_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@
if(!ishuman(M))
return
var/mob/living/carbon/human/H = M
if(SSticker.mode && !MODE_HAS_TOGGLEABLE_FLAG(MODE_ALLOW_ZOMBIES))
message_admins(SPAN_HIGHDANGER("[holder] tried to pass black-goo infection to [key_name(H)] [ADMIN_JMP(H)]!"))
return FALSE
H.contract_disease(new /datum/disease/black_goo, 1)

/datum/chem_property/special/curing
Expand Down
3 changes: 3 additions & 0 deletions code/modules/reagents/chemistry_reagents/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.name == "Human")
if(SSticker.mode && !MODE_HAS_TOGGLEABLE_FLAG(MODE_ALLOW_ZOMBIES))
message_admins(SPAN_HIGHDANGER("Black goo reaction-mob tried to infect [key_name(H)] [ADMIN_JMP(H)] with black-goo!"))
return FALSE
H.contract_disease(new /datum/disease/black_goo)

/datum/reagent/blackgoo/reaction_turf(turf/T, volume)
Expand Down

0 comments on commit cb47890

Please sign in to comment.