Revert "PLASE"

This reverts commit 8af225e6e3.
This commit is contained in:
Fermi
2019-11-24 03:06:08 +00:00
parent aeb8606ce0
commit ba4fa1ef67
2145 changed files with 1387321 additions and 5257 deletions
@@ -0,0 +1,35 @@
/datum/component/souldeath
var/mob/living/wearer
var/equip_slot
var/signal = FALSE
/datum/component/souldeath/Initialize()
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/equip)
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/unequip)
/datum/component/souldeath/proc/equip(datum/source, mob/living/equipper, slot)
if(!slot || equip_slot == slot)
wearer = equipper
RegisterSignal(wearer, COMSIG_MOB_DEATH, .proc/die, TRUE)
signal = TRUE
else
if(signal)
UnregisterSignal(wearer, COMSIG_MOB_DEATH)
signal = FALSE
return
/datum/component/souldeath/proc/unequip()
UnregisterSignal(wearer, COMSIG_MOB_DEATH)
wearer = null
signal = FALSE
/datum/component/souldeath/proc/die()
if(!wearer)
return //idfk
new/obj/effect/temp_visual/souldeath(wearer.loc, wearer)
playsound(wearer, 'sound/misc/souldeath.ogg', 100, FALSE)
/datum/component/souldeath/neck
equip_slot = SLOT_NECK