* Changes a line of the master controller to make it easier to read (#59974)
* Changes a line of the master controller to make it easier to read
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Properly fix postpones in the mc. (#59813)
I broke shuttles and other things by trusting queued_time.
This fixes it better, by tracking the ticks it's suppose to miss.
closes: #59805 (this doesn't actually work anymore it seems)
* Properly fix postpones in the mc.
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Makes master support ss.postpone()ing the next fire of running subsystems (#59792)
Sadly it can't apply this to the next fire resume of paused subsystems, but at least its not resetting that postpone.
* Makes master support ss.postpone()ing the next fire of running subsystems
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Remove SS_NO_TICK_CHECK (#57800)
## About The Pull Request
This is a whopper, will need @ MrStonedOne to review.
In theory this flag shouldn't be needed and my own testing didn't find any issues, but I'd feel better with a lengthy test merge.
## Why It's Good For The Game
Might make nightshift subsystem lag less, MC loop has less stuff to check.
* Remove SS_NO_TICK_CHECK
Co-authored-by: spookydonut <github@spooksoftware.com>
* [READY] Adds station traits: Small modifiers that can randomly be chosen each round
* conflicts
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* Stack overflow detection for the Master Controller. (#56008)
* Stack overflow detection for the Master Controller.
Using a weakref, we can detect if the mc's stack was ended by byond due to a stack overflow, and restart it without waiting the entire defcon countdown in the failsafe controller.
I built a system around this concept under /datum/stack_end_detector and deployed it to the MC's main loop with checks in the failsafe controller.
* Stack overflow detection for the Master Controller.
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Finishes the allocation refactor (#55965)
#53841 continuation
I recall that the reason for infinite stuns and such was that the priority wasn't being cleared properly when something hitched and I fixed it and I don't remember where exactly but it works now (TM)
A variation of this is TMed on TGMC and it works fine
* Finishes the allocation refactor
Co-authored-by: TiviPlus <57223640+TiviPlus@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>
About The Pull Request
Extools maptick stuff is in the game. Stolen from BeeStation/BeeStation-Hornet#1119, improves performance. Requires ex-tools on the server, though.
Explosions have been refactored to do the actual exploding in a subsystem.
Credit to goon.
Here's some videos!
Why It's Good For The Game
Basically instant max-caps now.
We can now give more of a tick over to the sending of map updates
Changelog
cl Goonstation Coders, Beestation, Extools devs
refactor: Explosions have been heavily optimized.
/cl
SS_BACKGROUND Conflicts with SS_TICKER and SS_NO_TICK_CHECK's behavior in certain ways. This fixes that breaking the mc.
SS_BACKGROUND has its own priority bracket that assumes that all remaining subsystems to run are also SS_BACKGROUND, allowing one of these to run when running SS_TICKER subsystems would cause the MC to assume all subsystems that run after it that tick were background subsystems, breaking the math of how much time to allocate the subsystem.
When delaying a run of a SS_NO_TICK_CHECK subsystem for lack of time, the MC will modify it's priority so it runs sooner next tick, if this happened on a background SS_NO_TICK_CHECK subsystem, it would update the wrong running total and desync the running total of the priority of all queued subsystem from the actual sum of those subsystem's priority.
Basic multiZ mob movement procs (Observers can always move)
Open space, showing what things are below it, and everything that entails. No complex support for dynamic generation just yet.
Decide how openspace should look :/
Atoms falling through open space (NO MOB SUPPORT/DAMAGE/ANYTHING YET.)
//CANCELLED FOR ANOTHER PR - [ ] Being able to see upwards? Downwards is going to be handled by open space.
MultiZ tile atmospherics - EDIT: Working demo! https://puu.sh/B7mUs/3f6274740f.mp4
Bugtest the heck out of this trainwreck.
* Moves TgsInitializationsComplete call to immediately after world/New()
* Subsystem PreInit data directory audit
* world/New data directory audit
* Needful here too
* Remove SS_NO_INIT from SStitle
* Don't create banlist.bdb for SQL banning
* Stop creating legacy notes file
* Moves iconCache from data to tmp
This is primarily a compatibility layer that enables both forward and backward compatibility for all past and future APIs based on the detected running TGS version. It also bundles all it's includes to make future upgrades not have to modify the dme, heck, could even use a submodule if it wanted (not happening). No other changes necessary.
There's an upcoming event system and new chat management functions. Check them out here: 303448457e/DMAPI/tgs.dm
Also added /datum/proc/CanProcCall()
* Adds test run
* Add OVERRIDE_LOG_DIRECTORY_PARAMETER
* Fails travis if a test run fails
* Fix travis looping
* Move the unit tests behind a define
* Fix various test run things
* Remove the DEBUG check because that's just you shooting yourself in the foot
* Adds readability spacing. Makes RunUnitTests a generic proc
* Remove unit tests
* Revert "all this wrapping and it's not even christmas (#33035)"
This reverts commit faaf151580.
* Revert "fuck me for forgetting to graph this one"
This reverts commit 45d7acea2f.
* Revert "defines math"
This reverts commit 2817a1737b.
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().
The logic behind this is that at higher populations, byond ends up needing to do more at the end of the tick to update clients, that the mc and traditional sleep timers end up fighting for a very small amount of time left.
Increasing the MC's sleep time means its wakes up sooner in the tick. So it has more time to do things, even if they don't happen as often, and leaving every other tick free allows for sleeping CHECK_TICK task to wake up without finding the MC left them very little time to do things.
Admins have been regularly manually doing this by varediting the processing variable to 2, that i figured we should automate it.
for /tg/, i plan on raising the player count a bit, but they make decent defaults for the avg server.
* Configuration datum refactor
* More WIP
* New easier on the eyes format
* More WIP
* Finished config.txt
* Fucktons more WIP
* The end of conversion draws near...
* Add all this shit
* Done converting entries finally
* Hunting down compile errors
* More WIP
* MORE CONVERSIONS
* More WIP
* More WIP
* Oh shit only 90 errors this time!
* IT COMPILES!!!
* Fixes world start runtimes
* Cleanup world/New
* Moves some things from OnReboot SS Shutdowns
* Move mode handling procs to ticker
* Moves delayed reboot to ticker
Cleans up round end sound setting
Splits round end animation between SStitle and SSticker
* Moves PR announcement to where it can use the define
* Clean this bit up
* Move out datacore Initialization
* Fix some stuff
* Fix this for
* Different PR
* Gives admins reboot options
* Make it smaller
* Fixes a bug where shuttles would not function
Okay, so Cyberboss walked me through this, I've tested it, and it fixes
shuttles working, it sets the master controller runlevel to 3, like it's
supposed to?
I don't really know that much about how this actually works internally.
But it does fix the bug.
* Compiling
* RIP softreset