Made turf contents listing more performant. (#25188)

* Made turf contents listing more performant.

* Made images resend and reload if they don't arrive.

* Runtime fix.

* Remove redundant code.

* Lint.

* Apply suggestions from code review

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Safety.

---------

Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Charlie Nolan
2024-05-12 11:03:14 +00:00
committed by GitHub
co-authored by Contrabang FunnyMan3595
parent 73068bb0d6
commit 9fa5fbb3c6
5 changed files with 292 additions and 94 deletions
+12
View File
@@ -1230,6 +1230,18 @@
if("Set-Tab")
stat_tab = payload["tab"]
SSstatpanels.immediate_send_stat_data(src)
if("Listedturf-Scroll")
if(payload["min"] == payload["max"])
// Not properly loaded yet, send the default set.
SSstatpanels.refresh_client_obj_view(src)
else
SSstatpanels.refresh_client_obj_view(src, payload["min"], payload["max"])
// Uncomment to enable log_debug in stat panel code.
// Disabled normally due to HREF exploit concerns.
//if("Statpanel-Debug")
// log_debug(payload)
if("Resend-Asset")
SSassets.transport.send_assets(src, list(payload))
if("Debug-Stat-Entry")
var/stat_item = locateUID(payload["stat_item_uid"])
if(!check_rights(R_DEBUG | R_VIEWRUNTIMES) || !stat_item)