* 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>
* Rework plumbing reaction chamber, purity support (#57071)
Currently does four things:
The reaction chamber now supports purity! It has a yellow (acid) and green (basic) input for buffers, aswell as a setting to automatically dispense either an acidic or alkalic buffer when above/below a certain pH! Now you can make a 100% pure meth factory! The buffer connects are on an alternate layer.
Probably going to be less loved, but I removed the reaction chambers ability to pick reagents from the net. Instead, it will pull untill a set volume is reached. Then it'll start reacting. While this means that players will have to be more creative and use a wider array of machinery.
Also new machine! Buffers! They fill the hole that reagent chambers left. They can be set with a threshold volume and will only start putting out chems when ALL of their neighbouring buffers also are also above this threshold. You might have a lot of one chem and have to wait for a more specialized chem to be produced, and with the cleverness of reaction chambers gone, bufferers can do just that: wait.
I also removed all but two layers. I want to make it obvious what layer the buffer connects are on. Also layers are basically unusable and I'm gonna give them a rework very soon. I'll put the things back in then when they actually have something to contribute
* Reworks plumbing reaction chamber, purity support
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* Moves grown food to newfood (#55040)
Moves grown food to newfood
Gives trash element support for callbacks for item creation override
* Moves grown food to newfood
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
* Fixes a few bugs with greyscale stacks. (#54858)
Fixes greyscale floor tiles merging regardless of their materials.
Fixes greyscale floor tiles voiding materials when splitting the stack.
Fixes greyscale floor tile stacks being created with no mats_per_unit and only enough custom materials for a single unit.
Fixes greyscale tile flooring being created with the wrong amount of materials.
Fixes greyscale tile flooring not producing floor tiles/producing floor tiles with 0 units.
* Fixes a few bugs with greyscale stacks.
Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
* Werewolves rejoice! (removes silver from the dispenser). (#54327)
* Werewolves rejoice! (removes silver from the dispenser).
Co-authored-by: Krysonism <49783092+Krysonism@users.noreply.github.com>
* Enforce preserving parent proc return values across ui_act call stacks (#53964)
All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
* Enforce preserving parent proc return values across ui_act call stacks
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities
* Review fixes
* Geiger counters cleanup
Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now
* Moved SS*_DT defines to subsystems.dm
* Rebase fix
* Redefined the SS*_DT defines to use the subsystem wait vars
* Implemented suggested changes by @AnturK
* Commented /datum/proc/process about the deltatime stuff
* Send delta_time as a process parameter instead of the defines
Also DTfied acid_processing
* Dtfied new acid component
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities
Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
* Converts everything to use setAnchored() + other fixes
* Fixed singulo debug
* singulo again
* forgot to move the vv_edit proc
* caught that this time :)
* changes
* Update code/game/atoms_movable.dm
Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
🆑
tweak: Ducts can now be hidden under tiles
code: tile hiding is now an element and way cooler and sexier
/🆑
Ducts can now be hidden under tiles
Plumbing machinery connects can now be hidden aswell
Plumbing can now also be properly mapped in without breaking anything
Plumbing component now uses the normal overlay systeem instead of being a weird exception
You can now add the /datum/element/undertile element to instantly make something hidable under tiles when appropriate.