* TGUI replaces Radial menu for Plumbing RCD (#71569)
**About the pull request**
Radial menu's replaced with TGUI window for all plumbing RCD's
https://user-images.githubusercontent.com/110812394/204481973-8f6d62c0-9288-4165-bce7-ee8bfec95bee.mp4
**Why it's good for the game**
**1. Faster Navigation**
- Old System: It had 3 radial menus'
->To select type of device to build
->To select the colour of fluid ducts
->To select the layer of devices
3 menus for one system makes navigation between them annoying for e.g.:
to create a red fluid duct of layer 5 you have to open all these 3 menus
& cycling through the radial menu by clicking the next button is time
consuming when you have a large number of items
- New System: with just one window open it's as simple as 3 clicks and
your done just like the RPD
**2. Always available**
- Old System: When you select an option inside a radial menu the menu
closes so you have to reopen it again to change a setting
- New System: open the window drag it to the side and it will always be
there for you
**3. Just easier for our eyes**
- Old System: Moving my eyes in a circle across the menu only to find
out i have to click Next and circle my eyes again honestly makes my head
spin
- New System: The menu options are small enough to be viewed all at once
& helps me see what I need more easily
**4. Consistency**
Both the RPD & plumbing all have similar concepts i.e., pipes, devices,
layers & colours it only makes sense they should have similar
interfaces. Also categorizing the items into tabs can help with
explaining what each item does
**Conclusion**
Just because the radial menu looks attractive shouldn't mean it must be
used everywhere, it only makes sense to use it when the number of
options of an item is small enough to be displayed on the screen all at
once for e.g., modules in a Mod suit. If the user has to click the next
button to cycle through the item's, it defeats the purpose of the radial
menu and makes the user work more to find his settings
**Side Note :** removed unused code in RapidPipeDispenser.js
**ChangeLog**
🆑
add: plumbing constructor TGUI, just like Rapid Pipe Dispensers
del: plumbing constructor radials
code: categories for each item
/🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@ hotmail.com>
* TGUI replaces Radial menu for Plumbing RCD
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@ hotmail.com>
* Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED
* modular RegisterSignals
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
* Plumbing Reagent UI changes & fixes (#71410)
**About the pull request**
3rd attempt cause the 1st
[PR](https://github.com/tgstation/tgstation/pull/71032) had way too many
problems and the 2nd
[PR](https://github.com/tgstation/tgstation/pull/71101) had merge
conflicts and became stale so fuck it delete those branches & try again.
1)For Plumbing the
- Chemical Reaction Chamber
- Chemical Filter
- As a side effect for Modifying Chemical Filter the BloodFilter also
now
Picks reagents from an input-list with a search bar attached at the
bottom
2)Fixes bug which prevented the user from entering new
values[temperature,acidic ph & alkaline ph] into the
ChemReactionChamber. They would be stuck at their defaults 300k,5,9
respectively even if you tried to enter new values it would reject those
new values. That's fixed now
https://user-images.githubusercontent.com/110812394/203076880-eb801c76-68ec-4470-8648-9239270fbcbc.mp4
**Why its good for the game**
1. Removes the need to type long reagent names manually by hand which is
error prone and time consuming
2. Allows you to change the ph & temp values for various reactions which
would have not been possible if not for this
**ChangeLog**
🆑
qol: Entering reagent names is much faster with zero errors
fix: You can enter new temp & ph values
/🆑
Co-authored-by: Time-Green <timkoster1@ hotmail.com>
* Plumbing Reagent UI changes & fixes[Take 3]
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@ hotmail.com>
* Completely refactors hallucinations, and also adds a few
* delete 5 old hallucination types that should have been removed
* Fixed old leftover tips conflicts
* Fixes all the leftover conflicts and otherwise broken code
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Adds lazyloading to the asset subsystems (#69454)
* Adds lazyloading to the asset subsystems
This currently applies only to spritesheets because of how monumentally
expensive they are.
If an asset is requested it will immediately be fully loaded, but
otherwise we slowly load them in with a separate subsystem.
This allows us to not hold up initialize with hair stuff. Saves roughly
33% (16 seconds with LOW_MEMORY_MODE) of initialize on my machine
My target is something closer to the 9 second init that had back in
2019, this is a good first step. Lets see how much more we can do yeah
lads?
Co-authored-by: san7890 <the@ san7890.com>
* Adds lazyloading to the asset subsystems
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
* Fix: Plumbing machinery handling and chemical press dispensing (#66039)
* Plumbing machinery fixes
* Using bitflag 'INTERACT_MACHINE_OFFLINE' instead of changing _machinery.dm
* Removed INTERACT_MACHINE_OFFLINE flag from limbgrower as it would have enabled powerless limbgrowing
* Fix: Plumbing machinery handling and chemical press dispensing
Co-authored-by: LordVollkorn <66637090+LordVollkorn@users.noreply.github.com>
* Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB (#64939)
* Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB
Co-authored-by: Tim <timothymtorres@gmail.com>
* Fix bottlers runtiming every second if input turf is empty (#64717)
Co-authored-by: Zonespace <41448081+Zonespace27@ users.noreply.github.com>
* Fix bottlers runtiming every second if input turf is empty
Co-authored-by: Gamer025 <33846895+Gamer025@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@ users.noreply.github.com>
* Patch icon choosing in the chem dispenser and chem press (#64137)
* patch style for chem master, chem press
* Patch icon choosing in the chem dispenser and chem press
Co-authored-by: Alex <sasichkamega@gmail.com>
* Gives a bunch of table sized and/or shaped things (#63964)
You can't reach over/around/through a whole bunch of objects that look small enough/low enough to imply that you can. This grants people the ability to do so.
Hydroponics trays look roughly table sized and shaped and you can't reach past them, which is irritating. Now you can, which is not.
Ditto for crates, the cooking grill, and the chaplain's altar.
Plumbing input/output/dev/null machines and chemical heaters take up maybe 1/4 of the turf and block attempts to reach past them. Being able to is less irritating.
* Gives a bunch of table sized and/or shaped things `LETPASSTHROW`
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* Fixes typos in span, other html elements (#63510)
Atomizes a much larger PR for another time...
There are typos in span and other html messages that causes them to not render correctly or at all.
Bug fixes
Converts those instances of span to use the macro
* Fixes typos in span, other html elements
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
* Fixed spelling of possession, separate, and cemetery (#63203)
Just fixes some spelling for gangs. I also fixed misspellings for "posession" to "possession". Fixed "seperate " to "Separate" Fixed "Cemetary" to "Cemetery"
* Fixed spelling of possession, Separate, and Cemetery
Co-authored-by: Doctor Pope <84367152+Dr-Pope@users.noreply.github.com>
* Adds some basic sanity to the plumbing bottler (#62823)
* Adds some basic sanity to the plumbing bottler
* Update code/modules/plumbing/plumbers/bottler.dm
Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>
* Update code/modules/plumbing/plumbers/bottler.dm
Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>
Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>
* Adds some basic sanity to the plumbing bottler
Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: Emmanuel S. <emmanuelssr@ gmail.com>
* removes double spaces before symbols (#62397)
This can apparently cause some bugs on occasions, so I thought I might as well try to kill them all.
* removes double spaces before symbols
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* grey to omni (#61292)
Swaps the default color of fluid ducts from "grey" to "omni."
Fluid ducts also read from the global list of pipe_paint_colors but were not updated when grey was changed to omni in #61162 (fef3629d11)
* Fixes "grey" fluid ducts.
Co-authored-by: sqnztb <zephyrthebreeze@gmail.com>
* Fixes GetComponents() returning a list with a null entry when there's no component of a given type (#61267)
Fixes GetComponents() returning a list with a null entry when there's no component of a given type
This can cause runtimes. The lists should only contains instances of a specific component type.
* Fixes GetComponents() returning a list with a null entry when there's no component of a given type
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Hypovials are printable via the chem-master
* Hypovials can now be made from factories
* There really isn't a reason for this to be in the autolathe any more.
* linters
fuck
* EVEN MORE HARDDEL FIXES (#60228)
Fixes a ton of harddels, sourced from #59996
I think this brings us down to like, ~100 per round from ~200, with only like 20 of those being proper hell failures. I've seen harddel profiles below 1 second of total cost. Feeling good.
See you on the other side
Makes the cryopod control computer into a weakref, never trust bee code
Converts brig door timer internal lists to weakrefs
Fixes a harddel caused by qdeling a motion sensitive camera after it had left its source area, jesus christ why didn't we do this already holy shit
Converts the radio implant ref held by the antenna mutation to weakrefs because it isn't reliably cleaned up, makes the radio implant actually qdel its fucking radio
Removes the target var from the throwing datum, it does literally nothing and just exists to cause harddels, mostly for the singularity
Fixes a cable harddel sourced from things that try to enter blueprints after smoothing, but before roundstart. IE, shuttles. Removes shuttles from the blueprints
Fixes emmisive blockers being added post qdel
Removes some manual ghosting from cryopods, I initially did this for harddel reasons, but I figured out a better fix for that. I'm now doing it because it's got this really strange logic for like "re-entering the game" that doesn't actually link to what the ghostize proc does. We should remove this at some point
Fixes robot hud objects harddeling due to hanging refs
Fixes buildmode related hanging refs, I'm coming for you admin team
Fixes a few instances of trying to add the forensics component post qdel, hhhhhhhhhhh
Fixes some split personality harddels/weirdness
Replaces a use of disconnect_duct with an init qdel hint, I suspect there's more issues with duct harddels, I've seen some odd logs about ahhh the area_contents list, but we can worry about that later
Makes teleporter targets into weakrefs, properly types them as /atom
Makes frequency devices into weakrefs
Makes cameras remove themselves from camera nets on Destroy
Makes tgui ui datums implement destroy, this means if I ever see one hang a ref to user or whatever, I know there's an error with calling close() properly. I've seen this harddel once, but not after this change so I assume there was some error with close(). IDK maybe this is a papering over? Would have to ask @ stylemistake
I've seen logs of beartraps being in world post del, putting a return there just in case. The same is true of nerf darts, but I haven't really looked into that yet
Makes a shoe's ref to untying alerts a weakref, yes this is needed.
Moves clearing client_in_contents to the Login of the new mob. This prevents doing things like ghosting someone before a mob qdel causing harddels
Fixes a harddel set sourced from adding a status effect to a qdeleted thing. Is this an error? I'm honestly not sure.
Converts bsa code to weakrefs
Converts the partner var of heat exchangers to weakrefs
Converts camera assemblies to weakrefs
Fixes some dumb behavior with ammo casings and assuming you'll be on a turf post Destroy parent call
Fixes? merger related harddels, you were never cleared from your own members list, so origin objects would end up making a new list, creating harddels. Potential input from @ ninjanomnom about the logic
Chasms store a static list of "falling atoms", which only exists for chasms that go somewhere else. This list wasn't being cleared of qdeleted objects, which is what happens when you fall in most chasms. Fixes this, and converts the list to weakrefs.
Fixes some runtimes in both sheet code, and the weather listener element. This is here because runtime spam made testing more of a pain, didn't think it needed its own pr
Fixes colorful reagent harddels sourced from reagents that were qdel'd before roundstart. I'm only like 50% sure this actually got it, but the issue may have been solved by #60174, so eh
Turns the nuke op antag datum's ref to the war button into a weakref
Fixes some holopad code that was not nulling refs all the time
Converts camera bugs to weakrefs, this was the result of the bug being "reworked" like 6 years back without taking the existing ref clearing into account. Whole item needs a redo, but this'll do for now.
Ensures that the both pulling and pullee refs are cleared on Destroy
The crew monitor held all users in a non clearing list, makes that list a weakref because I hate everything
Oh and I removed all sources of gas_mixture qdeletion, I'm kinda unsure on this since it's not technically supported, but any harddels from it might? indicate something going wrong with like, gas passing logic. I'd like @ MrStonedOne's thoughts, since I trust him to call me an idiot if I'm wrong.
<!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. -->
## Why it's not good for the game
I crashed sybil like 10 times to get this data, I'm gonna put it to good use. Don't think you're safe sybilites, I'm coming for you.
* EVEN MORE HARDDEL FIXES
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Modifies right click logic so that it is not the same priority as modifier keys. (#59656)
Strips out the existing right click code - Due to the myriad of ways right clicking has been implemented, dedicated signals and procs for right clicking without modifiers are fundamentally incompatible with our system of primary and secondary attacks.
Adds additional signals to attacking code. These signals allow atoms to cancel the attack chain early on secondary attacks, or override the standard procs and not send signals to prevent any undesired behaviour from signal handlers.
Items that used RightClick procs have been converted to attack_hand_secondary.
The slaughter demon, having its own set of snowflake code as poor OOP principles have been applied in UnarmedAttack() procs with lacking calls to parent procs and arbitrary redefinition of behaviour, checks for a right click in its own UnarmedAttack() and performs a bodyslam off that.
Storage components now hijack the secondary attackby stage via signals to handle their opening and closing shortcuts on right click. When you right click a storage component equipped item with an object in your active hand, the object has an opportunity to perform its logic in pre secondary attack code and cancel the attack chain. If it does not cancel the attack chain in pre-attack, then the storage component takes over for attackby and, if possible, opens the relevant inventory and ends the attack chain.
The forensic scanner is a proof-of-concept of this working in action. With its scan logic moved from afterattack code to pre attack code for right clicking, right clicking with the scanner will now perform a scan where previously one was impossible. Left clicking still does what it always does - Scans at the very end of the attack chain.
The logic still isn't perfect - For example, you still can't attack containers in melee even in combat mode (you'll either open them or put your weapon into them regardless of which option you choose) - But this is a better setup overall which allows for items to at least override this behaviour in pre-attack if needed.
* Modifies right click logic so that it is not the same priority as modifier keys.
* a
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Makes turfs persist their signals, uses this to optimize connect_loc (#59608)
* Makes turfs persist signals
* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear
* Converts all uses of connect_loc over to the new patterns
* Adds some comments, actually makes turfs persist signals
* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work
* bro fuck documentation
* Changes from a var to a proc, prevents admemems and idiots
* Extra detail on why we do the copy post qdel
* Makes turfs persist their signals, uses this to optimize connect_loc
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* use SIGNAL_HANDLER REEEEEE (#59242)
makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did
* USE SIGNAL_HANDLER REEEEEE
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Fix issue where Plumbing Reaction Chambers can get stuck filling (#59131)
About The Pull Request
This Pull Requests aims to fix the issue #58993 by changing two parts of the logic I've seen the chambers get stuck on.
Chamber gets stuck requesting a unit that is always rounded down to 0
Chamber gets stuck requesting an insanely small number that gets eaten by float math
Part 1 Explanation
Take the example where a chamber is trying to request one unit of chemical from three synthesizers. A chamber will divide it's request amongst all suppliers who can satisfy it. In this case, 1 / 3 becomes asking each synthesizer for 0.33 (due to rounding). After one update, the chamber has 0.99 of the chemical, not 1. On the second update, it then requires 0.01 of the chemical and asks each chamber for 0.0033, which gets rounded down to 0. This means the chamber NEVER fills as it spends every update cycle doing the same logic and trying to transfer in parts of 0 in size.
This has been fixed by changing it from flat dividing the amount required by the number of suppliers to a more dynamic approach that looks at the target volume and how many requests it needs to make. This mean that instead of asking for 0.33 three times in the above example, it actually works out more to asking for 0.33 then 0.34 then 0.33. Meaning it gets the whole 1 it wanted in the first update, fixing the issue.
Part 2 Explanation
Even with the above fix, when working with the right numbers, floats do not add as expected. Take the above example. I lied. 1/3 as a float is NOT 0.33. 0.33 does not exist as a float, so the actual closest value is 0.32999998, which is what the code will use, even when rounding to 0.01. What this causes is, in some scenarios, chambers getting incredibly close to their target volume but never being able to actually reach it because currentVolume + missingAmount comes out as just currentVolume, due to the insanely small float that it's missing having no impact on the larger float when added together. Again, this is due to how floats work.
So to avoid a chamber getting stuck on 98.9999999998 when it needs 99, I'm adding the CHEMICAL_QUANTISATION_LEVEL constant (used elsewhere for similar issues) to the chamber's volume when checking if it has enough. This way, the chamber will exit the filling mode even though it was short by a tiny fraction. These discrepancies seem to get handled anyway in the actual reaction code so I haven't seen any changes/problems to my outputs. For all intents and purposes, 98.9999999998 is 99 in float arithmetic when rounding as we do.
Why It's Good For The Game
Fixes an incredibly annoying issue that plagues chemistry automation. Machines, in many scenarios, currently get stuck when they shouldn't. This means a chemist has to actively keep monitoring all their machines and then do some investigation when suddenly something stops. Eventually finding the problem chamber that is stuck on "Filling" and then plungering it. Not all Chemists know of this either and just assume it's something they have done or that it's just broken and unaware how to fix it.
Now a Chemist can move on to automating more or helping elsewhere rather than babysitting their setups.
Changelog
cl
fix: fixed issue where plumbing Reaction Chambers get stuck on "Filling"
/cl
* Fix issue where Plumbing Reaction Chambers can get stuck filling
Co-authored-by: mGuv <mguv.dev@gmail.com>
* Fixes big roundstart ductnets breaking world init (#58659)
closes: #58623 (Having two stationary plumbing tanks connected broke the map)
you can now map infinitely huge plumbing networks
Byond mistakes big chains of connecting ducts for an infinite loops, so when a lot of ducts (about 60) initialize at once and chain connect, byond kills the worldtick.
Plumbing already had an internal duct limit of about 800~ ducts, which has now finally been fixed aswell. The plumbing subsystem (SSfluids, I need to rename this shit) tells one duct to start connecting and uses the timer subsystem to call them one by one.
* Fixes big roundstart ductnets breaking world init
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc
* WHEW THAT WAS EASY
* Update ammo.dm
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Refactors Reaction Chamber Code (jesus christ it was so bad), Fixes bugs with it too (#58709)
fixes#58574 (Adding a reagent to the reaction chamber increase the UI width beyond the size of the window)
Adds in a new reaction chamber panel, looks nice, ya did a good job
* Refactors Reaction Chamber Code (jesus christ it was so bad), Fixes bugs with it too
Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
* Deletes recipient_reagents_holder on del (#57767)
* Deletes recipient_reagents_holder on del
* Cleans up recipient refs when recipient dels
* no one saw that
* Makes plumbing listen to component signal for finishing
* Unregisters enable call
* Deletes recipient_reagents_holder on del
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* Adds a plumbing layer manifold (#57494)
Adds a multilayer plumbing manifold, I also murdered the multilayer duct
You can now alt-click the plumbing RCD to change the layer it prints. I made a whole thing where right clicking changed the settings and you could use that to change machinery aswell. I even did that with the plunger, it was absolutely beautiful. Anyway that drained the life out of me because apparently there's no attack_obj_secondary and afterattack_secondary ALSO called attack_obj (left click). I just hate whoever made it with intensity
Plumbing now uses three layers. They should be easier to navigate. I tried to make layer connecting the same as cross-color connecting, but that would take more of my soul then there is to take
* Adds a plumbing layer manifold
Co-authored-by: Time-Green <timkoster1@hotmail.com>