53 Commits

Author SHA1 Message Date
kin98
ce226b0c16 Fix: obsolete warnings in SharedAbsorbentSystem (#40885)
* fix: formating warnings

* split GetAbsorbentReagents into string and protoid

* fix: changed SplitSolutionWhitout [obsolete] to use new method

* fix: missing using directive after merge

* Replaced methods with ProtoId variant
2025-11-10 11:30:24 +00:00
Princess Cheeseballs
222aaa9b59 [HOTFIX] Fix status effect removal from entity effects and buckets not being draggable (#41168)
just do less work it's that easy!

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-10-28 14:31:53 -04:00
SlamBamActionman
c6352786f1 Add doafter to filling the hypopen (#40538)
* Initial commit

* Small QOL buff

* Review changes

* Ch-ch-ch-ch-chaaaanges

* Review changes

* oops

* Oh ya fix the fill thing

* cleanup warnings make a few more private methods

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-10-21 22:05:44 +00:00
Perry Fraser
c65f0aeb31 Make a lot more puddle stuff predicted (#38871)
* feat: predict evaporation

* refactor: move puddle update logic to shared

* refactor: move more puddle stuff to Shared

Still can't do stuff that creates puddles :(

* refactor: move puddle transfers to shared

* fix: various style fixes + switch to predicted variants

* style: make some puddle stuff private instead of protected

* refactor: move solution dumping to its own system

* docs: clarify Drainable/Dumpable/Refillable docs

Also whacks unneeded VVAccess's.

* fix: audit usages of drainable+refillable

I'm leaving spear and arrow for now... but I don't love it.

* Added an item query I guess

* Review changes

* You can pour out waterguns

* Review changes

* oops

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
2025-10-18 17:41:56 +00:00
K-Dynamic
9828f165b4 Increase puddle spillover volume to 50u (#38044)
* increase puddle spillover volume

* sleepy; 50u volume
2025-10-01 20:17:31 +00:00
slarticodefast
86e77f05ce Predict InjectorSystem (#39976)
* predict injectors

* hide verbs if no options
2025-09-01 18:24:37 +03:00
Winkarst-cpu
be2eeb3cb1 Cleanup: Un-hardcode reagents standout (#39752) 2025-08-19 10:40:21 -04:00
Perry Fraser
c802b8bbb2 Make mopping predicted (and some other stuff) (#38749)
* refactor: move puddle evaporation + absorbents to shared

* refactor: move SolutionRegeneration to shared

* refactor: make AbsorbentSystem visuals clientside

* style: general formatting/cleanup on touched files

- Few logical simplifications
- Add field for hard-coded sparkle effect ent
- Switch stuff to Entity<T>

No actual prediction fixes in this commit (though in
retrospect I should've done this commit last).

* fix: use predicted variants for predicted code

* fix: average out evaporation rates in mixtures

* refactor: move SolutionPurge to shared

* style: Basic SolutionPurgeComponent field cleanup

* fix: general prediction + timing + networking fixes

- Moves client side visuals back to shared because other
  players exist
- Don't accumulate CurTime in Purge/RegenerationSystem
- Network the next update field in Purge/RegenerationSystem to
  deal with UI mispredictions???

* fix: add udder bug workaround

Not needed for SolutionPurgeSystem which doesn't resolve
solutions (probably fine that SolutionPurgeSystem doesn't
cache since it's much rarer, though it probably should), and
likely not needed for AbsorbentSystem since it only resolves
against puddles which, I don't think can be in containers.

* fix: don't divide by zero for evaporation speed = 0.

* refactor: revert evaporation changes

Will cherry-pick these out in another PR.

Also reverting the evaporation speed bugfix since it's easier
to revert all at once. :)

* fix: component cleanup; autopause fields, use ProtoID

* fix: remove unused AbsorbentComponentState

* fix: ProtoId is not string

* refactor: move PuddleSystem.UpdateAppearance to shared

* style: general PuddleSystem.UpdateAppearance tweaks

- Switch to Entity<T>
- Use ProtoIds
- Minor simplifications

* fix: add udderly silly PVS workaround

* cleanup

* fix

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-07-09 05:17:55 +02:00
Tayrtahn
c565b44965 Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)
* The easy ones

* For certain values of easy

* Easy test

* Hair

* Fix sandbox violations

* Sort usings
2025-07-07 21:57:05 +02:00
Perry Fraser
793f525c6b fix: mops with liquid can hit people again (#38486) 2025-06-22 00:23:39 +02:00
Fildrance
291ccfbe23 Spray nozzle can suck puddles into tank directly! (#30600)
* feat: now vacuum cleaner can suck solutions from floor

* refactor using AbsorbentSystem instead of separate vacuum cleaner

* refactor: remove unused vacuum cleaner files

* refactor: renamed ConnectedContainerComponent to SlotBasedConnectedContainerComponent (and system)

* fix: fix invalid comp name

* fix: no more spray nozzle messaging about water inside bottles etc.

* refactor: minor refactor in SlotBasedConnectedContainerSystem and adjustments after merge

* refactor: cleanups

* refactor: renaming

* refactor: update to use _puddleSystem.GetAbsorbentReagents

* refactor: changed interactions with SlotBasedConnectedContainerSystem into events

* refactor: new sound and action delay adjusted to sound (amount tweaked a bit accordingly, almost)

* refactor: added networking for SlotBasedConnectedContainerComponent

* fix attribution for vacuum-cleaner-fast.ogg

* trying to fix multi-license for mix sound file

* remove empty line

* refactor: remove trailing whitespace

* by ref struct, brother

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2025-05-25 23:36:16 -04:00
Princess Cheeseballs
251cfbd8be Puddle Code Slipping Cleanup (#35845)
* Init Commit

* windows yelling at me to update commit

* working commit, need prediciton and more dehardcoding

* Project 0 warnings

* Working Commit (Near Final)

* ryder got confused commit

* I love Merge Conflicts :)

* Working commit, no prediction

* Forgot the yaml changes

* Comments and typos

* Apparently while the reduced launch mult of lube was initialized it was never used so I revered back to default

* Fixed an incorrect divisor

* bit of cleanup

* Prediciton fixed, and puddles now affect all entities

* FORGOT TO RENAME A VERY IMPORTANT VARIABLE OOPS

* Really big I forgor moment

* Even bigger I forgor moment

* four more merge conflicts to fix four more oopsies

* fixed actual divide by zero moment and also im very dumb

* Even bigger I forgor moment

* four more merge conflicts to fix four more oopsies

* fixed actual divide by zero moment and also im very dumb

* Fix all test fails

* code cleanup

* Webedit whitespace

* Code cleaup

* whitespace webedit

* whitespace webedit

* whitespace webedit

* whitespace removal

* Comments and cleanup

* Re-Added 20 warnings as per Ork's request

* Cleanups

* Spacing fix

* bugfixes and cleanup

* Small bugfix

* Actually dirty the slipComp for real

* Added Friction field to Reagent Prototype per design discussion

* Sliding system is kill
2025-04-20 17:27:12 -04:00
Jajsha
a6741e42c1 Un-Hardcode water evaporation & mopping behavior (#33399)
* Un-harcode slipperiness

* Make it actually work

* Prettyfy

* Cleanup GetEvaporatingReagents

* Fix mopping with space lube + wrong solutions in absorbance

* Remove LINQ and rename parameters

* Change evaporation speed to fixedpoint2

* Add evaporating speed functionality

* Remove unused imports

* Swap around reagent evaporation speed and puddle evaporation speed.

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2025-04-18 20:11:28 -04:00
Partmedia
37c88debb5 Fix comment (#36054) 2025-03-24 20:47:48 +01:00
Leon Friedrich
1c315ba033 Remove Entity<T> data-fields (#34083) 2025-01-11 21:22:29 +01:00
Partmedia
cf202e805d Fix sinks and toilets not draining (#33691)
* Fix AutoDrain

Per the system comments, AutoDrain is designed to automatically move
puddles into the drain (like a floor drain). Drains without AutoDrain
are still supposed to gradually empty the buffer, but not remove puddles
(like sinks and toilets).

However, a logic error in the original implementation causes drains with
AutoDrain set to false to simply not work. Hence sinks never emptied.

* Update documentation
2024-12-04 03:42:16 +01:00
metalgearsloth
dd376e4e84 Optimise drains (#32230)
* Optimise drains

If it's still a problem then we do what I did for rmc14 and just dump all the active drains onto a job to getentitiesinrange in parallel.

* Fixes
2024-09-28 15:16:54 +10:00
IProduceWidgets
550c423181 Clean up solution regen and drain comps (#29777)
* clean up solution regen and drain comps

* Tape applied.

* Update Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* remain entity

* That has to be a rogue test fail.

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2024-09-19 12:17:13 +10:00
slarticodefast
2187aef904 Make mobs without hands unable to spill jugs (#31438)
* make mobs without hands unable to spill jugs

* snails
2024-09-09 14:02:15 +03:00
deltanedas
7b590122b6 fire extinguisher using item toggle (#29906)
* move SprayAttemptEvent to shared

* add SolutionTransferredEvent

* replace FireExtinguisher with SpraySafety

* update fire extinguisher yml

* invert visuals

* always handle event in solution transfer, it makes popups

* instantly fill it

* untroll

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-07-13 14:17:10 +10:00
Tayrtahn
880fef507d Replace BlockSolutionAccessComponent with an attempt event (#26988)
* BlockSolutionAccessComponent now only blocks one specified solution.

* Significant overhaul
Separated spilling when worn functionality into its own component/system.
Removed BlockSolutionAccessComponent.
Added an event for solution access.
2024-06-21 13:04:02 +10:00
Vasilis
d4982bad31 Stop mop buckets from spilling when you push them (#26706) 2024-04-04 02:39:54 -06:00
deltanedas
1db178b632 scoopable ash and foam, solution transfer prediction (#25832)
* move SolutionTransfer to shared and predict as much as possible

* fully move OpenableSystem to shared now that SolutionTransfer is

* fix imports for everything

* doc for solution transfer system

* trolling

* add scoopable system

* make ash and foam scoopable

* untroll

* untroll real

* make clickable it work

* troll

* the scooping room

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-04-01 17:27:39 +11:00
Plykiya
d71062a64c Injector UI shows TransferAmount change, Spilling liquid changes Injector mode (#26596)
* Injector UI shows TransferAmount change, spill changes mode

* Update Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs

* Update Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-03-31 16:37:33 +11:00
Tayrtahn
4cd2fbd076 Add prediction to Spill Container verb, add dummy TrySpill methods to shared (#25813)
* Moved abstract spill methods to shared; added prediction to spill container verb.

* Rerun tests

* Requested changes

* Note Client behavior in Spill method docs
2024-03-29 02:00:09 -07:00
Tayrtahn
4943151111 Add prediction for puddle and spillable examines (#25794)
Prediction for puddle and spillable examines
2024-03-03 16:36:36 +11:00
Pieter-Jan Briers
68ce53ae17 Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
2024-02-13 16:48:39 -05:00
themias
557e5eb476 Add reagent specific footstep sounds (#24406)
* Add sticky footsteps

* Update Resources/Audio/Effects/Footsteps/attributions.yml

Co-authored-by: ike709 <ike709@users.noreply.github.com>

---------

Co-authored-by: ike709 <ike709@users.noreply.github.com>
2024-01-22 23:18:33 -05:00
TemporalOroboros
d23c8d5c19 Revert 'Revert 'Solution Entities'' (#23168) 2023-12-29 08:47:43 -04:00
Emisse
938d6d9945 Revert "Solution Entities" (#23160)
Revert "Solution Entities (#21916)"

This reverts commit d75e743dd7.
2023-12-28 20:45:42 -07:00
TemporalOroboros
d75e743dd7 Solution Entities (#21916)
* 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>
2023-12-28 17:58:14 -08:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
TNE
52ef8f9b70 Allow drag-and-drop insertion of reagents into the ChemMaster (#19796)
* Add DumpableSolutionComponent

Separates out the component from "DrainComponent" that allows one to drag a bucket/any reagent container onto a drain/sink/toilet to empty it and allows other reagent containers to reuse the code effortlessly.

* Give the ChemMaster 4000 the DumpableSolution Component

Allows drag and dropping solutions into the ChemMaster much like you used to be able to do exclusively with drains. This also allows dumping jugs into them.
2023-09-04 15:53:13 +03:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
metalgearsloth
d7abbab082 Add gatherable break sounds (#19360) 2023-08-20 14:05:43 -07:00
Vordenburg
7582474f1a Lint more const string prototypes (#18922) 2023-08-13 20:26:59 -04:00
Topy
2349a3eba3 Fixed args.Used instead of args.Target (#17838) 2023-07-05 13:31:30 -07:00
Topy
b85c902189 Added sink (#14348) 2023-06-30 18:10:47 -04:00
metalgearsloth
f12f277c35 Puddle fixes (#15820) 2023-04-26 21:29:31 +10:00
metalgearsloth
6076130987 Janitor QoL (#15626) 2023-04-23 18:20:03 +10:00
EnDecc
34f5cb7440 Drain buffs (#15300) 2023-04-11 21:21:30 +10:00
metalgearsloth
317a4013eb Puddles & spreader refactor (#15191) 2023-04-10 15:37:03 +10:00
Leon Friedrich
19277a2276 More DoAfter Changes (#14609)
* DoAfters

* Compact Clone()

* Fix mice and cuffables

* Try generalize attempt events

* moves climbabledoafter event to shared, fixes issue with climbable target

* Fix merge (cuffing)

* Make all events netserializable

* handful of doafter events moved

* moves the rest of the events to their respective shared folders

* Changes all mentions of server doafter to shared

* stop stripping cancellation

* fix merge errors

* draw paused doafters

* handle unpausing

* missing netserializable ref

* removes break on stun reference

* removes cuffing state reference

* Fix tools

* Fix door prying.

* Fix construction

* Fix dumping

* Fix wielding assert

* fix rev

* Fix test

* more test fixes

---------

Co-authored-by: keronshb <keronshb@live.com>
2023-04-02 21:13:48 -04:00
metalgearsloth
2c751d5153 Add ItemStatus for mopping (#13745)
* Add ItemStatus for mopping

Big QOL feature

* a
2023-02-11 01:38:45 +00:00
Willhelm53
a1dcc500a8 Puddle Visuals: ECS/Refactor and fixes (#11941)
* Don't stop me now, cuz I'm havin' such a good time (I'm havin' a ball!)

* YEET

* No changes to intended behaviour at this point. Pretty much just a refactor + bugfixes.

* tweaks to RandomizeState, removing an error caused by setting the state after setting the RSI

* Comments cleanup and removed IsSlippery. To re-add soon for this PR.

* test

* We don't actually use this PuddleGeneric anywhere

* cheeky

* Uncheeky, and tweaks based on #8203

* Recheeky

* A small price to pay for `checks passed`

* Beauty, like ice, our footing does betray; Who can tread sure on the smooth, slippery way

* Undo Slippery Checks

* Begin smoothing. Need to fix the animation-not-playing bug again

* Cleanup

* animation bugfix

* IgnoredComponents tests fix
2022-12-19 20:40:53 -06:00
Ygg01
75ea093d78 Fluid spread refactor (#11908)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Fix undefined
2022-11-15 22:30:59 +11:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
Willhelm53
4d3a381962 Mopping Puddle Dilution and Wet Floor Sparkles (#6273) 2022-02-04 19:26:11 -07:00
mirrorcult
fd316c3983 Fire extinguisher/spray refactor (#6314)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-01-31 01:42:15 +11:00
Ygg01
14b401f9b3 Puddle refactor 2: Spillastic boogaloo (#4784)
* Refactor PuddleComponent

* Move puddle effects into separate RSIs

Basically egg/tomato/powder puddle will be moved into separate
/Textures/Fluids RSIs

* Fix YAML for puddles

* Fix issues sloth pointed out.

* Ensure Puddle Component are properly added when spawned

* Remove unnecessary method init puddle with starting maxVolume

* Addressed ElectroSr comments

* Add Resolves

* Try fix error in ensureSolution

* Puddle unanchoring

* Address some issues with puddles

* Fix continue -> return
2021-10-27 19:24:18 +11:00