Refactor of catpeople mutant organs
This commit is contained in:
committed by
CitadelStationBot
parent
56c534fa62
commit
eb54055278
@@ -539,15 +539,3 @@
|
||||
dismemberable = 0
|
||||
max_damage = 5000
|
||||
animal_origin = DEVIL_BODYPART
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/severedtail
|
||||
name = "tail"
|
||||
desc = "A severed tail. Somewhere, no doubt, a lizard hater is very \
|
||||
pleased with themselves."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "severedtail"
|
||||
color = "#161"
|
||||
var/markings = "Smooth"
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
// without external aid (earmuffs, drugs)
|
||||
var/ear_damage = 0
|
||||
|
||||
var/bang_protect = 0 //Resistance against loud noises
|
||||
//Resistance against loud noises
|
||||
var/bang_protect = 0
|
||||
// Multiplier for both long term and short term ear damage
|
||||
var/damage_multiplier = 1
|
||||
|
||||
/obj/item/organ/ears/on_life()
|
||||
if(!iscarbon(owner))
|
||||
@@ -43,14 +46,14 @@
|
||||
deaf = 1
|
||||
|
||||
/obj/item/organ/ears/proc/adjustEarDamage(ddmg, ddeaf)
|
||||
ear_damage = max(ear_damage + ddmg, 0)
|
||||
deaf = max(deaf + ddeaf, 0)
|
||||
ear_damage = max(ear_damage + (ddmg*damage_multiplier), 0)
|
||||
deaf = max(deaf + (ddeaf*damage_multiplier), 0)
|
||||
|
||||
/obj/item/organ/ears/proc/minimumDeafTicks(value)
|
||||
deaf = max(deaf, value)
|
||||
|
||||
/obj/item/organ/ears/invincible/adjustEarDamage(ddmg, ddeaf)
|
||||
return
|
||||
/obj/item/organ/ears/invincible
|
||||
damage_multiplier = 0
|
||||
|
||||
|
||||
/mob/proc/restoreEars()
|
||||
@@ -79,15 +82,28 @@
|
||||
name = "cat ears"
|
||||
icon = 'icons/obj/clothing/hats.dmi'
|
||||
icon_state = "kitty"
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
damage_multiplier = 2
|
||||
>>>>>>> b5e0746... Refactor of catpeople mutant organs (#32101)
|
||||
|
||||
/obj/item/organ/ears/cat/Insert(mob/living/carbon/human/H, special = 0, drop_if_replaced = TRUE)
|
||||
..()
|
||||
color = H.hair_color
|
||||
H.dna.features["ears"] = "Cat"
|
||||
H.update_body()
|
||||
if(istype(H))
|
||||
color = H.hair_color
|
||||
H.dna.species.mutant_bodyparts |= "ears"
|
||||
H.dna.features["ears"] = "Cat"
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/ears/cat/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
<<<<<<< HEAD
|
||||
color = H.hair_color
|
||||
H.dna.features["ears"] = "None"
|
||||
H.update_body()
|
||||
=======
|
||||
if(istype(H))
|
||||
color = H.hair_color
|
||||
H.dna.species.mutant_bodyparts -= "ears"
|
||||
H.update_body()
|
||||
>>>>>>> b5e0746... Refactor of catpeople mutant organs (#32101)
|
||||
|
||||
@@ -173,3 +173,9 @@
|
||||
ears = new
|
||||
|
||||
ears.Insert(src)
|
||||
|
||||
if(!getorganslot(ORGAN_SLOT_TAIL))
|
||||
var/obj/item/organ/tail/tail
|
||||
if(dna && dna.species && dna.species.mutanttail)
|
||||
tail = new dna.species.mutanttail
|
||||
tail.Insert(src)
|
||||
|
||||
@@ -1,23 +1,62 @@
|
||||
// Note: tails only work in humans. They use human-specific parameters and rely on human code for displaying.
|
||||
|
||||
/obj/item/organ/tail
|
||||
name = "tail"
|
||||
desc = "What did you cut this off of?"
|
||||
desc = "A severed tail. What did you cut this off of?"
|
||||
icon_state = "severedtail"
|
||||
zone = "groin"
|
||||
slot = ORGAN_SLOT_TAIL
|
||||
var/tail_type = "None"
|
||||
|
||||
/obj/item/organ/tail/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
if(istype(H))
|
||||
H.endTailWag()
|
||||
|
||||
|
||||
/obj/item/organ/tail/cat
|
||||
name = "cat tail"
|
||||
desc = "Who's wagging now?"
|
||||
icon_state = "severedtail"
|
||||
desc = "A severed cat tail. Who's wagging now?"
|
||||
tail_type = "Cat"
|
||||
|
||||
/obj/item/organ/tail/cat/Insert(mob/living/carbon/human/H, special = 0, drop_if_replaced = TRUE)
|
||||
..()
|
||||
color = H.hair_color
|
||||
H.dna.features["tail_human"] = "Cat"
|
||||
H.update_body()
|
||||
if(istype(H))
|
||||
H.dna.species.mutant_bodyparts |= "tail_human"
|
||||
H.dna.features["tail_human"] = tail_type
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/ears/cat/Remove(mob/living/carbon/human/H, special = 0)
|
||||
/obj/item/organ/tail/cat/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
H.endTailWag()
|
||||
H.dna.features["tail_human"] = "None"
|
||||
color = H.hair_color
|
||||
H.update_body()
|
||||
if(istype(H))
|
||||
H.dna.species.mutant_bodyparts -= "tail_human"
|
||||
tail_type = H.dna.features["tail_human"]
|
||||
color = H.hair_color
|
||||
H.update_body()
|
||||
|
||||
|
||||
/obj/item/organ/tail/lizard
|
||||
name = "lizard tail"
|
||||
desc = "A severed lizard tail. Somewhere, no doubt, a lizard hater is very pleased with themselves."
|
||||
color = "#116611"
|
||||
tail_type = "Smooth"
|
||||
var/spines = "None"
|
||||
|
||||
/obj/item/organ/tail/lizard/Insert(mob/living/carbon/human/H, special = 0, drop_if_replaced = TRUE)
|
||||
..()
|
||||
if(istype(H))
|
||||
H.dna.features["tail_lizard"] = tail_type
|
||||
H.dna.features["spines"] = spines
|
||||
H.dna.species.mutant_bodyparts |= "tail_lizard"
|
||||
H.dna.species.mutant_bodyparts |= "spines"
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/tail/lizard/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
if(istype(H))
|
||||
H.dna.species.mutant_bodyparts -= "tail_lizard"
|
||||
H.dna.species.mutant_bodyparts -= "spines"
|
||||
color = "#" + H.dna.features["mcolor"]
|
||||
tail_type = H.dna.features["tail_lizard"]
|
||||
spines = H.dna.features["spines"]
|
||||
H.update_body()
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
// The detachment and attachment of lizard tails
|
||||
// Dismemberment lite; can/should be generalized aka augs when we get more mutant parts and/or for actual dismemberment
|
||||
|
||||
// TAIL REMOVAL
|
||||
|
||||
/datum/surgery/tail_removal
|
||||
name = "tail removal"
|
||||
steps = list(/datum/surgery_step/sever_tail, /datum/surgery_step/close)
|
||||
species = list(/mob/living/carbon/human)
|
||||
possible_locs = list("groin")
|
||||
|
||||
/datum/surgery/tail_removal/can_start(mob/user, mob/living/carbon/target)
|
||||
var/mob/living/carbon/human/L = target
|
||||
if(("tail_lizard" in L.dna.species.mutant_bodyparts) || ("waggingtail_lizard" in L.dna.species.mutant_bodyparts))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/sever_tail
|
||||
name = "sever tail"
|
||||
implements = list(/obj/item/scalpel = 100, /obj/item/circular_saw = 100,
|
||||
/obj/item/melee/sabre = 100, /obj/item/melee/transforming/energy/sword/cyborg/saw = 100,
|
||||
/obj/item/melee/arm_blade = 80, /obj/item/twohanded/required/chainsaw = 80,
|
||||
/obj/item/mounted_chainsaw = 80, /obj/item/twohanded/fireaxe = 50,
|
||||
/obj/item/hatchet = 40, /obj/item = 30) // 30% success with any sharp item.
|
||||
time = 64
|
||||
|
||||
/datum/surgery_step/sever_tail/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to sever [target]'s tail!", "<span class='notice'>You begin to sever [target]'s tail...</span>")
|
||||
|
||||
/datum/surgery_step/sever_tail/tool_check(mob/user, obj/item/tool)
|
||||
if(implement_type == /obj/item && !tool.is_sharp())
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/sever_tail/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/mob/living/carbon/human/L = target
|
||||
user.visible_message("[user] severs [L]'s tail!", "<span class='notice'>You sever [L]'s tail.</span>")
|
||||
if("tail_lizard" in L.dna.species.mutant_bodyparts)
|
||||
L.dna.species.mutant_bodyparts -= "tail_lizard"
|
||||
else if("waggingtail_lizard" in L.dna.species.mutant_bodyparts)
|
||||
L.dna.species.mutant_bodyparts -= "waggingtail_lizard"
|
||||
if("spines" in L.dna.features)
|
||||
L.dna.features -= "spines"
|
||||
var/obj/item/severedtail/S = new(get_turf(target))
|
||||
S.add_atom_colour("#[L.dna.features["mcolor"]]", FIXED_COLOUR_PRIORITY)
|
||||
S.markings = "[L.dna.features["tail_lizard"]]"
|
||||
L.update_body()
|
||||
return 1
|
||||
|
||||
// TAIL ATTACHMENT
|
||||
|
||||
/datum/surgery/tail_attachment
|
||||
name = "tail attachment"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/replace, /datum/surgery_step/attach_tail, /datum/surgery_step/close)
|
||||
species = list(/mob/living/carbon/human)
|
||||
possible_locs = list("groin")
|
||||
|
||||
/datum/surgery/tail_attachment/can_start(mob/user, mob/living/carbon/target)
|
||||
var/mob/living/carbon/human/L = target
|
||||
if(!("tail_lizard" in L.dna.species.mutant_bodyparts) && !("waggingtail_lizard" in L.dna.species.mutant_bodyparts))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/attach_tail
|
||||
name = "attach tail"
|
||||
implements = list(/obj/item/severedtail = 100)
|
||||
time = 64
|
||||
|
||||
/datum/surgery_step/attach_tail/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to attach a tail to [target]!", "<span class='notice'>You begin to attach the tail to [target]...</span>")
|
||||
|
||||
/datum/surgery_step/attach_tail/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/mob/living/carbon/human/L = target
|
||||
user.visible_message("[user] gives [L] a tail!", "<span class='notice'>You give [L] a tail. It adjusts to [L]'s melanin.</span>") // fluff for color
|
||||
if(!(L.dna.features["mcolor"]))
|
||||
L.dna.features["mcolor"] = tool.color
|
||||
var/obj/item/severedtail/T = tool
|
||||
L.dna.features["tail_lizard"] = T.markings
|
||||
L.dna.species.mutant_bodyparts += "tail_lizard"
|
||||
qdel(tool)
|
||||
L.update_mutant_bodyparts()
|
||||
return 1
|
||||
Reference in New Issue
Block a user