asset cache + better minimaps
This commit is contained in:
@@ -36,29 +36,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null
|
||||
return
|
||||
|
||||
// asset_cache
|
||||
var/asset_cache_job
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
var/job = text2num(href_list["asset_cache_confirm_arrival"])
|
||||
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us
|
||||
// into letting append to a list without limit.
|
||||
if (job && job <= last_asset_job && !(job in completed_asset_jobs))
|
||||
completed_asset_jobs += job
|
||||
asset_cache_job = asset_cache_confirm_arrival(href_list["asset_cache_confirm_arrival"])
|
||||
if (!asset_cache_job)
|
||||
return
|
||||
else if (job in completed_asset_jobs) //byond bug ID:2256651
|
||||
to_chat(src, "<span class='danger'>An error has been detected in how your client is receiving resources. Attempting to correct.... (If you keep seeing these messages you might want to close byond and reconnect)</span>")
|
||||
src << browse("...", "window=asset_cache_browser")
|
||||
// Keypress passthrough
|
||||
if(href_list["__keydown"])
|
||||
var/keycode = browser_keycode_to_byond(href_list["__keydown"])
|
||||
if(keycode)
|
||||
keyDown(keycode)
|
||||
return
|
||||
if(href_list["__keyup"])
|
||||
var/keycode = browser_keycode_to_byond(href_list["__keyup"])
|
||||
if(keycode)
|
||||
keyUp(keycode)
|
||||
return
|
||||
|
||||
|
||||
var/mtl = CONFIG_GET(number/minute_topic_limit)
|
||||
if (!holder && mtl)
|
||||
@@ -75,7 +57,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
topiclimiter[ADMINSWARNED_AT] = minute
|
||||
msg += " Administrators have been informed."
|
||||
log_game("[key_name(src)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
|
||||
to_chat(src, "<span class='danger'>[msg]</span>")
|
||||
return
|
||||
|
||||
@@ -96,6 +78,27 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(!(href_list["_src_"] == "chat" && href_list["proc"] == "ping" && LAZYLEN(href_list) == 2))
|
||||
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
|
||||
|
||||
//byond bug ID:2256651
|
||||
if (asset_cache_job && (asset_cache_job in completed_asset_jobs))
|
||||
to_chat(src, "<span class='danger'>An error has been detected in how your client is receiving resources. Attempting to correct.... (If you keep seeing these messages you might want to close byond and reconnect)</span>")
|
||||
src << browse("...", "window=asset_cache_browser")
|
||||
return
|
||||
if (href_list["asset_cache_preload_data"])
|
||||
asset_cache_preload_data(href_list["asset_cache_preload_data"])
|
||||
return
|
||||
|
||||
// Keypress passthrough
|
||||
if(href_list["__keydown"])
|
||||
var/keycode = browser_keycode_to_byond(href_list["__keydown"])
|
||||
if(keycode)
|
||||
keyDown(keycode)
|
||||
return
|
||||
if(href_list["__keyup"])
|
||||
var/keycode = browser_keycode_to_byond(href_list["__keyup"])
|
||||
if(keycode)
|
||||
keyUp(keycode)
|
||||
return
|
||||
|
||||
// Admin PM
|
||||
if(href_list["priv_msg"])
|
||||
cmd_admin_pm(href_list["priv_msg"],null)
|
||||
@@ -858,8 +861,14 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
'html/browser/playeroptions.css',
|
||||
)
|
||||
spawn (10) //removing this spawn causes all clients to not get verbs.
|
||||
|
||||
//load info on what assets the client has
|
||||
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
|
||||
|
||||
//Precache the client with all other assets slowly, so as to not block other browse() calls
|
||||
getFilesSlow(src, SSassets.preload, register_asset = FALSE)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/getFilesSlow, src, SSassets.preload, FALSE), 5 SECONDS)
|
||||
|
||||
#if (PRELOAD_RSC == 0)
|
||||
for (var/name in GLOB.vox_sounds)
|
||||
var/file = GLOB.vox_sounds[name]
|
||||
|
||||
Reference in New Issue
Block a user