Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black Goo Patch #3633

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
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)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forest seriously I swear.... OOP exists for a reason. At least do it 2018 style and define a handler proc on the disease, don't strap istypes based chunks in the middle of stuff like it's 2012

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(virus.can_infect(src))

or something i don't know

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But where's the fun in that. If I did everything perfectly first time around you wouldn't have so much fun reviewing it! :HAH:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mean 😭

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do this when/if I have time tomorrow

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 @@ -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)


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 @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
13 changes: 13 additions & 0 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
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 @@ -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)
Expand Down
Loading