-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Whitelist, MachinePart compilation fixes
- Loading branch information
Showing
6 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
Content.Shared/Construction/Components/MachinePartComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// FRONTIER MERGE: restored this from frontier's master to get things to compile | ||
|
||
using Content.Shared.Construction.Prototypes; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Shared.Construction.Components | ||
{ | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class MachinePartComponent : Component | ||
{ | ||
[DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))] | ||
public string PartType { get; private set; } = default!; | ||
|
||
[ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("rating")] | ||
public int Rating { get; private set; } = 1; | ||
|
||
/// <summary> | ||
/// This number is used in tests to ensure that you can't use high quality machines for arbitrage. In | ||
/// principle there is nothing wrong with using higher quality parts, but you have to be careful to not | ||
/// allow them to be put into a lathe or something like that. | ||
/// </summary> | ||
public const int MaxRating = 4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Content.Shared/Construction/Prototypes/MachinePartPrototype.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// FRONTIER MERGE: restored this from frontier's master to get things to compile | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Shared.Construction.Prototypes; | ||
|
||
/// <summary> | ||
/// This is a prototype for categorizing | ||
/// different types of machine parts. | ||
/// </summary> | ||
[Prototype("machinePart")] | ||
public sealed partial class MachinePartPrototype : IPrototype | ||
{ | ||
/// <inheritdoc/> | ||
[IdDataField] | ||
public string ID { get; private set; } = default!; | ||
|
||
/// <summary> | ||
/// A human-readable name for the machine part type. | ||
/// </summary> | ||
[DataField("name")] | ||
public string Name = string.Empty; | ||
|
||
/// <summary> | ||
/// A stock part entity based on the machine part. | ||
/// </summary> | ||
[DataField("stockPartPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>), required: true)] | ||
public string StockPartPrototype = string.Empty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters