Add linter support to StackPrototype, fix linter errors.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -12,16 +13,23 @@ namespace Content.Shared.Stacks
|
|||||||
[DataField("id", required: true)]
|
[DataField("id", required: true)]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Human-readable name for this stack type e.g. "Steel"
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This is a localization string ID.</remarks>
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
public string Name { get; } = string.Empty;
|
public string Name { get; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An icon that will be used to represent this stack type.
|
||||||
|
/// </summary>
|
||||||
[DataField("icon")]
|
[DataField("icon")]
|
||||||
public SpriteSpecifier? Icon { get; } = null;
|
public SpriteSpecifier? Icon { get; } = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The entity id that will be spawned by default from this stack.
|
/// The entity id that will be spawned by default from this stack.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("spawn", required: true)]
|
[DataField("spawn", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||||
public string Spawn { get; } = string.Empty;
|
public string Spawn { get; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
suffix: Full
|
suffix: Full
|
||||||
components:
|
components:
|
||||||
- type: Stack
|
- type: Stack
|
||||||
stackType: DiamondOre
|
stackType: DiamondRaw
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: diamond
|
state: diamond
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
spawn: BananiumOre1
|
spawn: BananiumOre1
|
||||||
|
|
||||||
- type: stack
|
- type: stack
|
||||||
id: DiamondOre
|
id: DiamondRaw
|
||||||
name: diamond ore
|
name: diamond ore
|
||||||
icon: /Textures/Objects/Materials/ore.rsi/diamond.png
|
icon: /Textures/Objects/Materials/ore.rsi/diamond.png
|
||||||
spawn: DiamondOre1
|
spawn: DiamondRaw1
|
||||||
|
|
||||||
- type: stack
|
- type: stack
|
||||||
id: GoldOre
|
id: GoldOre
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
id: PizzaBox
|
id: PizzaBox
|
||||||
name: pizza box
|
name: pizza box
|
||||||
icon: Objects/Consumable/Food/Baked/pizza.rsi/box.png
|
icon: Objects/Consumable/Food/Baked/pizza.rsi/box.png
|
||||||
spawn: FoodPizzaBox
|
spawn: FoodBoxPizza
|
||||||
|
|
||||||
# Smokeables
|
# Smokeables
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user