Content PR for auto-componentstate sourcegen (#14845)

* Content PR for auto-componentstate sourcegen

# Conflicts:
#	Content.Shared/Chat/TypingIndicator/TypingIndicatorComponent.cs
#	Content.Shared/Content.Shared.csproj
#	SpaceStation14.sln

* shared file too

* afterautohandlestate example

* oops

* anudda

* access fixed

* smart
This commit is contained in:
Kara
2023-04-06 10:33:40 -07:00
committed by GitHub
parent b943d83ae1
commit 9688544e78
6 changed files with 23 additions and 64 deletions

View File

@@ -4,16 +4,18 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Shared.Parallax.Biomes;
[RegisterComponent, NetworkedComponent]
public sealed class BiomeComponent : Component
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class BiomeComponent : Component
{
public FastNoiseLite Noise = new();
[ViewVariables(VVAccess.ReadWrite), DataField("seed")]
[AutoNetworkedField]
public int Seed;
[ViewVariables(VVAccess.ReadWrite),
DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<BiomePrototype>))]
[AutoNetworkedField]
public string BiomePrototype = "Grasslands";
// TODO: Need to flag tiles as not requiring custom data anymore, e.g. if we spawn an ent and don't unspawn it.