Add basic PDA/Syndicate Uplink. (#942)
Co-authored-by: FL-OZ <anotherscuffed@gmail.com> Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
42
Content.Shared/Prototypes/PDA/UplinkStoreListingPrototype.cs
Normal file
42
Content.Shared/Prototypes/PDA/UplinkStoreListingPrototype.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Content.Shared.GameObjects.Components.PDA;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
namespace Content.Shared.Prototypes.PDA
|
||||
{
|
||||
[Prototype("uplinkListing")]
|
||||
public class UplinkStoreListingPrototype : IPrototype, IIndexedPrototype
|
||||
{
|
||||
|
||||
private string _id;
|
||||
private string _itemId;
|
||||
private int _price;
|
||||
private UplinkCategory _category;
|
||||
private string _desc;
|
||||
private string _name;
|
||||
private Color _displayColor;
|
||||
|
||||
public string ID => _id;
|
||||
|
||||
public string ItemId => _itemId;
|
||||
public int Price => _price;
|
||||
public UplinkCategory Category => _category;
|
||||
public string Description => _desc;
|
||||
public string ListingName => _name;
|
||||
public Color DisplayColor => _displayColor;
|
||||
public void LoadFrom(YamlMappingNode mapping)
|
||||
{
|
||||
var serializer = YamlObjectSerializer.NewReader(mapping);
|
||||
serializer.DataField(ref _id, "id", string.Empty);
|
||||
serializer.DataField(ref _itemId, "itemId", string.Empty);
|
||||
serializer.DataField(ref _price, "price", 5);
|
||||
serializer.DataField(ref _category, "category", UplinkCategory.Utility);
|
||||
serializer.DataField(ref _desc, "description", string.Empty);
|
||||
serializer.DataField(ref _name, "listingName", string.Empty);
|
||||
serializer.DataField(ref _displayColor, "displayColor", Color.White);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user