mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Browser/TGUI Stat Panels (#24065)
* initial commit (broken)
* load the html
* fix this
* Fix various issues with browser statpanel
* Fix Alt Clicking opening up a window and Add back some object verbs to the browser stat panel
* Optimize stat panel and fix guardian verbs
* Restyles Stat Panel, Adds Subpanel Sub-Categories
* Use better layout for verbs in stat panel
* Updates statpanel verb widths to be more dynamic at higher screen resolutions.
* Adjust stat panel grid item widths and breakpoints
* refactors statpanel to use tgui API
* CI moment
* more CI
* this stupid thing
* Apply suggestions from code review
Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
* Update code/modules/client/client_procs.dm
* ci fix
* emergency mc debug view
* temp revert some code change suggestions due to massive runtiming
* proper atom click topic implementation
* optimise
* mob clicking in stat panels work
* yeet spell tab thingy
* yeet simple stat panel pref
* allow insertion of html into MC tab content
* tidy up status tab
* Apply suggestions from code review
* fix this
* fix CI
* oops
* fix index runtime
* fixes MC tab showing up for mentors, fixes runtime
* safeties!
* Return of theme support
* more fixes
* fix view range pref, tidy prefs tab
* Remove old stat panel from themes
* fixes
* make sure verbs don't go missing
* fix ooc/looc breaking
* Revert "make sure verbs don't go missing"
This reverts commit 7d07ad45ed.
* fix this properly
* fix stat panel hitting rate limiters
* fix borg status tab
* Object Window Niceties
* Adds file cycling for icon2base64
* optimizes icon2html() for icon files known to be in the rsc at compile time
* CI moment
* remove dupe emergency shuttle timers
* more robust verb updates
* statpanel tweaks
* zip archived changelog to avoid search results
* optimise
* fix mentor chat wonkyness when disabled
* debug log moment
* i am very smart
* reintroduce this because it was needed
* better time listings
* less jank
* stops telling admins they arent mentors
* returns MC tab pref for admins
* Update code/controllers/subsystem/SSstatpanel.dm
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
* lewcc
* OD typemaker prep
---------
Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Aylong <alexanderkitsa@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
co-authored by
GDN
Burzah
Luc
Aylong
parent
19a3f768c8
commit
91660824fa
@@ -25,15 +25,21 @@
|
||||
/// TRUE for keeping local asset names when browse_rsc backend is used
|
||||
var/keep_local_name = FALSE
|
||||
|
||||
/datum/asset_cache_item/New(name, file)
|
||||
/// Pass in a valid file_hash if you have one to save it from needing to do it again.
|
||||
/// Pass in a valid dmi file path string e.g. "icons/path/to/dmi_file.dmi" to make generating the hash less expensive
|
||||
/datum/asset_cache_item/New(name, file, file_hash, dmi_file_path)
|
||||
if(!isfile(file))
|
||||
file = fcopy_rsc(file)
|
||||
hash = md5(file)
|
||||
hash = file_hash
|
||||
|
||||
// The given file is directly from a dmi file and is thus in the rsc already, we know that its file_hash will be correct
|
||||
if(!hash)
|
||||
hash = md5(fcopy_rsc(file))
|
||||
if(!hash)
|
||||
CRASH("invalid asset sent to asset cache")
|
||||
log_debug("asset cache unexpected success of second fcopy_rsc")
|
||||
if(dmi_file_path)
|
||||
hash = md5(file)
|
||||
else
|
||||
hash = md5asfile(file) // Icons sent to the rsc md5 incorrectly when theyre given incorrect data
|
||||
if(!hash)
|
||||
CRASH("invalid asset sent to asset cache")
|
||||
src.name = name
|
||||
var/extstart = findlasttext(name, ".")
|
||||
if(extstart)
|
||||
|
||||
@@ -23,15 +23,21 @@
|
||||
addtimer(CALLBACK(src, PROC_REF(send_assets_slow), C, preload), 1 SECONDS)
|
||||
|
||||
|
||||
/// Register a browser asset with the asset cache system
|
||||
/// asset_name - the identifier of the asset
|
||||
/// asset - the actual asset file (or an asset_cache_item datum)
|
||||
/// returns a /datum/asset_cache_item.
|
||||
/// mutiple calls to register the same asset under the same asset_name return the same datum
|
||||
/datum/asset_transport/proc/register_asset(asset_name, asset)
|
||||
/**
|
||||
* Register a browser asset with the asset cache system.
|
||||
* returns a /datum/asset_cache_item.
|
||||
* mutiple calls to register the same asset under the same asset_name return the same datum.
|
||||
*
|
||||
* Arguments:
|
||||
* * asset_name - the identifier of the asset.
|
||||
* * asset - the actual asset file (or an asset_cache_item datum).
|
||||
* * file_hash - optional, a hash of the contents of the asset files contents. used so asset_cache_item doesnt have to hash it again
|
||||
* * dmi_file_path - optional, means that the given asset is from the rsc and thus we dont need to do some expensive operations
|
||||
*/
|
||||
/datum/asset_transport/proc/register_asset(asset_name, asset, file_hash, dmi_file_path)
|
||||
var/datum/asset_cache_item/ACI = asset
|
||||
if(!istype(ACI))
|
||||
ACI = new(asset_name, asset)
|
||||
ACI = new(asset_name, asset, file_hash, dmi_file_path)
|
||||
if(!ACI || !ACI.hash)
|
||||
CRASH("ERROR: Invalid asset: [asset_name]:[asset]:[ACI]")
|
||||
if(SSassets.cache[asset_name])
|
||||
|
||||
Reference in New Issue
Block a user