Commit Graph

29 Commits

Author SHA1 Message Date
SpaceManiac
4122310735 Fix 38 non-obsolete warnings (#33794) 2025-02-11 20:59:50 +11:00
Ignaz "Ian" Kraft
36b59c69f4 allow paper labels on seeds (#34450)
* allow paper labels on seeds

* added the components required by PaperLabel to the SeedBase

* localize insert/eject for PaperLabel

* visualize the paper label on seeds

* new paper layer for seeds

* eject the seed label on use

* different looking paper label

* forgot to turn on a layer
2025-02-08 15:16:06 -08:00
drakewill-CRL
1dec19cc05 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.
2024-09-14 20:12:17 -07:00
Cojoke
ef1fadf275 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>
2024-09-02 13:26:04 +02:00
Flesh
dab2c48849 Change plant clipping mechanics (#25326)
Make seeds from clipped plants inherit the decreased health from parents.
Also require one growth stage before clipping.
2024-02-16 21:02:12 -08:00
Kara
0ae3858b69 Examine prediction (#23565)
* Initial prediction

* new group handling

* groups for all examines that use multiple rn

* compile

* why was it doing this??

* handle newlines with sorting properly
2024-01-06 17:53:13 +11: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
Kara
77964d4a6b Kill SharedEntityExtensions and all popup extensions (#20909)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-10-16 16:56:09 +11:00
TemporalOroboros
0775ab6a14 Moves SolutionContainerManagerComponent to Shared. (#20944) 2023-10-15 03:45:28 +11:00
metalgearsloth
99b77bc2d3 Remove lights compref (#19531) 2023-09-11 19:18:06 +10:00
Doru991
c6869c89d0 Add plant phalanximine, fix slippery fruits (#19820) 2023-09-04 12:11:40 -08:00
Visne
b88c2cbb49 Remove usages of obsolete MetaDataComponent setters (#19582) 2023-08-28 19:20:31 +10:00
Leon Friedrich
3e2ffcc02d Remove server-side sprite references from botany system (#15886) 2023-04-29 19:03:23 +10:00
deltanedas
60ac402b8b clipping and extracting put seeds in the users hands (#14343) 2023-03-05 22:37:57 -04:00
Pieter-Jan Briers
a323671984 Changes for prototype load parallelization (#13066)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-12-20 14:25:34 -08:00
Leon Friedrich
881a2b2ece PopupSystem public methods rejig (#12830) 2022-12-19 08:41:47 +11:00
Nemanja
195bf86fe2 PlantholderComponent ECS (#12871) 2022-12-18 10:12:28 -08:00
Kevin Zheng
b798924f12 Disable shadow casting for bioluminescent plants (#11986) 2022-10-22 15:40:57 -07:00
Kevin Zheng
7fc357afd2 Plant genetics (#11407) 2022-10-15 23:25:41 -07:00
Kara
dc28b58468 Visual popup types (#9523)
* Visual popup types

* Pass over `PopupCoordinates` and `PopupCursor`

* `PopupEntity` pass

* Disease and reagent popup pass

* COLOUR
2022-07-09 04:09:52 -05:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
Leon Friedrich
6997bd83b2 Save seed data in components and remove the seed-database (#7499) 2022-04-16 15:32:35 +10:00
mirrorcult
e87ab94810 Potency sprite scaling (#7100)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-03-13 21:11:03 +11:00
mirrorcult
676ca21b5f Add knife butchering and blood gibbing (#6770) 2022-02-18 15:57:42 -07:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
metalgearsloth
70c0a502cf ECS tags (#6504) 2022-02-08 14:08:11 +11:00
mirrorcult
19bbbefdf5 ECS botany except for plantholder (#6466) 2022-02-06 13:14:41 -07:00