branchrust_reboot/main/farming_optimisationcancel
30 Commits over 31 Days - 0.04cph!
Use current flag instead of next (probably the same thing but this keeps consistency)
Increase maximum length of drain calculation
Show clone option by default when mousing over plants while holding RMB (save opening entity menu)
Gravity warning when connecting fluid entities will now be more accurate and take into account whether a prop is powered
Check server state in CeilingLight growable refresh (like the GrowableHeatSource component)
Add check for IsDestroyed in all WantsSplash implementations
Code review:
Change PushLiquid in LiquidContainer to CheckPushLiquid
Null check time cached values
Use IsValid check where possible (and in IOEntity)
Ensure push targets don't get double added
Better sprinkler splash randomisation
Fixed growable entities updating their quality twice when consuming water
Liquid Containers will now automatically evenly distribute their water between up to 3 connected liquid containers
Liquid Containers now cache the targets for pushing water instead of calculating/traversing the IO system every time they push water
Subtract
53586 (already getting pooled on a different branch)
Planters, sprinklers, water pump, fluid switch are now poolable
Added a GrowableHeatSource component to make heaters affect plants
Uses the new TimeCachedValue to prevent repeated artificial temperature checks (like light checks)
The powered water purifier will stop converting salt water when it's output container is full, will automatically resume once some fresh water is removed
Revert line of sight change on sprinkler
Make the light calculation methods of GrowableEntity static so we can call it from PlanterBox
Added a budgeted update for growable entity calculations so performance cost should be uniform regardless of server farm density (0.25ms default)
Only update water quality when hit by a sprinkler
Remove gene caching
Fix some client server issues when playing in editor
Use a new TimeCachedValue class to only update plant quality values every x seconds with a generic system
Cache temperature at position on the planter and access that from plants
Calculate artificial light and sunlight on the planter instead of the plant
Sprinkler/Growable server side performance improvements
Cache ISplashables in range instead of a Vis loop every splash
Cache whether a plant can see the sun to avoid a raycast every time we update quality
Force calculate artificial lights on first calculate
Add a 5s random offset to the time restriction on updating artificial light quality
Some optimisations to calculating artificial light values in large farms
Only update the artificial light level of a plant every 20 seconds, but force an update if a light nearby changes state
Added some slight randomisation to sprinkler splash invokes to space out the load