mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 00:35:45 +01:00
[MIRROR] Begin clickcode attack_self fix (#12173)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
063cf6cf48
commit
3cac28f9ad
@@ -98,6 +98,9 @@
|
||||
var/high_color = "#0099FF" // Color the shield will be when at max health. A light blue.
|
||||
var/low_color = "#FF0000" // Color the shield will drift towards as health is lowered. Deep red.
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/shield_projector/Initialize(mapload)
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddComponent(/datum/component/recursive_move)
|
||||
@@ -186,7 +189,12 @@
|
||||
for(var/obj/effect/directional_shield/S in active_shields)
|
||||
S.update_color(new_color)
|
||||
|
||||
/obj/item/shield_projector/attack_self(var/mob/living/user)
|
||||
/obj/item/shield_projector/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(active)
|
||||
if(always_on)
|
||||
to_chat(user, span_warning("You can't seem to deactivate \the [src]."))
|
||||
@@ -362,6 +370,7 @@
|
||||
|
||||
var/obj/mecha/my_mecha = null
|
||||
var/obj/item/mecha_parts/mecha_equipment/combat_shield/my_tool = null
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/shield_projector/line/exosuit/process()
|
||||
..()
|
||||
@@ -378,7 +387,10 @@
|
||||
else
|
||||
my_tool.set_ready_state(TRUE)
|
||||
|
||||
/obj/item/shield_projector/line/exosuit/attack_self(var/mob/living/user)
|
||||
/obj/item/shield_projector/line/exosuit/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(active)
|
||||
if(always_on)
|
||||
to_chat(user, span_warning("You can't seem to deactivate \the [src]."))
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
icon_state = "hdiffuser_off"
|
||||
|
||||
/obj/item/shield_diffuser/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
enabled = !enabled
|
||||
update_icon()
|
||||
if(enabled)
|
||||
|
||||
Reference in New Issue
Block a user