Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm
We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.
There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.
Hi codeowners!
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
This PR adds station traits which are essentially small changes to a normal round that can be used to create small variations in how a round might play out, sometimes there might be only one, very simple trait, but you might have a round where they have a somewhat bigger impact, to make rounds feel slightly more different from each other.
The following traits have been added:
Positive:
Lucky winner - Free pizza and beer every 6-12 minutes
Galactic Grant - Larger starting funds for cargo
Premium internals boxes - emergency box has flare + radio as bonus
Bountiful bounties - Bounties pay 20% more
Strong supply lines - Imports 20% cheaper
Filled maint - More loot in maint
Fast shuttle - Cargo shuttle is faster
Free scarves - Free scarfs if a slot is free
Neutral:
Bananium shipment - Clown starts with 5 sheets of bananium (Neutral because this helps noone but the clown)
Unnatural atmosphere - Lava planet can get more restricted gasses
Unique AI - Random lawset at roundstart for AI
Ian adventure - Ian teleports to a random spot on the station
Glitched PDAs - PDA's have a different beep
Announcer intern - Changes the announcement messages to sound like they're from an intern at Centcom
Negative:
Carp infestation - Carp event is more common and can start earlier
Weak supply lines - Imports 20% more expensive
Blackout - Station lights are partially broken around the station
Empty maint - Less loot in maint
Overflow bureacracy mistake - Random overflow job (From a vetted list)
Late Arrivals - Everyone starts in arrivals
Random spawns - Random spawn location (by drop pod)
Slow shuttle - Cargo shuttle is slower
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: coiax <yellowbounder@gmail.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>
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
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
The malformed logic here kept the mc from running all ticker subsystems first, (a functionality that i'm not even sure we need to preserve, as long as we update the docs, thoughts?)
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.
* updated robocop.mp3 quality
* hurr durr im appveryor and im of low mental capacity, to the extent that a certain r word would be frequently used to describe me
* using original file that is potentially better quality while being a tiny amount smaller.
* Reorganize the mapping code
* Finish this up
* Reee line endings
* FUCKING LINE ENDINGS
* LINARU ENDARU
* >PLS SET REPO LINE ENDINGS
* Comments
* Hoisted by my own travis.yml changes
* Ports paradise error handler, with in game runtime viewer!
* Changes to the old runtime error and removes inerror reference
* Oops
* Adds a wrapper for world.log so it displays both in the runtime diary and in DD window
Originally I wanted to just say that such a thing is unsupported, but since byond can just randomly decide to insert a bunch of sleeps into a loop, I can't make that requirement on subsystems, so its now supported.
Basically, they key difference between StonedMC and CarnMC is that when multiple ticks want to run at the same byond tick, we divvy up the tick between the subsystems, rather then allow one subsystem to hog it all.
The key difference between StonedMC and GoonPS is that we allow the subsystems to tell us how to divvy up the tick using flags and priority.
The new SS_ flags allows us to select behaviors that used to be piggybacked as side effects of dynamic wait or default but sometimes unneeded behavior.
Dynamic wait is 100% gone, lower priority and SS_BACKGROUND are better more refined ways of doing this when combined with MC_TICK_CHECK
I have by design never looked at the inners of goonPS, so this is all original code but I know it uses two loops because of comments by goon devs on reddit threads, that design didn't make sense before, but when I can tell a SS how much of a byond tick it is allowed to have, knowing how many need to run this tick is helpful I also know a bit more about how it works from piecing together comments in #vgstation.
Detailed list of changes:
Subsystems now have flags, allowing fine grain control over things like rather or not it processes, inits, rather it's wait is how long between runs (post run timing) or how long between starts, and rather or not late fires should cause the next fire to be earlier.
Mc now has two loops One loop handles queuing shit, one loop handles running shit.
MC now splits up tick allotment rather than first come first serve Subsystems can even request a bigger share using higher priorities. (It will even resume subsystems it paused if other subsystems hadn't used as much as it predicted they might need)
Default fps is now 20 This is related enough to the MC and it's a change that's really long since over due
All code oddities are most likely to be necessities to lower overhead on the mc since it runs every tick