Skip to content

Commit

Permalink
Fixed TGUI not loading new panels on first try (#16596)
Browse files Browse the repository at this point in the history
* Fix + Changelog

* there's always something you miss

* Less checks

* Additions
  • Loading branch information
FluffyGhoster committed Jun 30, 2023
1 parent 9593b48 commit fb94314
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 17 deletions.
28 changes: 24 additions & 4 deletions code/modules/client/client procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,30 @@ var/list/localhost_addresses = list(
return

// asset_cache
var/asset_cache_job
if(href_list["asset_cache_confirm_arrival"])
//to_chat(src, "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED.")
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

//byond bug ID:2256651
if (asset_cache_job && (asset_cache_job in completed_asset_jobs))
to_chat(src, SPAN_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)"))
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

if(href_list["reload_tguipanel"])
nuke_chat()
if(href_list["reload_statbrowser"])
stat_panel.reinitialize()

if (href_list["EMERG"] && href_list["EMERG"] == "action")
if (!info_sent)
handle_connection_info(src, href_list["data"])
Expand Down Expand Up @@ -250,7 +265,12 @@ var/list/localhost_addresses = list(
show_browser(src, data, "window=jobban_reason;size=400x300")
return

..() //redirect to hsrc.()
if (hsrc)
var/datum/real_src = hsrc
if(QDELETED(real_src))
return

..() //redirect to hsrc.Topic()

/proc/client_by_ckey(ckey)
return directory[ckey]
Expand Down
42 changes: 42 additions & 0 deletions html/changelogs/fluffyghost-fixtguinotloadingonfirsttry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################

# Your name.
author: FluffyGhost

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fixed TGUI not loading new panels on first try, because the caching confirmation system was not correctly flagging them as received assets."
- bugfix: "Added some remaining pieces of code that were not ported over for the Topic function."
Loading

0 comments on commit fb94314

Please sign in to comment.