Commit Graph

107 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
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
slarticodefast
ccd47a00a3 Fix AddReagent modifying to solution being added in some cases (#40959)
fix
2025-10-18 17:06:08 +00:00
slarticodefast
86e77f05ce Predict InjectorSystem (#39976)
* predict injectors

* hide verbs if no options
2025-09-01 18:24:37 +03:00
āda
49c4aab489 Move solution examine subscription from DrinkComponent to ExaminableSolutionComponent (#39362)
* initial it works

* clean it up

* yml

* datafield the LocIds

* move from the other branch

* no max vol on puddles and anoms

* closed

* Changes inspired by #39008

* small bug and more color range

* puddle changes and more examinable solutions

* lint

* small change

* requested changes

* un-delete

* tiny comment

* 1 less loc id in this world

* request and last second change

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
2025-08-06 09:11:19 -07:00
DrSmugleaf
00826aaad6 Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out (#37959)
* Replace usages of customTypeSerializer PrototypeIdListSerializer with something that doesn't take 20 separate words to type out

* Missed one

* Missed another

* Fix data field ids
2025-07-10 05:06:51 +02: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
948ecc8279 Fix solutions flickering when transferring contents (#34838)
* Use Solution clones when applying SolutionComponent states

* Revert "Use Solution clones when applying SolutionComponent states"

This reverts commit 013fd111cf92b22562e00f98a7aaa49bc4b4ed62.

* Make Solution implement ICloneable and rename Clone method.

* Copy CanReact value when cloning a Solution

* Convert to IRobustCloneable
2025-06-28 02:13:24 +02:00
kosticia
f64505bea1 predicted hyposprays (#38046)
* G O I D A

* how

* now proper

* a

* Update HypospraySystem.cs

* good catch

* Apply suggestions from code review

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-06-17 02:08:08 +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
ScarKy0
9acead4236 Network SolutionScanner (#37541)
* init

* doc
2025-05-17 17:00:32 +02:00
Verm
47258651a3 Make container draw disableble for mob-affecting Hyposprays (#30683)
* Seperate container draw from affects mobs

* Spaces

* More spaces

* Fix toggle

* Use better ands

* Reorder checks for Performance™️

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2025-05-07 16:43:47 -04:00
Tayrtahn
50f7846bb1 Delete SolutionContainerVisualsComponent.InitialName (#35654) 2025-03-03 23:58:04 +01:00
Leon Friedrich
1c315ba033 Remove Entity<T> data-fields (#34083) 2025-01-11 21:22:29 +01:00
beck-thompson
da4fa9bea9 Clumsy system refactor (#31147)
* First commit

* Fixes

* Added the noise

* Renames

* Timespan

* Fixed space

* entity -> ent

* This shouldn't work

* opps....

* Datafield name change

* Better comments

* small comment

* Personal skill issue

* Event renames and stuff

* Couple fixes

* Defib ref fixes (Silly me)

* Added clumsy back!

* no hard code clumsy!

* Identity fix

* Event name change

* Comment change

* Function name change

* opp

* Update names

* Damage stuff!

* Fixes!

* Fixes

* opps

* This was hidden away!!

* negative diff feeds me
2024-11-16 00:46:01 +01:00
Preston Smith
70e3650246 Make Droppers Respect Closed/Sealed Containers (#33011)
* Make droppers respect closed/sealed

* Combine nested

* Optimize conditions a bit
2024-11-12 19:06:43 +07:00
SlamBamActionman
4626904fa8 [#20285 fix] Carp Plush and Rehydratables can now be put into mop bucket (#33079)
* Make shark plush janitor-bucketable

* fix bucketed grey shark texture

* Make sprites less shiny and adapt copyright notice

* Made shark way way less shiny

* Allow carp plush and rehydratables in mop bucket.

* Remove old mop bucket shark sprites

* Fix post-merge bugs

* Fix errors

* Move ReactiveContainer stuff to shared

That should mean it is now predicted.

* Custom eject verb for the mop bucket

* Fixes OnSolutionChange, removes pop-up as there already is one.

* .ftl is not necessary as the custom pop-up was removed

* Review fixes

* Update Content.Shared/Chemistry/Components/ReactiveContainerComponent.cs

* Update Content.Shared/Chemistry/EntitySystems/ReactiveContainerSystem.cs

---------

Co-authored-by: Psychpsyo <psychpsyo@gmail.com>
Co-authored-by: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2024-10-31 19:46:19 +01:00
blueDev2
c8f2ddc729 Add ReagentWhitelist to Injector component and system (#28262)
* Add reagent whitelist to Injector component and system

* Apply suggested Changes

* Remove LINQ function for performance

* Update Content.Server/Chemistry/EntitySystems/InjectorSystem.cs

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
2024-09-12 13:29:11 +03:00
metalgearsloth
a89d4c750b Power stuff (#31314)
* Power stuff

- Add shared IsPowered
- Add shared ResolveApc
- Move PowerChangedEvent to shared for now
- Add SlimPoweredLight that actually functions how you'd expect a PoweredLight to function it id didn't have a bunch of bloat on it.

* big update

* boing
2024-08-25 22:18:42 +10:00
SlamBamActionman
49dd17dcab Fix reagents with ReagentData being duplicated (#30983)
Initial commit
2024-08-16 12:47:53 +02:00
SlamBamActionman
07174d0aaf Better DNA forensics & ReagentData (#26699)
* Added the ability for blood to track DNA using ReagentData; Forensic Scanner now accounts for solution DNA, non-DNA holders have "Unknown DNA"

* Removes touch DNA for puddles, adds DNA to vomit

* DNA now leaves traces in containers and those marked without don't show DNA on scan (except for puddles), gibbed parts have DNA

* Fix stupid metamorphic glass bug grrr

* Removed SpillableComponent since DnaSubstanceTraceComponent is used instead

* Removes data field from maps, adds DNA tracking for some missed items

* Give default value, fix missing values.

* Fixes recipe bug

* Review changes

* Make the Data list into a nullable type

* Revert map changes

* Move gibbed unknown DNA to forensicssystem
2024-08-09 09:27:27 +10:00
Brandon Hu
9bb9e80ede tweak(SolutionTransfer): Raise default max transfer amount. (#29969)
* fix(jugs): Make max and minimum transfer amounts make sense

* fix name

* Better

* Implement bounds checks

* large beaker too

* More logical solution

* Bleh

* remove

* Doesn't make sense yet

WAS MISTAKEN AAAAAAAAAAAAAAD@ @!
2024-08-06 00:59:51 +02:00
Tayrtahn
ed4ae1628c Add "fill levels" to spear in-hand/wielded/equipped sprites (#28865)
* Add fill level sprite support for equipped items

* Add fill sprites for held/equipped spears
2024-08-02 17:18:59 +10:00
osjarw
aa886ca494 Make NeedHand modifiable for injectorSystem (#29870)
* Get needhand from yml

* MovementThreshold modifiable + inheritdoc
2024-07-24 12:26:52 -07:00
osjarw
d8433a8f86 Make delay incurred from additional syringe contents modifiable + tiny syringe buff/fix (#29825)
* Make delay incurred by transfer amount modifiable

* No unintentional negative delay please

* Use more fixedpoint, hope I didn't break anything

* merge review suggestion

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>

---------

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
2024-07-22 03:20:36 -07:00
Winkarst-cpu
ee59ae91ec Custom solution transfer volume popup and item status panel fix (#29852)
* Fix for custom solution transfer volume

* Dirty call to prevent issues

* Another fix, git issue

---------

Co-authored-by: Winkarst-cpu <Winkarst@users.noreply.github.com>
2024-07-10 12:32:30 +02: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
Ed
91028a5149 remove Injector SolutionName constant (#27493)
remove stupid constant
2024-04-29 17:29:15 -04:00
Verm
089c9cb967 You can bless more containers with a bible (#26526)
* Made more things blessable

* Removed junk

* Remove whatever that was

* Make bowls blessable

* New mixablesolution component, converted everything to work with it

* Fix minor mishaps

* Fix extra spaces in bottle yml

* Fix last extra space, fix bottle havign the wrong solution name

* Remvoe unneeded event(I think), fix alcohol bottles not being mixable

* I missed cans
2024-04-20 16:16:55 +10:00
Nemanja
a47c5561a9 add fuel costs back to finishing welding (#27030)
* add fuel costs back to welding

* ack

* meh

* eek!
2024-04-19 19:20:30 -04: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
90a880a9be Fix: Prevent single-use hyposprays from getting the toggle draw verb (#26595)
Prevent single-use hyposprays from getting the toggle draw verb

Co-authored-by: Plykiya <plykiya@protonmail.com>
2024-03-31 16:20:48 +11:00
drteaspoon420
4e618e9387 Fix 'Hypopen shouldn't display solution examine text' (#26453)
* stealthy hypo

* ExaminableSolution hand check when in covert implement.

ExaminableSolution now has 'hidden' datafield to enable chemical inspection only in hand.

* cleaning code

* more cleaning

* Hidden datafield renamed to HeldOnly

* review

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-03-31 15:59:36 +11:00
Tayrtahn
1b94e01563 Prevent storing liquids in equipped buckets (#24412)
* Block access to solutions in equipped spillables.

* Stop Drink verb appearing if the solution can't be accessed.
2024-03-31 15:40:22 +11:00
Plykiya
f192d7901f Hyposprays Draw from Jugs (#25544)
* Hyposprays Draw from Jugs

* Fix last onlyMobs usage in yml

* Some Suggested Changes

* Remove unnecessary datafield name declarations

* Remove unnecessary dirtying of component

* Same line parentheses

* Added client-side HypospraySystem

* Cache UI values and only updates if values change

* empty line

* Update label

* Label change

* Reimplement ReactionMixerSystem

* Remove DataField from Hypospray Toggle Mode

* Change ToggleMode from enum to Bool OnlyAffectsMobs

* Add DataField required back since it's required for replays...?

* update EligibleEntity and uses of it

* Add user argument back

* Adds newline

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Guard for dirty entity

* Adds summary tag

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-03-30 14:59:16 +11:00
veprolet
ad6ac73f6f Cycle injector transfer amount on alt. use (#25566)
* Add toggle verb for injector transfer amount

* Fix injector verb priority scalability

---------

Co-authored-by: veprolet <>
2024-03-13 21:00:45 +11:00
Plykiya
5cb48c922f Syringes that spawn with content start in inject mode (#25881)
* Remove unnecessary datafield names, syringes with stuff in them start in inject mode

* No trash tag

* Remove ViewVariables since DataField has them implicitly

* Revert "No trash tag"

This reverts commit 2c42172653d2cc70d58bd5bedf61a880b939bf20.

* Get rid of tags entirely for PrefilledSyringes

---------

Co-authored-by: Plykiya <plykiya@protonmail.com>
2024-03-09 11:19:03 +01:00
deltanedas
550612a37f fishops nerf real (#25148)
* refactor ops

* inherit dna and fiber when fish hydrated

* :trollface:

* kid named finger

* :trollface:

* move rehydrating to shared :trollface:

* nobody noticed the popup being missing all this time

* method ops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-03-05 14:13:50 +11:00
Pieter-Jan Briers
e00f74505c Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
2024-02-26 14:36:19 +11:00
Pieter-Jan Briers
33611b7094 Solution precision fixes (#25199)
* 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
2024-02-16 16:54:27 -07:00
Pieter-Jan Briers
6d8be538c9 Predict Injector (syringes), cleanup (#25235)
At least the mode/transfer amount logic. Actual transfer logic needs Bloodstream which I didn't wanna move into shared.
2024-02-14 16:05:01 -07:00
deltanedas
55dbe26019 predict egg cracking + refactor (#25028)
* move stuff to server and some refactoring

* update spikables to not use triggering

* add Delete bool just incase

* a new egg

* mom can we have webedit. no, we have webedit at home

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-02-08 17:24:24 +11:00
themias
bd100344a2 Add inhand fill visuals (#24495)
* Add inhand fill visuals

* oops

* remove unused import
2024-01-28 20:38:06 -05:00
Nemanja
0e45c63d22 Fix chem sources in guidebook (#23987)
* Fix chem sources in guidebook

* shabooya
2024-01-13 18:16:47 +11:00
Skye
fbe72c848a ChemMaster buffer preserves list ordering (#23352)
ChemMaster now maintains list order on reagent removal
2024-01-02 10:51:21 -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
Leon Friedrich
cf98300ba2 Fix rotation visuals desync & appearance state spam (#23016)
* Fix rotation visuals desync

* :bucklemeup:

* A
2023-12-26 16:32:25 -07:00