diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm index 45c098ac0a21..9903f4991782 100644 --- a/code/__DEFINES/mode.dm +++ b/code/__DEFINES/mode.dm @@ -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 diff --git a/code/datums/diseases/black_goo.dm b/code/datums/diseases/black_goo.dm index 183cdadf17aa..c90c59a08d26 100644 --- a/code/datums/diseases/black_goo.dm +++ b/code/datums/diseases/black_goo.dm @@ -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("You sense your target is infected.")) - 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("You sense your target is now infected.")) + 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("You sense your target is infected.")) + 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("You sense your target is now infected.")) + 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) diff --git a/code/datums/diseases/mob_procs.dm b/code/datums/diseases/mob_procs.dm index c27efecdff84..11ccf707d9b0 100644 --- a/code/datums/diseases/mob_procs.dm +++ b/code/datums/diseases/mob_procs.dm @@ -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)) diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index a88b4ea5c5ea..8b8a8d0795e3 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -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) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index e5fd014e5706..26940e71a2f3 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -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( @@ -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( diff --git a/code/modules/admin/tabs/admin_tab.dm b/code/modules/admin/tabs/admin_tab.dm index 356762b5edd7..7448d6aa8a56 100644 --- a/code/modules/admin/tabs/admin_tab.dm +++ b/code/modules/admin/tabs/admin_tab.dm @@ -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.") diff --git a/code/modules/reagents/chemistry_properties/prop_special.dm b/code/modules/reagents/chemistry_properties/prop_special.dm index 52354f0d6b01..78177dadf5e4 100644 --- a/code/modules/reagents/chemistry_properties/prop_special.dm +++ b/code/modules/reagents/chemistry_properties/prop_special.dm @@ -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 diff --git a/code/modules/reagents/chemistry_reagents/other.dm b/code/modules/reagents/chemistry_reagents/other.dm index ae1a42bd5e6d..a0cf6dfd8a17 100644 --- a/code/modules/reagents/chemistry_reagents/other.dm +++ b/code/modules/reagents/chemistry_reagents/other.dm @@ -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)