From d01bdfb6c8cf0d5fdb85945b68e406ffa72d6053 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 15 Jun 2023 00:17:17 +0100 Subject: [PATCH 1/2] patch --- code/__DEFINES/mode.dm | 1 + code/datums/diseases/mob_procs.dm | 4 ++++ code/game/objects/effects/decals/cleanable/misc.dm | 3 +++ code/modules/admin/admin_verbs.dm | 4 +++- code/modules/admin/tabs/admin_tab.dm | 13 +++++++++++++ .../reagents/chemistry_properties/prop_special.dm | 3 +++ code/modules/reagents/chemistry_reagents/other.dm | 3 +++ 7 files changed, 30 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm index 1f3c4ad22bf1..4f4d8cc1f467 100644 --- a/code/__DEFINES/mode.dm +++ b/code/__DEFINES/mode.dm @@ -69,6 +69,7 @@ #define MODE_LZ_PROTECTION (1<<7) /// Prevents the LZ from being mortared #define MODE_SHIPSIDE_SD (1<<8) /// Toggles whether Predators can big SD when not on the groundmap #define MODE_HARDCORE_PERMA (1<<9) /// Toggles Hardcore for all marines, meaning they instantly perma upon death +#define MODE_ALLOW_ZOMBIES (1<<10) /// 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/mob_procs.dm b/code/datums/diseases/mob_procs.dm index 7f9704c46f47..efb46245bd3c 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 0399d0996411..1ed0a0ebfd92 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -170,6 +170,9 @@ if(!istype(H)) return if(H.species.name == "Human") if(!H.shoes || prob(25)) + 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 d21188615785..2177c95a673f 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -153,7 +153,8 @@ var/list/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 ) var/list/admin_verbs_spawn = list( @@ -209,6 +210,7 @@ var/list/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, ) var/list/admin_verbs_debug_advanced = list( diff --git a/code/modules/admin/tabs/admin_tab.dm b/code/modules/admin/tabs/admin_tab.dm index 11ee49b65e61..f9810bcd1092 100644 --- a/code/modules/admin/tabs/admin_tab.dm +++ b/code/modules/admin/tabs/admin_tab.dm @@ -843,3 +843,16 @@ SSticker.mode.toggleable_flags ^= MODE_HARDCORE_PERMA message_admins("[src] has toggled Hardcore [MODE_HAS_TOGGLEABLE_FLAG(MODE_HARDCORE_PERMA) ? "on, causing all humans to instantly go perma on death" : "off, causing all humans to die like normal"].") +/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 cec04ca66616..ca8be0693bc5 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 a7f0a1143428..35e2a79db44a 100644 --- a/code/modules/reagents/chemistry_reagents/other.dm +++ b/code/modules/reagents/chemistry_reagents/other.dm @@ -680,6 +680,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) From 9e7c29b68522c045af6aeb8256b314a52defaee1 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Tue, 13 Feb 2024 03:39:24 +0000 Subject: [PATCH 2/2] zombs --- code/datums/diseases/black_goo.dm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) 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)