Skip to content

Commit

Permalink
Refactor stage three of black goo and added stage four. (#5739)
Browse files Browse the repository at this point in the history
# About the pull request
Refactor black goo :
1- change how stage 3 was done because it was a mess. this stage
function is to turn every infected into zombie.
2-add a stage 4 for when you zombie transformation is over.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
refactor: refactored stage three of black goo and added stage four.
/:cl:

---------

Co-authored-by: Julien <[email protected]>
Co-authored-by: Drathek <[email protected]>
  • Loading branch information
3 people authored Feb 29, 2024
1 parent 0b04a33 commit 0deeaf6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
26 changes: 17 additions & 9 deletions code/datums/diseases/black_goo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
#define ZOMBIE_INFECTION_STAGE_ONE 1
#define ZOMBIE_INFECTION_STAGE_TWO 2
#define ZOMBIE_INFECTION_STAGE_THREE 3
#define ZOMBIE_INFECTION_STAGE_FOUR 4
#define SLOW_INFECTION_RATE 1
#define FAST_INFECTION_RATE 7
#define STAGE_LEVEL_THRESHOLD 360
#define MESSAGE_COOLDOWN_TIME 1 MINUTES

/datum/disease/black_goo
name = "Black Goo"
max_stages = 3
max_stages = 4
cure = "Anti-Zed"
cure_id = "antiZed"
spread = "Bites"
Expand Down Expand Up @@ -120,17 +121,23 @@
stage_level += 42

if(ZOMBIE_INFECTION_STAGE_THREE)
//check if the mob is already a zombie and just return to avoid weird stuff, edge case if zombie_is_transforming deoesn't work.
// if zombie or transforming we upgrade it to stage four.
if(iszombie(infected_mob))
stage++
return

if(infected_mob.stat == DEAD && stage_counter != stage)
to_chat(infected_mob, SPAN_CENTERBOLD("Your zombie infection is now at stage three! Zombie transformation begin!"))
stage_counter = stage
hidden = list(0,0)
// if not a zombie(above check) and isn't transforming then we transform you into a zombie.
if(!zombie_is_transforming)
// if your dead we inform you that you're going to turn into a zombie.
if(infected_mob.stat == DEAD && stage_counter != stage)
to_chat(infected_mob, SPAN_CENTERBOLD("Your zombie infection is now at stage three! Zombie transformation begin!"))
stage_counter = stage
zombie_transform(infected_mob)
infected_mob.next_move_slowdown = max(infected_mob.next_move_slowdown, 2)
hidden = list(0,0)
infected_mob.next_move_slowdown = max(infected_mob.next_move_slowdown, 2)

if(ZOMBIE_INFECTION_STAGE_FOUR)
return
// final stage of infection it's to avoid running the above test once you're a zombie for now. maybe more later.

/datum/disease/black_goo/proc/zombie_transform(mob/living/carbon/human/human)
set waitfor = 0
Expand All @@ -149,7 +156,7 @@
playsound(human.loc, 'sound/hallucinations/wail.ogg', 25, 1)
human.jitteriness = 0
human.set_species(SPECIES_ZOMBIE)
stage = 3
stage = 4
human.faction = FACTION_ZOMBIE
zombie_is_transforming = FALSE

Expand Down Expand Up @@ -310,6 +317,7 @@
#undef ZOMBIE_INFECTION_STAGE_ONE
#undef ZOMBIE_INFECTION_STAGE_TWO
#undef ZOMBIE_INFECTION_STAGE_THREE
#undef ZOMBIE_INFECTION_STAGE_FOUR
#undef STAGE_LEVEL_THRESHOLD
#undef SLOW_INFECTION_RATE
#undef FAST_INFECTION_RATE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species/zombie.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
var/datum/disease/black_goo/zombie_infection = locate() in zombie.viruses
if(!zombie_infection)
zombie_infection = zombie.AddDisease(new /datum/disease/black_goo())
zombie_infection.stage = 3
zombie_infection.stage = 4

var/datum/mob_hud/Hu = GLOB.huds[MOB_HUD_MEDICAL_OBSERVER]
Hu.add_hud_to(zombie, zombie)
Expand Down

0 comments on commit 0deeaf6

Please sign in to comment.