Skip to content

Commit

Permalink
Revert zombie changes
Browse files Browse the repository at this point in the history
Zombie PCs are not working as intended.
- When player count did not meet the threshold, NPC zombies would rez with no logic. (Comatose mobs)
- Players were not able to rez as a zombie when the player threshold was met.
- Players were having issues ghosting into a spirit when they died.

I like the idea of PC zombies however, I would like this feature to be in a better working state with more balance behind it before we attempt this in the future.
  • Loading branch information
russ-money committed Aug 29, 2024
1 parent 0c06f00 commit 95c1372
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 29 deletions.
46 changes: 27 additions & 19 deletions code/modules/antagonists/roguetown/villain/zomble.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
TRAIT_NOPAIN,
TRAIT_NOPAINSTUN,
TRAIT_NOBREATH,
TRAIT_NOBREATH,
TRAIT_TOXIMMUNE,
TRAIT_CHUNKYFINGERS,
TRAIT_NOSLEEP,
Expand All @@ -43,7 +44,7 @@
TRAIT_LIMPDICK,
TRAIT_ZOMBIE_SPEECH,
TRAIT_ZOMBIE_IMMUNE,
//TRAIT_EMOTEMUTE,
TRAIT_EMOTEMUTE,
TRAIT_ROTMAN,
TRAIT_NORUN
)
Expand Down Expand Up @@ -186,24 +187,34 @@
zombie_part.rotted = TRUE
zombie_part.update_disabled()
zombie.update_body()
zombie.cmode_music = 'sound/music/combat_zombie.ogg'
zombie.cmode_music = 'sound/music/combat_weird.ogg'
zombie.set_patron(/datum/patron/inhumen/zizo)

// We will adjust thier stats so they're a bit stronger
zombie.STASTR += rand(6,10)
if(zombie.STASTR >= 20)
zombie.STASTR = 20
zombie.STACON += rand(6,10)
if(zombie.STACON >= 20)
zombie.STACON = 20
zombie.STASPD = rand(3,6)
// Outside of one 2% chance remaining for zombie era strength
if(prob(2))
zombie.STASTR = 18

// This is the original first commit values for it, aka 5-7
zombie.STASPD = rand(5,7)

zombie.STAINT = 1

last_bite = world.time
has_turned = TRUE
// Drop your helm and gorgies boy you won't need it anymore!!!
var/static/list/removed_slots = list(
SLOT_HEAD,
SLOT_WEAR_MASK,
SLOT_MOUTH,
SLOT_NECK,
)
for(var/slot in removed_slots)
zombie.dropItemToGround(zombie.get_item_by_slot(slot), TRUE)

// Ghosts you because this shit was just not working whatsoever, let the AI handle the rest
zombie.ghostize(FALSE)

/datum/antagonist/zombie/greet()
to_chat(owner.current, span_userdanger("Death is not the end... We must spread..."))
to_chat(owner.current, span_userdanger("Death is not the end..."))
return ..()

/datum/antagonist/zombie/on_life(mob/user)
Expand Down Expand Up @@ -290,7 +301,7 @@
if(!closest_dist)
to_chat(src, span_warning("I failed to smell anything..."))
return FALSE
to_chat(src, span_warning("I smell something... [closest_dist] meters away, [dir2text(the_dir)]..."))
to_chat(src, span_warning("[closest_dist] meters away, [dir2text(the_dir)]..."))
return TRUE

/// Use this to attempt to add the zombie antag datum to a human
Expand Down Expand Up @@ -323,19 +334,16 @@
to_chat(src, span_danger("I feel horrible... REALLY horrible..."))
mob_timers["puke"] = world.time
vomit(1, blood = TRUE, stun = FALSE)
src.playsound_local(get_turf(src), 'sound/music/horror.ogg', 35, FALSE, pressure_affected = FALSE, channel = CHANNEL_MUSIC)
vomit(blood = TRUE, stun = FALSE)
addtimer(CALLBACK(src, PROC_REF(wake_zombie)), 125 SECONDS)
addtimer(CALLBACK(src, PROC_REF(wake_zombie)), 1 MINUTES)
return zombie_antag

/mob/living/carbon/human/proc/wake_zombie()
var/datum/antagonist/zombie/zombie_antag = mind?.has_antag_datum(/datum/antagonist/zombie)
if(!zombie_antag || zombie_antag.has_turned)
return FALSE
flash_fullscreen("redflash3")
to_chat(src, span_danger("ZIZO! I NEED TO DIG MY TEETH INTO FLESH!"))
src.client.verbs -= GLOB.ghost_verbs
emote("rage")
to_chat(src, span_danger("It hurts... Is this really the end for me?"))
emote("scream") // heres your warning to others bro
Knockdown(1)
zombie_antag.wake_zombie(TRUE)
return TRUE
14 changes: 4 additions & 10 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,22 +406,16 @@ Works together with spawning an observer, noted above.
return ghost

/mob/living/carbon/human/ghostize(can_reenter_corpse = 1, force_respawn = FALSE, drawskip = FALSE, admin = FALSE)
if(mind) // check if we are a player
var/playercount = 0 // setup a var to get the total player number
for(var/client/C in GLOB.clients) // for every player add 1 to playercount
playercount++
testing("GHOSTIZE(Mob:[src])(PlayerTotal:[playercount])")
if(playercount >= 40) // if we have 40 or more players turn us into a zombie
var/datum/antagonist/zombie/zomble = mind.has_antag_datum(/datum/antagonist/zombie)
if(mind)
var/datum/antagonist/zombie/zomble = mind.has_antag_datum(/datum/antagonist/zombie)
if(zomble)
if(force_respawn)
mind.remove_antag_datum(/datum/antagonist/zombie)
return ..()
else if(!zomble.revived)
if(!(world.time % 5))
to_chat(src, span_warning("I'm preparing to walk again..."))
to_chat(src, span_warning("I'm preparing to walk again."))
return
else
return ..()
return ..()

/mob/proc/scry_ghost()
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/carbon/human/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
dust(just_ash=TRUE,drop_items=TRUE)
return

if(!gibbed)
var/datum/antagonist/zombie/zomble = mind?.has_antag_datum(/datum/antagonist/zombie)
if(zomble)
addtimer(CALLBACK(zomble, TYPE_PROC_REF(/datum/antagonist/zombie, wake_zombie)), 5 SECONDS)
else if(can_death_zombify())
zombie_check()

if(client || mind)
SSticker.deaths++

Expand Down

0 comments on commit 95c1372

Please sign in to comment.