RCD Refactor (#34781)

* fixed prediction (hopefully), removed caching of prototype, sealed the class, removed any and count

* erroneus using statement

* removed unused timing, removed obsolete method of getting gridUid

* nuked mapgriddata

* code cleanup

* cleanup

* this has to be a string without me rewriting more code than i want to in this moment

* kill

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
gus
2025-04-17 18:34:38 -07:00
committed by GitHub
parent 944aa57907
commit 2c60d6b27f
6 changed files with 129 additions and 175 deletions

View File

@@ -33,25 +33,13 @@ public sealed partial class RCDComponent : Component
[DataField, AutoNetworkedField]
public ProtoId<RCDPrototype> ProtoId { get; set; } = "Invalid";
/// <summary>
/// A cached copy of currently selected RCD prototype
/// </summary>
/// <remarks>
/// If the ProtoId is changed, make sure to update the CachedPrototype as well
/// </remarks>
[ViewVariables(VVAccess.ReadOnly)]
public RCDPrototype CachedPrototype { get; set; } = default!;
/// <summary>
/// The direction constructed entities will face upon spawning
/// </summary>
[DataField, AutoNetworkedField]
public Direction ConstructionDirection
{
get
{
return _constructionDirection;
}
get => _constructionDirection;
set
{
_constructionDirection = value;
@@ -68,5 +56,5 @@ public sealed partial class RCDComponent : Component
/// Contains no position data
/// </remarks>
[ViewVariables(VVAccess.ReadOnly)]
public Transform ConstructionTransform { get; private set; } = default!;
public Transform ConstructionTransform { get; private set; }
}