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 4e8c5bcc80bb2..2008f9d67a21f 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_attack.dm @@ -31,3 +31,6 @@ #define COMSIG_ATOM_ATTACK_ROBOT "atom_attack_robot" ///from base of atom/attack_silicon(): (mob/user) #define COMSIG_ATOM_ATTACK_SILICON "atom_attack_silicon" + +///from base of atom/interact(): (mob/user) +#define COMSIG_ATOM_INTERACT "atom_interact" diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index a6559a9ec4c06..cd4192c81babe 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -78,12 +78,15 @@ return FALSE /atom/proc/interact(mob/user) + if(SEND_SIGNAL(src, COMSIG_ATOM_INTERACT, user)) + return TRUE if(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_INTERACT) add_hiddenprint(user) else add_fingerprint(user) if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT) - return ui_interact(user) + ui_interact(user) + return TRUE return FALSE /mob/living/carbon/RangedAttack(atom/A, mouseparams) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index cc65a33b2ed2d..a5e3b0c6ec052 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -434,6 +434,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) . += research_msg.Join() /obj/item/interact(mob/user) + if(SEND_SIGNAL(src, COMSIG_ATOM_INTERACT, user)) + . = TRUE add_fingerprint(user) ui_interact(user) diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index b97e1707c6159..41721d51f501c 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -47,9 +47,6 @@ tracking = null return ..() -/obj/item/camera_bug/interact(mob/user) - ui_interact(user) - /obj/item/camera_bug/ui_interact(mob/user = usr) . = ..() var/datum/browser/popup = new(user, "camerabug","Camera Bug",nref=src) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 9b98b13ad763e..d43ae7b6a2829 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -111,10 +111,6 @@ effective or pretty fucking useless. /obj/item/healthanalyzer/rad_laser/attack_self(mob/user) interact(user) -/obj/item/healthanalyzer/rad_laser/interact(mob/user) - ui_interact(user) - - /obj/item/healthanalyzer/rad_laser/ui_state(mob/user) return GLOB.hands_state diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index f6d0983296766..8c8d67e3aec7d 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -10,6 +10,7 @@ armor = list(MELEE = 20, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 70, ACID = 60, STAMINA = 0, BLEED = 0) blocks_emissive = EMISSIVE_BLOCK_GENERIC pass_flags_self = LETPASSCLICKS | PASSSTRUCTURE + interaction_flags_atom = NONE var/contents_initialised = FALSE var/enable_door_overlay = TRUE var/has_opened_overlay = TRUE diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index dec80cf4b3ab0..3acb974a557e8 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -68,9 +68,6 @@ return TRUE interact(user) -/obj/item/clothing/ears/headphones/interact(mob/user) - ui_interact(user) - /obj/item/clothing/ears/headphones/ui_interact(mob/living/user) if(!isliving(user) || user.stat != CONSCIOUS || (HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) && !ispAI(user))) return diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index 308c55f277b5d..abd24a3418d21 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -37,9 +37,6 @@ return TRUE interact(user) -/obj/item/instrument/interact(mob/user) - ui_interact(user) - /obj/item/instrument/ui_interact(mob/living/user) if((!isliving(user) || user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) && !ispAI(user)) return diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index e89b34bfde167..2ce4edb106598 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -1,6 +1,6 @@ /obj/item/modular_computer/interact(mob/user) if(enabled) - ui_interact(user) + return ..() else turn_on(user)