Allows for proxy atoms in object melee attack chain (#83860)

## About The Pull Request
1. Objects now have an `get_proxy_for()` proc. This returns an atom that
will participate in the object melee attack chain on behalf of your
atom. Allows for general purpose polymorphism per object interaction
2. Cleaned up some multitool acts to accommodate proxy behaviour
3. You can pry tiles as an Engiborg with crowbar in hand & do other
similar behaviour with crowbar
5. Improves & Depends on #83880. We don't need a hidden omni toolbox &
can create the tools directly in the omnitool and pass them in the
attack chain as a proxy rather than calling the attack chain manually.
All tools are on the borg directly
   - Fixes #84355
   - Fixes #84359
   - Fixes #84393

## Changelog 
SyncIt21,zxaber
🆑
fix: omni crowbar tool interaction for replacing tiles has been fixed 
fix: techfab screentip does not runtime when you hover over it with an
omnitool multitool
fix: medi borgs can do brain surgery again
code: improved multitool & general tool code for some machines
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SyncIt21
2024-07-03 15:47:18 -07:00
committed by GitHub
co-authored by MrMelbert
parent 6fa8c95c9c
commit e4c5c2fc2a
32 changed files with 353 additions and 394 deletions
+16 -6
View File
@@ -77,29 +77,34 @@
)
/obj/item/mod/control/multitool_act_secondary(mob/living/user, obj/item/multitool/tool)
if(!multitool_check_buffer(user, tool))
return
. = NONE
var/tool_frequency = null
if(istype(tool.buffer, /datum/mod_link))
var/datum/mod_link/buffer_link = tool.buffer
tool_frequency = buffer_link.frequency
balloon_alert(user, "frequency set")
. = ITEM_INTERACT_SUCCESS
if(!tool_frequency && mod_link.frequency)
tool.set_buffer(mod_link)
balloon_alert(user, "frequency copied")
. = ITEM_INTERACT_SUCCESS
else if(tool_frequency && !mod_link.frequency)
mod_link.frequency = tool_frequency
. = ITEM_INTERACT_SUCCESS
else if(tool_frequency && mod_link.frequency)
var/response = tgui_alert(user, "Would you like to copy or imprint the frequency?", "MODlink Frequency", list("Copy", "Imprint"))
if(!user.is_holding(tool))
return
return ITEM_INTERACT_BLOCKING
switch(response)
if("Copy")
tool.set_buffer(mod_link)
balloon_alert(user, "frequency copied")
. = ITEM_INTERACT_SUCCESS
if("Imprint")
mod_link.frequency = tool_frequency
balloon_alert(user, "frequency set")
. = ITEM_INTERACT_SUCCESS
/obj/item/mod/control/proc/can_call()
return get_charge() && wearer && wearer.stat < DEAD
@@ -227,29 +232,34 @@
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/item/clothing/neck/link_scryer/multitool_act_secondary(mob/living/user, obj/item/multitool/tool)
if(!multitool_check_buffer(user, tool))
return
. = NONE
var/tool_frequency = null
if(istype(tool.buffer, /datum/mod_link))
var/datum/mod_link/buffer_link = tool.buffer
tool_frequency = buffer_link.frequency
balloon_alert(user, "frequency set")
. = ITEM_INTERACT_SUCCESS
if(!tool_frequency && mod_link.frequency)
tool.set_buffer(mod_link)
balloon_alert(user, "frequency copied")
. = ITEM_INTERACT_SUCCESS
else if(tool_frequency && !mod_link.frequency)
mod_link.frequency = tool_frequency
. = ITEM_INTERACT_SUCCESS
else if(tool_frequency && mod_link.frequency)
var/response = tgui_alert(user, "Would you like to copy or imprint the frequency?", "MODlink Frequency", list("Copy", "Imprint"))
if(!user.is_holding(tool))
return
return ITEM_INTERACT_BLOCKING
switch(response)
if("Copy")
tool.set_buffer(mod_link)
balloon_alert(user, "frequency copied")
. = ITEM_INTERACT_SUCCESS
if("Imprint")
mod_link.frequency = tool_frequency
balloon_alert(user, "frequency set")
. = ITEM_INTERACT_SUCCESS
/obj/item/clothing/neck/link_scryer/worn_overlays(mutable_appearance/standing, isinhands)
. = ..()