mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01:00
Port mob cooldown actions and AI behavior. (#29924)
* Port mob cooldown actions and AI behavior. * fix lint * fix missing override args * Update code/_onclick/click.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/_onclick/click.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/actions/action.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/__DEFINES/ai/blackboard_defines.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> * remove unused defines --------- Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
This commit is contained in:
co-authored by
PollardTheDragon
Burzah
parent
653e9e8c72
commit
ef41677463
+14
-2
@@ -51,8 +51,7 @@
|
||||
if(QDELETED(A))
|
||||
return
|
||||
|
||||
if(client?.click_intercept)
|
||||
client.click_intercept.InterceptClickOn(src, params, A)
|
||||
if(check_click_intercept(params,A))
|
||||
return
|
||||
|
||||
if(next_click > world.time)
|
||||
@@ -516,5 +515,18 @@
|
||||
click_turf.Click(location, control, list2params(modifiers))
|
||||
. = 1
|
||||
|
||||
/mob/proc/check_click_intercept(params,A)
|
||||
// Client level intercept
|
||||
if(client?.click_intercept)
|
||||
if(call(client.click_intercept, "InterceptClickOn")(src, params, A))
|
||||
return TRUE
|
||||
|
||||
// Mob level intercept
|
||||
if(click_interceptor)
|
||||
if(call(click_interceptor, "InterceptClickOn")(src, params, A))
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
#undef MAX_SAFE_BYOND_ICON_SCALE_TILES
|
||||
#undef MAX_SAFE_BYOND_ICON_SCALE_PX
|
||||
|
||||
Reference in New Issue
Block a user