GOODBYE SPECIES, HELLO COMPONENT

This commit is contained in:
Timothy Teakettle
2022-08-05 18:19:22 +01:00
parent b05f6e221d
commit b4330b2f3d
10 changed files with 36 additions and 39 deletions

View File

@@ -161,3 +161,25 @@
H.reset_perspective(H)
else
H.reset_perspective(dullahan_head)
/datum/component/dullahan/Destroy()
UnregisterSignal(parent, COMSIG_LIVING_REGENERATE_LIMBS)
qdel(dullahan_head)
REMOVE_TRAIT(parent, TRAIT_DULLAHAN, "dullahan_component")
// work out what organs to give them based on their species
if(ishuman(parent))
var/mob/living/carbon/human/H = parent
var/obj/item/organ/eyes/new_eyes = new H.dna.species.mutant_eyes()
var/obj/item/organ/brain/new_brain = new H.dna.species.mutant_brain()
var/obj/item/organ/eyes/old_eyes = H.getorganslot(ORGAN_SLOT_EYES)
var/obj/item/organ/brain/old_brain = H.getorganslot(ORGAN_SLOT_BRAIN)
old_brain.Remove(TRUE,TRUE)
QDEL_NULL(old_brain)
new_brain.Insert(C, TRUE, TRUE)
old_eyes.Remove(TRUE,TRUE)
QDEL_NULL(old_eyes)
new_eyes.Insert(C, TRUE, TRUE)
. = ..()

View File

@@ -717,7 +717,6 @@
death()
petrify(INFINITY)
if(3)
if(prob(90))
var/obj/item/bodypart/BP = get_bodypart(pick(BODY_ZONE_CHEST,BODY_ZONE_HEAD))
if(BP)
BP.dismember()
@@ -725,8 +724,6 @@
unequip_everything()
drop_all_held_items()
gib()
else
set_species(/datum/species/dullahan)
/datum/dna/proc/update_body_size(old_size)
if(!holder || features["body_size"] == old_size)

View File

@@ -177,7 +177,7 @@
if(isinsect(victim) || iscatperson(victim) || ismammal(victim) || isdwarf(victim) || ismonkey(victim)) // Yep you can lick monkeys.
user.reagents.add_reagent(/datum/reagent/hairball, 2)
else if(ishumanbasic(victim) || isflyperson(victim) || islizard(victim) || isdullahan(victim))
else if(ishumanbasic(victim) || isflyperson(victim) || islizard(victim) || HAS_TRAIT(victim, TRAIT_DULLAHAN))
user.reagents.add_reagent(/datum/reagent/hairball, 1)
if(blood_flow > minimum_flow)

View File

@@ -119,7 +119,7 @@
if(istype(AM, /obj/item))
var/obj/item/bodypart/head/as_head = AM
var/obj/item/mmi/as_mmi = AM
if(istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay))
if(istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_head))
living_detected = living_detected ? living_detected : AM
nom += AM
else if(isliving(AM))

View File

