mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-26 22:46:15 +01:00
Merge pull request #1323 from ArchieBeepBoop/fuck512
Component Updates - Taking 512 compatibility out back and beating it with a stick
This commit is contained in:
@@ -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)
|
||||
@@ -201,7 +201,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
|
||||
|
||||
@@ -231,7 +230,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)
|
||||
//var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN) //removing this, may cause some issues unsure.
|
||||
mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain!
|
||||
@@ -570,8 +569,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>")
|
||||
|
||||
@@ -6,19 +6,18 @@
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
|
||||
/obj/item/clothing/glasses/phantomthief/Initialize()
|
||||
/obj/item/clothing/glasses/phantomthief/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/phantomthief)
|
||||
AddComponent(/datum/component/wearertargeting/phantomthief)
|
||||
|
||||
/obj/item/clothing/glasses/phantomthief/syndicate
|
||||
name = "suspicious plastic mask"
|
||||
desc = "A cheap, bulky, Syndicate-branded plastic face mask. You have to break in to break out."
|
||||
var/nextadrenalinepop
|
||||
var/datum/component/redirect/combattoggle_redir
|
||||
|
||||
/obj/item/clothing/glasses/phantomthief/syndicate/examine(user)
|
||||
/obj/item/clothing/glasses/phantomthief/syndicate/examine(mob/user)
|
||||
. = ..()
|
||||
if(combattoggle_redir)
|
||||
if(user.get_item_by_slot(SLOT_GLASSES) == src)
|
||||
if(world.time >= nextadrenalinepop)
|
||||
. += "<span class='notice'>The built-in adrenaline injector is ready for use.</span>"
|
||||
else
|
||||
@@ -34,12 +33,12 @@
|
||||
. = ..()
|
||||
if(!istype(user))
|
||||
return
|
||||
if(!combattoggle_redir)
|
||||
combattoggle_redir = user.AddComponent(/datum/component/redirect, list(COMSIG_COMBAT_TOGGLED = CALLBACK(src, .proc/injectadrenaline)))
|
||||
if(slot != SLOT_GLASSES)
|
||||
return
|
||||
RegisterSignal(user, COMSIG_COMBAT_TOGGLED, .proc/injectadrenaline)
|
||||
|
||||
/obj/item/clothing/glasses/phantomthief/syndicate/dropped(mob/user)
|
||||
. = ..()
|
||||
if(!istype(user))
|
||||
return
|
||||
if(combattoggle_redir)
|
||||
QDEL_NULL(combattoggle_redir)
|
||||
UnregisterSignal(user, COMSIG_COMBAT_TOGGLED)
|
||||
|
||||
Reference in New Issue
Block a user