mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
adds spawners for NPC zombies (#25873)
* lmao * lol * yes * yeah sure * fix * Apply suggestions from code review Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * lewc review + duplicate --------- Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
|
||||
|
||||
/obj/item/zombie_claw/proc/try_infect(mob/living/carbon/human/target, mob/living/user)
|
||||
if(!ishuman(target))
|
||||
if(!ishuman(target) || HAS_TRAIT(user, TRAIT_NON_INFECTIOUS_ZOMBIE))
|
||||
return
|
||||
if(!(user.zone_selected in list(BODY_ZONE_CHEST, BODY_ZONE_HEAD)))
|
||||
to_chat(user, "<span class='warning zombie'>Our infection cannot spread without their head or chest.</span>")
|
||||
|
||||
@@ -183,6 +183,8 @@
|
||||
assignedrole = "Ghost Role"
|
||||
|
||||
var/husk = null
|
||||
/// Should we fully dna-scramble these humans?
|
||||
var/dna_scrambled = FALSE
|
||||
//these vars are for lazy mappers to override parts of the outfit
|
||||
//these cannot be null by default, or mappers cannot set them to null if they want nothing in that slot
|
||||
var/uniform = -1
|
||||
@@ -259,6 +261,9 @@
|
||||
H.s_tone = random_skin_tone()
|
||||
H.skin_colour = rand_hex_color()
|
||||
|
||||
if(dna_scrambled)
|
||||
H.get_dna_scrambled()
|
||||
|
||||
H.update_body(rebuild_base = TRUE)
|
||||
|
||||
if(outfit)
|
||||
@@ -581,6 +586,28 @@
|
||||
mob_species = /datum/species/skeleton/brittle
|
||||
mob_gender = NEUTER
|
||||
|
||||
/obj/effect/mob_spawn/human/alive/zombie
|
||||
name = "NPC Zombie (Infectious)"
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "zombie_s"
|
||||
roundstart = TRUE
|
||||
dna_scrambled = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/alive/zombie/equip(mob/living/carbon/human/H)
|
||||
ADD_TRAIT(H, TRAIT_NPC_ZOMBIE, ROUNDSTART_TRAIT)
|
||||
H.ForceContractDisease(new /datum/disease/zombie)
|
||||
for(var/datum/disease/zombie/zomb in H.viruses)
|
||||
zomb.stage = 8
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/alive/zombie/non_infectious
|
||||
name = "NPC Zombie (Non-infectious)"
|
||||
|
||||
/obj/effect/mob_spawn/human/alive/zombie/non_infectious/equip(mob/living/carbon/human/H)
|
||||
ADD_TRAIT(H, TRAIT_NON_INFECTIOUS_ZOMBIE, ROUNDSTART_TRAIT)
|
||||
return ..()
|
||||
|
||||
////////Non-human spawners////////
|
||||
|
||||
/obj/effect/mob_spawn/mouse
|
||||
|
||||
@@ -2046,3 +2046,13 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
return dna.species.unarmed
|
||||
return zombie.claw_attack
|
||||
|
||||
/mob/living/carbon/human/proc/get_dna_scrambled()
|
||||
scramble(1, src, 100)
|
||||
real_name = random_name(gender, dna.species.name) // Give them a name that makes sense for their species.
|
||||
sync_organ_dna(assimilate = 1)
|
||||
update_body()
|
||||
reset_hair() // No more winding up with hairstyles you're not supposed to have, and blowing your cover.
|
||||
reset_markings() // ...Or markings.
|
||||
dna.ResetUIFrom(src)
|
||||
flavor_text = ""
|
||||
|
||||
|
||||
@@ -1087,17 +1087,18 @@ It'll return null if the organ doesn't correspond, so include null checks when u
|
||||
playsound(user.loc, 'sound/misc/moist_impact.ogg', 50, TRUE)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_BITE)
|
||||
target.apply_damage(20, BRUTE, user.zone_selected)
|
||||
if(!target.HasDisease(/datum/disease/zombie))
|
||||
var/datum/disease/zombie/zomb = new /datum/disease/zombie
|
||||
if(target.CanContractDisease(zomb)) // biosuit aint going to protect you buddy
|
||||
target.ForceContractDisease(zomb)
|
||||
target.Dizzy(10 SECONDS)
|
||||
target.Confused(10 SECONDS)
|
||||
else
|
||||
qdel(zomb)
|
||||
if(!HAS_TRAIT(user, TRAIT_NON_INFECTIOUS_ZOMBIE))
|
||||
if(!target.HasDisease(/datum/disease/zombie))
|
||||
var/datum/disease/zombie/zomb = new /datum/disease/zombie
|
||||
if(target.CanContractDisease(zomb)) // biosuit aint going to protect you buddy
|
||||
target.ForceContractDisease(zomb)
|
||||
target.Dizzy(10 SECONDS)
|
||||
target.Confused(10 SECONDS)
|
||||
else
|
||||
qdel(zomb)
|
||||
|
||||
for(var/datum/disease/zombie/zomb in target.viruses)
|
||||
zomb.stage = max(rand(3, 4), zomb.stage)
|
||||
for(var/datum/disease/zombie/zomb in target.viruses)
|
||||
zomb.stage = max(rand(3, 4), zomb.stage)
|
||||
|
||||
qdel(grabby)
|
||||
return TRUE
|
||||
@@ -1126,12 +1127,13 @@ It'll return null if the organ doesn't correspond, so include null checks when u
|
||||
|
||||
eat_brain.custom_pain("OH GOD!!! THEY'RE EATING MY [uppertext(eat_brain.name)]!!") // gnarly
|
||||
user.visible_message("<span class='danger'>[user] digs their claws into [target]'s [brain_house.name], eating their [eat_brain]!</span>", "<span class='danger zombie'>We feast on [target]'s brains.</span>")
|
||||
if(!target.HasDisease(/datum/disease/zombie))
|
||||
var/datum/disease/zombie/zomb = new /datum/disease/zombie
|
||||
target.ContractDisease(zomb)
|
||||
if(!HAS_TRAIT(user, TRAIT_NON_INFECTIOUS_ZOMBIE))
|
||||
if(!target.HasDisease(/datum/disease/zombie))
|
||||
var/datum/disease/zombie/zomb = new /datum/disease/zombie
|
||||
target.ContractDisease(zomb)
|
||||
|
||||
for(var/datum/disease/zombie/zomb in target.viruses)
|
||||
zomb.stage = max(5, zomb.stage)
|
||||
for(var/datum/disease/zombie/zomb in target.viruses)
|
||||
zomb.stage = max(5, zomb.stage)
|
||||
|
||||
if(!do_mob(user, target, 1 SECONDS))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user