removes alot of click-related self registering signals on basic mobs (#87220)

## About The Pull Request
there was no real benefit of using signals over proc overrides for many
of these cases.

## Why It's Good For The Game
registering signals on self when we can just override the proc is
un-necessary, im responsible for most of these so im just confronting
the sins of my past

## Changelog
🆑
/🆑
This commit is contained in:
Ben10Omintrix
2024-10-15 22:58:20 +03:00
committed by GitHub
parent 6e21331367
commit 2438ff0213
18 changed files with 158 additions and 164 deletions
+10 -5
View File
@@ -216,15 +216,20 @@
. += span_deadsay("Upon closer examination, [p_they()] appear[p_s()] to be [HAS_MIND_TRAIT(user, TRAIT_NAIVE) ? "asleep" : "dead"].")
/mob/living/basic/proc/melee_attack(atom/target, list/modifiers, ignore_cooldown = FALSE)
face_atom(target)
if (!ignore_cooldown)
changeNext_move(melee_attack_cooldown)
if(SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target, Adjacent(target), modifiers) & COMPONENT_HOSTILE_NO_ATTACK)
return FALSE //but more importantly return before attack_animal called
if(!early_melee_attack(target, modifiers, ignore_cooldown))
return FALSE
var/result = target.attack_basic_mob(src, modifiers)
SEND_SIGNAL(src, COMSIG_HOSTILE_POST_ATTACKINGTARGET, target, result)
return result
/mob/living/basic/proc/early_melee_attack(atom/target, list/modifiers, ignore_cooldown = FALSE)
face_atom(target)
if(!ignore_cooldown)
changeNext_move(melee_attack_cooldown)
if(SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target, Adjacent(target), modifiers) & COMPONENT_HOSTILE_NO_ATTACK)
return FALSE //but more importantly return before attack_animal called
return TRUE
/mob/living/basic/resolve_unarmed_attack(atom/attack_target, list/modifiers)
melee_attack(attack_target, modifiers)