[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 07:08:19 +01:00
committed by GitHub
parent cba75a0e0b
commit 37953d4bcf
19 changed files with 178 additions and 98 deletions
@@ -118,6 +118,9 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
if(is_creating)
fully_replace_character_name(real_name, "John Doe")
/mob/living/carbon/human/consistent/domutcheck()
return // We skipped adding any mutations so this runtimes
//Inefficient pooling/caching way.
GLOBAL_LIST_EMPTY(human_dummy_list)
GLOBAL_LIST_EMPTY(dummy_mob_list)
@@ -426,7 +426,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
for(var/obj/item/equipped_item in wearer.get_all_worn_items())
var/equipped_item_slot = wearer.get_slot_by_item(equipped_item)
if(!equipped_item.mob_can_equip(wearer, equipped_item_slot, bypass_equip_delay_self = TRUE, ignore_equipped = TRUE))
wearer.dropItemToGround(equipped_item)
wearer.dropItemToGround(equipped_item, force = TRUE)
/datum/species/proc/update_no_equip_flags(mob/living/carbon/wearer, new_flags)
no_equip_flags = new_flags
@@ -100,12 +100,9 @@
if(changeling_datum.can_absorb_dna(owner))
changeling_datum.add_new_profile(owner)
// SKYRAT EDIT START
var/datum/action/changeling/humanform/hf = new()
changeling_datum.purchased_powers += hf
hf.Grant(origin.current)
var/datum/action/changeling/lesserform/transform = new()
changeling_datum.purchased_powers[transform.type] = transform
changeling_datum.regain_powers()
// SKYRAT EDIT END
owner.investigate_log("has been gibbed by a changeling egg burst.", INVESTIGATE_DEATHS)
owner.gib()
+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)