* Fixes a runtime with ai trying to use a browser ui (#59062)
* Fixes a runtime with ai trying to use a browser ui
Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
* Replace tgalert with tgui_alert, a new TGUI-based alert system
* a
* a
Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B
BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
* Converts all A && A.B into A?.B
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
* Optimize stat panel and fix guardian verbs (#53463)
Optimizes stat panel code for better performance, including icon caching and removing some unnecessary processing
Also fixes#53432fix#53381fix#53724
Changelog
add: icons are back on alt clicks
fix: horrible performance from alt clicking turfs with multiple objects
tweak:browser should notify the SS when it's ready to receive data
* Update statbrowser.html
* Apply suggestions from code review
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
* hidden = TRUE
* almost ready
* Browser should notify when ready to receive data
* Apply MSO's suggestions
* reset cache if something in it gets deleted
* Fix runtime
* fix my stupid code
* send href_token when adding admin tabs
* fix an issue with cyborg suit topic
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
* Optimize stat panel and fix guardian verbs
Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is
Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Couls <coul422@gmail.com>
* [Ready] CDN browser assets! (#52681)
Rewrites the asset_cache system to handle sending assets to a CDN via a webroot.
see https://github.com/MrStonedOne/tgstation/blob/asset-cdn/code/modules/asset_cache/readme.md
Fixed a lot of bugs with assets, removed some dead code.
Changes:
Moved asset cache code to transport datums, the currently loaded one is located at SSassets.transport, asset cache calls made before the config is loaded use the simple browse_rsc transport.
Added subsystem call for when the config loads or reloads.
Added a webroot CDN asset transport. assets are saved to a file in a format based on the file's hash (currently md5).
Assets that don't use get_asset_url or get_url_mappings (such as browser assets referred to by static html files like changelog.html or static css files) can be saved to browse_rsc even when in cdn asset mode by setting legacy to TRUE on the datum returned by register_assets
Added a system for saving assets on a cdn in a hash based namespace (folder), assets within the same namespace will always be able to refer to each other by relative names. (used to allow cdn'ing font awesome without having to make something that regenerates it's css files.).
The simple/namespaced asset cache datum helper will handle generating a namespace composed of the combined md5 of everything in the same datum, as well as registering them properly.
Moved external resource from a snowflake loaded file to a config entry, added it to resources.txt
To ensure the system breaks in local testing in any situation that wouldn't work in cdn mode, the simple transport will mutate the filenames of non-legacy and non-namespaced assets and return this with get_asset_url.
Simple transport's passive send of all roundstart assets to all clients is now a config that defaults to off. this is to break race conditions during local testings from devs accidentally relying on this instead of using send() properly.
cl
refactor: Interface assets (js/css/images) can now be managed using an external webserver instead of byond's one at a time file transfer queue.
admin: Adds admin verb toggle-cdn that allows admins to disable the external webserver asset transport and revert to the old system. Useful if the webserver backing this goes down (thanks cloudflare).
config: New config file, resources.txt, (must be loaded by an $include statement from the main config)
server: The external_rsc_urls.txt config has been moved to the main config system.
/cl
Porting notes:
Interface webpages must refer to their assets (css/js/image/etc) by a generated url, or the asset must register itself as a legacy asset. The system is designed to break in localtest (on simple/legacy mode) in most situations that would break in cdn mode.
Requires latest tgui.
The webserver must set the proper CORS headers for font files or font awesome (and other fonts) won't load.
/tg/'s webserver config: https://gist.github.com/MrStonedOne/523388b2f161af832292d98a8aad0eae
* [Ready] CDN browser assets!
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Cleanup up all instances of using var/ definitions in proc parameters. (#52728)
* var/list cleanup
* The rest of the owl
* plushvar bad
* Can't follow my own advice.
* Cleanup up all instances of using var/ definitions in proc parameters.
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Asset cache now caches the asset's md5 This should solve the high cpu usage issues with it. line by line profile suggests that the next hotspot is the asset log.
Simplied asset cache code, moved verify functionality to a flush_assets proc that blocks until a client has all currently sending assets. (sidenote: there is an argument for moving most of asset_cache's global procs onto the client, get_asset_datum and register_asset are really the only valid global procs.)
Re-added batched passive sends since it does speed up how quickly the asset cache pre-caches to clients.
* Makes raw HTML and browser datum popups UTF-8 aware
Admin menus specifically really shouldn't break just because you named some guy "☺s the Clown"
* Fixed new_player.dm
* Fucking filing cabinets
About The Pull Request
Pretty much what it says on the tin.
Oh yeah I also removed the string concatenation nonsense in favor of multiline strings and a list.
Why It's Good For The Game
Removes many getFlatIcon calls during the round, also some runtimes from ephemeral items being created and immediately deleted when the vending machines are used.
Changelog
cl Naksu
tweak: vending machines now use spritesheets
/cl
Instead of using expensive getFlatIcon() calls, character previews are now shown using appearance clones in a second map window.
Its creating a secondary map and adding mut_appearances as screen objs on that map.
There are 1 set of dummy objects per client, it also only creates them while the preview window is open and garbage collects them when it's closed.
Because it creates the MA from the main preview dummy mob, the dummy mob's appearance remains a seperate object and they don't affect each other
This is basically extracting the functionality of the animation spell into an admin verb.
Please excuse the browser.dm code, this is more of a stepping stone towards the more complicated popup needed for custom ERTs.
cl Naksu
admin: Admins can now easily spawn mobs that look like objects. Googly eyes optional!
/cl
* updates sqladmins with excluded flags and tempminning
* rank, editing and permission protections; json backup
* fixes
* reverted the wrong file
* fix slidecolor cascading and disabled switches not being sent in form
* removes debug uncommenting
* whoops this too
* commas fix + versions for changelog entry headers since 3.0
* actually account for can_edit_flags and use of @ with - or *
* fixes and rearrangement of admin > localhost > autoadmin precedence
* in case you want to not have autologin autoadmins
* Draft 1
* requested changes
* fixes & refactoring & vv support
* one more vars access
* there we go
* change arg name
* Update lava.dm
* Update armor.dm
* Update armor.dm
* Update armor.dm
* fixes
* Update datumvars.dm
* Update goliath_hide.dm
* Update objs.dm
* 0 -> none in checkrights()
* Update armor.dm
* Update datumvars.dm
* Update armor.dm
* Adds magic armor type
this did not exist before
* two missing things from previous commit
* I shouldn't webeditor at work
* It works, but is it worth it?
* bitfield helpers take 1
* Would this work?
* remove dangling debug code
* rebase & fixes
* vv bitfield stuff, reading
* DNM oceans of shitcode DNM
* honk
* honk2
* plonk
* rebase & fix
Tick contention is when the mc, sleep()/spawns(), and byond internal processing fight each other for game tick time. Usually in an unproductive way that wastes cpu cycles and reduces the effective amount of game tick to go around.
Tweaked the anti-tick contention heuristics of the MC a touch.
Fixed an incorrect operator in the mc's anti-tick contention heuristics causing it to apply in times of no lag rather then times of lag.
The mc's anti-tick contention heuristics now plays better with the high pop processing mode.
We no longer reserve the tail end of a tick for the mc to have if the mc doesn't plan to run next tick because of high pop mode or anti-tick contention heuristics.
stoplag() can now be given an initial delay allowing it to act like a smarter sleep (in that it sleeps for longer if the server is overwhelmed.
All short sleeps that only existed for performance reason and had no game play, visual/audio, or balance reasons behind their timing were converted to stoplag().
* Makes browser datum use asset cache
This should shave one or two round trips off of the lag for player preferences window, since it was sending the css for browser datums every load.
* Fix improper casing
Read this for more info http://www.byond.com/forum/?post=1820325
Assuming the user has a modern version of IE installed, this allows access to supported CSS 3 elements that we currently can't use. Visually everything seems to remain the same.
Tried doing this with nano and it stopped working for me. Since I know jack all about how nano works, it stays as-is for now.