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:
@@ -6,10 +6,10 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Shared.RCD;
|
||||
|
||||
/// <summary>
|
||||
/// Contains the parameters for a RCD construction / operation
|
||||
/// Contains the parameters for an RCD construction / operation
|
||||
/// </summary>
|
||||
[Prototype("rcd")]
|
||||
public sealed partial class RCDPrototype : IPrototype
|
||||
public sealed class RCDPrototype : IPrototype
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; private set; } = default!;
|
||||
@@ -36,13 +36,13 @@ public sealed partial class RCDPrototype : IPrototype
|
||||
/// Texture path for this prototypes menu icon
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadOnly)]
|
||||
public SpriteSpecifier? Sprite { get; private set; } = null;
|
||||
public SpriteSpecifier? Sprite { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The entity prototype that will be constructed (mode dependent)
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadOnly)]
|
||||
public string? Prototype { get; private set; } = string.Empty;
|
||||
public string? Prototype { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of charges consumed when the operation is completed
|
||||
@@ -60,10 +60,10 @@ public sealed partial class RCDPrototype : IPrototype
|
||||
/// The visual effect that plays during this operation
|
||||
/// </summary>
|
||||
[DataField("fx"), ViewVariables(VVAccess.ReadOnly)]
|
||||
public EntProtoId? Effect { get; private set; } = null;
|
||||
public EntProtoId? Effect { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of rules that govern where the entity prototype can be contructed
|
||||
/// A list of rules that govern where the entity prototype can be constructed
|
||||
/// </summary>
|
||||
[DataField("rules"), ViewVariables(VVAccess.ReadOnly)]
|
||||
public HashSet<RcdConstructionRule> ConstructionRules { get; private set; } = new();
|
||||
@@ -84,10 +84,7 @@ public sealed partial class RCDPrototype : IPrototype
|
||||
[DataField, ViewVariables(VVAccess.ReadOnly)]
|
||||
public Box2? CollisionBounds
|
||||
{
|
||||
get
|
||||
{
|
||||
return _collisionBounds;
|
||||
}
|
||||
get => _collisionBounds;
|
||||
|
||||
private set
|
||||
{
|
||||
@@ -103,13 +100,13 @@ public sealed partial class RCDPrototype : IPrototype
|
||||
}
|
||||
}
|
||||
|
||||
private Box2? _collisionBounds = null;
|
||||
private Box2? _collisionBounds;
|
||||
|
||||
/// <summary>
|
||||
/// The polygon shape associated with the prototype CollisionBounds (if set)
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public PolygonShape? CollisionPolygon { get; private set; } = null;
|
||||
public PolygonShape? CollisionPolygon { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Governs how the local rotation of the constructed entity will be set
|
||||
|
||||
Reference in New Issue
Block a user