* Add test for two chemistry issues
1. rounding issue with reaction processing when making chloral hydrate
2. reliable assert trip due to the ValidateSolution() heat capacity issue.
* Fix FixedPoint2 arithmetic
Fix internal floating point arithmetic in places where it could be avoided.
Fix incorrect rounding mode used in other places (it should always floor, like regular int arithmetic).
I had to add an explicit epsilon value for float -> FixedPoint2 because something like 1.05 is actually like 1.04999 and that'd cause it to be rounded down to 1.04.
This fixes reaction reagent processing in cases where the reagent inputs can't cleanly divide. Previously, when making 30u chloral hydrate by adding the chlorine in 10u increments you'd end up with 0.04 chlorine left over. This was caused by division in the reaction code rounding up in some cases. Changing division here to always round down fixes it.
* Attempt to fix heat capacity precision assert issues.
Fixes#22126
First, we just increase the tolerance of the assert. It was way too low.
Second, actually put a cap on float drift from one-off _heatCapacity changes.
* Fix float -> FixedPoint2 epsilon for negative number, fix tests.
* Fix DamageableTest
* Oh yeah I need to call CleanReturnAsync
Change the slot ID back to what it was to keep old map saves with an item in the slot loading correctly.
This also fixes the "You can't put this in the dispenser!" message not appearing when inserting an item without FitsInDispenserComponent because the whitelisted slot name wasn't changed.
* Add limited-reagent dispensers
* Add empty versions for all dispensers
* Fix lint
* Set initial window size so all buttons are visible
* Simplify logic, add parenthesis
* Use localized name for initial labels
* Adjust button style
* Avoid touching items before MapInit
* Remove pre-labeling
* Reduce diff
* Clean up YAML
* Fix test
* Really fix test
* Document
* Adjust based on review
* Add labels for obnoxiously long bottles
---------
Co-authored-by: AWF <you@example.com>
* Creates Content.Shared.Chemistry.Solutions
Copies Solution class to new namespace
Obsoletes old Solution class
* Switches over to the Solutions.Solution Solution
* Creates Content.Shared.Chemistry.Containers
Copies relevant components/systems to the new namespace
Obsoletes old versions
* Switches over to the Containers.XYZ namespace
* Creates SolutionSystem and obsoletes old SolutionContainerSystem methods
* Start using SolutionSystem for Solution manipulation
* EnumerateSolutions
* Move TryGetMixableSolution
* Move EnsureSolution to Server
* Create Solution Entities
* Stop using obsolete solution system methods
* Fix prototype component tests
* Add using ..Audio.Systems; back
* Wrap solution container slots in ContainerSlots
* Actually add the slot to the solution container map
* Dirty SolutionContainerComponent when ensuring solutions
* Revert namespace changes
* Remerge SolutionSystem and SolutionContainerSystem
* SolutionContainerManagerComponent refactor
* Avoid wrapping necessary code in DebugTools.Assert as it is removed when compiling for release
* Readd examine reagent sorting
* Fix errors
* Poke tests
* Fix solution names not being applied
* Fix WoolyComponent including statement
* Fix merge skew
* Fix compile errors
* Make reactions use solntities
* Reindent solution class namespace
* Field attribute changes
* AutoGenerateComponentState for SolutionContainerComponent
* SolutionContainerComponent -> ContainedSolutionComponent
* ref ReactionAttemptEvent
* Denetwork preinit solutions
* Misc 1
* Nullable TryGetSolution out vars
* Cache associated solutions
* Fix merge skew
* Use explicit regions in SharedSolutionContainerSystem.Capabilities
* Add debug assert
* Use explicit regions in SharedSolutionContainerSystem.Relay + ref SolutionContainerChangedEvent
* ContainedSolutionComponent.Name -> ContainedSolutionComponent.ContainerName
* SolutionComponent doc comments
* Implicit DataField names and property purge
* ReagentEffect DataField names
* Local variables for readability
* Sort using statements + Entity<T> event handlers
* Fix compile erros
* Fix compile errors
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
* everything for mixing aside from yaml changes
* add recipe and canmix to bottles and the holy mixer tag to the bible
* fixes as a result of testing
* remove unused usings
* remove emptylines that are not required
Co-authored-by: 0x6273 <0x40@keemail.me>
* more empty line removal!
Co-authored-by: 0x6273 <0x40@keemail.me>
* add single space between if statement and condition
Co-authored-by: 0x6273 <0x40@keemail.me>
* fixes indentation on TryGetMixableSolution
* raise new AfterMixingEvent after attempting to mix a solution
* before mixing event and attempt get mixable solution event
* update reaction tests to be a beaker that can be mixed, and then pass a mixer component in to simulate mixing
* make two more beaker types mixable, add attribute for mixing feedback
* bible mix message
* mixing feedback on success
* updates test to use SpawnEntity over new as per feedback
Co-authored-by: 0x6273 <0x40@keemail.me>
* Fix a bunch of warnings
Also made ensnareable not broadcast as they're only used directed.
Mainly just Get<T> and AppearanceSystem
* buckle too
* fix tests
Co-authored-by: wrexbe <wrexbe@protonmail.com>
* Add test pooling
* WIP test pooling changes
* Fix Destructible tests
* Don't pool unpooled or dummy ticker instances
* Change ServerPathfindingDebugSystem to replace existing entries
* Fix SaveLoadSaveTest comment
* Don't pool StartTest
* Comment out global setup
* Fix puddle tests
* Move SolarPanelComponent initialize to PowerSolarSystem OnMapInit
* Update RobustToolbox
* Finish fixing tests, make test threads background threads
* Bring back pooling
* Fix nullable
* Update RobustToolbox
* Set cvars on server return
* Un-pool tests with custom cvars
* Update RobustToolbox
* Update RobustToolbox
* Change where the main tile coordinates are
* Remove DisposalUnitTest grid check
* Fix test pooling being a fickle bitch
* Fix EntitySystemExtensionsTest
* Update RobustToolbox
* Update RobustToolbox
* Make nullable pool settings true
* Update RobustToolbox
* Wait other way around
* We are unitystation now
* Update RobustToolbox
* Create global setup
* Pool some more tests
* Fix not properly disconnecting clients before restarting the round
* Give more info on ran tests
* Standardize default test cvars
* Update RobustToolbox
* Update RobustToolbox
* Pool clients
* Fix test order issue
* Fix cvars in character creation test not being set properly
* Update RobustToolbox
* Update RobustToolbox
* Rider shut
* Update RobustToolbox
* Format tests ran better
* Update RobustToolbox
* Reset RobustToolbox
* Reset RobustToolbox harder
* Fix one instance of test order causing destructible tests to fail
* Move entity solution entity systems to shared
* Move SolutionComponents to Server
* Fix namespaces
* Remove Networked Component.
* Fixes
* Add components to ignore list
* Rename SolutionContainerCaps -> Capability
* Move IExamine event to Chemistry System.
* ECS the ISolutionChange into SolutionChangeEvent
* Unify SolutionContainer into a single shared component
* Replace ISolutionInteraction with SolutionContainerComponent
* Move all methods from SolutionContainer to ChemistrySystem
* Refactor EntitySystem calls to Dependencies
* Refactor SolutionContainer to SolutionManager
* Fix yamls
* Fix test fails
* Fix post merge issues
* Fix various issues with SolutionManager
* More fixes
* Fix more components
* Fix events not being directed
* Fixes for Hypospray
* Separate removal and iteration on Metabolism
* Fix creampie problems
* Address some of sloth's issues
* Refactors for Systems
* Refactored solution location
* Fix tests
* Address more sloth issues
* Fix dependency
* Fix merge conflicts
* Add xmldocs for Capabilities components
* Remove HasSolution/TryGetDefaultSolution and Add/Remove Drainable/Refillable
* Replace Grindable/Juiceable with Extractable
* Refactor field names
* Fix Drainable
* Fix some issues with spillable and injector
* Fix issues with Grinder
* Fix Beaker having duplicate solutions
* Fix foaming
* Address some MGS issues
* Fix Uid issues
* Fix errors in solution Tranfer
* Fixed some extra values constant values
* Cola is drinkable now