mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +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
@@ -408,6 +408,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/electronic_assembly/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!check_interactivity(user))
|
||||
return
|
||||
if(opened)
|
||||
|
||||
@@ -60,13 +60,18 @@
|
||||
return IC.attackby(I, user)
|
||||
|
||||
/obj/item/clothing/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(helmet_handling)
|
||||
return FALSE
|
||||
if(IC)
|
||||
if(IC.opened)
|
||||
IC.attack_self(user)
|
||||
else
|
||||
action_circuit.do_work()
|
||||
else
|
||||
..()
|
||||
|
||||
// Does most of the repeatative setup.
|
||||
/obj/item/clothing/proc/setup_integrated_circuit(new_type)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
var/obj/item/electronic_assembly/device/EA
|
||||
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/assembly/electronic_assembly/Initialize(mapload)
|
||||
. = ..()
|
||||
EA = new(src)
|
||||
@@ -35,7 +37,10 @@
|
||||
if(opened)
|
||||
icon_state = icon_state + "-open"
|
||||
|
||||
/obj/item/assembly/electronic_assembly/attack_self(mob/user as mob)
|
||||
/obj/item/assembly/electronic_assembly/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(EA)
|
||||
EA.attack_self(user)
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/integrated_electronics/detailer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
// Leaving this commented out in case someone decides that this would be better as an "any color" selection system
|
||||
|
||||
@@ -124,7 +124,10 @@
|
||||
dirty_items = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_circuit_printer/attack_self(var/mob/user)
|
||||
/obj/item/integrated_circuit_printer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/integrated_circuit_printer/tgui_state(mob/user)
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
return
|
||||
|
||||
/obj/item/integrated_electronics/wirer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
switch(mode)
|
||||
if(WIRE)
|
||||
mode = UNWIRE
|
||||
@@ -114,6 +117,9 @@
|
||||
var/accepting_refs = 0
|
||||
|
||||
/obj/item/integrated_electronics/debugger/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
|
||||
if(!CanInteract(user, GLOB.tgui_physical_state))
|
||||
return
|
||||
@@ -172,14 +178,6 @@
|
||||
var/datum/integrated_io/selected_io = null
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/multitool/attack_self(mob/user)
|
||||
if(selected_io)
|
||||
selected_io = null
|
||||
to_chat(user, span_notice("You clear the wired connection from the multitool."))
|
||||
else
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/multitool/update_icon()
|
||||
if(selected_io)
|
||||
if(buffer || connecting || connectable)
|
||||
|
||||
@@ -46,7 +46,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user)
|
||||
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(installed_gun)
|
||||
installed_gun.forceMove(get_turf(src))
|
||||
to_chat(user, span_notice("You slide \the [installed_gun] out of the firing mechanism."))
|
||||
@@ -191,7 +194,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/grenade/attack_self(var/mob/user)
|
||||
/obj/item/integrated_circuit/manipulation/grenade/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(attached_grenade)
|
||||
user.visible_message(span_warning("\The [user] removes \an [attached_grenade] from \the [src]!"), span_notice("You remove \the [attached_grenade] from \the [src]."))
|
||||
user.put_in_any_hand_if_possible(attached_grenade) || attached_grenade.dropInto(loc)
|
||||
|
||||
@@ -91,6 +91,9 @@
|
||||
return
|
||||
|
||||
/obj/item/integrated_circuit/memory/constant/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
|
||||
if(!CanInteract(user, GLOB.tgui_physical_state))
|
||||
|
||||
Reference in New Issue
Block a user