Zombie/limb refactors/fixes
This commit is contained in:
@@ -142,10 +142,12 @@
|
||||
return not_handled //For future deeper overrides
|
||||
|
||||
/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE)
|
||||
var/index = get_held_index_of_item(I)
|
||||
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
|
||||
if(!. || !I)
|
||||
return
|
||||
|
||||
if(index && dna.species.mutanthands)
|
||||
put_in_hand(new dna.species.mutanthands(), index)
|
||||
if(I == wear_suit)
|
||||
if(s_store && invdrop)
|
||||
dropItemToGround(s_store, TRUE) //It makes no sense for your suit storage to stay on you if you drop your suit.
|
||||
|
||||
@@ -143,15 +143,16 @@
|
||||
qdel(lungs)
|
||||
lungs = null
|
||||
|
||||
if(eyes)
|
||||
qdel(eyes)
|
||||
eyes = new mutanteyes
|
||||
eyes.Insert(C)
|
||||
if(C.get_bodypart("head"))
|
||||
if(eyes)
|
||||
qdel(eyes)
|
||||
eyes = new mutanteyes
|
||||
eyes.Insert(C)
|
||||
|
||||
if(ears)
|
||||
qdel(ears)
|
||||
ears = new mutantears
|
||||
ears.Insert(C)
|
||||
if(ears)
|
||||
qdel(ears)
|
||||
ears = new mutantears
|
||||
ears.Insert(C)
|
||||
|
||||
if((!(NOBREATH in species_traits)) && !lungs)
|
||||
if(mutantlungs)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
diff a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm (rejected hunks)
|
||||
@@ -173,14 +173,18 @@
|
||||
if(exotic_bloodtype && C.dna.blood_type != exotic_bloodtype)
|
||||
C.dna.blood_type = exotic_bloodtype
|
||||
|
||||
+ if(old_species.mutanthands)
|
||||
+ for(var/obj/item/I in C.held_items)
|
||||
+ if(istype(I, old_species.mutanthands))
|
||||
+ qdel(I)
|
||||
+
|
||||
if(mutanthands)
|
||||
// Drop items in hands
|
||||
// If you're lucky enough to have a NODROP item, then it stays.
|
||||
for(var/V in C.held_items)
|
||||
var/obj/item/I = V
|
||||
if(istype(I))
|
||||
- if(C.dropItemToGround(I))
|
||||
- C.put_in_hands(new mutanthands())
|
||||
+ C.dropItemToGround(I)
|
||||
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
|
||||
C.put_in_hands(new mutanthands())
|
||||
|
||||
@@ -189,10 +193,6 @@
|
||||
C.dna.blood_type = random_blood_type()
|
||||
if(DIGITIGRADE in species_traits)
|
||||
C.Digitigrade_Leg_Swap(TRUE)
|
||||
- if(mutanthands)
|
||||
- for(var/obj/item/I in C.held_items)
|
||||
- if(istype(I, mutanthands))
|
||||
- qdel(I)
|
||||
|
||||
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
H.remove_overlay(HAIR_LAYER)
|
||||
@@ -13,6 +13,7 @@
|
||||
name = "Infectious Zombie"
|
||||
id = "memezombies"
|
||||
limbs_id = "zombie"
|
||||
mutanthands = /obj/item/zombie_hand
|
||||
no_equip = list(slot_wear_mask, slot_head)
|
||||
armor = 20 // 120 damage to KO a zombie, which kills it
|
||||
speedmod = 2
|
||||
@@ -27,29 +28,15 @@
|
||||
|
||||
/datum/species/zombie/infectious/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
. = ..()
|
||||
// Drop items in hands
|
||||
// If you're a zombie lucky enough to have a NODROP item, then it stays.
|
||||
for(var/V in C.held_items)
|
||||
var/obj/item/I = V
|
||||
if(istype(I))
|
||||
if(C.dropItemToGround(I))
|
||||
var/obj/item/zombie_hand/zh = new /obj/item/zombie_hand()
|
||||
C.put_in_hands(zh)
|
||||
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
|
||||
var/obj/item/zombie_hand/zh = new /obj/item/zombie_hand()
|
||||
C.put_in_hands(zh)
|
||||
|
||||
// Next, deal with the source of this zombie corruption
|
||||
// Deal with the source of this zombie corruption
|
||||
// Infection organ needs to be handled separately from mutant_organs
|
||||
// because it persists through species transitions
|
||||
var/obj/item/organ/zombie_infection/infection
|
||||
infection = C.getorganslot("zombie_infection")
|
||||
if(!infection)
|
||||
infection = new(C)
|
||||
|
||||
/datum/species/zombie/infectious/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
for(var/obj/item/I in C.held_items)
|
||||
if(istype(I, /obj/item/zombie_hand))
|
||||
qdel(I)
|
||||
infection = new()
|
||||
infection.Insert(C)
|
||||
|
||||
|
||||
// Your skin falls off
|
||||
|
||||
Reference in New Issue
Block a user