mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
Refactor of catpeople mutant organs
This commit is contained in:
committed by
CitadelStationBot
parent
56c534fa62
commit
eb54055278
@@ -1091,7 +1091,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
|
||||
SSblackbox.add_details("admin_verb","Show Tip")
|
||||
|
||||
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
|
||||
#define ON_PURRBATION(H) (\H.getorgan(/obj/item/organ/tail/cat) || H.getorgan(/obj/item/organ/ears/cat) || \
|
||||
H.dna.features["ears"] == "Cat" || H.dna.features["human_tail"] == "Cat")
|
||||
|
||||
/proc/mass_purrbation()
|
||||
for(var/M in GLOB.mob_list)
|
||||
@@ -1105,36 +1106,72 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
purrbation_remove(M)
|
||||
CHECK_TICK
|
||||
|
||||
/proc/purrbation_toggle(mob/living/carbon/human/H)
|
||||
/proc/purrbation_toggle(mob/living/carbon/human/H, silent = FALSE)
|
||||
if(!ishumanbasic(H))
|
||||
return
|
||||
if(!ON_PURRBATION(H))
|
||||
purrbation_apply(H)
|
||||
purrbation_apply(H, silent)
|
||||
. = TRUE
|
||||
else
|
||||
purrbation_remove(H)
|
||||
purrbation_remove(H, silent)
|
||||
. = FALSE
|
||||
|
||||
/proc/purrbation_apply(mob/living/carbon/human/H)
|
||||
/proc/purrbation_apply(mob/living/carbon/human/H, silent = FALSE)
|
||||
if(!ishuman(H))
|
||||
return
|
||||
if(ON_PURRBATION(H))
|
||||
return
|
||||
to_chat(H, "Something is nya~t right.")
|
||||
H.dna.features["tail_human"] = "Cat"
|
||||
H.dna.features["ears"] = "Cat"
|
||||
H.regenerate_icons()
|
||||
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
|
||||
|
||||
/proc/purrbation_remove(mob/living/carbon/human/H)
|
||||
var/obj/item/organ/ears/cat/ears = new
|
||||
var/obj/item/organ/tail/cat/tail = new
|
||||
ears.Insert(H, drop_if_replaced=FALSE)
|
||||
tail.Insert(H, drop_if_replaced=FALSE)
|
||||
|
||||
if(!silent)
|
||||
to_chat(H, "Something is nya~t right.")
|
||||
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
|
||||
|
||||
/proc/purrbation_remove(mob/living/carbon/human/H, silent = FALSE)
|
||||
if(!ishuman(H))
|
||||
return
|
||||
if(!ON_PURRBATION(H))
|
||||
return
|
||||
to_chat(H, "You are no longer a cat.")
|
||||
H.dna.features["tail_human"] = "None"
|
||||
|
||||
var/obj/item/organ/ears/cat/ears = H.getorgan(/obj/item/organ/ears/cat)
|
||||
var/obj/item/organ/tail/cat/tail = H.getorgan(/obj/item/organ/tail/cat)
|
||||
|
||||
if(ears)
|
||||
var/obj/item/organ/ears/NE
|
||||
if(H.dna.species && H.dna.species.mutantears)
|
||||
// Roundstart cat ears override H.dna.species.mutantears, reset it here.
|
||||
H.dna.species.mutantears = initial(H.dna.species.mutantears)
|
||||
if(H.dna.species.mutantears)
|
||||
NE = new H.dna.species.mutantears()
|
||||
|
||||
if(!NE)
|
||||
// Go with default ears
|
||||
NE = new /obj/item/organ/ears()
|
||||
|
||||
NE.Insert(H, drop_if_replaced = FALSE)
|
||||
|
||||
if(tail)
|
||||
var/obj/item/organ/tail/NT
|
||||
if(H.dna.species && H.dna.species.mutanttail)
|
||||
// Roundstart cat tail overrides H.dna.species.mutanttail, reset it here.
|
||||
H.dna.species.mutanttail = initial(H.dna.species.mutanttail)
|
||||
if(H.dna.species.mutanttail)
|
||||
NT = new H.dna.species.mutanttail()
|
||||
|
||||
if(NT)
|
||||
NT.Insert(H, drop_if_replaced = FALSE)
|
||||
else
|
||||
tail.Remove(H)
|
||||
|
||||
H.dna.features["ears"] = "None"
|
||||
H.regenerate_icons()
|
||||
H.dna.features["tail_human"] = "None"
|
||||
|
||||
if(!silent)
|
||||
to_chat(H, "You are no longer a cat.")
|
||||
|
||||
#undef ON_PURRBATION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user