This commit is contained in:
Ghommie
2019-10-25 12:40:50 +02:00
330 changed files with 6403 additions and 1760 deletions
@@ -1,49 +0,0 @@
//This component applies a customizable drop_shadow filter to its wearer when they toggle combat mode on or off. This can stack.
/datum/component/phantomthief
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
var/filter_x
var/filter_y
var/filter_size
var/filter_border
var/filter_color
var/datum/component/redirect/combattoggle_redir
/datum/component/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _border = 0, _color = "#E62111")
filter_x = _x
filter_y = _y
filter_size = _size
filter_border = _border
filter_color = _color
RegisterSignal(parent, COMSIG_COMBAT_TOGGLED, .proc/handlefilterstuff)
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/OnEquipped)
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/OnDropped)
/datum/component/phantomthief/proc/handlefilterstuff(mob/user, combatmodestate)
if(istype(user))
var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color)
if(!combatmodestate)
user.filters -= thefilter
else
user.filters += thefilter
/datum/component/phantomthief/proc/stripdesiredfilter(mob/user)
if(istype(user))
var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color)
user.filters -= thefilter
/datum/component/phantomthief/proc/OnEquipped(mob/user, slot)
if(!istype(user))
return
if(!combattoggle_redir)
combattoggle_redir = user.AddComponent(/datum/component/redirect, list(COMSIG_COMBAT_TOGGLED = CALLBACK(src, .proc/handlefilterstuff)))
/datum/component/phantomthief/proc/OnDropped(mob/user)
if(!istype(user))
return
if(combattoggle_redir)
QDEL_NULL(combattoggle_redir)
stripdesiredfilter(user)
@@ -198,7 +198,6 @@
var/enthrallGender //Use master or mistress
var/mental_capacity //Higher it is, lower the cooldown on commands, capacity reduces with resistance.
var/datum/weakref/redirect_component //resistance
var/distancelist = list(2,1.5,1,0.8,0.6,0.5,0.4,0.3,0.2) //Distance multipliers
@@ -228,7 +227,7 @@
master = get_mob_by_key(enthrallID)
//if(M.ckey == enthrallID)
// owner.remove_status_effect(src)//At the moment, a user can enthrall themselves, toggle this back in if that should be removed.
redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist)))) //Do resistance calc if resist is pressed#
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist) //Do resistance calc if resist is pressed#
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/owner_hear)
mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain!
var/mob/living/carbon/human/H = owner
@@ -566,8 +565,7 @@
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing2")
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing3")
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing4")
qdel(redirect_component.resolve())
redirect_component = null
UnregisterSignal(M, COMSIG_LIVING_RESIST)
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "MKUltra")
to_chat(owner, "<span class='big redtext'><i>You're now free of [master]'s influence, and fully independent!'</i></span>")