Move the handle_changeling proc to a signal

This commit is contained in:
joep van der velden
2019-12-12 16:20:38 +01:00
parent 1029bf7e7a
commit 08bceebcb1
3 changed files with 7 additions and 1 deletions
@@ -383,6 +383,9 @@ var/list/sting_paths
var/mob/living/carbon/C = src //only carbons have dna now, so we have to typecaste
mind.changeling.absorbed_dna |= C.dna.Clone()
mind.changeling.trim_dna()
RegisterSignal(C, COMSIG_CARBON_LIFE, CALLBACK(C, /mob/living/carbon/.proc/handle_changeling))
return 1
//Used to dump the languages from the changeling datum into the actual mob.
@@ -421,6 +424,8 @@ var/list/sting_paths
if(hud_used)
hud_used.lingstingdisplay.icon_state = null
hud_used.lingstingdisplay.invisibility = 101
hud_used.lingchemdisplay.invisibility = 101
UnregisterSignal(src, COMSIG_CARBON_LIFE)
/datum/changeling/proc/has_sting(datum/action/power)
for(var/datum/action/P in purchasedpowers)