From 8e95962e678f15befc0b4ee0c6b1daa0f5c91eb5 Mon Sep 17 00:00:00 2001
From: mystery3525 <30960302+mystery3525@users.noreply.github.com>
Date: Wed, 25 Sep 2024 12:26:25 -0400
Subject: [PATCH] Properly splits attack_ai() and attack_robot() where in make
sense (#11310)
* attack_robot()
* add the . = ..()
* so apparently this is very important for cyborgs to be able to function
* cleans things up
* forgot this
* okay so git ate this part at some point
---
beestation.dme | 1 +
.../dcs/signals/signals_atom/signals_atom_attack.dm | 6 ++++++
code/_onclick/ai.dm | 6 +++++-
code/_onclick/cyborg.dm | 7 +++++--
code/_onclick/silicon.dm | 9 +++++++++
code/game/machinery/_machinery.dm | 12 ++++++++----
code/game/machinery/announcement_system.dm | 6 ++----
code/game/machinery/buttons.dm | 5 +----
code/game/machinery/cell_charger.dm | 4 ++--
code/game/machinery/cloning.dm | 5 +----
code/game/machinery/computer/apc_control.dm | 2 +-
code/game/machinery/cryopod.dm | 4 ++--
code/game/machinery/dish_drive.dm | 3 ++-
code/game/machinery/doors/airlock.dm | 3 ++-
code/game/machinery/doors/firedoor.dm | 5 +----
code/game/machinery/firealarm.dm | 5 +----
code/game/machinery/flasher.dm | 2 +-
code/game/machinery/igniter.dm | 4 +---
code/game/machinery/navbeacon.dm | 2 +-
code/game/machinery/porta_turret/portable_turret.dm | 8 +-------
.../porta_turret/portable_turret_construct.dm | 4 ++--
.../machinery/porta_turret/portable_turret_cover.dm | 3 +--
code/game/machinery/status_display.dm | 2 --
code/game/machinery/syndicatebeacon.dm | 5 ++---
code/game/objects/items.dm | 7 ++++---
code/game/objects/items/devices/powersink.dm | 4 ++--
code/game/objects/items/devices/radio/intercom.dm | 2 +-
code/game/objects/structures/barsigns.dm | 2 +-
code/game/objects/structures/fireaxe.dm | 2 +-
code/game/objects/structures/mineral_doors.dm | 10 ++++------
code/game/objects/structures/morgue.dm | 8 ++++----
code/game/turfs/open/floor/light_floor.dm | 2 +-
code/modules/atmospherics/machinery/other/miner.dm | 2 +-
code/modules/awaymissions/super_secret_room.dm | 2 +-
.../food_and_drinks/kitchen_machinery/deep_fryer.dm | 4 ++--
.../food_and_drinks/kitchen_machinery/grill.dm | 4 ++--
code/modules/holodeck/items.dm | 2 +-
code/modules/mob/living/simple_animal/bot/bot.dm | 2 +-
.../modular_computers/computers/item/computer.dm | 2 +-
.../modular_computers/computers/item/tablet.dm | 2 +-
code/modules/pool/pool.dm | 7 +------
code/modules/power/lighting/light.dm | 4 ++--
code/modules/power/port_gen.dm | 2 +-
code/modules/shuttle/ferry.dm | 5 +----
code/modules/station_goals/bluespace_tap.dm | 2 +-
45 files changed, 92 insertions(+), 98 deletions(-)
create mode 100644 code/_onclick/silicon.dm
diff --git a/beestation.dme b/beestation.dme
index a0fd31184e3a0..c8b9894027ab7 100644
--- a/beestation.dme
+++ b/beestation.dme
@@ -357,6 +357,7 @@
#include "code\_onclick\other_mobs.dm"
#include "code\_onclick\overmind.dm"
#include "code\_onclick\pai.dm"
+#include "code\_onclick\silicon.dm"
#include "code\_onclick\telekinesis.dm"
#include "code\_onclick\hud\_defines.dm"
#include "code\_onclick\hud\action_button.dm"
diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm
index 91094391ed1d1..4e8c5bcc80bb2 100644
--- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm
+++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm
@@ -8,6 +8,8 @@
#define COMPONENT_NO_AFTERATTACK (1<<0)
///from base of atom/attack_hulk(): (/mob/living/carbon/human)
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack"
+///from base of atom/attack_ai(): (/mob/user)
+#define COMSIG_ATOM_ATTACK_AI "attack_ai"
///from base of atom/animal_attack(): (/mob/user)
#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal"
//from base of atom/attack_basic_mob(): (/mob/user)
@@ -25,3 +27,7 @@
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand"
///from base of atom/attack_paw(): (mob/user)
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw"
+///from base of atom/attack_robot(): (mob/user)
+#define COMSIG_ATOM_ATTACK_ROBOT "atom_attack_robot"
+///from base of atom/attack_silicon(): (mob/user)
+#define COMSIG_ATOM_ATTACK_SILICON "atom_attack_silicon"
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index 708b157e6a8c8..3cdf1c25fedfa 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -95,7 +95,11 @@
A.attack_ai(src)
/atom/proc/attack_ai(mob/user)
- return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_AI, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
+ return TRUE
+ if(attack_silicon(user))
+ return TRUE
+ return FALSE
/*
Since the AI handles shift, ctrl, and alt-click differently
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index 0cedde0462430..82b087f26cb14 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -182,5 +182,8 @@
A.attack_robot(src)
/atom/proc/attack_robot(mob/user)
- attack_ai(user)
- return
+ if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_ROBOT, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
+ return TRUE
+ if(attack_silicon(user))
+ return TRUE
+ return FALSE
diff --git a/code/_onclick/silicon.dm b/code/_onclick/silicon.dm
new file mode 100644
index 0000000000000..877d887fa7c0f
--- /dev/null
+++ b/code/_onclick/silicon.dm
@@ -0,0 +1,9 @@
+/**
+ * Often times, we want functionality to be available to both AIs and Cyborgs.
+ *
+ * returns TRUE if action has been done
+ */
+/atom/proc/attack_silicon(mob/user)
+ if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_SILICON, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
+ return TRUE
+ return FALSE
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index 6ae592b4ea064..ce67ff6599278 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -462,6 +462,9 @@ Class Procs:
user.visible_message("[user] smashes [src] with [user.p_their()] paws[damage ? "." : ", without leaving a mark!"]", null, null, COMBAT_MESSAGE_RANGE)
/obj/machinery/attack_robot(mob/user)
+ if(isAI(user))
+ CRASH("An AI just tried to run attack_robot().") // They should not be running the same procs anymore.
+ . = ..()
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
return FALSE
if(Adjacent(user) && can_buckle && has_buckled_mobs()) //so that borgs (but not AIs, sadly (perhaps in a future PR?)) can unbuckle people from machines
@@ -475,12 +478,13 @@ Class Procs:
return _try_interact(user)
/obj/machinery/attack_ai(mob/user)
+ if(iscyborg(user))
+ CRASH("A cyborg just tried to run attack_ai().") // They should not be running the same procs anymore.
+ . = ..()
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
return FALSE
- if(iscyborg(user))// For some reason attack_robot doesn't work
- return attack_robot(user)
- else
- return _try_interact(user)
+
+ return _try_interact(user)
/obj/machinery/_try_interact(mob/user)
if((interaction_flags_machine & INTERACT_MACHINE_WIRES_IF_OPEN) && panel_open && (attempt_wire_interaction(user) == WIRE_INTERACTION_BLOCK))
diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm
index a777feaf0d418..8e6868d461959 100644
--- a/code/game/machinery/announcement_system.dm
+++ b/code/game/machinery/announcement_system.dm
@@ -155,16 +155,14 @@ GLOBAL_LIST_EMPTY(announcement_systems)
update_icon()
. = TRUE
-/obj/machinery/announcement_system/attack_robot(mob/living/silicon/user)
- . = attack_ai(user)
-
-/obj/machinery/announcement_system/attack_ai(mob/user)
+/obj/machinery/announcement_system/attack_silicon(mob/user)
if(!user.canUseTopic(src, !issilicon(user)))
return
if(machine_stat & BROKEN)
to_chat(user, "[src]'s firmware appears to be malfunctioning!")
return
interact(user)
+ return TRUE
/obj/machinery/announcement_system/proc/act_up() //does funny breakage stuff
if(!obj_break()) // if badmins flag this unbreakable or its already broken
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index 54182368f4896..a9e89a0ac1e19 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -116,13 +116,10 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/button)
if(do_after(eminence, 20, target=get_turf(eminence)))
attack_hand(eminence)
-/obj/machinery/button/attack_ai(mob/user)
+/obj/machinery/button/attack_silicon(mob/user)
if(!panel_open)
return attack_hand(user)
-/obj/machinery/button/attack_robot(mob/user)
- return attack_ai(user)
-
/obj/machinery/button/proc/setup_device()
if(id && istype(device, /obj/item/assembly/control))
var/obj/item/assembly/control/A = device
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index bd0a164f12229..d44fabf0aa49b 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -103,8 +103,8 @@
removecell()
return COMPONENT_CANCEL_ATTACK_CHAIN
-/obj/machinery/cell_charger/attack_ai(mob/user)
- return
+/obj/machinery/cell_charger/attack_silicon(mob/user)
+ return TRUE
/obj/machinery/cell_charger/emp_act(severity)
. = ..()
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 2207b417ba41d..fa9c1e3481660 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -105,7 +105,7 @@
reagents.reaction(user.loc)
src.reagents.clear_reagents()
-/obj/machinery/clonepod/attack_ai(mob/user)
+/obj/machinery/clonepod/attack_silicon(mob/user)
return attack_hand(user)
/obj/machinery/clonepod/examine(mob/user)
@@ -179,9 +179,6 @@
if(mob_occupant)
. = (100 * ((mob_occupant.health + 100) / (heal_level + 100)))
-/obj/machinery/clonepod/attack_ai(mob/user)
- return examine(user)
-
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(clonename, ui, mutation_index, mindref, last_death, datum/species/mrace, list/features, factions, datum/bank_account/insurance, list/traumas, body_only, experimental)
var/result = CLONING_SUCCESS
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index 8f2b84866db50..1b4cf065f1ccc 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -30,7 +30,7 @@
active_apc.remote_control = null
active_apc = null
-/obj/machinery/computer/apc_control/attack_ai(mob/user)
+/obj/machinery/computer/apc_control/attack_silicon(mob/user)
if(!IsAdminGhost(user))
to_chat(user,"[src] does not support AI control.") //You already have APC access, cheater!
return
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index bebbd89ffacf9..b9898291876c1 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -43,8 +43,8 @@ GLOBAL_LIST_EMPTY(cryopod_computers)
GLOB.cryopod_computers -= src
..()
-/obj/machinery/computer/cryopod/attack_ai()
- attack_hand()
+/obj/machinery/computer/cryopod/attack_silicon()
+ return attack_hand()
/obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
if(machine_stat & (NOPOWER|BROKEN))
diff --git a/code/game/machinery/dish_drive.dm b/code/game/machinery/dish_drive.dm
index c2d434811fae6..b06017a24d4e5 100644
--- a/code/game/machinery/dish_drive.dm
+++ b/code/game/machinery/dish_drive.dm
@@ -102,11 +102,12 @@
else
step_towards(I, src)
-/obj/machinery/dish_drive/attack_ai(mob/living/user)
+/obj/machinery/dish_drive/attack_silicon(mob/living/user)
if(machine_stat)
return
to_chat(user, "You send a disposal transmission signal to [src].")
do_the_dishes(TRUE)
+ return TRUE
/obj/machinery/dish_drive/AltClick(mob/living/user)
if(user.canUseTopic(src, !issilicon(user)))
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index ccbddf896fdd9..9bc1d1aa1b878 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -769,7 +769,7 @@
. += "Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it."
. += "Ctrl-Shift-click [src] to [ emergency ? "disable" : "enable"] emergency access."
-/obj/machinery/door/airlock/attack_ai(mob/user)
+/obj/machinery/door/airlock/attack_silicon(mob/user)
if(!canAIControl(user))
if(canAIHack())
hack(user)
@@ -784,6 +784,7 @@
return
ui_interact(user)
+ return TRUE
/obj/machinery/door/airlock/proc/hack(mob/user)
set waitfor = 0
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 278110a0b6331..0a2f1083bbc60 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -229,7 +229,7 @@
return ..()
-/obj/machinery/door/firedoor/attack_ai(mob/user)
+/obj/machinery/door/firedoor/attack_silicon(mob/user)
add_fingerprint(user)
if(welded || operating || machine_stat & NOPOWER)
return TRUE
@@ -239,9 +239,6 @@
close()
return TRUE
-/obj/machinery/door/firedoor/attack_robot(mob/user)
- return attack_ai(user)
-
/obj/machinery/door/firedoor/attack_alien(mob/user)
add_fingerprint(user)
if(welded)
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 820bf6fd17ff8..e1a78a1e48294 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -193,10 +193,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/firealarm)
else
alarm(user)
-/obj/machinery/firealarm/attack_ai(mob/user)
- return attack_hand(user)
-
-/obj/machinery/firealarm/attack_robot(mob/user)
+/obj/machinery/firealarm/attack_silicon(mob/user)
return attack_hand(user)
/obj/machinery/firealarm/attackby(obj/item/W, mob/user, params)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 39cd58f65a9ad..d27471b9f74ae 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -90,7 +90,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/flasher)
return ..()
//Let the AI trigger them directly.
-/obj/machinery/flasher/attack_ai()
+/obj/machinery/flasher/attack_silicon()
if (anchored)
return flash()
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index dcce9b812b5a1..6d3db9ff5ceb2 100644
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -116,11 +116,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/sparker, 26)
update_appearance()
return TRUE
-/obj/machinery/sparker/attack_ai()
+/obj/machinery/sparker/attack_silicon()
if (anchored)
return ignite()
- else
- return
/obj/machinery/sparker/proc/ignite()
if (!(powered()))
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 35e77322e7adc..3ab494d79723a 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -95,7 +95,7 @@
else
return ..()
-/obj/machinery/navbeacon/attack_ai(mob/user)
+/obj/machinery/navbeacon/attack_silicon(mob/user)
interact(user, 1)
/obj/machinery/navbeacon/attack_paw()
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index 7ab2e4ea8d8eb..346c2b6fc4aa8 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -941,13 +941,7 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/turretid)
to_chat(user, "You short out the turret controls' access analysis module.")
locked = FALSE
-/obj/machinery/turretid/attack_robot(mob/user)
- if(!ailock)
- return attack_hand(user)
- else
- to_chat(user, "There seems to be a firewall preventing you from accessing this device.")
-
-/obj/machinery/turretid/attack_ai(mob/user)
+/obj/machinery/turretid/attack_silicon(mob/user)
if(!ailock || IsAdminGhost(user))
return attack_hand(user)
else
diff --git a/code/game/machinery/porta_turret/portable_turret_construct.dm b/code/game/machinery/porta_turret/portable_turret_construct.dm
index 30f916b1c4574..95943a20d6e9b 100644
--- a/code/game/machinery/porta_turret/portable_turret_construct.dm
+++ b/code/game/machinery/porta_turret/portable_turret_construct.dm
@@ -185,8 +185,8 @@
new /obj/item/assembly/prox_sensor(loc)
build_step = PTURRET_GUN_EQUIPPED
-/obj/machinery/porta_turret_construct/attack_ai()
- return
+/obj/machinery/porta_turret_construct/attack_silicon()
+ return TRUE
#undef PTURRET_UNSECURED
#undef PTURRET_BOLTED
diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm
index 4289aff7bf779..8761404d545e4 100644
--- a/code/game/machinery/porta_turret/portable_turret_cover.dm
+++ b/code/game/machinery/porta_turret/portable_turret_cover.dm
@@ -23,14 +23,13 @@
//>necessary
//I'm not fixing it because i'm fucking bored of this code already, but someone should just reroute these to the parent turret's procs.
-/obj/machinery/porta_turret_cover/attack_ai(mob/user)
+/obj/machinery/porta_turret_cover/attack_silicon(mob/user)
. = ..()
if(.)
return
return parent_turret.attack_ai(user)
-
/obj/machinery/porta_turret_cover/attack_hand(mob/user)
. = ..()
if(.)
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 1f24a5d136cb8..90f0ea21326cf 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -449,8 +449,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/status_display/ai, 32)
. = ..()
/obj/machinery/status_display/ai/attack_ai(mob/living/silicon/ai/user)
- if(!isAI(user))
- return
var/list/choices = list()
for(var/emotion_const in emotion_map)
var/icon_state = emotion_map[emotion_const]
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 61320e077e3b7..1da7a00cab370 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -42,9 +42,8 @@
to_chat(user, "You deactivate the beacon.")
-/obj/machinery/power/singularity_beacon/attack_ai(mob/user)
- return
-
+/obj/machinery/power/singularity_beacon/attack_silicon(mob/user)
+ return TRUE
/obj/machinery/power/singularity_beacon/attack_hand(mob/user)
. = ..()
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 4d10584e00747..5d6834f05e52d 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -542,11 +542,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
return
attack_paw(A)
-/obj/item/attack_ai(mob/user)
+/obj/item/attack_robot(mob/living/user)
+ . = ..()
+ if(.)
+ return
if(istype(src.loc, /obj/item/robot_module))
//If the item is part of a cyborg module, equip it
- if(!iscyborg(user))
- return
var/mob/living/silicon/robot/R = user
if(!R.low_power_mode) //can't equip modules with an empty cell.
R.activate_module(src)
diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm
index f57c077bbdac2..bbd01ccbea583 100644
--- a/code/game/objects/items/devices/powersink.dm
+++ b/code/game/objects/items/devices/powersink.dm
@@ -100,8 +100,8 @@
/obj/item/powersink/attack_paw()
return
-/obj/item/powersink/attack_ai()
- return
+/obj/item/powersink/attack_silicon()
+ return TRUE
/obj/item/powersink/attack_hand(mob/user)
. = ..()
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index be51cd20bcecb..e2c4e0d877fb3 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -56,7 +56,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/radio/intercom)
return
return ..()
-/obj/item/radio/intercom/attack_ai(mob/user)
+/obj/item/radio/intercom/attack_silicon(mob/user)
interact(user)
/obj/item/radio/intercom/attack_paw(mob/user)
diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm
index d47d71b3fa1d0..2ca66cc88647d 100644
--- a/code/game/objects/structures/barsigns.dm
+++ b/code/game/objects/structures/barsigns.dm
@@ -59,7 +59,7 @@
if(BURN)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
-/obj/structure/sign/barsign/attack_ai(mob/user)
+/obj/structure/sign/barsign/attack_silicon(mob/user)
return attack_hand(user)
/obj/structure/sign/barsign/attack_hand(mob/user)
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index b417c19d64091..e4720096c9765 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -131,7 +131,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/fireaxecabinet, 32)
/obj/structure/fireaxecabinet/attack_paw(mob/living/user)
return attack_hand(user)
-/obj/structure/fireaxecabinet/attack_ai(mob/user)
+/obj/structure/fireaxecabinet/attack_silicon(mob/user)
toggle_lock(user)
return
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index 4a9790843926e..0f28eb2d11f3f 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -40,12 +40,10 @@
if(!door_opened)
return TryToSwitchState(AM)
-/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
- if(isAI(user)) //so the AI can't open it
- return
- else if(iscyborg(user)) //but cyborgs can
- if(get_dist(user,src) <= 1) //not remotely though
- return TryToSwitchState(user)
+/obj/structure/mineral_door/attack_robot(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
+ // so the AI can't open it but cyborgs can
+ if(get_dist(user,src) <= 1) //not remotely though
+ return TryToSwitchState(user)
/obj/structure/mineral_door/attack_paw(mob/user)
return attack_hand(user)
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 282b2bf827d74..d77abbbcbc3a0 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -215,7 +215,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/bodycontainer/crematorium/attack_robot(mob/user) //Borgs can't use crematoriums without help
to_chat(user, "[src] is locked against you.")
- return
+ return TRUE
/obj/structure/bodycontainer/crematorium/Destroy()
GLOB.crematoriums.Remove(src)
@@ -395,9 +395,9 @@ GLOBAL_LIST_EMPTY(crematoriums)
desc = "Apply body before burning."
icon_state = "cremat"
-/obj/structure/tray/c_tray/attack_robot(mob/user) //copied behaviour from /obj/structure/bodycontainer/crematorium
- to_chat(user, "[src] is locked against you.")
- return
+/obj/structure/tray/c_tray/attack_silicon(mob/user) //copied behaviour from /obj/structure/bodycontainer/crematorium
+ to_chat(user, "\The [src] is locked against you.")
+ return TRUE
/*
* Morgue tray
diff --git a/code/game/turfs/open/floor/light_floor.dm b/code/game/turfs/open/floor/light_floor.dm
index fd865cb614321..5c24204e41963 100644
--- a/code/game/turfs/open/floor/light_floor.dm
+++ b/code/game/turfs/open/floor/light_floor.dm
@@ -75,7 +75,7 @@
on = FALSE
update_icon()
-/turf/open/floor/light/attack_ai(mob/user)
+/turf/open/floor/light/attack_silicon(mob/user)
return attack_hand(user)
/turf/open/floor/light/attackby(obj/item/C, mob/user, params)
diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm
index c025855411842..6f7b4260e1439 100644
--- a/code/modules/atmospherics/machinery/other/miner.dm
+++ b/code/modules/atmospherics/machinery/other/miner.dm
@@ -138,7 +138,7 @@
merger.set_temperature(spawn_temp)
O.assume_air(merger)
-/obj/machinery/atmospherics/miner/attack_ai(mob/living/silicon/user)
+/obj/machinery/atmospherics/miner/attack_silicon(mob/living/silicon/user)
if(broken)
to_chat(user, "[src] seems to be broken. Its debug interface outputs: [broken_message]")
..()
diff --git a/code/modules/awaymissions/super_secret_room.dm b/code/modules/awaymissions/super_secret_room.dm
index e9f3fb75689b1..5b7445ce56b86 100644
--- a/code/modules/awaymissions/super_secret_room.dm
+++ b/code/modules/awaymissions/super_secret_room.dm
@@ -101,7 +101,7 @@
/obj/structure/speaking_tile/attack_larva(mob/user)
return interact(user)
-/obj/structure/speaking_tile/attack_ai(mob/user)
+/obj/structure/speaking_tile/attack_silicon(mob/user)
return interact(user)
/obj/structure/speaking_tile/attack_slime(mob/user)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
index 810690e1152dc..38b685bcfde0d 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm
@@ -199,8 +199,8 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
explosion(src, devastation_range = 1, heavy_impact_range = 3, light_impact_range = 5, flame_range = 7)
deconstruct(FALSE)
-/obj/machinery/deepfryer/attack_ai(mob/user)
- return
+/obj/machinery/deepfryer/attack_silicon(mob/user)
+ return TRUE
/obj/machinery/deepfryer/attack_hand(mob/user)
if(frying)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/grill.dm b/code/modules/food_and_drinks/kitchen_machinery/grill.dm
index 3963ffa3cfb0e..7eea5ee3a60d6 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/grill.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/grill.dm
@@ -114,8 +114,8 @@
new /obj/item/stack/rods(loc, 5)
..()
-/obj/machinery/grill/attack_ai(mob/user)
- return
+/obj/machinery/grill/attack_silicon(mob/user)
+ return TRUE
/obj/machinery/grill/attack_hand(mob/user)
if(grilled_item)
diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm
index 3510e090af54d..89078d5f03e17 100644
--- a/code/modules/holodeck/items.dm
+++ b/code/modules/holodeck/items.dm
@@ -157,7 +157,7 @@
active_power_usage = 6
power_channel = AREA_USAGE_ENVIRON
-/obj/machinery/readybutton/attack_ai(mob/user as mob)
+/obj/machinery/readybutton/attack_silicon(mob/user as mob)
to_chat(user, "The station AI is not to interact with these devices.")
return
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 28e3c1d1d760d..32a38719f9ae6 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -310,7 +310,7 @@
else
return ..()
-/mob/living/simple_animal/bot/attack_ai(mob/user)
+/mob/living/simple_animal/bot/attack_silicon(mob/user)
if(!topic_denied(user))
ui_interact(user)
else
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index a4ef011cd21ff..3ceb2011d325c 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -235,7 +235,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
return attack_self(M)
return ..()
-/obj/item/modular_computer/attack_ai(mob/user)
+/obj/item/modular_computer/attack_silicon(mob/user)
return attack_self(user)
/obj/item/modular_computer/attack_ghost(mob/dead/observer/user)
diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm
index 8e266ce8c4a46..d725676716c81 100644
--- a/code/modules/modular_computers/computers/item/tablet.dm
+++ b/code/modules/modular_computers/computers/item/tablet.dm
@@ -384,7 +384,7 @@
add_overlay(mutable_appearance(init_icon, "light_overlay"))
-/obj/item/modular_computer/tablet/pda/attack_ai(mob/user)
+/obj/item/modular_computer/tablet/pda/attack_silicon(mob/user)
to_chat(user, "It doesn't feel right to snoop around like that...")
return // we don't want ais or cyborgs using a private role tablet
diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm
index 9639fa63eb569..4725215997a30 100644
--- a/code/modules/pool/pool.dm
+++ b/code/modules/pool/pool.dm
@@ -216,7 +216,6 @@ Place a pool filter somewhere in the pool if you want people to be able to modif
P.splash(user)
/obj/structure/pool_ladder/attack_robot(mob/user)
- . = ..()
attack_hand(user)
GLOBAL_LIST_EMPTY(pool_filters)
@@ -257,11 +256,7 @@ GLOBAL_LIST_EMPTY(pool_filters)
//Brick can set the pool to low temperatures remotely. This will probably be hell on malf!
-/obj/machinery/pool_filter/attack_robot(mob/user)
- . = ..()
- wrench_act(user, null)
-
-/obj/machinery/pool_filter/attack_ai(mob/user)
+/obj/machinery/pool_filter/attack_silicon(mob/user)
. = ..()
wrench_act(user, null)
diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm
index d761ec5a1d4e3..7a79332566807 100644
--- a/code/modules/power/lighting/light.dm
+++ b/code/modules/power/lighting/light.dm
@@ -160,7 +160,7 @@
if(on && turning_on)
return
-
+
var/area/local_area = get_area(src)
if(emergency_mode || (local_area?.fire))
. += mutable_appearance(overlayicon, "[base_state]_emergency")
@@ -478,7 +478,7 @@
// ai attack - make lights flicker, because why not
-/obj/machinery/light/attack_ai(mob/user)
+/obj/machinery/light/attack_silicon(mob/user)
no_emergency = !no_emergency
to_chat(user, "Emergency lights for this fixture have been [no_emergency ? "disabled" : "enabled"].")
update(FALSE)
diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm
index 904f497ce06de..c4c09b2c2bd40 100644
--- a/code/modules/power/port_gen.dm
+++ b/code/modules/power/port_gen.dm
@@ -218,7 +218,7 @@
..()
emp_act(EMP_HEAVY)
-/obj/machinery/power/port_gen/pacman/attack_ai(mob/user)
+/obj/machinery/power/port_gen/pacman/attack_silicon(mob/user)
interact(user)
/obj/machinery/power/port_gen/pacman/attack_paw(mob/user)
diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm
index d6908c05768b7..14d9bfa3f8365 100644
--- a/code/modules/shuttle/ferry.dm
+++ b/code/modules/shuttle/ferry.dm
@@ -17,10 +17,7 @@
return FALSE
return TRUE
-/obj/machinery/computer/shuttle_flight/ferry/attack_ai()
- return allow_silicons ? ..() : FALSE
-
-/obj/machinery/computer/shuttle_flight/ferry/attack_robot()
+/obj/machinery/computer/shuttle_flight/ferry/attack_silicon()
return allow_silicons ? ..() : FALSE
/obj/machinery/computer/shuttle_flight/ferry/request
diff --git a/code/modules/station_goals/bluespace_tap.dm b/code/modules/station_goals/bluespace_tap.dm
index 18183bf390e10..f06886f63dce4 100644
--- a/code/modules/station_goals/bluespace_tap.dm
+++ b/code/modules/station_goals/bluespace_tap.dm
@@ -362,7 +362,7 @@
/obj/machinery/power/bluespace_tap/attack_ghost(mob/user)
ui_interact(user)
-/obj/machinery/power/bluespace_tap/attack_ai(mob/user)
+/obj/machinery/power/bluespace_tap/attack_silicon(mob/user)
ui_interact(user)
/**