mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
Fixes slapping atoms + range checks. (#9769)
This commit is contained in:
@@ -190,6 +190,13 @@
|
||||
emote_message_3p = "USER slaps USER_SELF across the face!"
|
||||
emote_sound = 'sound/effects/snap.ogg'
|
||||
|
||||
/decl/emote/audible/slap/target_check(var/atom/user, var/atom/target)
|
||||
if(!ismob(target))
|
||||
return FALSE
|
||||
if(!target.Adjacent(user))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/decl/emote/audible/snap
|
||||
key = "snap"
|
||||
emote_message_3p = "USER snaps USER_THEIR fingers."
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
return emote_message_3p
|
||||
|
||||
/decl/emote/proc/do_emote(var/atom/user, var/extra_params)
|
||||
|
||||
if(ismob(user) && check_restraints)
|
||||
var/mob/M = user
|
||||
if(M.restrained())
|
||||
@@ -83,6 +82,9 @@
|
||||
if (!use_range)
|
||||
use_range = world.view
|
||||
|
||||
if(!target_check(user, target))
|
||||
return
|
||||
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(message_type == AUDIBLE_MESSAGE)
|
||||
@@ -98,6 +100,9 @@
|
||||
/decl/emote/proc/check_user(var/atom/user)
|
||||
return TRUE
|
||||
|
||||
/decl/emote/proc/target_check(var/atom/user, var/atom/target)
|
||||
return TRUE
|
||||
|
||||
/decl/emote/proc/can_target()
|
||||
return (emote_message_1p_target || emote_message_3p_target)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user