Merge pull request #7931 from Citadel-Station-13/souldeath_neck
Donator Item - Soul Necklace
This commit is contained in:
@@ -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, 'modular_citadel/sound/misc/souldeath.ogg', 100, FALSE)
|
||||
|
||||
/datum/component/souldeath/neck
|
||||
equip_slot = SLOT_NECK
|
||||
@@ -0,0 +1,5 @@
|
||||
/obj/effect/temp_visual/souldeath
|
||||
name = "soul death"
|
||||
icon = 'modular_citadel/icons/effects/souldeath.dmi'
|
||||
icon_state = "souldeath"
|
||||
duration = 30
|
||||
@@ -361,4 +361,10 @@ datum/gear/darksabresheath
|
||||
name = "Mime's Overalls"
|
||||
category = SLOT_WEAR_SUIT
|
||||
path = /obj/item/clothing/under/mimeoveralls
|
||||
ckeywhitelist = list("pireamaineach")
|
||||
ckeywhitelist = list("pireamaineach")
|
||||
|
||||
/datum/gear/soulneck
|
||||
name = "Soul Necklace"
|
||||
category = SLOT_IN_BACKPACK
|
||||
path = /obj/item/clothing/neck/undertale
|
||||
ckeywhitelist = list("twilightic")
|
||||
@@ -0,0 +1,23 @@
|
||||
/datum/action/item_action/zanderlocket
|
||||
name = "Activate the locket"
|
||||
|
||||
/obj/item/clothing/neck/undertale
|
||||
name = "Sylphaen Heart Locket"
|
||||
desc = "A heart shaped locket...The name: 'Zander Sylphaen is inscribed on the front. Something about this necklace fills you with determination."
|
||||
icon = 'modular_citadel/icons/obj/clothing/cit_neck.dmi'
|
||||
item_state = "undertale"
|
||||
icon_state = "undertale"
|
||||
alternate_worn_icon = 'modular_citadel/icons/mob/clothing/necks.dmi'
|
||||
resistance_flags = FIRE_PROOF
|
||||
actions_types = list(/datum/action/item_action/zanderlocket)
|
||||
var/toggled = FALSE
|
||||
var/obj/effect/heart/heart
|
||||
|
||||
/datum/action/item_action/zanderlocket/Trigger()
|
||||
new/obj/effect/temp_visual/souldeath(owner.loc, owner)
|
||||
playsound(owner, 'modular_citadel/sound/misc/souldeath.ogg', 100, FALSE)
|
||||
|
||||
|
||||
/obj/item/clothing/neck/undertale/Initialize()
|
||||
..()
|
||||
AddComponent(/datum/component/souldeath/neck)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 292 B |
Binary file not shown.
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 1016 B |
Binary file not shown.
@@ -2772,6 +2772,7 @@
|
||||
#include "modular_citadel\code\datums\uplink_items_cit.dm"
|
||||
#include "modular_citadel\code\datums\components\material_container.dm"
|
||||
#include "modular_citadel\code\datums\components\phantomthief.dm"
|
||||
#include "modular_citadel\code\datums\components\souldeath.dm"
|
||||
#include "modular_citadel\code\datums\mood_events\generic_negative_events.dm"
|
||||
#include "modular_citadel\code\datums\mood_events\generic_positive_events.dm"
|
||||
#include "modular_citadel\code\datums\mood_events\moodular.dm"
|
||||
@@ -2798,6 +2799,7 @@
|
||||
#include "modular_citadel\code\game\objects\items.dm"
|
||||
#include "modular_citadel\code\game\objects\tools.dm"
|
||||
#include "modular_citadel\code\game\objects\effects\spawner\spawners.dm"
|
||||
#include "modular_citadel\code\game\objects\effects\temporary_visuals\souldeath.dm"
|
||||
#include "modular_citadel\code\game\objects\effects\temporary_visuals\projectiles\impact.dm"
|
||||
#include "modular_citadel\code\game\objects\effects\temporary_visuals\projectiles\muzzle.dm"
|
||||
#include "modular_citadel\code\game\objects\effects\temporary_visuals\projectiles\tracer.dm"
|
||||
@@ -2870,6 +2872,7 @@
|
||||
#include "modular_citadel\code\modules\client\loadout\uniform.dm"
|
||||
#include "modular_citadel\code\modules\client\verbs\who.dm"
|
||||
#include "modular_citadel\code\modules\clothing\clothing.dm"
|
||||
#include "modular_citadel\code\modules\clothing\neck.dm"
|
||||
#include "modular_citadel\code\modules\clothing\glasses\phantomthief.dm"
|
||||
#include "modular_citadel\code\modules\clothing\head\head.dm"
|
||||
#include "modular_citadel\code\modules\clothing\spacesuits\cydonian_armor.dm"
|
||||
|
||||
Reference in New Issue
Block a user