mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
//This component applies a customizable drop_shadow filter to its wearer when they toggle combat mode on or off. This can stack.
|
|
|
|
/datum/component/wearertargeting/phantomthief
|
|
dupe_mode = COMPONENT_DUPE_ALLOWED
|
|
signals = list(COMSIG_LIVING_COMBAT_ENABLED, COMSIG_LIVING_COMBAT_DISABLED)
|
|
proctype = .proc/handlefilterstuff
|
|
var/filter_x
|
|
var/filter_y
|
|
var/filter_size
|
|
var/filter_color
|
|
|
|
/datum/component/wearertargeting/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _color = "#E62111", list/_valid_slots = list(SLOT_GLASSES))
|
|
. = ..()
|
|
if(. == COMPONENT_INCOMPATIBLE)
|
|
return
|
|
filter_x = _x
|
|
filter_y = _y
|
|
filter_size = _size
|
|
filter_color = _color
|
|
valid_slots = _valid_slots
|
|
|
|
/datum/component/wearertargeting/phantomthief/proc/handlefilterstuff(mob/living/user, was_forced = FALSE)
|
|
if(!SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE))
|
|
user.remove_filter("phantomthief")
|
|
else
|
|
user.add_filter("phantomthief", 4, list(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, color = filter_color))
|
|
|
|
/datum/component/wearertargeting/phantomthief/on_drop(datum/source, mob/user)
|
|
. = ..()
|
|
user.remove_filter("phantomthief")
|