Skip to content

Commit

Permalink
Merge pull request #23 from CannibalHunter/zombie
Browse files Browse the repository at this point in the history
ACTUALLY makes zombies not spawn durring lowpop
  • Loading branch information
russ-money authored Aug 19, 2024
2 parents bc1643d + cb4d010 commit 07524d7
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,22 @@ 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're a player
var/playercount = 0 // setup a var
for(var/client/C in GLOB.clients) //for every client in the game add one to the var
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++
if(playercount >= 50) // check the var to see if it's more than 50, if not just ghost the player
// turn us into a deadite flesh eater
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(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..."))
return
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..."))
return
else
return ..()
return ..()

/mob/proc/scry_ghost()
Expand Down

0 comments on commit 07524d7

Please sign in to comment.