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>
https://cdn.discordapp.com/attachments/326831214667235328/740812723956482118/2020-08-06_02-04-14.mp4
For everything in this PR working at the same time, watch this video!
Alright, from the top:
Sinks now need plumbing to pump out liquids.
All sinks now has a demand-only plumbing pipe face the opposite direction of the sink itself. A standard iron sink will hold 100 units of water, and must be constructed from a sink frame. To complete the frame, a new stock part, the water recycler must be applied to the frame. Once the sink is constructed, it will only hold those 100 units of water until new water is piped in.
This however doesn't extend just to water, as a result. Any reagent can be piped into the sink, and will be used 5 units at a time per use. This means water isn't just an infinite resource, and will need to be resupplied to the station if, somehow, you're using a metric ton of water somehow.
image
A basic sink setup with water being plumbed in.
Showers now need plumbing to wash you off.
Want to dispense reagents faster on your Patients Victims Friends Coworkers? Well, you may also construct a shower frame, in a similar fashion to a sink frame, and pipe in your own reagents into the loop. The shower drains reagents much faster than the shower, and also preforms vapor and touch reagent reactions, resulting in a constant stream of chemicals being processed. This can lead to horrible situations, like a chemical heater hooked up to a vat of cooking oil being pumped into a shower.
Additionally, showers will display the reagents they're pumping out visually based on the color of their chemical contents. As a result, dangerous or unique showers are going to look noticeably different if their contents are dangerous looking.
image
A safe shower.
image
A very unsafe shower.
Wait what was that bit about cooking oil?
So, reagent dispensers, like water/fuel tanks, Virus Food, Cooking Oil Vats, Pepperspray, and the like, can now be converted into a stationary tank of reagents by using a sheet of metal on it, allowing it to behave as a simple supply of their respective contents, and can be pumped into a plumbing network. This means rolling water tanks can be used to resupply sinks and showers, as well as allow for inventive uses of otherwise unused chemicals located all around the station. Pump welding fuel into a resupply line to fight a blob! Pump pepper spray into the dorms showers! Create a deep fryer shower! The possibilities are LIMITED (Because we have very few reagent dispensers)! Still, this will prevent sinks and showers from being completely unfix-able should all the water run out, as cargo can purchase many of these chemical tanks at will.
Hydroponics is now also plumbing enabled.
So there I was, thinking, have I gone mad? Is the barking I hear in my noggin my own dogs rattling and raging against the eternal ocean tide, or are these the hounds of tindalos come to finally rip me to shreds within the sea of causality?
The answer to this is quite simple: I added plumbing simple-demand components to hydroponics.
Now, the trays will accept a pumping input, which can provide the plants themselves a reagent input for their nutrients, and SHOULD (current not fixed yet) also contribute to refilling the trays water. As a check to this horrible decision, there are very few plumbing chems that don't suffer from some kind of downside if exclusively pumped into the trays, so this should be done delicately and with forethought applied, or you'll have a row of plants with dead stats because they OD'd on ammonia.
image
Holy damn why are you doing this
I'm thinking this pr is probably in need of some serious trimming and will probably be closed as a result of the need to atomize this down, but this way I can start to get some feedback and ideas on which aspects would be better suited towards the current design direction of plumbing/bio-chem/reagent heavy jobs. As far as I'm aware, this is all in accordance with the relevant design docs, but this way I'll know for sure 🤷♂️
To-do before being 100% sparkly and clean
Fix hydroponics trays adding water to the nutrient reagents slot (NOT A TRUE FIX, SEE COMMENTS BELOW PLEASE)
Make disconnected sinks/showers slowly regenerate water so that a stationwide plumbing net isn't required so Anturk doesn't snap my kneecaps off
Make water/fuel tanks use their snowflaked stationary tank sprites instead of the custom overlay version
Yeet out the existing psudo-plumbing from hydroponics
Why It's Good For The Game
We've discussed adding plumbing into the game for forever now, and with all the new and tangentally related plumbing content we have, almost everything we have now perfectly enables servers to properly create a station-wide plumbing network.
Sinks and showers provide an infinite supply of water all shift long, and since they can be produced with any material, anywhere, practically for free, that was the first and foremost reason why I made this PR, to make water slightly more precious on station, to justify the 20+ water tanks mapped across every station. Plus, no more meatsink spam in the middle of the hallways.
Hydroponics has a built in feature that was intended to work similar to plumbing, before we had plumbing, for sharing resources/water, but it was pretty rough and is still exceptionally difficult to make look very pretty on live servers. By integrating them with actual plumbing pipes, this enables one step closer to integrating chemistry and botany to merge going forward, and give them an incentive to include each other in their supply chains each shift.
On the reagent tank conversion, That's just an interesting feature I felt the need for while testing everything else, and found pretty great success in. Being able to pipe in large supplies of a single reagent that ordinarily would just sit on a wall or in mait somewhere proved extra useful, and would be beneficial for refilling plumbing heavy areas like bathrooms/medbay, etc.
Automatic glide size adjustment based on move delay.
Essentially a port of https://github.com/yogstation13/Yogstation/pull/8132 but that was mostly my code with some fixes.
Why again? well it turns out the recent byond fixes to glide size actually worked and solved the issues that were unsolvable.
https://file.house/0B3u.mp4
Glide size no longer incorrectly scales at fps, so it works as intended at any framerate with the only stuttering being normal byond suck stuttering.
Price inflation is now based upon averages, and is now uncapped from 5.
Civilian budget is no longer the worst budget to pay out from.
Medical Civilian bounties are no longer chees-able in seconds.
* I'll pick this up later because it's going to need a UI with keyed lists
* Updated market crash and average inflation values.
* Alright, I'm confident now.
* Make the market crash end at the beginning of the event end
* And on the 2nd day, the lord spoke, "Compile"
* Division by zero protection.
* That should have been a max, smhing my smhead
Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.
Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.
This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.
To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.
Requested by @optimumtact.
Changelog
cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl
This pull request upgrades Yarn to version 2 (also known as Yarn Berry).
* Update build validator
* Provide inferno in the root level package
* Remove type module from package.json
* Powershell build script
This PR changes the message pipeline a little bit to support list-based messages, which can be annotated with custom data. Function signature of to_chat was slightly changed as well:
// Plain text message
to_chat(client,
type = MESSAGE_TYPE_INFO,
text = "foo")
// HTML message
to_chat(client,
type = MESSAGE_TYPE_INFO,
html = "<span class='notice'>foo</span>")
Old to_chat format is still supported, but handle_whitespace, trailing_newline and confidential flags have no effect. confidential flag could still be revived though, if there is enough merit in it, for example to filter out confidential messages when saving a chat log.
The reason for using /list and not /datum, is because lists are plain faster, and there are minimal data transformations - these lists are fed directly to json_encode and sent to tgchat.
Plain text messages do not need to be HTML-escaped, which makes them safer and more performant than HTML messages. Plain text messages can be made interactive (or formatted with CSS) by custom-handling them in javscript based on message type and annotations.
It would be impossible to annotate every single message in the game (at the moment of writing, there are 9447 to_chat calls in the code), but it could be done selectively, for only those messages that are hard to classify by span classes (and there are still A LOT of them).
Please annotate more messages. Thank you.
Fixes#52943Fixes#52908Fixes#52816
Changelog
cl
add: tgchat: Unread message count is now smarter and won't increase on other tabs if you have already read the same message in the active tab.
add: tgchat: Admin PMs are now properly annotated and can be filtered into separate tabs.
fix: tgchat: Fix: Highlighted message overlay no longer blocks clicks. Clicking a highlighted (F) link should work as it should.
fix: tgui: Fixed NTOS bluescreen due to calling .includes() on a stylesheet href which could be null on certain browsers.
code: tgchat: Chat schema bumped to version 5. All chat-related settings were reset to avoid breakage.
/cl
Replaces goonchat with a tgui based chat panel
Fixes#52898Fixes#52663
It is as fast as goonchat was (if not faster in certain circumstances), and is very extensible. It has all the necessary code for sorting messages into categories, which means that one of the next features will be multiple tab support.
Additional features that you will get with tgchat right now:
Massively faster server-side performance compared to goonchat, especially if batching multiple messages to one client.
Message persistence across rounds and reconnects. (All messages are stored client-side in IndexedDB)
More robust scroll tracking. If you scroll up, it will not change the scroll position on new messages like goonchat did.
Multiple message combining. (Currently set to combine up to 5 messages over last 5 seconds).
If using the highlighting feature, it highlights the whole message as well as the matching word.
"Now playing" widget, with preview of the song title, a knob for adjusting the volume and a stop button.
Architecture is as following:
```
to_chat() -+
|
SSchat
(queue, batching)
|
window.send_message()
|
v
+-------------+
| tgui-panel |
|+-----------+|
|| tgchat ||
|+-----------+|
+-------------+
```
Subsystem is basically goonchat, but without all the garbage that slows the servers down (string concatenation, double urlencoding, sanitizing, etc). Now, instead of all that, it's being slowed down by json_encode in /datum/tgui_window/proc/send_message, which IMO is completely worth it, and allows sending various templates and widgets to tgchat.
/datum/tgui_window abstracts the whole window away from you, establishes a nice message-passing interface between DM and JS, with two message queues on each side, automatically loads js/css assets for you, basically does everything. You as a developer only have to worry about sending/receiving messages and write javascript.
tgui-panel is a slimmed down version of tgui, and functions as a container for various widgets, and tgchat is one of them. It of course can be expanded with more stuff.
It's also a separate entry point and a JS bundle, so it's not bloating the main tgui bundle, and is currently sitting at about 230kB.
Lazy list macros weren't being used properly.
Did a bit of code cleaning as well.
Runtime:
[17:39:46] Runtime in parallax.dm, line 43: type mismatch: null -= Sukie Braun (/mob/dead/observer)
proc name: fire (/datum/controller/subsystem/parallax/fire)
src: Parallax (/datum/controller/subsystem/parallax)
call stack:
Parallax (/datum/controller/subsystem/parallax): fire(0)
Parallax (/datum/controller/subsystem/parallax): ignite(0)
Master (/datum/controller/master): RunQueue()
Master (/datum/controller/master): Loop()
Master (/datum/controller/master): StartProcessing(0)
bitflag list construct added: an associative list of bitflags for cheap and quick element comparison between two lists using the same system.
canSmoothWith list turned into a bitflag list.
smoothing_groups list added to substitute the type path list.
smoothing procs turned into atom procs, refactored and optimized a bit.
smooth directions redefined in order to fit in 8 bits for a future smoothing system
some variable names changed, foreseeing a second smoothing system
SMOOTH_OBJ flag added, for things that need to scan turfs for smoothing. The old locate() optimization has the risk of returning false negatives by finding a child and returning null while there might be one of the wanted type as well, as it doesn't match the type exactly.
SMOOTH_TRUE and SMOOTH_MORE condensed into SMOOTH_CORNERS. The old behavior can be replicated using smoothing groups without loss.
Does very minor code cleanup.
Processing-wise didn't find a noticeable difference. The system loses on init a bit by setting the bitflag_lists, and by scanning whole turf contents for object smoothing (increasing accuracy), and gains by making less checks per target to smooth, through the same bitflag_lists.
Memory-wise there should be a small improvement, given that on the old system we had 63512 canSmoothWith lists (a few typelists, most unique), and on this new system canSmoothWith + smoothing_groups are both bitflag_lists from the same pool, totaling 46 in number.
Could be tested a bit to see if I missed any icons not properly smoothing.
* The profiler now starts earlier into the init process.
Also documents the init pipeline and order in world/New()'s codedoc.
* better early profiler
* NEWMAN!
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
-bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot
-Unused vars
-Fixed a var pretending to be a fake bool
-Probably more
* Makes pad fireproof and makes machines spam less
* Update code/game/machinery/civilian_bountys.dm
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
* Adds an atmos debugging tool and excited group visualizer
* rebuild moment
* yarn install -> yarn run build
* Sigh
* Fixed UI, did not test, needs a rebuild.
* Proper flexing
* Adds varied colors, improved ui courtusy of stylemistake:
* Fixes a runtime, updates tgui
* added superconductors, cleaned up some shitcode, removed a clashing color
* Woop
* Speed
* rebuild
* Adds a tick count
* begone auto-update
* color defines
* rebuild moment
* color improvements, fixes updating
* adds another preprocesser define to handle showing max shares in the ui
* test of application system?
* patches up some display issues, allows for smooth flowing from one group to another
* overlay-ified
* client testing
* dmi moment
* plane master
* it fucking works
* size change
* passthrough
* rebuild moment
* adresses review concerns, toggles active turf vis on when testing
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
* temp
* cleanup
* more
* Revert "more"
This reverts commit 8707bfe75d.
* less is better
* some documentation
* almost there
* we did it
* words
* better words
* Update code/controllers/subsystem/timer.dm
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Update code/controllers/subsystem/timer.dm
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* whitespace
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
* Cleans up some unused procs and makes is_blocked_turf a turf proc.
* Update code/game/turfs/turf.dm
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
A lot of issues happen when the tick overruns due to less important and more expensive subsystems. If timer is not ran or breaks, a lot of stuff breaks.
* pierce the heavens
* starts doing projs
* continue pierce
* before armor
* before sharpness redefine
* rename sharp defines, before further implementation
* finishing undoing atk_type back to sharpness
* neatens up sharpness defines, FALSE -> SHARP_NONE
* more piercing, removes brute damage bleed, bubblegum no longer wound
* starts letting embeds get in on the fun
* half with embed
* work on dismembering
* continued embed work
* more moving bandaging to limbs
* more dismemberment work
* removing embed pierce stuff
* tweaking bullets
* more docs and work on dismemberment
* spans, piercing, guns
* dismemberment and scar fixes
* bee changes
* bullets embedding
* more bullet and dismember work
* dismemberment, surgery, piercing, formaldehyde,
* pleases travis
* pierce smite
* nicer on blood
* Auto stash before rebase of "tgstation/master"
* more neatening
* wounds only consider up to 35 damage, wounds on l6 and 762
* updates hulk
* balance
* defines
* lower slug to 50 brute to accommodate wounds
* adds differentiation for having flesh/bones/both in mobs
* moves scar descs to json, renames organic_state
* excises removed healing skill
* fixes logs, inconsistencies, some balance changes
* untab
* slight compress
* a
* kills pointed global list
* dmdoc
* halfway through roh
* finishes roh review
* okay NOW i finished roh's reviews
* roh roh roh your boat
* gently down the stream
* global lists
* list ops, fix scanner for bone gel improvised fix
* travis moment
* sounds added and moved
* pellet clouds can join the fun fully, slight gun balancing for wounds
* doc moment
* unconflicts myself
* update hulk
* Update code/_onclick/item_attack.dm
Co-authored-by: Rohesie <rohesie@gmail.com>
* crying ascii face
* final rohview
* oops
* final final
Co-authored-by: Rohesie <rohesie@gmail.com>