Commit Graph

10 Commits

Author SHA1 Message Date
drakewill-CRL
efa4d384ae Botany Rework Part 1: Mutations (#31163)
Instead of each mutation being a flag that gets checked at some unique point in BotanySystem somewhere, they're now EntityEffects that get applied when the mutation occurs and when produce is harvested. One new list was added to SeedData so that multiple other fields could be removed.

All the non-stat-change mutations that have been rolled are added to the Mutations list, and get applied to the plant when the mutation occurs or when a seed with the mutation is planted. Produce get mutations applied at harvest if they apply to the produce, and carry all of the plant's mutations over as a seed. This gets rid of the one-off checks for things like Slippery, Bioluminescent, Sentient, etc.

The base odds of a mutation applying should be equal to the odds of the original mutation check. It pretended to have 1 bit flip (on averge) per mutation power, and odds of each mutation was the odds of one of its bit being flipped (1 /275 * bits). The 'thermometer code' applied for numbers will be replaced with simple random rolls, as both average out to the middle value. The new checks are much easier to understand and don't obfuscate the actual changes of something happening behind 3 layers of math. The biggest player-facing change is that Potency will be able to get over 65 significantly more often than it did in the previous system, but it will be just as common to get low values as high ones.

Mutation definitions have been moved to a .yml file. These include the odds per tick per mutagen strength of that mutation applying that tick, the effect applied, if it applies to the plant and/or its produce. This makes mutations simpler to add and edit.

This PR is limited specifically to the mutation logic. Improving other aspects of the system will be done in other PRs per the design document. Mutations was chosen first because its got the largest amount of one-off checks scattered all over that could be consolidated. Once this is merged, mutations could be contributed to the codebase with minimal extra work for later botany refactor PRs.

(cherry picked from commit 1dec19cc052dd22c73cc25dc92b3d0a918ef13fd)
2025-07-20 20:44:00 +10:00
Cojoke
8f355ef036 Replace instances of SolutionContainerSystem with SharedSolutionContainerSystem (#30084)
* Replace instances of SolutionContainerSystem with SharedSolutionContainerSystem

* guap

* More fixes

* Wait you can do that?

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>

(cherry picked from commit ef1fadf2752789ffc4f59309e2dd7490aee6f4e7)
2025-07-20 14:08:05 +10:00
genderGeometries
6d902b62a6 Crop harvest int cast fix (#25453)
* deleted int cast on solution amount

* deleted int cast on solution amount for real

(cherry picked from commit 1360d57eea3938ee61899e03f0b5e2aefd425ea9)
2024-03-05 09:46:14 +01:00
TemporalOroboros
ce27944275 Revert 'Revert 'Solution Entities'' (#23168)
(cherry picked from commit d23c8d5c19e56a582b6b12f832bd318efbdac7c7)
2024-01-23 23:00:42 +01:00
Leon Friedrich
3e2ffcc02d Remove server-side sprite references from botany system (#15886) 2023-04-29 19:03:23 +10:00
Duke
8640f0b0a3 New botany mutations (#13646) 2023-03-05 21:11:13 -04:00
Leon Friedrich
466384b081 Solution rejig (#12428) 2023-01-12 14:41:40 +11:00
Leon Friedrich
6997bd83b2 Save seed data in components and remove the seed-database (#7499) 2022-04-16 15:32:35 +10:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
mirrorcult
19bbbefdf5 ECS botany except for plantholder (#6466) 2022-02-06 13:14:41 -07:00