mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Converted a bunch of stuff to the new thing (#27556)
* removed old on_density_change thing * converted on_resist to lazy events * Converted on_spellcast to lazy events * Converted on_uattack to lazy events, breaks spell channeling * Converted on_ruattack to lazy events, unbreaks channeled spells * Converted on_logout to lazy events * Converted on_damaged to lazy_events * Converted on_death to lazy_events * Converted on_clickon to lazy_events * Converted on_attackhand to lazy_events, added on_bumped
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
RestrainedClickOn(A)
|
||||
else
|
||||
*/
|
||||
if(INVOKE_EVENT(on_uattack,list("atom"=A))) //This returns 1 when doing an action intercept
|
||||
if(lazy_invoke_event(/lazy_event/on_uattack, list("atom" = A))) //This returns 1 when doing an action intercept
|
||||
return
|
||||
A.add_hiddenprint(src)
|
||||
A.attack_ai(src)
|
||||
@@ -115,4 +115,4 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/AIShiftClick(var/mob/living/silicon/ai/user) // Allows examining firelocks
|
||||
examine(user)
|
||||
examine(user)
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
on_clickon.Invoke(list(
|
||||
lazy_invoke_event(/lazy_event/on_clickon, list(
|
||||
"user" = src,
|
||||
"modifiers" = modifiers,
|
||||
"target" = A
|
||||
))
|
||||
@@ -151,7 +152,7 @@
|
||||
else
|
||||
if(ismob(A) || istype(held_item, /obj/item/weapon/grab))
|
||||
delayNextAttack(10)
|
||||
if(INVOKE_EVENT(on_uattack,list("atom"=A))) //This returns 1 when doing an action intercept
|
||||
if(lazy_invoke_event(/lazy_event/on_uattack, list("atom" = A))) //This returns 1 when doing an action intercept
|
||||
return
|
||||
UnarmedAttack(A, 1, params)
|
||||
|
||||
@@ -182,7 +183,7 @@
|
||||
else
|
||||
if(ismob(A))
|
||||
delayNextAttack(10)
|
||||
if(INVOKE_EVENT(on_uattack,list("atom"=A))) //This returns 1 when doing an action intercept
|
||||
if(lazy_invoke_event(/lazy_event/on_uattack, list("atom" = A))) //This returns 1 when doing an action intercept
|
||||
return
|
||||
RangedAttack(A, params)
|
||||
|
||||
@@ -244,8 +245,7 @@
|
||||
Not currently used by anything but could easily be.
|
||||
*/
|
||||
/mob/proc/RestrainedClickOn(var/atom/A)
|
||||
if(INVOKE_EVENT(on_ruattack,list("atom"=A))) //This returns 1 when doing an action intercept
|
||||
return
|
||||
lazy_invoke_event(/lazy_event/on_ruattack, list("atom" = A))
|
||||
|
||||
/*
|
||||
Middle click
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
aicamera.captureimage(A, src)
|
||||
return
|
||||
|
||||
if(INVOKE_EVENT(on_uattack,list("atom"=A)))
|
||||
if(lazy_invoke_event(/lazy_event/on_uattack, list("atom" = A)))
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_hand()
|
||||
|
||||
@@ -74,9 +74,6 @@
|
||||
/atom/proc/requires_dexterity(mob/user)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(var/atom/A)
|
||||
if(!gloves && !mutations.len)
|
||||
return
|
||||
@@ -112,9 +109,6 @@
|
||||
|
||||
/atom/proc/attack_animal(mob/user as mob)
|
||||
return
|
||||
/mob/living/RestrainedClickOn(var/atom/A)
|
||||
..()
|
||||
|
||||
/*
|
||||
Monkeys
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user