diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 09187b5019d..3e1926ef609 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -11,7 +11,7 @@
var/list/modifiers = params2list(params)
var/is_right_clicking = LAZYACCESS(modifiers, RIGHT_CLICK)
- var/item_interact_result = target.item_interaction(user, src, modifiers, is_right_clicking)
+ var/item_interact_result = target.base_item_interaction(user, src, modifiers)
if(item_interact_result & ITEM_INTERACT_SUCCESS)
return TRUE
if(item_interact_result & ITEM_INTERACT_BLOCKING)
@@ -159,7 +159,7 @@
return FALSE
return attacking_item.attack_atom(src, user, params)
-/mob/living/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/mob/living/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
// Surgery and such happens very high up in the interaction chain, before parent call
var/attempt_tending = item_tending(user, tool, modifiers)
if(attempt_tending & ITEM_INTERACT_ANY_BLOCKER)
diff --git a/code/datums/components/style/style_meter.dm b/code/datums/components/style/style_meter.dm
index 72688f41c52..94acf0a6dcf 100644
--- a/code/datums/components/style/style_meter.dm
+++ b/code/datums/components/style/style_meter.dm
@@ -27,7 +27,7 @@
. = ..()
. += span_notice("You feel like a multitool could be used on this.")
-/obj/item/style_meter/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/style_meter/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!istype(interacting_with, /obj/item/clothing/glasses))
return NONE
diff --git a/code/datums/elements/ridable.dm b/code/datums/elements/ridable.dm
index cbb6d7931f9..e68653b3d4a 100644
--- a/code/datums/elements/ridable.dm
+++ b/code/datums/elements/ridable.dm
@@ -197,3 +197,15 @@
to_chat(user, span_notice("You gently let go of [rider]."))
return
return rider
+
+/obj/item/riding_offhand/interact_with_atom(atom/movable/interacting_with, mob/living/user, list/modifiers)
+ if(!istype(interacting_with) || !interacting_with.can_buckle)
+ return NONE
+ if(rider == user) // Piggyback user
+ return ITEM_INTERACT_BLOCKING
+
+ // Handles de-fireman carrying a mob and buckling them onto something (tables, etc)
+ var/mob/living/former_rider = rider
+ user.unbuckle_mob(former_rider)
+ former_rider.forceMove(get_turf(interacting_with))
+ return interacting_with.mouse_buckle_handling(former_rider, user) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING
diff --git a/code/game/atom/atom_tool_acts.dm b/code/game/atom/atom_tool_acts.dm
index 4d4fd2b7416..9f06fbcdea3 100644
--- a/code/game/atom/atom_tool_acts.dm
+++ b/code/game/atom/atom_tool_acts.dm
@@ -4,15 +4,12 @@
* Handles non-combat iteractions of a tool on this atom,
* such as using a tool on a wall to deconstruct it,
* or scanning someone with a health analyzer
- *
- * This can be overridden to add custom item interactions to this atom
- *
- * Do not call this directly
*/
-/atom/proc/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/atom/proc/base_item_interaction(mob/living/user, obj/item/tool, list/modifiers)
SHOULD_CALL_PARENT(TRUE)
PROTECTED_PROC(TRUE)
+ var/is_right_clicking = LAZYACCESS(modifiers, RIGHT_CLICK)
var/is_left_clicking = !is_right_clicking
var/early_sig_return = NONE
if(is_left_clicking)
@@ -24,6 +21,12 @@
if(early_sig_return)
return early_sig_return
+ var/self_interaction = is_left_clicking \
+ ? item_interaction(user, tool, modifiers) \
+ : item_interaction_secondary(user, tool, modifiers)
+ if(self_interaction)
+ return self_interaction
+
var/interact_return = is_left_clicking \
? tool.interact_with_atom(src, user, modifiers) \
: tool.interact_with_atom_secondary(src, user, modifiers)
@@ -85,6 +88,27 @@
SEND_SIGNAL(tool, COMSIG_TOOL_ATOM_ACTED_SECONDARY(tool_type), src)
return act_result
+/**
+ * Called when this atom has an item used on it.
+ * IE, a mob is clicking on this atom with an item.
+ *
+ * Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code.
+ * Return NONE to allow default interaction / tool handling.
+ */
+/atom/proc/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
+ return NONE
+
+/**
+ * Called when this atom has an item used on it WITH RIGHT CLICK,
+ * IE, a mob is right clicking on this atom with an item.
+ * Default behavior has it run the same code as left click.
+ *
+ * Return an ITEM_INTERACT_ flag in the event the interaction was handled, to cancel further interaction code.
+ * Return NONE to allow default interaction / tool handling.
+ */
+/atom/proc/item_interaction_secondary(mob/living/user, obj/item/tool, list/modifiers)
+ return item_interaction(user, tool, modifiers)
+
/**
* Called when this item is being used to interact with an atom,
* IE, a mob is clicking on an atom with this item.
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index e744554d164..533c3aa1a42 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -767,13 +767,14 @@
return
update_last_used(user)
-/obj/machinery/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/base_item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(SEND_SIGNAL(user, COMSIG_TRY_USE_MACHINE, src) & COMPONENT_CANT_USE_MACHINE_TOOLS)
- return ITEM_INTERACT_ANY_BLOCKER
+ return ITEM_INTERACT_BLOCKING
+
. = ..()
- if(. & ITEM_INTERACT_BLOCKING)
- return
- update_last_used(user)
+ if(.)
+ update_last_used(user)
+ return .
/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/computer/arcade/_arcade.dm b/code/game/machinery/computer/arcade/_arcade.dm
index 1bfd43cdb69..69994634fc3 100644
--- a/code/game/machinery/computer/arcade/_arcade.dm
+++ b/code/game/machinery/computer/arcade/_arcade.dm
@@ -12,11 +12,7 @@
///Like prize pool, it must be a list of the prize and the weight of being selected.
var/list/prize_override
-/obj/machinery/computer/arcade/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- . = ..()
- if(. & ITEM_INTERACT_ANY_BLOCKER)
- return .
-
+/obj/machinery/computer/arcade/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(istype(tool, /obj/item/stack/arcadeticket))
var/obj/item/stack/arcadeticket/tickets = tool
if(!tickets.use(2))
@@ -44,6 +40,8 @@
reset_cabinet(user)
return ITEM_INTERACT_SUCCESS
+ return NONE
+
/obj/machinery/computer/arcade/screwdriver_act(mob/living/user, obj/item/I)
//you can't stop playing when you start.
if(obj_flags & EMAGGED)
@@ -100,5 +98,3 @@
var/atom/movable/the_prize = new prizeselect(get_turf(src))
playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3)
visible_message(span_notice("[src] dispenses [the_prize]!"), span_notice("You hear a chime and a clunk."))
-
-
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 521f83900a4..f937c02fc9e 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -146,7 +146,7 @@
return FALSE
-/obj/structure/frame/computer/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/structure/frame/computer/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
. = ..()
if(. & ITEM_INTERACT_ANY_BLOCKER)
return .
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index f47948753ab..f0b3434ec85 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -107,15 +107,10 @@
return ITEM_INTERACT_BLOCKING
return .
-/obj/structure/frame/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- . = ..()
- if(. & ITEM_INTERACT_ANY_BLOCKER)
- return .
-
+/obj/structure/frame/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(istype(tool, /obj/item/circuitboard)) // Install board will fail if passed an invalid circuitboard and give feedback
return install_board(user, tool, by_hand = TRUE) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING
-
- return .
+ return NONE
/**
* Installs the passed circuit board into the frame
diff --git a/code/game/machinery/machine_frame.dm b/code/game/machinery/machine_frame.dm
index 4edb3215e2b..ccdcddc8705 100644
--- a/code/game/machinery/machine_frame.dm
+++ b/code/game/machinery/machine_frame.dm
@@ -389,7 +389,7 @@
balloon_alert(user, "can't add that!")
return FALSE
-/obj/structure/frame/machine/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/structure/frame/machine/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
. = ..()
if(. & ITEM_INTERACT_ANY_BLOCKER)
return .
@@ -416,11 +416,18 @@
if(istype(tool, /obj/item/storage/part_replacer))
return install_parts_from_part_replacer(user, tool) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING
- if(!user.combat_mode)
- return add_part(user, tool) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING
-
return .
+// Override of base_item_interaction so we only try to add parts to the frame AFTER running item_interaction and all the tool_acts
+/obj/structure/frame/machine/base_item_interaction(mob/living/user, obj/item/tool, list/modifiers)
+ . = ..()
+ if(. & ITEM_INTERACT_ANY_BLOCKER)
+ return .
+ if(user.combat_mode)
+ return NONE
+
+ return add_part(user, tool) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING
+
/**
* Attempt to finalize the construction of the frame into a machine
* as according to our circuit and parts
diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm
index 51b0a5b6a5d..bb93b7d00f5 100644
--- a/code/game/machinery/slotmachine.dm
+++ b/code/game/machinery/slotmachine.dm
@@ -94,50 +94,56 @@
return ..()
-/obj/machinery/computer/slot_machine/item_interaction(mob/living/user, obj/item/inserted, list/modifiers, is_right_clicking)
+/obj/machinery/computer/slot_machine/item_interaction(mob/living/user, obj/item/inserted, list/modifiers)
if(istype(inserted, /obj/item/coin))
var/obj/item/coin/inserted_coin = inserted
if(paymode == COIN)
if(prob(2))
if(!user.transferItemToLoc(inserted_coin, drop_location(), silent = FALSE))
- return
+ return ITEM_INTERACT_BLOCKING
inserted_coin.throw_at(user, 3, 10)
if(prob(10))
balance = max(balance - SPIN_PRICE, 0)
to_chat(user, span_warning("[src] spits your coin back out!"))
-
+ return ITEM_INTERACT_BLOCKING
else
if(!user.temporarilyRemoveItemFromInventory(inserted_coin))
- return
+ return ITEM_INTERACT_BLOCKING
balloon_alert(user, "coin insterted")
balance += inserted_coin.value
qdel(inserted_coin)
+ return ITEM_INTERACT_SUCCESS
else
balloon_alert(user, "holochips only!")
+ return ITEM_INTERACT_BLOCKING
- else if(istype(inserted, /obj/item/holochip))
+ if(istype(inserted, /obj/item/holochip))
if(paymode == HOLOCHIP)
var/obj/item/holochip/inserted_chip = inserted
if(!user.temporarilyRemoveItemFromInventory(inserted_chip))
- return
+ return ITEM_INTERACT_BLOCKING
balloon_alert(user, "[inserted_chip.credits] credit[inserted_chip.credits == 1 ? "" : "s"] inserted")
balance += inserted_chip.credits
qdel(inserted_chip)
+ return ITEM_INTERACT_SUCCESS
else
balloon_alert(user, "coins only!")
+ return ITEM_INTERACT_BLOCKING
- else if(inserted.tool_behaviour == TOOL_MULTITOOL)
- if(balance > 0)
- visible_message("[src] says, 'ERROR! Please empty the machine balance before altering paymode'") //Prevents converting coins into holocredits and vice versa
- else
- if(paymode == HOLOCHIP)
- paymode = COIN
- balloon_alert(user, "now using coins")
- else
- paymode = HOLOCHIP
- balloon_alert(user, "now using holochips")
+ return NONE
+
+/obj/machinery/computer/slot_machine/multitool_act(mob/living/user, obj/item/tool)
+ if(balance > 0)
+ visible_message("[src] says, 'ERROR! Please empty the machine balance before altering paymode'") //Prevents converting coins into holocredits and vice versa
+ return ITEM_INTERACT_BLOCKING
+
+ if(paymode == HOLOCHIP)
+ paymode = COIN
+ balloon_alert(user, "now using coins")
else
- return ..()
+ paymode = HOLOCHIP
+ balloon_alert(user, "now using holochips")
+ return ITEM_INTERACT_SUCCESS
/obj/machinery/computer/slot_machine/emag_act(mob/user, obj/item/card/emag/emag_card)
if(obj_flags & EMAGGED)
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index e4fc4592b79..e2ad3af956a 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -28,18 +28,6 @@
if(user_unbuckle_mob(buckled_mobs[1],user))
return TRUE
-/atom/movable/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- if(!can_buckle || !istype(tool, /obj/item/riding_offhand) || !user.Adjacent(src))
- return ..()
-
- var/obj/item/riding_offhand/riding_item = tool
- var/mob/living/carried_mob = riding_item.rider
- if(carried_mob == user) //Piggyback user.
- return ITEM_INTERACT_BLOCKING
- user.unbuckle_mob(carried_mob)
- carried_mob.forceMove(get_turf(src))
- return mouse_buckle_handling(carried_mob, user) ? ITEM_INTERACT_SUCCESS: ITEM_INTERACT_BLOCKING
-
//literally just the above extension of attack_hand(), but for silicons instead (with an adjacency check, since attack_robot() being called doesn't mean that you're adjacent to something)
/atom/movable/attack_robot(mob/living/user)
. = ..()
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 51fa9e26355..f4de2c4d631 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -80,14 +80,11 @@
diode = null
return TRUE
-/obj/item/laser_pointer/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- . = ..()
- if(. & ITEM_INTERACT_ANY_BLOCKER)
- return .
+/obj/item/laser_pointer/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(isnull(crystal_lens))
- return .
+ return NONE
if(tool_behaviour != TOOL_WIRECUTTER && tool_behaviour != TOOL_HEMOSTAT)
- return .
+ return NONE
tool.play_tool_sound(src)
balloon_alert(user, "removed crystal lens")
crystal_lens.forceMove(drop_location())
diff --git a/code/game/objects/items/devices/scanners/autopsy_scanner.dm b/code/game/objects/items/devices/scanners/autopsy_scanner.dm
index 16f90489b20..c5d33b74226 100644
--- a/code/game/objects/items/devices/scanners/autopsy_scanner.dm
+++ b/code/game/objects/items/devices/scanners/autopsy_scanner.dm
@@ -13,7 +13,7 @@
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT*2)
custom_price = PAYCHECK_COMMAND
-/obj/item/autopsy_scanner/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/autopsy_scanner/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!user.can_read(src) || user.is_blind())
diff --git a/code/game/objects/items/devices/scanners/health_analyzer.dm b/code/game/objects/items/devices/scanners/health_analyzer.dm
index 941ab13ae5f..f779f6f08a1 100644
--- a/code/game/objects/items/devices/scanners/health_analyzer.dm
+++ b/code/game/objects/items/devices/scanners/health_analyzer.dm
@@ -51,7 +51,7 @@
if(SCANMODE_WOUND)
to_chat(user, span_notice("You switch the health analyzer to report extra info on wounds."))
-/obj/item/healthanalyzer/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/healthanalyzer/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!user.can_read(src)) //NOVA EDIT CHANGE - Blind People Can Analyze Again- ORIGINAL: if(!user.can_read(src) || user.is_blind())
@@ -89,7 +89,7 @@
add_fingerprint(user)
-/obj/item/healthanalyzer/interact_with_atom_secondary(atom/interacting_with, mob/living/user)
+/obj/item/healthanalyzer/interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!user.can_read(src)) // NOVA EDIT CHANGE - Blind people can analyze again - ORIGINAL: if(!user.can_read(src) || user.is_blind())
@@ -596,7 +596,7 @@
/obj/item/healthanalyzer/simple/proc/violence_damage(mob/living/user)
user.adjustBruteLoss(4)
-/obj/item/healthanalyzer/simple/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/healthanalyzer/simple/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!user.can_read(src)) //NOVA EDIT CHANGE - Blind People Can Analyze Again - ORIGINAL: if(!user.can_read(src) || user.is_blind())
diff --git a/code/game/objects/items/devices/scanners/sequence_scanner.dm b/code/game/objects/items/devices/scanners/sequence_scanner.dm
index 3d212cbb771..3a45dae813b 100644
--- a/code/game/objects/items/devices/scanners/sequence_scanner.dm
+++ b/code/game/objects/items/devices/scanners/sequence_scanner.dm
@@ -29,7 +29,7 @@
if(LAZYLEN(genetic_makeup_buffer) > 0)
. += span_notice("It has the genetic makeup of \"[genetic_makeup_buffer["name"]]\" stored inside its buffer")
-/obj/item/sequence_scanner/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/sequence_scanner/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
@@ -46,7 +46,7 @@
user.visible_message(span_notice("[user] fails to analyze [interacting_with]'s genetic sequence."), span_warning("[interacting_with] has no readable genetic sequence!"))
return ITEM_INTERACT_BLOCKING
-/obj/item/sequence_scanner/interact_with_atom_secondary(atom/interacting_with, mob/living/user)
+/obj/item/sequence_scanner/interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
diff --git a/code/game/objects/items/devices/scanners/slime_scanner.dm b/code/game/objects/items/devices/scanners/slime_scanner.dm
index f794c63e04a..576baddbc0e 100644
--- a/code/game/objects/items/devices/scanners/slime_scanner.dm
+++ b/code/game/objects/items/devices/scanners/slime_scanner.dm
@@ -13,7 +13,7 @@
throw_range = 7
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*0.30, /datum/material/glass=SMALL_MATERIAL_AMOUNT * 0.20)
-/obj/item/slime_scanner/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/slime_scanner/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!user.can_read(src)) //NOVA EDIT CHANGE - Blind People Can Analyze Again - ORIGINAL : if(!user.can_read(src) || user.is_blind())
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 8e8f2578fa4..7e6ee077fce 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -76,7 +76,7 @@ effective or pretty fucking useless.
var/intensity = 10 // how much damage the radiation does
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
-/obj/item/healthanalyzer/rad_laser/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/healthanalyzer/rad_laser/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!stealth || !irradiate)
. = ..()
diff --git a/code/game/objects/items/emags.dm b/code/game/objects/items/emags.dm
index f1d66b875c3..b940ae6471a 100644
--- a/code/game/objects/items/emags.dm
+++ b/code/game/objects/items/emags.dm
@@ -49,7 +49,7 @@
user.visible_message(span_notice("[user] shows you: [icon2html(src, viewers(user))] [name]."), span_notice("You show [src]."))
add_fingerprint(user)
-/obj/item/card/emagfake/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/card/emagfake/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE)
return ITEM_INTERACT_SKIP_TO_ATTACK // So it does the attack animation.
@@ -57,7 +57,7 @@
. = ..()
type_blacklist = list(typesof(/obj/machinery/door/airlock) + typesof(/obj/machinery/door/window/) + typesof(/obj/machinery/door/firedoor) - typesof(/obj/machinery/door/airlock/tram)) //list of all typepaths that require a specialized emag to hack.
-/obj/item/card/emag/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/card/emag/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!can_emag(interacting_with, user))
return ITEM_INTERACT_BLOCKING
log_combat(user, interacting_with, "attempted to emag")
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 1f33384b393..e900bd36720 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -35,7 +35,7 @@
/// Time it takes to assess injuries when looping healing
var/assessing_injury_delay = 1 SECONDS
-/obj/item/stack/medical/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/stack/medical/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!isliving(interacting_with))
return NONE
if(!begin_heal_loop(interacting_with, user))
diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm
index a6bbe3bfe19..dd1b74eb106 100644
--- a/code/game/objects/items/stacks/telecrystal.dm
+++ b/code/game/objects/items/stacks/telecrystal.dm
@@ -11,7 +11,7 @@
merge_type = /obj/item/stack/telecrystal
novariants = FALSE
-/obj/item/stack/telecrystal/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/stack/telecrystal/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(interacting_with != user) //You can't go around smacking people with crystals to find out if they have an uplink or not.
return NONE
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index 7c770cfab48..7d2b7fcb802 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -134,7 +134,7 @@
LAZYREMOVE(update_overlays_on_z, sparks)
target.cut_overlay(sparks)
-/obj/item/weldingtool/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/weldingtool/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!ishuman(interacting_with))
return NONE
if(user.combat_mode)
diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm
index e9f9eb5d11e..cace64a7101 100644
--- a/code/game/objects/structures/false_walls.dm
+++ b/code/game/objects/structures/false_walls.dm
@@ -91,9 +91,9 @@
qdel(src)
return T
-/obj/structure/falsewall/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/structure/falsewall/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!opening || !tool.tool_behaviour)
- return ..()
+ return NONE
to_chat(user, span_warning("You must wait until the door has stopped moving!"))
return ITEM_INTERACT_BLOCKING
diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm
index 0d6799b0583..0700f19818a 100644
--- a/code/game/objects/structures/reflector.dm
+++ b/code/game/objects/structures/reflector.dm
@@ -79,10 +79,10 @@
P.decayedRange = max(P.decayedRange--, 0)
return BULLET_ACT_FORCE_PIERCE
-/obj/structure/reflector/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/structure/reflector/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(admin && tool.tool_behaviour)
return ITEM_INTERACT_BLOCKING
- return ..()
+ return NONE
/obj/structure/reflector/screwdriver_act(mob/living/user, obj/item/tool)
can_rotate = !can_rotate
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 04f0d41cfb8..2a7d5693bdb 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -858,12 +858,12 @@
deconstruct(TRUE)
return ITEM_INTERACT_SUCCESS
-/obj/structure/rack/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- . = ..()
- if(. || (tool.item_flags & ABSTRACT) || user.combat_mode)
- return .
+/obj/structure/rack/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
+ if((tool.item_flags & ABSTRACT) || user.combat_mode)
+ return NONE
if(user.transferItemToLoc(tool, drop_location(), silent = FALSE))
return ITEM_INTERACT_SUCCESS
+ return ITEM_INTERACT_BLOCKING
/obj/structure/rack/attack_paw(mob/living/user, list/modifiers)
attack_hand(user, modifiers)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 8c0fbd338cc..47ea10fcf50 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -188,11 +188,11 @@
return
return ..()
-/obj/structure/window/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/structure/window/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!can_be_reached(user))
return ITEM_INTERACT_SKIP_TO_ATTACK // Guess you get to hit it
add_fingerprint(user)
- return ..()
+ return NONE
/obj/structure/window/welder_act(mob/living/user, obj/item/tool)
if(atom_integrity >= max_integrity)
diff --git a/code/game/turfs/open/floor/plating.dm b/code/game/turfs/open/floor/plating.dm
index 974042ce7c8..5bcd8a6a4a8 100644
--- a/code/game/turfs/open/floor/plating.dm
+++ b/code/game/turfs/open/floor/plating.dm
@@ -177,9 +177,8 @@
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
return TRUE
-/turf/open/floor/plating/foam/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- SHOULD_CALL_PARENT(FALSE)
- return NONE // Fuck you
+/turf/open/floor/plating/foam/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
+ return user.combat_mode ? ITEM_INTERACT_SKIP_TO_ATTACK : ITEM_INTERACT_BLOCKING // Fuck you
//reinforced plating deconstruction states
#define PLATE_INTACT 0
diff --git a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
index 07e8dad2aa6..7afe0ddc2a3 100644
--- a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
+++ b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
@@ -48,7 +48,7 @@
icon_state = "gizmo_scan"
to_chat(user, span_notice("You switch the device to [mode == GIZMO_SCAN? "SCAN": "MARK"] MODE"))
-/obj/item/abductor/gizmo/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/abductor/gizmo/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!ScientistCheck(user))
return ITEM_INTERACT_SKIP_TO_ATTACK // So you slap them with it
if(!console)
@@ -110,7 +110,7 @@
icon_state = "silencer"
inhand_icon_state = "gizmo"
-/obj/item/abductor/silencer/interact_with_atom(atom/interacting_with, mob/living/user)
+/obj/item/abductor/silencer/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(!AbductorCheck(user))
return ITEM_INTERACT_SKIP_TO_ATTACK // So you slap them with it
diff --git a/code/modules/food_and_drinks/machinery/griddle.dm b/code/modules/food_and_drinks/machinery/griddle.dm
index f04b50e5551..e0c45e6c9af 100644
--- a/code/modules/food_and_drinks/machinery/griddle.dm
+++ b/code/modules/food_and_drinks/machinery/griddle.dm
@@ -80,43 +80,42 @@
else
return ..()
-/obj/machinery/griddle/item_interaction(mob/living/user, obj/item/item, list/modifiers, is_right_clicking)
- . = ..()
- if(. & ITEM_INTERACT_ANY_BLOCKER)
- return
-
+/obj/machinery/griddle/item_interaction_secondary(mob/living/user, obj/item/item, list/modifiers)
if(isnull(item.atom_storage))
- return
-
- if(is_right_clicking)
- var/obj/item/storage/tray = item
+ return NONE
- for(var/obj/tray_item in griddled_objects)
- tray.atom_storage?.attempt_insert(tray_item, user, TRUE)
- return ITEM_INTERACT_SUCCESS
+ for(var/obj/tray_item in griddled_objects)
+ item.atom_storage.attempt_insert(tray_item, user, TRUE)
+ return ITEM_INTERACT_SUCCESS
- var/obj/item/storage/tray = item
- var/loaded = 0
+/obj/machinery/griddle/item_interaction(mob/living/user, obj/item/item, list/modifiers)
+ if(isnull(item.atom_storage))
+ return NONE
+
+ if(length(contents) >= max_items)
+ balloon_alert(user, "it's full!")
+ return ITEM_INTERACT_BLOCKING
if(!istype(item, /obj/item/storage/bag/tray))
// Non-tray dumping requires a do_after
to_chat(user, span_notice("You start dumping out the contents of [item] into [src]..."))
- if(!do_after(user, 2 SECONDS, target = tray))
+ if(!do_after(user, 2 SECONDS, target = item))
return ITEM_INTERACT_BLOCKING
- for(var/obj/tray_item in tray.contents)
+ var/loaded = 0
+ for(var/obj/tray_item in item)
if(!IS_EDIBLE(tray_item))
continue
- if(contents.len >= max_items)
- balloon_alert(user, "it's full!")
- return ITEM_INTERACT_BLOCKING
- if(tray.atom_storage.attempt_remove(tray_item, src))
+ if(length(contents) >= max_items)
+ break
+ if(item.atom_storage.attempt_remove(tray_item, src))
loaded++
AddToGrill(tray_item, user)
if(loaded)
- to_chat(user, span_notice("You insert [loaded] items into \the [src]."))
+ to_chat(user, span_notice("You insert [loaded] item\s into [src]."))
update_appearance()
- return ITEM_INTERACT_SUCCESS
+ return ITEM_INTERACT_SUCCESS
+ return ITEM_INTERACT_BLOCKING
/obj/machinery/griddle/attack_hand(mob/user, list/modifiers)
. = ..()
diff --git a/code/modules/food_and_drinks/machinery/grill.dm b/code/modules/food_and_drinks/machinery/grill.dm
index d170a77f230..a52749280dd 100644
--- a/code/modules/food_and_drinks/machinery/grill.dm
+++ b/code/modules/food_and_drinks/machinery/grill.dm
@@ -125,15 +125,15 @@
grill_fuel += boost
update_appearance(UPDATE_ICON_STATE)
-/obj/machinery/grill/item_interaction(mob/living/user, obj/item/weapon, list/modifiers, is_right_clicking)
+/obj/machinery/grill/item_interaction(mob/living/user, obj/item/weapon, list/modifiers)
if(user.combat_mode || (weapon.item_flags & ABSTRACT) || (weapon.flags_1 & HOLOGRAM_1) || (weapon.resistance_flags & INDESTRUCTIBLE))
- return ..()
+ return NONE
if(istype(weapon, /obj/item/stack/sheet/mineral/coal) || istype(weapon, /obj/item/stack/sheet/mineral/wood))
if(!QDELETED(grilled_item))
- return ..()
+ return NONE
if(!anchored)
- balloon_alert(user, "anchor first!")
+ balloon_alert(user, "anchor it first!")
return ITEM_INTERACT_BLOCKING
//required for amount subtypes
@@ -150,7 +150,7 @@
if(!istype(stored, target_type))
continue
if(stored.amount == MAX_STACK_SIZE)
- to_chat(user, span_warning("No space for [weapon]"))
+ balloon_alert(user, "no space!")
return ITEM_INTERACT_BLOCKING
target.merge(stored)
merged = TRUE
@@ -158,7 +158,7 @@
if(!merged)
weapon.forceMove(src)
- to_chat(user, span_notice("You add [src] to the fuel stack"))
+ to_chat(user, span_notice("You add [src] to the fuel stack."))
if(!grill_fuel)
burn_stack()
begin_processing()
@@ -167,9 +167,9 @@
if(is_reagent_container(weapon) && weapon.is_open_container())
var/obj/item/reagent_containers/container = weapon
if(!QDELETED(grilled_item))
- return ..()
+ return NONE
if(!anchored)
- balloon_alert(user, "anchor first!")
+ balloon_alert(user, "anchor it first!")
return ITEM_INTERACT_BLOCKING
var/transfered_amount = weapon.reagents.trans_to(src, container.amount_per_transfer_from_this)
@@ -202,11 +202,11 @@
update_appearance(UPDATE_ICON_STATE)
//feedback
- to_chat(user, span_notice("You transfer [transfered_amount]u to the fuel source"))
+ to_chat(user, span_notice("You transfer [transfered_amount]u to the fuel source."))
return ITEM_INTERACT_SUCCESS
- else
- to_chat(user, span_warning("No fuel was transfered"))
- return ITEM_INTERACT_BLOCKING
+
+ balloon_alert(user, "no fuel transfered!")
+ return ITEM_INTERACT_BLOCKING
if(IS_EDIBLE(weapon))
//sanity checks
@@ -218,10 +218,10 @@
if(!QDELETED(grilled_item))
balloon_alert(user, "remove item first!")
return ITEM_INTERACT_BLOCKING
- else if(grill_fuel <= 0)
+ if(grill_fuel <= 0)
balloon_alert(user, "no fuel!")
return ITEM_INTERACT_BLOCKING
- else if(!user.transferItemToLoc(weapon, src))
+ if(!user.transferItemToLoc(weapon, src))
balloon_alert(user, "[weapon] is stuck in your hand!")
return ITEM_INTERACT_BLOCKING
@@ -236,7 +236,7 @@
grill_loop.start()
return ITEM_INTERACT_SUCCESS
- return ..()
+ return NONE
/obj/machinery/grill/wrench_act(mob/living/user, obj/item/tool)
if(user.combat_mode)
diff --git a/code/modules/food_and_drinks/machinery/microwave.dm b/code/modules/food_and_drinks/machinery/microwave.dm
index dfb6ac9b2de..2b9315dfd55 100644
--- a/code/modules/food_and_drinks/machinery/microwave.dm
+++ b/code/modules/food_and_drinks/machinery/microwave.dm
@@ -364,21 +364,15 @@
update_appearance()
return ITEM_INTERACT_SUCCESS
-/obj/machinery/microwave/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/microwave/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(operating)
- return
+ return ITEM_INTERACT_SKIP_TO_ATTACK // Don't use tools if we're dirty
if(dirty >= MAX_MICROWAVE_DIRTINESS)
- return
-
- . = ..()
- if(. & ITEM_INTERACT_ANY_BLOCKER)
- return .
-
+ return ITEM_INTERACT_SKIP_TO_ATTACK // Don't insert items if we're dirty
if(panel_open && is_wire_tool(tool))
wires.interact(user)
return ITEM_INTERACT_SUCCESS
-
- return .
+ return NONE
/obj/machinery/microwave/attackby(obj/item/item, mob/living/user, params)
if(operating)
diff --git a/code/modules/food_and_drinks/machinery/oven.dm b/code/modules/food_and_drinks/machinery/oven.dm
index 85462737745..ef9aac9a410 100644
--- a/code/modules/food_and_drinks/machinery/oven.dm
+++ b/code/modules/food_and_drinks/machinery/oven.dm
@@ -107,10 +107,15 @@
to_chat(user, span_notice("You put [item] in [src]."))
add_tray_to_oven(item, user)
-/obj/machinery/oven/item_interaction(mob/living/user, obj/item/item, list/modifiers, is_right_clicking)
+/obj/machinery/oven/item_interaction(mob/living/user, obj/item/item, list/modifiers)
if(open && used_tray && item.atom_storage)
- return used_tray.item_interaction(user, item, modifiers, is_right_clicking)
- return ..()
+ return used_tray.item_interaction(user, item, modifiers)
+ return NONE
+
+/obj/machinery/oven/item_interaction_secondary(mob/living/user, obj/item/tool, list/modifiers)
+ if(open && used_tray && tool.atom_storage)
+ return used_tray.item_interaction_secondary(user, tool, modifiers)
+ return NONE
///Adds a tray to the oven, making sure the shit can get baked.
/obj/machinery/oven/proc/add_tray_to_oven(obj/item/plate/oven_tray, mob/baker)
@@ -247,42 +252,42 @@
max_items = 6
biggest_w_class = WEIGHT_CLASS_BULKY
-/obj/item/plate/oven_tray/item_interaction(mob/living/user, obj/item/item, list/modifiers, is_right_clicking)
- . = ..()
-
+/obj/item/plate/oven_tray/item_interaction_secondary(mob/living/user, obj/item/item, list/modifiers)
if(isnull(item.atom_storage))
- return
-
- if(is_right_clicking)
- var/obj/item/storage/tray = item
+ return NONE
- for(var/obj/tray_item in contents)
- tray.atom_storage?.attempt_insert(tray_item, user, TRUE)
+ for(var/obj/tray_item in src)
+ item.atom_storage.attempt_insert(tray_item, user, TRUE)
+ return ITEM_INTERACT_SUCCESS
- return ITEM_INTERACT_SUCCESS
+/obj/item/plate/oven_tray/item_interaction(mob/living/user, obj/item/item, list/modifiers)
+ if(isnull(item.atom_storage))
+ return NONE
- var/obj/item/storage/tray = item
- var/loaded = 0
+ if(length(contents >= max_items))
+ balloon_alert(user, "it's full!")
+ return ITEM_INTERACT_BLOCKING
if(!istype(item, /obj/item/storage/bag/tray))
// Non-tray dumping requires a do_after
to_chat(user, span_notice("You start dumping out the contents of [item] into [src]..."))
- if(!do_after(user, 2 SECONDS, target = tray))
+ if(!do_after(user, 2 SECONDS, target = item))
return ITEM_INTERACT_BLOCKING
- for(var/obj/tray_item in tray.contents)
+ var/loaded = 0
+ for(var/obj/tray_item in item)
if(!IS_EDIBLE(tray_item))
continue
- if(contents.len >= max_items)
- balloon_alert(user, "it's full!")
- return ITEM_INTERACT_BLOCKING
- if(tray.atom_storage.attempt_remove(tray_item, src))
+ if(length(contents) >= max_items)
+ break
+ if(item.atom_storage.attempt_remove(tray_item, src))
loaded++
AddToPlate(tray_item, user)
if(loaded)
- to_chat(user, span_notice("You insert [loaded] items into \the [src]."))
+ to_chat(user, span_notice("You insert [loaded] item\s into [src]."))
update_appearance()
- return ITEM_INTERACT_SUCCESS
+ return ITEM_INTERACT_SUCCESS
+ return ITEM_INTERACT_BLOCKING
#undef OVEN_SMOKE_STATE_NONE
#undef OVEN_SMOKE_STATE_GOOD
diff --git a/code/modules/food_and_drinks/machinery/stove.dm b/code/modules/food_and_drinks/machinery/stove.dm
index c80fca71085..6cc0ec52789 100644
--- a/code/modules/food_and_drinks/machinery/stove.dm
+++ b/code/modules/food_and_drinks/machinery/stove.dm
@@ -168,12 +168,11 @@
update_appearance(UPDATE_OVERLAYS)
return TRUE
-/obj/item/reagent_containers/cup/soup_pot/item_interaction(mob/living/user, obj/item/item, list/modifiers, is_right_clicking)
+/obj/item/reagent_containers/cup/soup_pot/item_interaction(mob/living/user, obj/item/item, list/modifiers)
+ if(LAZYACCESS(modifiers, RIGHT_CLICK))
+ return NONE
- if(!is_right_clicking)
- return transfer_from_container_to_pot(item, user)
- else
- return ..()
+ return transfer_from_container_to_pot(item, user)
/obj/item/reagent_containers/cup/soup_pot/attack_hand_secondary(mob/user, list/modifiers)
if(!LAZYLEN(added_ingredients))
diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm
index 3e54c134106..51e09f8ab9a 100644
--- a/code/modules/holodeck/turfs.dm
+++ b/code/modules/holodeck/turfs.dm
@@ -8,9 +8,8 @@
/turf/open/floor/holofloor/attackby(obj/item/I, mob/living/user)
return // HOLOFLOOR DOES NOT GIVE A FUCK
-/turf/open/floor/holofloor/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- SHOULD_CALL_PARENT(FALSE)
- return NONE // Fuck you
+/turf/open/floor/holofloor/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
+ return ITEM_INTERACT_BLOCKING // Fuck you
/turf/open/floor/holofloor/burn_tile()
return //you can't burn a hologram!
diff --git a/code/modules/mining/boulder_processing/_boulder_processing.dm b/code/modules/mining/boulder_processing/_boulder_processing.dm
index f30fd24ae6c..5795eed1d74 100644
--- a/code/modules/mining/boulder_processing/_boulder_processing.dm
+++ b/code/modules/mining/boulder_processing/_boulder_processing.dm
@@ -244,9 +244,9 @@
return FALSE
-/obj/machinery/bouldertech/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/bouldertech/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(panel_open || user.combat_mode)
- return ..()
+ return NONE
if(istype(tool, /obj/item/boulder))
var/obj/item/boulder/my_boulder = tool
@@ -276,7 +276,7 @@
to_chat(user, span_notice("You claim [amount] mining points from \the [src] to [id_card]."))
return ITEM_INTERACT_SUCCESS
- return ..()
+ return NONE
/obj/machinery/bouldertech/wrench_act(mob/living/user, obj/item/tool)
. = ITEM_INTERACT_BLOCKING
diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm
index 9adbcff2dcb..7a2d2c837f6 100644
--- a/code/modules/paperwork/handlabeler.dm
+++ b/code/modules/paperwork/handlabeler.dm
@@ -107,12 +107,9 @@
to_chat(user, span_notice("You turn off [src]."))
return TRUE
-/obj/item/hand_labeler/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- . = ..()
- if(. & ITEM_INTERACT_ANY_BLOCKER)
- return .
+/obj/item/hand_labeler/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!istype(tool, /obj/item/hand_labeler_refill))
- return .
+ return NONE
balloon_alert(user, "refilled")
qdel(tool)
diff --git a/code/modules/power/apc/apc_tool_act.dm b/code/modules/power/apc/apc_tool_act.dm
index 981e35fe780..6a8835cd5b7 100644
--- a/code/modules/power/apc/apc_tool_act.dm
+++ b/code/modules/power/apc/apc_tool_act.dm
@@ -1,10 +1,7 @@
//attack with an item - open/close cover, insert cell, or (un)lock interface
-/obj/machinery/power/apc/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- . = ..()
- if(.)
- return .
-
+/obj/machinery/power/apc/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
+ . = NONE
if(HAS_TRAIT(tool, TRAIT_APC_SHOCKING))
. = fork_outlet_act(user, tool)
if(.)
@@ -17,7 +14,7 @@
if(istype(tool, /obj/item/stock_parts/cell))
. = cell_act(user, tool)
else if(istype(tool, /obj/item/stack/cable_coil))
- . = cable_act(user, tool, is_right_clicking)
+ . = cable_act(user, tool, LAZYACCESS(modifiers, RIGHT_CLICK))
else if(istype(tool, /obj/item/electronics/apc))
. = electronics_act(user, tool)
else if(istype(tool, /obj/item/electroadaptive_pseudocircuit))
diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
index 78ee3e2cd1c..2c66fef2787 100644
--- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm
@@ -458,7 +458,7 @@
return ITEM_INTERACT_SUCCESS
return ITEM_INTERACT_BLOCKING
-/obj/machinery/chem_dispenser/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/chem_dispenser/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(is_reagent_container(tool) && !(tool.item_flags & ABSTRACT) && tool.is_open_container())
//NOVA EDIT ADDITION START - CHEMISTRY QOL
var/obj/item/reagent_containers/container = tool
@@ -467,12 +467,12 @@
transferAmounts = container.possible_transfer_amounts
//NOVA EDIT ADDITION END
if(!user.transferItemToLoc(tool, src))
- return ..()
+ return ITEM_INTERACT_BLOCKING
replace_beaker(user, tool)
ui_interact(user)
return ITEM_INTERACT_SUCCESS
- return ..()
+ return NONE
/obj/machinery/chem_dispenser/get_cell()
return cell
diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm
index 857cd5bd221..76b2dbf7f96 100644
--- a/code/modules/reagents/chemistry/machinery/chem_heater.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm
@@ -94,9 +94,9 @@
heater_coefficient *= micro_laser.tier
-/obj/machinery/chem_heater/item_interaction(mob/living/user, obj/item/held_item, list/modifiers, is_right_clicking)
+/obj/machinery/chem_heater/item_interaction(mob/living/user, obj/item/held_item, list/modifiers)
if((held_item.item_flags & ABSTRACT) || (held_item.flags_1 & HOLOGRAM_1))
- return ..()
+ return NONE
if(QDELETED(beaker))
if(istype(held_item, /obj/item/reagent_containers/dropper) || istype(held_item, /obj/item/reagent_containers/syringe))
@@ -110,7 +110,7 @@
balloon_alert(user, "beaker added")
return ITEM_INTERACT_SUCCESS
- return ..()
+ return NONE
/obj/machinery/chem_heater/wrench_act(mob/living/user, obj/item/tool)
. = ITEM_INTERACT_BLOCKING
diff --git a/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm b/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm
index 298fe259814..eb5646993a7 100644
--- a/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_mass_spec.dm
@@ -147,9 +147,9 @@
for(var/datum/stock_part/micro_laser/laser in component_parts)
cms_coefficient /= laser.tier
-/obj/machinery/chem_mass_spec/item_interaction(mob/living/user, obj/item/item, list/modifiers, is_right_clicking)
+/obj/machinery/chem_mass_spec/item_interaction(mob/living/user, obj/item/item, list/modifiers)
if((item.item_flags & ABSTRACT) || (item.flags_1 & HOLOGRAM_1) || !can_interact(user) || !user.can_perform_action(src, FORBID_TELEKINESIS_REACH))
- return ..()
+ return NONE
if(is_reagent_container(item) && item.is_open_container())
if(processing_reagents)
@@ -160,13 +160,14 @@
if(!user.transferItemToLoc(beaker, src))
return ITEM_INTERACT_BLOCKING
+ var/is_right_clicking = LAZYACCESS(modifiers, RIGHT_CLICK)
replace_beaker(user, !is_right_clicking, beaker)
to_chat(user, span_notice("You add [beaker] to [is_right_clicking ? "output" : "input"] slot."))
update_appearance()
ui_interact(user)
return ITEM_INTERACT_SUCCESS
- return ..()
+ return NONE
/obj/machinery/chem_mass_spec/wrench_act(mob/living/user, obj/item/tool)
. = ITEM_INTERACT_BLOCKING
diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index d2ffea1d5bf..27563a246a7 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -170,9 +170,9 @@
)
return containers
-/obj/machinery/chem_master/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/chem_master/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(user.combat_mode || (tool.item_flags & ABSTRACT) || (tool.flags_1 & HOLOGRAM_1) || !can_interact(user) || !user.can_perform_action(src, ALLOW_SILICON_REACH | FORBID_TELEKINESIS_REACH))
- return ..()
+ return NONE
if(is_reagent_container(tool) && tool.is_open_container())
replace_beaker(user, tool)
@@ -182,7 +182,7 @@
else
return ITEM_INTERACT_BLOCKING
- return ..()
+ return NONE
/obj/machinery/chem_master/wrench_act(mob/living/user, obj/item/tool)
if(user.combat_mode)
diff --git a/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm b/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm
index a6113d2f0c6..0185eb7bda9 100644
--- a/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm
+++ b/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm
@@ -105,14 +105,14 @@
/obj/item/storage/portable_chem_mixer/ex_act(severity, target)
return severity > EXPLODE_LIGHT ? ..() : FALSE
-/obj/item/storage/portable_chem_mixer/item_interaction(mob/living/user, obj/item/weapon, list/modifiers, is_right_clicking)
+/obj/item/storage/portable_chem_mixer/item_interaction(mob/living/user, obj/item/weapon, list/modifiers)
if (!atom_storage.locked || \
(weapon.item_flags & ABSTRACT) || \
(weapon.flags_1 & HOLOGRAM_1) || \
!is_reagent_container(weapon) || \
!weapon.is_open_container() \
)
- return ..()
+ return NONE
replace_beaker(user, weapon)
update_appearance()
diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
index f02d0d47deb..e206ffebbc9 100644
--- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
+++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm
@@ -211,9 +211,9 @@
return items_transfered
-/obj/machinery/reagentgrinder/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/reagentgrinder/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(user.combat_mode || (tool.item_flags & ABSTRACT) || (tool.flags_1 & HOLOGRAM_1) || !can_interact(user) || !user.can_perform_action(src, ALLOW_SILICON_REACH))
- return ..()
+ return NONE
//add the beaker
if (is_reagent_container(tool) && tool.is_open_container())
@@ -262,7 +262,7 @@
to_chat(user, span_warning("You must drag & dump contents of [tool] into [src]."))
return ITEM_INTERACT_BLOCKING
- return ..()
+ return NONE
/obj/machinery/reagentgrinder/wrench_act(mob/living/user, obj/item/tool)
if(user.combat_mode)
diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm
index 03fffcec8ca..babf8962b44 100644
--- a/code/modules/research/destructive_analyzer.dm
+++ b/code/modules/research/destructive_analyzer.dm
@@ -115,11 +115,11 @@
say("Destructive analysis failed!")
return TRUE
-//Let emags in on a right click
-/obj/machinery/rnd/destructive_analyzer/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
- if(is_right_clicking && istype(tool, /obj/item/card/emag))
- return NONE
- return ..()
+/obj/machinery/rnd/destructive_analyzer/item_interaction_secondary(mob/living/user, obj/item/tool, list/modifiers)
+ // Cringe way to let emags insert on RMB because we still use attackby to insert
+ if(istype(tool, /obj/item/card/emag))
+ return ITEM_INTERACT_SKIP_TO_ATTACK
+ return NONE
//This allows people to put syndicate screwdrivers in the machine. Secondary act still passes.
/obj/machinery/rnd/destructive_analyzer/screwdriver_act(mob/living/user, obj/item/tool)
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index e446672bc33..1bd0d3560be 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -154,17 +154,16 @@
if(HDD_OVERLOADED)
. += "The front panel is dangling open. The hdd inside is destroyed and the wires are all burned."
-/obj/machinery/rnd/server/master/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/rnd/server/master/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!tool.tool_behaviour)
- return ..()
- // Only antags are given the training and knowledge to disassemble this thing.
- if(is_special_character(user))
- return ..()
- if(user.combat_mode)
return NONE
-
- balloon_alert(user, "you can't find an obvious maintenance hatch!")
- return ITEM_INTERACT_BLOCKING
+ // Only antags are given the training and knowledge to disassemble this thing.
+ if(!is_special_character(user))
+ if(user.combat_mode)
+ return ITEM_INTERACT_SKIP_TO_ATTACK
+ balloon_alert(user, "you can't find an obvious maintenance hatch!")
+ return ITEM_INTERACT_BLOCKING
+ return NONE
/obj/machinery/rnd/server/master/attackby(obj/item/attacking_item, mob/user, params)
if(istype(attacking_item, /obj/item/computer_disk/hdd_theft))
diff --git a/modular_nova/modules/apc_arcing/apc.dm b/modular_nova/modules/apc_arcing/apc.dm
index b02fe27200c..451da0f1be5 100644
--- a/modular_nova/modules/apc_arcing/apc.dm
+++ b/modular_nova/modules/apc_arcing/apc.dm
@@ -35,7 +35,7 @@
playsound(get_turf(living_target), 'sound/magic/lightningshock.ogg', 75, TRUE)
Beam(living_target, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/beam.dmi', time = 5)
-/obj/machinery/power/apc/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+/obj/machinery/power/apc/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
. = ..()
if(.)
return .