[MIRROR] Makes Lesser Form into one ability & unit tests it [MDB IGNORE] (#19521)

* Makes Lesser Form into one ability & unit tests it

* Update headcrab.dm

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-10 06:08:19 +00:00
committed by GitHub
co-authored by Jacquerel Gandalf
parent cba75a0e0b
commit 37953d4bcf
19 changed files with 178 additions and 98 deletions
+10 -3
View File
@@ -1,12 +1,16 @@
#define TRANSFORMATION_DURATION 22
/mob/living/carbon/proc/monkeyize()
/mob/living/carbon/proc/monkeyize(instant = FALSE)
if (notransform || transformation_timer)
return
if(ismonkey(src))
return
if(instant)
finish_monkeyize()
return
//Make mob invisible and spawn animation
notransform = TRUE
Paralyze(TRANSFORMATION_DURATION, ignore_canstun = TRUE)
@@ -15,7 +19,6 @@
invisibility = INVISIBILITY_MAXIMUM
new /obj/effect/temp_visual/monkeyify(loc)
transformation_timer = addtimer(CALLBACK(src, PROC_REF(finish_monkeyize)), TRANSFORMATION_DURATION, TIMER_UNIQUE)
/mob/living/carbon/proc/finish_monkeyize()
@@ -33,13 +36,17 @@
////////////////////////// Humanize //////////////////////////////
//Could probably be merged with monkeyize but other transformations got their own procs, too
/mob/living/carbon/proc/humanize(species = /datum/species/human)
/mob/living/carbon/proc/humanize(species = /datum/species/human, instant = FALSE)
if (notransform || transformation_timer)
return
if(!ismonkey(src))
return
if(instant)
finish_humanize(species)
return
//Make mob invisible and spawn animation
notransform = TRUE
Paralyze(TRANSFORMATION_DURATION, ignore_canstun = TRUE)