Files
S.P.L.U.R.T-Station-13/code/datums/components/phantomthief.dm
kevinz000 0e3193e929 relatively small 71 file 700 lines changed refactor/rework to combat mode/sprint and some miscellaneous things that totally aren't important (#11376)
* combat refactoring

* i hate this

* mobility flags part 2 time xd

* whew

* stuff

* a

* ok

* changes

* Wew

* k

* add flags

* FUCKYOUVORE

* fixes

* typo

* no using this in hard stamcrit

* update icon

* woopsy

* . = ..()

* sigh

* Update living_combat.dm

* wew

* wups

* fix

* i hate you

* wrong button

* k

* ok

* bet

* k

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Update code/modules/mob/living/living_combat.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* early returns

* skreee

* agony

* k

* k

* k

* k

* wack

* compile

* wack

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2020-03-21 16:04:26 +01:00

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_UNIQUE_PASSARGS
signals = list(COMSIG_LIVING_COMBAT_ENABLED)
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(datum/source, mob/user, combatmodestate)
if(!combatmodestate)
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")