@@ -363,9 +363,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
// dullahans as a species cease to exist
if(current_version < 56)
var/species_id = S["species"]
if(species_id = SPECIES_DULLAHAN)
if(species_id == SPECIES_DULLAHAN)
S["species"] = SPECIES_HUMAN
if(islist(S["all_quirks"])
if(islist(S["all_quirks"]))
S["all_quirks"] += "Dullahan"
else
S["all_quirks"] = list("Dullahan")

View File

@@ -219,23 +219,11 @@
/mob/living/simple_animal/jacq/proc/treat(mob/living/carbon/C, gender)
visible_message("<b>[src]</b> gives off a glowing smile, <span class='spooky'>\"What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.\"</span>")
jacqrunes("What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.", C)
var/choices_reward = list("Object - 3 candies", "Potion - 2 candies", "Jacqueline Tracker - 2 candies", "Plushie - 1 candy", "Can I get to know you instead?", "Become a pumpkinhead dullahan (perma) - 4 candies")
var/choices_reward = list("Object - 3 candies", "Potion - 2 candies", "Jacqueline Tracker - 2 candies", "Plushie - 1 candy", "Can I get to know you instead?")
var/choice_reward = input(usr, "Trick or Treat?", "Trick or Treat?") in choices_reward
//rewards
switch(choice_reward)
if("Become a pumpkinhead dullahan (perma) - 4 candies")
if(!take_candies(C, 4))
visible_message("<b>[src]</b> raises an eyebrown, <span class='spooky'>\"It's 4 candies for that [gender]! Thems the rules!\"</span>")
jacqrunes("It's 4 candies for that [gender]! Thems the rules!", C)
return
visible_message("<b>[src]</b> waves their arms around, <span class='spooky'>\"Off comes your head, a pumpkin taking it's stead!\"</span>")
jacqrunes("Off comes your head, a pumpkin taking it's stead!", C)
C.reagents.add_reagent(/datum/reagent/mutationtoxin/pumpkinhead, 5)
sleep(20)
poof()
return
if("Object - 3 candies")
if(!take_candies(C, 3))
visible_message("<b>[src]</b> raises an eyebrown, <span class='spooky'>\"It's 3 candies per trinket [gender]! Thems the rules!\"</span>")
@@ -688,12 +676,6 @@
else
..()
/datum/reagent/mutationtoxin/pumpkinhead
name = "Pumpkin head mutation toxin"
race = /datum/species/dullahan/pumpkin
mutationtext = "<span class='spooky'>The pain subsides. You feel your head roll off your shoulders... and you smell pumpkin."
//I couldn't get the replace head sprite with a pumpkin to work so, it is what it is.
/mob/living/simple_animal/jacq/proc/check_candies(mob/living/carbon/C)
var/invs = C.get_contents()
var/candy_count = 0

View File

@@ -954,9 +954,6 @@
/mob/living/carbon/human/species/corporate
race = /datum/species/corporate
/mob/living/carbon/human/species/dullahan
race = /datum/species/dullahan
/mob/living/carbon/human/species/felinid
race = /datum/species/human/felinid

View File

@@ -345,11 +345,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/obj/item/organ/stomach/stomach = C.getorganslot(ORGAN_SLOT_STOMACH)
var/obj/item/organ/tail/tail = C.getorganslot(ORGAN_SLOT_TAIL)
var/should_have_brain = !(HAS_TRAIT(C, TRAIT_DULLAHAN))
var/should_have_brain = !(HAS_TRAIT(C, TRAIT_DULLAHAN)) // do not mess with a dullahans brain
var/should_have_heart = !(NOBLOOD in species_traits)
var/should_have_lungs = ((TRAIT_AUXILIARY_LUNGS in inherent_traits) || !(TRAIT_NOBREATH in inherent_traits))
var/should_have_appendix = !(TRAIT_NOHUNGER in inherent_traits)
var/should_have_eyes = TRUE
var/should_have_eyes = !(HAS_TRAIT(C, TRAIT_DULLAHAN)) // .. or their eyes
var/should_have_ears = TRUE
var/should_have_tongue = TRUE
var/should_have_liver = !(NOLIVER in species_traits)

View File

@@ -37,7 +37,7 @@
return BULLET_ACT_BLOCK
if(iscarbon(target))
var/mob/living/carbon/C = target
if(!is_species(C, /datum/species/dullahan)) //No accidental instagibbing dullahans please
if(HAS_TRAIT(C, TRAIT_DULLAHAN)) //No accidental instagibbing dullahans please
C.regenerate_limbs()
C.regenerate_organs()
if(target.revive(full_heal = 1))

View File

@@ -2696,7 +2696,6 @@
#include "code\modules\mob\living\carbon\human\species_types\arachnid.dm"
#include "code\modules\mob\living\carbon\human\species_types\bugmen.dm"
#include "code\modules\mob\living\carbon\human\species_types\corporate.dm"
#include "code\modules\mob\living\carbon\human\species_types\dullahan.dm"
#include "code\modules\mob\living\carbon\human\species_types\dwarves.dm"
#include "code\modules\mob\living\carbon\human\species_types\ethereal.dm"
#include "code\modules\mob\living\carbon\human\species_types\felinid.dm"