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-18 22:32:12 -05:00
committed by GitHub
parent 225300a189
commit 5261efb67f
483 changed files with 1088 additions and 1082 deletions

View File

@@ -109,7 +109,7 @@
///How much progression should be shown in the uplink, set on purchase of the item.
var/current_progression = 0
/obj/item/computer_disk/virus/frame/attackby(obj/item/attacking_item, mob/user, list/modifiers)
/obj/item/computer_disk/virus/frame/attackby(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers)
. = ..()
if(!istype(attacking_item, /obj/item/stack/telecrystal))
return

View File

@@ -98,7 +98,7 @@
return ..()
/obj/item/modular_computer/pda/pre_attack(atom/target, mob/living/user, list/modifiers)
/obj/item/modular_computer/pda/pre_attack(atom/target, mob/living/user, list/modifiers, list/attack_modifiers)
if(!inserted_disk || !ismachinery(target))
return ..()

View File

@@ -157,8 +157,8 @@
/obj/machinery/modular_computer/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
return (CPU_INTERACTABLE(user) && !user.combat_mode) ? cpu.item_interaction(user, tool, modifiers) : ..()
/obj/machinery/modular_computer/attacked_by(obj/item/attacking_item, mob/living/user)
return CPU_INTERACTABLE(user) ? cpu.attacked_by(attacking_item, user) : ..()
/obj/machinery/modular_computer/attacked_by(obj/item/attacking_item, mob/living/user, list/modifiers, list/attack_modifiers)
return CPU_INTERACTABLE(user) ? cpu.attacked_by(attacking_item, user, modifiers, attack_modifiers) : ..()
// Stronger explosions cause serious damage to internal components
// Minor explosions are mostly mitigitated by casing.