Refactored the attack proc (#19908)

Refactored the attack proc signature.
Added signals and components for the attack proc.
Added signals and components for the attackby proc.
Adjusted some leftover attackby procs signatures.
Added grep test to ensure people don't keep adding attack/attackby procs
with the wrong signature.
This commit is contained in:
Fluffy
2024-10-06 23:30:00 +02:00
committed by GitHub
parent b79b7c5177
commit 9636363e60
121 changed files with 878 additions and 663 deletions
@@ -146,13 +146,13 @@
else
to_chat(user, SPAN_WARNING("\The [src] does not have a card or item stored in the card slot."))
/obj/item/modular_computer/attack(mob/living/M, mob/living/user, var/sound_scan)
sound_scan = FALSE
/obj/item/modular_computer/attack(mob/living/target_mob, mob/living/user, target_zone)
var/sound_scan = FALSE
if(last_scan <= world.time - 20) //Spam limiter.
last_scan = world.time
sound_scan = TRUE
if(scan_mode == SCANNER_MEDICAL)
health_scan_mob(M, user, TRUE, sound_scan = sound_scan)
health_scan_mob(target_mob, user, TRUE, sound_scan = sound_scan)
/obj/item/modular_computer/afterattack(atom/A, mob/user, proximity_flag, click_parameters)
. = ..()