[MIRROR] Attack chain refactoring: Broadening tool_act into item_interact, moving some item interactions to... atom/item_interact / item/interact_with_atom [MDB IGNORE] (#25516)

* Attack chain refactoring: Broadening `tool_act` into `item_interact`, moving some item interactions to... `atom/item_interact` / `item/interact_with_atom`

* Patches up merge skew (#80197)

## About The Pull Request

Yeah #79968 (1e76fd70b4) was not
compatible with master but no one said anything on the PR so i got
jebaited into merging it. The code should be up to the same standards
per the documentation I read (preventing thwacking the target in certain
situations while not returning anything in other situations)

master will definitely compile now though

* Patches up merge skew

* Merge conflicts

* Modular adjustments

* Removes this entirely duplicated proc...

* Update tool_override.dm

* Update weldingtool.dm

* Update tool_override.dm

* Update tool_override.dm

* Nope. Copy paste begone.

A skyrat edit is so much easier to deal with here

* Update brand_intelligence.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-09 14:22:19 +01:00
committed by GitHub
parent 41ea46d5f2
commit b15b16976a
171 changed files with 805 additions and 772 deletions

View File

@@ -808,7 +808,7 @@
user.balloon_alert(user, "cell removed")
internal_cell.forceMove(drop_location())
internal_cell = null
return TOOL_ACT_TOOLTYPE_SUCCESS
return ITEM_INTERACT_SUCCESS
else
user.balloon_alert(user, "no cell!")
@@ -817,24 +817,24 @@
tool.play_tool_sound(src, user, 20, volume=20)
deconstruct(TRUE)
user.balloon_alert(user, "disassembled")
return TOOL_ACT_TOOLTYPE_SUCCESS
return ITEM_INTERACT_SUCCESS
/obj/item/modular_computer/welder_act(mob/living/user, obj/item/tool)
. = ..()
if(atom_integrity == max_integrity)
to_chat(user, span_warning("\The [src] does not require repairs."))
return TOOL_ACT_TOOLTYPE_SUCCESS
return ITEM_INTERACT_SUCCESS
if(!tool.tool_start_check(user, amount=1))
return TOOL_ACT_TOOLTYPE_SUCCESS
return ITEM_INTERACT_SUCCESS
to_chat(user, span_notice("You begin repairing damage to \the [src]..."))
if(!tool.use_tool(src, user, 20, volume=50))
return TOOL_ACT_TOOLTYPE_SUCCESS
return ITEM_INTERACT_SUCCESS
atom_integrity = max_integrity
to_chat(user, span_notice("You repair \the [src]."))
update_appearance()
return TOOL_ACT_TOOLTYPE_SUCCESS
return ITEM_INTERACT_SUCCESS
/obj/item/modular_computer/deconstruct(disassembled = TRUE)
remove_pai()