From 31087a618d34c46039c7b1067aaceec5c2b9a998 Mon Sep 17 00:00:00 2001 From: Moony Date: Sun, 29 May 2022 01:16:13 -0500 Subject: [PATCH] Improve the templates, add networked entity system templates. (#8518) --- SpaceStation14.sln.DotSettings | 81 +++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 5 deletions(-) diff --git a/SpaceStation14.sln.DotSettings b/SpaceStation14.sln.DotSettings index 45118b13cb..86c25ffd11 100644 --- a/SpaceStation14.sln.DotSettings +++ b/SpaceStation14.sln.DotSettings @@ -86,6 +86,9 @@ Entity System 14 6 + True + Entity System + 17 7 True Entity System @@ -94,6 +97,9 @@ Entity Component 12 8 + True + Entity System + 16 True Prototype 15 @@ -123,7 +129,7 @@ $HEADER$namespace $NAMESPACE$; /// <summary> -/// $CLASS$ is used for... +/// This is used for... /// </summary> [RegisterComponent] public sealed class $CLASS$ : Component { @@ -154,7 +160,7 @@ public sealed class $CLASS$ : Component { namespace $NAMESPACE$; /// <summary> -/// $CLASS$ is a prototype for... +/// This is a prototype for... /// </summary> [Prototype($END$)] public sealed class $CLASS$ : IPrototype { @@ -191,6 +197,37 @@ public sealed class $CLASS$ : IPrototype { False + True + True + cs + FooSystem + True + &Client/Server Net Entity System + True + getAlphaNumericFileNameWithoutExtension() + 2 + True + fileheader() + 0 + True + fileDefaultNamespace() + 1 + True + True + InCSharpProjectFile + True + $HEADER$namespace $NAMESPACE$; + +/// <inheritdoc/> +public sealed class $CLASS$ : Shared$CLASS$ { + /// <inheritdoc/> + public override void Initialize() + { + base.Initialize(); + $END$ + } +} + SS14 True True IoC resolve @@ -239,7 +276,7 @@ public sealed class $CLASS$ : IPrototype { $HEADER$namespace $NAMESPACE$; /// <summary> -/// $CLASS$ handles... +/// This handles... /// </summary> public sealed class $CLASS$ : EntitySystem { /// <inheritdoc/> @@ -271,7 +308,7 @@ public sealed class $CLASS$ : EntitySystem { $HEADER$namespace $NAMESPACE$; /// <summary> -/// $CLASS$ is used for... +/// This is used for... /// </summary> public abstract class $CLASS$ : Component { $END$ @@ -280,6 +317,7 @@ public abstract class $CLASS$ : Component { /// <summary> /// Contains network state for $CLASS$. /// </summary> +[Serializable, NetSerializable] public sealed class $CLASS$State : ComponentState { public $CLASS$State($CLASS$ component) { @@ -299,6 +337,38 @@ public sealed class $CLASS$State : ComponentState { netser True [System.Serializable, Robust.Shared.Serialization.NetSerializable] + True + True + cs + FooSystem + True + &Shared Net Entity System + True + getAlphaNumericFileNameWithoutExtension() + 2 + True + fileheader() + 0 + True + fileDefaultNamespace() + 1 + True + True + InCSharpProjectFile + True + $HEADER$namespace $NAMESPACE$; + +/// <summary> +/// This handles... +/// </summary> +public abstract class $CLASS$ : EntitySystem { + /// <inheritdoc/> + public override void Initialize() + { + $END$ + } +} + SS14 True True cs @@ -324,7 +394,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy namespace $NAMESPACE$; /// <summary> -/// $CLASS$ is a prototype for... +/// This is a prototype for... /// </summary> [Prototype($END$)] public sealed class $CLASS$ : IPrototype, IInheritingPrototype { @@ -365,6 +435,7 @@ public sealed class $CLASS$ : IPrototype, IInheritingPrototype { /// <inheritdoc/> [RegisterComponent, NetworkedComponent] +[ComponentReference(typeof(Shared$CLASS$))] public sealed class $CLASS$ : Shared$CLASS$ { $END$ }