Moves a plethora of things from attackby() to item_interaction() (#96726)

## About The Pull Request

50 files. Sorry about that, I was faster today. Just merge without
looking, it'll be fine.

This is the end of `/machinery/` & `/stack/` `attackby()`s(that aren't
actually meant for being attacked) when these are all merged.
Like, 200 left? I think? 

Also, this one will make light replacer reloading slightly more
difficult until whichever one converted the light replacer is merged.
If, for some ungodly reason, this one gets merged first.

Changes beyond conversion:

if a `/porta_turret_construct` somehow became anchored out of sync with
its construction steps, it's no longer softlocked
you can no longer place an infinite amount of blackboxes into the
blackbox recorder
a TTV will no longer keep its ghost on your back when you cut its wires
while wearing it
RCLs will properly update their appearance when initially given their
first coil
The creator of `robot_suit/attackby()` has been cursed to spend a
thousand years in the lake of fire

## Why It's Good For The Game

Now that all of these are remade, you can find bugs in them and then get
GBP for fixing them(not that my code would ever have bugs).

## Changelog
🆑

fix: It's no longer possible to softlock building a turret(if it ever
was)
fix: you can no longer stuff the blackbox recorder full with as many
blackboxes as you've somehow collected
fix: TTVs will no longer remain on your back as a ghost when you cut
their wire straps
fix: RCLs will now properly update their appearance when given their
first coil of cleaners
code: 50 files have been converted from attackby() to item_interaction()
/🆑
This commit is contained in:
Leland Kemble
2026-07-02 06:10:46 +02:00
committed by GitHub
parent ad628750c0
commit b3c74dca2d
50 changed files with 1134 additions and 1029 deletions
+8 -7
View File
@@ -792,13 +792,14 @@
user.put_in_hands(new_stack, merge_stacks = FALSE)
return new_stack
/obj/item/stack/attackby(obj/item/W, mob/user, list/modifiers, list/attack_modifiers)
if(can_merge(W, inhand = TRUE))
var/obj/item/stack/S = W
if(merge(S))
to_chat(user, span_notice("Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s."))
else
. = ..()
/obj/item/stack/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!can_merge(tool, inhand = TRUE))
return NONE
var/obj/item/stack/overtaking_stack = tool
if(!merge(overtaking_stack))
return ITEM_INTERACT_BLOCKING
to_chat(user, span_notice("Your [overtaking_stack.name] stack now contains [overtaking_stack.get_amount()] [overtaking_stack.singular_name]\s."))
return ITEM_INTERACT_SUCCESS
/obj/item/stack/proc/copy_evidences(obj/item/stack/from)
add_blood_DNA(GET_ATOM_BLOOD_DNA(from))