mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 16:44:43 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user