Merge pull request #7917 from VOREStation/Arokha/squeez

Attempt some performance improvements
This commit is contained in:
Aronai Sieyes
2020-05-17 10:17:24 -04:00
committed by GitHub
14 changed files with 90 additions and 32 deletions

View File

@@ -284,7 +284,10 @@ var/global/list/default_medbay_channels = list(
if(.)
SSnanoui.update_uis(src)
GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/list/zlevels) //BS12 EDIT
if(!GLOB.autospeaker)
return
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if(channel == "department")
@@ -299,9 +302,8 @@ var/global/list/default_medbay_channels = list(
if(!LAZYLEN(zlevels))
zlevels = list(0)
var/static/mob/living/silicon/ai/announcer/A = new /mob/living/silicon/ai/announcer(src, null, null, 1)
A.SetName(from)
Broadcast_Message(connection, A,
GLOB.autospeaker.SetName(from)
Broadcast_Message(connection, GLOB.autospeaker,
0, "*garbled automated announcement*", src,
message_to_multilingual(message), from, "Automated Announcement", from, "synthesized voice",
DATA_FAKE, 0, zlevels, connection.frequency, "states")

View File

@@ -648,9 +648,14 @@ proc/establish_old_db_connection()
/world/proc/max_z_changed()
if(!istype(GLOB.players_by_zlevel, /list))
GLOB.players_by_zlevel = new /list(world.maxz, 0)
GLOB.living_players_by_zlevel = new /list(world.maxz, 0)
while(GLOB.players_by_zlevel.len < world.maxz)
GLOB.players_by_zlevel.len++
GLOB.players_by_zlevel[GLOB.players_by_zlevel.len] = list()
GLOB.living_players_by_zlevel.len++
GLOB.living_players_by_zlevel[GLOB.living_players_by_zlevel.len] = list()
// Call this to make a new blank z-level, don't modify maxz directly.
/world/proc/increment_max_z()