mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[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:
co-authored by
Jacquerel
Gandalf
parent
cba75a0e0b
commit
37953d4bcf
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user