mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Optimizes some functions (#24049)
* Optimizes some functions * Update code/__HELPERS/unsorted.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * Cached per AI now * no more 80k character jumpscares * parent functions exist * I need a new keyboard * Update code/modules/surgery/organs/vocal_cords.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/living/silicon/ai/ai_say.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/__HELPERS/game.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/__HELPERS/game.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
co-authored by
AffectedArc07
Burzah
Contrabang
S34N
parent
176e12ff04
commit
cc0eee4b4d
@@ -139,7 +139,7 @@
|
||||
|
||||
/mob/visible_message(message, self_message, blind_message)
|
||||
if(!isturf(loc)) // mobs inside objects (such as lockers) shouldn't have their actions visible to those outside the object
|
||||
for(var/mob/M in get_mobs_in_view(3, src))
|
||||
for(var/mob/M as anything in get_mobs_in_view(3, src))
|
||||
if(M.see_invisible < invisibility)
|
||||
continue //can't view the invisible
|
||||
var/msg = message
|
||||
@@ -151,7 +151,7 @@
|
||||
msg = blind_message
|
||||
M.show_message(msg, EMOTE_VISIBLE, blind_message, EMOTE_AUDIBLE)
|
||||
return
|
||||
for(var/mob/M in get_mobs_in_view(7, src))
|
||||
for(var/mob/M as anything in get_mobs_in_view(7, src))
|
||||
if(M.see_invisible < invisibility)
|
||||
continue //can't view the invisible
|
||||
var/msg = message
|
||||
@@ -164,7 +164,7 @@
|
||||
// message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
/atom/proc/visible_message(message, blind_message)
|
||||
for(var/mob/M in get_mobs_in_view(7, src))
|
||||
for(var/mob/M as anything in get_mobs_in_view(7, src))
|
||||
if(!M.client)
|
||||
continue
|
||||
M.show_message(message, EMOTE_VISIBLE, blind_message, EMOTE_AUDIBLE)
|
||||
@@ -180,7 +180,7 @@
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
var/msg = message
|
||||
for(var/mob/M in get_mobs_in_view(range, src))
|
||||
for(var/mob/M as anything in get_mobs_in_view(range, src))
|
||||
M.show_message(msg, EMOTE_AUDIBLE, deaf_message, EMOTE_VISIBLE)
|
||||
|
||||
// based on say code
|
||||
@@ -206,7 +206,7 @@
|
||||
var/range = 7
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
for(var/mob/M in get_mobs_in_view(range, src))
|
||||
for(var/mob/M as anything in get_mobs_in_view(range, src))
|
||||
M.show_message(message, EMOTE_AUDIBLE, deaf_message, EMOTE_VISIBLE)
|
||||
|
||||
/mob/proc/findname(msg)
|
||||
|
||||
Reference in New Issue
Block a user