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.
* Fix outdated component name in assaultbelt whitelist
RangedMagazine was replaced with BallisticAmmoProvider in the Gun
refactor (#8301)
* Move FlashOnTrigger, SmokeOnTrigger, Flash components to Shared
* Move LightReplacerComponent to Shared
* Move Utensil, Mousetrap components to Shared
* Move SprayPainterComponent to Shared
The PaintableAirlock tag has also been removed, as it was unused &
unnecessary, likely a vestige of spray painter development when the
PaintableAirlock component wasn't in Content.Shared.
* Add trivial Produce and Seed components to Client
This allows the plant bag and botanical belt whitelists to correctly
match produce and seeds on the client, fixing the extraneous "Can't
insert" message that previously appeared.
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* Move entity solution entity systems to shared
* Move SolutionComponents to Server
* Fix namespaces
* Remove Networked Component.
* Fixes
* Add components to ignore list
One of these was going to have to be folded into the other for it to work.
I am starting to really hate this refactor.
Note that this might still leave smokable tampering broken if it was already broken, but it shouldn't break it if it wasn't.
TESTED: Grown apples, carrots, something I forgot, bananas, *client crash due to slipping*
* 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