Re-refactors batons / Refactors attack chain force modifiers (#90809)

## About The Pull Request

Melee attack chain now has a list passed along with it,
`attack_modifiers`, which you can stick force modifiers to change the
resulting attack

This is basically a soft implementation of damage packets until a more
definitive pr, but one that only applies to item attack chain, and not
unarmed attacks.

This change was done to facilitate a baton refactor - batons no longer
hack together their own attack chain, and are now integrated straight
into the real attack chain. This refactor itself was done because batons
don't send any attack signals, which has been annoying in the past (for
swing combat).

## Changelog

🆑 Melbert
refactor: Batons have been refactored again. Baton stuns now properly
count as an attack, when before it was a nothing. Report any oddities,
particularly in regards to harmbatonning vs normal batonning.
refactor: The method of adjusting item damage mid-attack has been
refactored - some affected items include the Nullblade and knives.
Report any strange happenings with damage numbers.
refactor: A few objects have been moved to the new interaction chain -
records consoles, mawed crucible, alien weeds and space vines, hedges,
restaurant portals, and some mobs - to name a few.
fix: Spears only deal bonus damage against secure lockers, not all
closet types (including crates)
/🆑
This commit is contained in:
MrMelbert
2025-05-19 13:32:12 +10:00
committed by GitHub
parent 225300a189
commit 5261efb67f
483 changed files with 1088 additions and 1082 deletions
+4 -4
View File
@@ -285,7 +285,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
GLOB.move_manager.stop_looping(thing, SSconveyors)
// attack with item, place item on conveyor
/obj/machinery/conveyor/attackby(obj/item/attacking_item, mob/living/user, list/modifiers)
/obj/machinery/conveyor/attackby(obj/item/attacking_item, mob/living/user, list/modifiers, list/attack_modifiers)
if(attacking_item.tool_behaviour == TOOL_CROWBAR)
user.visible_message(span_notice("[user] struggles to pry up [src] with [attacking_item]."), \
span_notice("You struggle to pry up [src] with [attacking_item]."))
@@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
else
return ..()
/obj/machinery/conveyor/attackby_secondary(obj/item/attacking_item, mob/living/user, list/modifiers)
/obj/machinery/conveyor/attackby_secondary(obj/item/attacking_item, mob/living/user, list/modifiers, list/attack_modifiers)
if(attacking_item.tool_behaviour == TOOL_SCREWDRIVER)
attacking_item.play_tool_sound(src)
flipped = !flipped
@@ -545,7 +545,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
/obj/machinery/conveyor_switch/attack_robot_secondary(mob/user, list/modifiers)
return attack_hand_secondary(user, modifiers)
/obj/machinery/conveyor_switch/attackby(obj/item/attacking_item, mob/user, list/modifiers)
/obj/machinery/conveyor_switch/attackby(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers)
if(is_wire_tool(attacking_item))
wires.interact(user)
return TRUE
@@ -660,7 +660,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
use(1)
return ITEM_INTERACT_SUCCESS
/obj/item/stack/conveyor/attackby(obj/item/item_used, mob/user, list/modifiers)
/obj/item/stack/conveyor/attackby(obj/item/item_used, mob/user, list/modifiers, list/attack_modifiers)
..()
if(istype(item_used, /obj/item/conveyor_switch_construct))
to_chat(user, span_notice("You link the switch to the conveyor belt assembly."))
+3 -3
View File
@@ -111,7 +111,7 @@
air_contents.merge(removed)
trunk_check()
/obj/machinery/disposal/attackby(obj/item/I, mob/living/user, list/modifiers)
/obj/machinery/disposal/attackby(obj/item/I, mob/living/user, list/modifiers, list/attack_modifiers)
add_fingerprint(user)
if(!pressure_charging && !full_pressure && !flush)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
@@ -378,7 +378,7 @@
var/obj/item/dest_tagger/mounted_tagger
// attack by item places it in to disposal
/obj/machinery/disposal/bin/attackby(obj/item/weapon, mob/user, list/modifiers)
/obj/machinery/disposal/bin/attackby(obj/item/weapon, mob/user, list/modifiers, list/attack_modifiers)
if(istype(weapon, /obj/item/storage/bag/trash)) //Not doing component overrides because this is a specific type.
var/obj/item/storage/bag/trash/bag = weapon
to_chat(user, span_warning("You empty the bag."))
@@ -388,7 +388,7 @@
return ..()
// handle machine interaction
/obj/machinery/disposal/bin/attackby_secondary(obj/item/weapon, mob/user, list/modifiers)
/obj/machinery/disposal/bin/attackby_secondary(obj/item/weapon, mob/user, list/modifiers, list/attack_modifiers)
if(istype(weapon, /obj/item/dest_tagger))
var/obj/item/dest_tagger/new_tagger = weapon
if(mounted_tagger)
@@ -55,7 +55,7 @@
else
. += "It has no sorting tags set."
/obj/structure/disposalpipe/sorting/mail/attackby(obj/item/I, mob/user, list/modifiers)
/obj/structure/disposalpipe/sorting/mail/attackby(obj/item/I, mob/user, list/modifiers, list/attack_modifiers)
if(istype(I, /obj/item/dest_tagger))
var/obj/item/dest_tagger/O = I
+2 -2
View File
@@ -103,7 +103,7 @@
if(sticker)
. += "[base_icon_state]_barcode"
/obj/item/delivery/attackby(obj/item/item, mob/user, list/modifiers)
/obj/item/delivery/attackby(obj/item/item, mob/user, list/modifiers, list/attack_modifiers)
if(istype(item, /obj/item/dest_tagger))
var/obj/item/dest_tagger/dest_tagger = item
@@ -352,7 +352,7 @@
if(payments_acc)
. += span_notice("<b>Ctrl-click</b> to clear the registered account.")
/obj/item/sales_tagger/attackby(obj/item/item, mob/living/user, list/modifiers)
/obj/item/sales_tagger/attackby(obj/item/item, mob/living/user, list/modifiers, list/attack_modifiers)
. = ..()
if(isidcard(item))
var/obj/item/card/id/potential_acc = item