mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
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:
@@ -310,11 +310,11 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/book/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone)
|
||||
/obj/item/book/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
if(target_zone == BP_EYES)
|
||||
user.visible_message(SPAN_NOTICE("You open up the book and show it to [M]. "), \
|
||||
SPAN_NOTICE(" [user] opens up a book and shows it to [M]. "))
|
||||
M << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
user.visible_message(SPAN_NOTICE("You open up the book and show it to [target_mob]. "), \
|
||||
SPAN_NOTICE(" [user] opens up a book and shows it to [target_mob]. "))
|
||||
target_mob << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //to prevent spam
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user