Serv3 rework content changes (#7145)

This commit is contained in:
Paul Ritter
2022-04-03 02:01:22 +02:00
committed by GitHub
parent 6b01ab17a6
commit 2ff40d5a1f
133 changed files with 476 additions and 324 deletions

View File

@@ -35,13 +35,13 @@ namespace Content.Client.Actions
[UsedImplicitly] [UsedImplicitly]
public sealed class ActionsSystem : SharedActionsSystem public sealed class ActionsSystem : SharedActionsSystem
{ {
[Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!; [Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IItemSlotManager _itemSlotManager = default!; [Dependency] private readonly IItemSlotManager _itemSlotManager = default!;
[Dependency] private readonly ISerializationManager _serializationManager = default!; [Dependency] private readonly ISerializationManager _serializationManager = default!;
[Dependency] private readonly IResourceManager _resourceManager = default!; [Dependency] private readonly IResourceManager _resourceManager = default!;
[Dependency] private readonly IOverlayManager _overlayMan = default!; [Dependency] private readonly IOverlayManager _overlayMan = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly InteractionOutlineSystem _interactionOutline = default!; [Dependency] private readonly InteractionOutlineSystem _interactionOutline = default!;
[Dependency] private readonly TargetOutlineSystem _targetOutline = default!; [Dependency] private readonly TargetOutlineSystem _targetOutline = default!;
@@ -427,7 +427,7 @@ namespace Content.Client.Actions
{ {
// The user is targeting with this action, but it is not valid. Maybe mark this click as // The user is targeting with this action, but it is not valid. Maybe mark this click as
// handled and prevent further interactions. // handled and prevent further interactions.
return !action.InteractOnMiss; return !action.InteractOnMiss;
} }
switch (action) switch (action)
@@ -611,7 +611,7 @@ namespace Content.Client.Actions
/*public void SaveActionAssignments(string path) /*public void SaveActionAssignments(string path)
{ {
// Currently only tested with temporary innate actions (i.e., mapping actions). No guarantee it works with // Currently only tested with temporary innate actions (i.e., mapping actions). No guarantee it works with
// other actions. If its meant to be used for full game state saving/loading, the entity that provides // other actions. If its meant to be used for full game state saving/loading, the entity that provides
// actions needs to keep the same uid. // actions needs to keep the same uid.
@@ -666,9 +666,7 @@ namespace Content.Client.Actions
if (!map.TryGet("action", out var actionNode)) if (!map.TryGet("action", out var actionNode))
continue; continue;
var action = _serializationManager.ReadValueCast<ActionType>(typeof(ActionType), actionNode); var action = _serializationManager.Read<ActionType>(actionNode);
if (action == null)
continue;
if (Ui.Component.Actions.TryGetValue(action, out var existingAction)) if (Ui.Component.Actions.TryGetValue(action, out var existingAction))
{ {
@@ -681,9 +679,7 @@ namespace Content.Client.Actions
if (!map.TryGet("assignments", out var assignmentNode)) if (!map.TryGet("assignments", out var assignmentNode))
continue; continue;
var assignments = _serializationManager.ReadValueCast<List<(byte Hotbar, byte Slot)>>(typeof(List<(byte Hotbar, byte Slot)>), assignmentNode); var assignments = _serializationManager.Read<List<(byte Hotbar, byte Slot)>>(assignmentNode);
if (assignments == null)
continue;
foreach (var index in assignments) foreach (var index in assignments)
{ {

View File

@@ -22,7 +22,7 @@ public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager
private void LoadGamePrototype(GamePrototypeLoadMessage message) private void LoadGamePrototype(GamePrototypeLoadMessage message)
{ {
_prototypeManager.LoadString(message.PrototypeData, true); _prototypeManager.LoadString(message.PrototypeData, true);
_prototypeManager.Resync(); _prototypeManager.ResolveResults();
_localizationManager.ReloadLocalizations(); _localizationManager.ReloadLocalizations();
GamePrototypeLoaded?.Invoke(); GamePrototypeLoaded?.Invoke();
Logger.InfoS("adminbus", "Loaded adminbus prototype data."); Logger.InfoS("adminbus", "Loaded adminbus prototype data.");

View File

@@ -81,7 +81,7 @@ namespace Content.Client.Changelog
return new List<ChangelogEntry>(); return new List<ChangelogEntry>();
var node = (MappingDataNode)yamlData.Documents[0].RootNode.ToDataNode(); var node = (MappingDataNode)yamlData.Documents[0].RootNode.ToDataNode();
return _serialization.ReadValueOrThrow<List<ChangelogEntry>>(node["Entries"]); return _serialization.Read<List<ChangelogEntry>>(node["Entries"]);
}); });
} }

View File

@@ -259,7 +259,7 @@ namespace Content.IntegrationTests
if (client.Options?.ExtraPrototypes is { } extra) if (client.Options?.ExtraPrototypes is { } extra)
{ {
prototypes.LoadString(extra, true); prototypes.LoadString(extra, true);
prototypes.Resync(); prototypes.ResolveResults();
} }
}); });
@@ -306,7 +306,7 @@ namespace Content.IntegrationTests
if (server.Options?.ExtraPrototypes is { } extra) if (server.Options?.ExtraPrototypes is { } extra)
{ {
prototypes.LoadString(extra, true); prototypes.LoadString(extra, true);
prototypes.Resync(); prototypes.ResolveResults();
} }
}); });

View File

@@ -40,6 +40,12 @@ namespace Content.IntegrationTests.Tests.Body
normalBodyTemperature: 310.15 normalBodyTemperature: 310.15
thermalRegulationTemperatureThreshold: 25 thermalRegulationTemperatureThreshold: 25
- type: Respirator - type: Respirator
damage:
types:
Asphyxiation: 1.5
damageRecovery:
types:
Asphyxiation: -1.5
"; ";
[Test] [Test]

View File

@@ -21,7 +21,7 @@ namespace Content.IntegrationTests.Tests.Chemistry
public void DeserializeNullTest() public void DeserializeNullTest()
{ {
var node = new ValueDataNode("null"); var node = new ValueDataNode("null");
var unit = Serialization.ReadValue<FixedPoint2?>(node); var unit = Serialization.Read<FixedPoint2?>(node);
Assert.That(unit, Is.Null); Assert.That(unit, Is.Null);
} }
@@ -30,7 +30,7 @@ namespace Content.IntegrationTests.Tests.Chemistry
public void DeserializeNullDefinitionTest() public void DeserializeNullDefinitionTest()
{ {
var node = new MappingDataNode().Add("unit", "null"); var node = new MappingDataNode().Add("unit", "null");
var definition = Serialization.ReadValueOrThrow<FixedPoint2TestDefinition>(node); var definition = Serialization.Read<FixedPoint2TestDefinition>(node);
Assert.That(definition.Unit, Is.Null); Assert.That(definition.Unit, Is.Null);
} }

View File

@@ -78,6 +78,9 @@ namespace Content.IntegrationTests.Tests.Disposal
id: HumanDummy id: HumanDummy
components: components:
- type: Body - type: Body
template: HumanoidTemplate
preset: HumanPreset
centerSlot: torso
- type: MobState - type: MobState
- type: Damageable - type: Damageable
damageContainer: Biological damageContainer: Biological

View File

@@ -24,7 +24,7 @@ namespace Content.IntegrationTests.Tests
{ {
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>()) foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
{ {
if (proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue; if (proto.NoSpawn || proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue;
Assert.DoesNotThrow(() => Assert.DoesNotThrow(() =>
{ {

View File

@@ -69,7 +69,7 @@ namespace Content.IntegrationTests.Tests
//Generate list of non-abstract prototypes to test //Generate list of non-abstract prototypes to test
foreach (var prototype in prototypeMan.EnumeratePrototypes<EntityPrototype>()) foreach (var prototype in prototypeMan.EnumeratePrototypes<EntityPrototype>())
{ {
if (prototype.Abstract) if (prototype.NoSpawn || prototype.Abstract)
{ {
continue; continue;
} }

View File

@@ -11,7 +11,7 @@ namespace Content.Server.AI.Components
// These are immutable so any dynamic changes aren't saved back over. // These are immutable so any dynamic changes aren't saved back over.
// AiFactionSystem will just read these and then store them. // AiFactionSystem will just read these and then store them.
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("hostile")] [DataField("hostile")]

View File

@@ -12,7 +12,7 @@ namespace Content.Server.AI.Utility
/// Name of the BehaviorSet. /// Name of the BehaviorSet.
/// </summary> /// </summary>
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -53,7 +53,7 @@ public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager
msg.PrototypeData = prototypeData; msg.PrototypeData = prototypeData;
_netManager.ServerSendToAll(msg); // everyone load it up! _netManager.ServerSendToAll(msg); // everyone load it up!
_prototypeManager.LoadString(prototypeData, true); // server needs it too. _prototypeManager.LoadString(prototypeData, true); // server needs it too.
_prototypeManager.Resync(); _prototypeManager.ResolveResults();
_localizationManager.ReloadLocalizations(); _localizationManager.ReloadLocalizations();
GamePrototypeLoaded?.Invoke(); GamePrototypeLoaded?.Invoke();
} }

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Advertisements
public sealed class AdvertisementsPackPrototype : IPrototype public sealed class AdvertisementsPackPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("advertisements")] [DataField("advertisements")]

View File

@@ -26,7 +26,7 @@ namespace Content.Server.Atmos.Reactions
public sealed class GasReactionPrototype : IPrototype public sealed class GasReactionPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -12,7 +12,7 @@ namespace Content.Server.BarSign
private string _name = string.Empty; private string _name = string.Empty;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;

View File

@@ -27,7 +27,7 @@ namespace Content.Server.Bible.Components
public DamageSpecifier DamageOnUntrainedUse = default!; public DamageSpecifier DamageOnUntrainedUse = default!;
//Chance the bible will fail to heal someone with no helmet //Chance the bible will fail to heal someone with no helmet
[DataField("failChance", required:true)] [DataField("failChance")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public float FailChance = 0.34f; public float FailChance = 0.34f;

View File

@@ -70,7 +70,7 @@ public sealed class SeedPrototype : IPrototype
{ {
public const string Prototype = "SeedBase"; public const string Prototype = "SeedBase";
[DataField("id", required: true)] public string ID { get; private init; } = default!; [IdDataFieldAttribute] public string ID { get; private init; } = default!;
/// <summary> /// <summary>
/// Unique identifier of this seed. Do NOT set this. /// Unique identifier of this seed. Do NOT set this.

View File

@@ -11,7 +11,7 @@ namespace Content.Server.Construction.Completions;
[UsedImplicitly] [UsedImplicitly]
public sealed class AdminLog : IGraphAction public sealed class AdminLog : IGraphAction
{ {
[DataField("logType", required: true)] [DataField("logType")]
public LogType LogType = LogType.Construction; public LogType LogType = LogType.Construction;
[DataField("impact")] [DataField("impact")]

View File

@@ -13,7 +13,7 @@ namespace Content.Server.GameTicking.Presets
[Prototype("gamePreset")] [Prototype("gamePreset")]
public sealed class GamePresetPrototype : IPrototype public sealed class GamePresetPrototype : IPrototype
{ {
[DataField("id", required:true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("alias")] [DataField("alias")]

View File

@@ -6,6 +6,6 @@ namespace Content.Server.GameTicking.Rules;
[Prototype("gameRule")] [Prototype("gameRule")]
public sealed class GameRulePrototype : IPrototype public sealed class GameRulePrototype : IPrototype
{ {
[DataField("id", required:true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }

View File

@@ -15,7 +15,7 @@ namespace Content.Server.Holiday
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty; [ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]

View File

@@ -102,7 +102,7 @@ public sealed class SpreaderSystem : EntitySystem
{ {
var direction = (DirectionFlag) (1 << i); var direction = (DirectionFlag) (1 << i);
var coords = transform.Coordinates.Offset(direction.AsDir().ToVec()); var coords = transform.Coordinates.Offset(direction.AsDir().ToVec());
if (grid.GetTileRef(coords).Tile.IsEmpty || _robustRandom.Prob(spreader.Chance)) continue; if (grid.GetTileRef(coords).Tile.IsEmpty || _robustRandom.Prob(1 - spreader.Chance)) continue;
var ents = grid.GetLocal(coords); var ents = grid.GetLocal(coords);
if (ents.Any(x => IsTileBlockedFrom(x, direction))) continue; if (ents.Any(x => IsTileBlockedFrom(x, direction))) continue;

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Maps;
public sealed class GameMapPrototype : IPrototype public sealed class GameMapPrototype : IPrototype
{ {
/// <inheritdoc/> /// <inheritdoc/>
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -11,7 +11,7 @@ namespace Content.Server.Objectives
public sealed class ObjectivePrototype : IPrototype public sealed class ObjectivePrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown"; [ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown";

View File

@@ -19,8 +19,8 @@ namespace Content.Server.Projectiles.Components
public bool DeleteOnCollide { get; } = true; public bool DeleteOnCollide { get; } = true;
// Get that juicy FPS hit sound // Get that juicy FPS hit sound
[DataField("soundHit", required: true)] public SoundSpecifier? SoundHit = default!; [DataField("soundHit")] public SoundSpecifier? SoundHit;
[DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies = null; [DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies;
public bool DamagedEntity; public bool DamagedEntity;

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Salvage
public sealed class SalvageMapPrototype : IPrototype public sealed class SalvageMapPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Speech.Components
public sealed class ReplacementAccentPrototype : IPrototype public sealed class ReplacementAccentPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("words")] [DataField("words")]

View File

@@ -28,7 +28,7 @@ public sealed class VocalComponent : Component
public const float Variation = 0.125f; public const float Variation = 0.125f;
// Not using the in-build sound support for actions, given that the sound is modified non-prototype specific factors like gender. // Not using the in-build sound support for actions, given that the sound is modified non-prototype specific factors like gender.
[DataField("action", required: true)] [DataField("action")]
public InstantAction Action = new() public InstantAction Action = new()
{ {
UseDelay = TimeSpan.FromSeconds(10), UseDelay = TimeSpan.FromSeconds(10),

View File

@@ -52,13 +52,13 @@ namespace Content.Server.Temperature.Components
} }
} }
[DataField("coldDamage", required: true)] [DataField("coldDamage")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier ColdDamage = default!; public DamageSpecifier ColdDamage = new();
[DataField("heatDamage", required: true)] [DataField("heatDamage")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier HeatDamage = default!; public DamageSpecifier HeatDamage = new();
/// <summary> /// <summary>
/// Temperature won't do more than this amount of damage per second. /// Temperature won't do more than this amount of damage per second.

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.Access;
[Prototype("accessGroup")] [Prototype("accessGroup")]
public sealed class AccessGroupPrototype : IPrototype public sealed class AccessGroupPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("tags", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<AccessLevelPrototype>))] [DataField("tags", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<AccessLevelPrototype>))]

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.Access
public sealed class AccessLevelPrototype : IPrototype public sealed class AccessLevelPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -15,7 +15,7 @@ namespace Content.Shared.Alert
public sealed class AlertOrderPrototype : IPrototype, IComparer<AlertPrototype>, ISerializationHooks public sealed class AlertOrderPrototype : IPrototype, IComparer<AlertPrototype>, ISerializationHooks
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("order")] private readonly List<(string type, string alert)> _order = new(); [DataField("order")] private readonly List<(string type, string alert)> _order = new();

View File

@@ -21,7 +21,7 @@ namespace Content.Shared.Alert
/// <summary> /// <summary>
/// Type of alert, no 2 alert prototypes should have the same one. /// Type of alert, no 2 alert prototypes should have the same one.
/// </summary> /// </summary>
[DataField("alertType")] [IdDataFieldAttribute]
public AlertType AlertType { get; private set; } public AlertType AlertType { get; private set; }
/// <summary> /// <summary>

View File

@@ -14,7 +14,7 @@ namespace Content.Shared.Atmos.Monitor
[Serializable, NetSerializable] [Serializable, NetSerializable]
public sealed class AtmosAlarmThreshold : IPrototype, ISerializationHooks public sealed class AtmosAlarmThreshold : IPrototype, ISerializationHooks
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]
[DataField("ignore")] [DataField("ignore")]

View File

@@ -15,7 +15,7 @@ namespace Content.Shared.Atmos.Prototypes
// TODO: Add interfaces for gas behaviours e.g. breathing, burning // TODO: Add interfaces for gas behaviours e.g. breathing, burning
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Audio
public sealed class SoundCollectionPrototype : IPrototype public sealed class SoundCollectionPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("files")] [DataField("files")]

View File

@@ -15,7 +15,7 @@ namespace Content.Shared.Body.Prototypes
public sealed class BodyPresetPrototype : IPrototype public sealed class BodyPresetPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("partIDs")] [DataField("partIDs")]

View File

@@ -28,7 +28,7 @@ namespace Content.Shared.Body.Prototypes
private Dictionary<string, string> _mechanismLayers = new(); private Dictionary<string, string> _mechanismLayers = new();
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Body.Prototypes
[Prototype("metabolismGroup")] [Prototype("metabolismGroup")]
public sealed class MetabolismGroupPrototype : IPrototype public sealed class MetabolismGroupPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }
} }

View File

@@ -6,7 +6,7 @@ namespace Content.Shared.Body.Prototypes
[Prototype("metabolizerType")] [Prototype("metabolizerType")]
public sealed class MetabolizerTypePrototype : IPrototype public sealed class MetabolizerTypePrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }
} }

View File

@@ -18,7 +18,7 @@ namespace Content.Shared.Cargo
[DataField("description")] private string _description = string.Empty; [DataField("description")] private string _description = string.Empty;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.CharacterAppearance
[Prototype("spriteAccessory")] [Prototype("spriteAccessory")]
public sealed class SpriteAccessoryPrototype : IPrototype, ISerializationHooks public sealed class SpriteAccessoryPrototype : IPrototype, ISerializationHooks
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("categories", required: true)] [DataField("categories", required: true)]

View File

@@ -22,7 +22,7 @@ namespace Content.Shared.Chemistry.Dispenser
private List<string> _inventory = new(); private List<string> _inventory = new();
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
public List<string> Inventory => _inventory; public List<string> Inventory => _inventory;

View File

@@ -18,7 +18,7 @@ namespace Content.Shared.Chemistry.Reaction
public sealed class ReactionPrototype : IPrototype, IComparable<ReactionPrototype> public sealed class ReactionPrototype : IPrototype, IComparable<ReactionPrototype>
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name")] [DataField("name")]

View File

@@ -37,7 +37,8 @@ public sealed class ReactiveReagentEffectEntry
[DataField("effects", required: true)] [DataField("effects", required: true)]
public List<ReagentEffect> Effects = default!; public List<ReagentEffect> Effects = default!;
[DataField("groups", required: true, readOnly: true, serverOnly: true,
[DataField("groups", readOnly: true, serverOnly: true,
customTypeSerializer:typeof(PrototypeIdDictionarySerializer<HashSet<ReactionMethod>, ReactiveGroupPrototype>))] customTypeSerializer:typeof(PrototypeIdDictionarySerializer<HashSet<ReactionMethod>, ReactiveGroupPrototype>))]
public Dictionary<string, HashSet<ReactionMethod>> ReactiveGroups { get; } = default!; public Dictionary<string, HashSet<ReactionMethod>> ReactiveGroups { get; } = default!;
} }

View File

@@ -6,6 +6,6 @@ namespace Content.Shared.Chemistry.Reaction;
[Prototype("reactiveGroup")] [Prototype("reactiveGroup")]
public sealed class ReactiveGroupPrototype : IPrototype public sealed class ReactiveGroupPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }

View File

@@ -25,7 +25,7 @@ namespace Content.Shared.Chemistry.Reagent
public sealed class ReagentPrototype : IPrototype, IInheritingPrototype public sealed class ReagentPrototype : IPrototype, IInheritingPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name", required: true)] [DataField("name", required: true)]
@@ -34,11 +34,11 @@ namespace Content.Shared.Chemistry.Reagent
[DataField("group")] [DataField("group")]
public string Group { get; } = "Unknown"; public string Group { get; } = "Unknown";
[DataField("parent", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))] [ParentDataFieldAttribute(typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string? Parent { get; private set; } public string? Parent { get; private set; }
[NeverPushInheritance] [NeverPushInheritance]
[DataField("abstract")] [AbstractDataFieldAttribute]
public bool Abstract { get; private set; } public bool Abstract { get; private set; }
[DataField("desc", required: true)] [DataField("desc", required: true)]

View File

@@ -18,7 +18,7 @@ namespace Content.Shared.Construction.Prototypes
private readonly Dictionary<string, Dictionary<ConstructionGraphNode, ConstructionGraphNode?>> _pathfinding = new(); private readonly Dictionary<string, Dictionary<ConstructionGraphNode, ConstructionGraphNode?>> _pathfinding = new();
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]

View File

@@ -60,7 +60,7 @@ namespace Content.Shared.Construction.Prototypes
[DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure; [DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("placementMode")] [DataField("placementMode")]

View File

@@ -2,7 +2,6 @@
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.Manager.Result;
using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Serialization.Markdown.Validation;
using Robust.Shared.Serialization.TypeSerializers.Interfaces; using Robust.Shared.Serialization.TypeSerializers.Interfaces;
@@ -47,17 +46,17 @@ namespace Content.Shared.Construction.Steps
return null; return null;
} }
public DeserializationResult Read(ISerializationManager serializationManager, public ConstructionGraphStep Read(ISerializationManager serializationManager,
MappingDataNode node, MappingDataNode node,
IDependencyCollection dependencies, IDependencyCollection dependencies,
bool skipHook, bool skipHook,
ISerializationContext? context = null) ISerializationContext? context = null, ConstructionGraphStep? _ = null)
{ {
var type = GetType(node) ?? var type = GetType(node) ??
throw new ArgumentException( throw new ArgumentException(
"Tried to convert invalid YAML node mapping to ConstructionGraphStep!"); "Tried to convert invalid YAML node mapping to ConstructionGraphStep!");
return serializationManager.Read(type, node, context, skipHook); return (ConstructionGraphStep)serializationManager.Read(type, node, context, skipHook)!;
} }
public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node, public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node,

View File

@@ -21,7 +21,7 @@ namespace Content.Shared.Damage.Prototypes
public sealed class DamageContainerPrototype : IPrototype public sealed class DamageContainerPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -18,7 +18,7 @@ namespace Content.Shared.Damage.Prototypes
[Serializable, NetSerializable] [Serializable, NetSerializable]
public sealed class DamageGroupPrototype : IPrototype public sealed class DamageGroupPrototype : IPrototype
{ {
[DataField("id", required: true)] public string ID { get; } = default!; [IdDataFieldAttribute] public string ID { get; } = default!;
[DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<DamageTypePrototype>))] [DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<DamageTypePrototype>))]
public List<string> DamageTypes { get; } = default!; public List<string> DamageTypes { get; } = default!;

View File

@@ -19,7 +19,7 @@ namespace Content.Shared.Damage.Prototypes
public sealed class DamageModifierSetPrototype : DamageModifierSet, IPrototype public sealed class DamageModifierSetPrototype : DamageModifierSet, IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }
} }

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.Damage.Prototypes
[Serializable, NetSerializable] [Serializable, NetSerializable]
public sealed class DamageTypePrototype : IPrototype public sealed class DamageTypePrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }
} }

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Prototypes;
[Prototype("examinableDamage")] [Prototype("examinableDamage")]
public sealed class ExaminableDamagePrototype : IPrototype public sealed class ExaminableDamagePrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Dataset
public sealed class DatasetPrototype : IPrototype public sealed class DatasetPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("values")] public IReadOnlyList<string> Values { get; } = new List<string>(); [DataField("values")] public IReadOnlyList<string> Values { get; } = new List<string>();

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.Decals;
[Prototype("palette")] [Prototype("palette")]
public sealed class ColorPalettePrototype : IPrototype public sealed class ColorPalettePrototype : IPrototype
{ {
[DataField("id")] public string ID { get; } = null!; [IdDataFieldAttribute] public string ID { get; } = null!;
[DataField("name")] public string Name { get; } = null!; [DataField("name")] public string Name { get; } = null!;
[DataField("colors")] public Dictionary<string, Color> Colors { get; } = null!; [DataField("colors")] public Dictionary<string, Color> Colors { get; } = null!;
} }

View File

@@ -3,7 +3,6 @@ using Robust.Shared.IoC;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.Manager.Result;
using Robust.Shared.Serialization.Markdown; using Robust.Shared.Serialization.Markdown;
using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Serialization.Markdown.Validation;
@@ -20,12 +19,10 @@ namespace Content.Shared.Decals
return serializationManager.ValidateNode<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context); return serializationManager.ValidateNode<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context);
} }
public DeserializationResult Read(ISerializationManager serializationManager, MappingDataNode node, public DecalGridComponent.DecalGridChunkCollection Read(ISerializationManager serializationManager, MappingDataNode node,
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null) IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, DecalGridComponent.DecalGridChunkCollection? _ = null)
{ {
//todo this read method does not support pushing inheritance var dictionary = serializationManager.Read<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context, skipHook: skipHook);
var dictionary =
serializationManager.ReadValueOrThrow<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context, skipHook);
var uids = new SortedSet<uint>(); var uids = new SortedSet<uint>();
var uidChunkMap = new Dictionary<uint, Vector2i>(); var uidChunkMap = new Dictionary<uint, Vector2i>();
@@ -54,8 +51,7 @@ namespace Content.Shared.Decals
newDict[indices][newUid] = dictionary[indices][oldUid]; newDict[indices][newUid] = dictionary[indices][oldUid];
} }
return new DeserializedValue<DecalGridComponent.DecalGridChunkCollection>( return new DecalGridComponent.DecalGridChunkCollection(newDict){NextUid = nextIndex};
new DecalGridComponent.DecalGridChunkCollection(newDict){NextUid = nextIndex});
} }
public DataNode Write(ISerializationManager serializationManager, DecalGridComponent.DecalGridChunkCollection value, bool alwaysWrite = false, public DataNode Write(ISerializationManager serializationManager, DecalGridComponent.DecalGridChunkCollection value, bool alwaysWrite = false,

View File

@@ -8,7 +8,7 @@ namespace Content.Shared.Decals
[Prototype("decal")] [Prototype("decal")]
public sealed class DecalPrototype : IPrototype public sealed class DecalPrototype : IPrototype
{ {
[DataField("id")] public string ID { get; } = null!; [IdDataFieldAttribute] public string ID { get; } = null!;
[DataField("sprite")] public SpriteSpecifier Sprite { get; } = SpriteSpecifier.Invalid; [DataField("sprite")] public SpriteSpecifier Sprite { get; } = SpriteSpecifier.Invalid;
[DataField("tags")] public List<string> Tags = new(); [DataField("tags")] public List<string> Tags = new();
} }

View File

@@ -12,17 +12,17 @@ namespace Content.Shared.Disease
public sealed class DiseasePrototype : IPrototype, IInheritingPrototype public sealed class DiseasePrototype : IPrototype, IInheritingPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name")] [DataField("name")]
public string Name { get; } = string.Empty; public string Name { get; } = string.Empty;
[DataField("parent", customTypeSerializer: typeof(PrototypeIdSerializer<DiseasePrototype>))] [ParentDataFieldAttribute(typeof(PrototypeIdSerializer<DiseasePrototype>))]
public string? Parent { get; private set; } public string? Parent { get; private set; }
[NeverPushInheritance] [NeverPushInheritance]
[DataField("abstract")] [AbstractDataFieldAttribute]
public bool Abstract { get; private set; } public bool Abstract { get; private set; }
/// <summary> /// <summary>

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.EntityList
public sealed class EntityListPrototype : IPrototype public sealed class EntityListPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Explosion;
[Prototype("explosion")] [Prototype("explosion")]
public sealed class ExplosionPrototype : IPrototype public sealed class ExplosionPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataField]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>
@@ -27,14 +27,14 @@ public sealed class ExplosionPrototype : IPrototype
/// <summary> /// <summary>
/// This set of points, together with <see cref="_tileBreakIntensity"/> define a function that maps the /// This set of points, together with <see cref="_tileBreakIntensity"/> define a function that maps the
/// explosion intensity to a tile break chance via linear interpolation. /// explosion intensity to a tile break chance via linear interpolation.
/// </summary> /// </summary>
[DataField("tileBreakChance")] [DataField("tileBreakChance")]
private readonly float[] _tileBreakChance = { 0f, 1f }; private readonly float[] _tileBreakChance = { 0f, 1f };
/// <summary> /// <summary>
/// This set of points, together with <see cref="_tileBreakChance"/> define a function that maps the /// This set of points, together with <see cref="_tileBreakChance"/> define a function that maps the
/// explosion intensity to a tile break chance via linear interpolation. /// explosion intensity to a tile break chance via linear interpolation.
/// </summary> /// </summary>
[DataField("tileBreakIntensity")] [DataField("tileBreakIntensity")]
private readonly float[] _tileBreakIntensity = {0f, 15f }; private readonly float[] _tileBreakIntensity = {0f, 15f };

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.HUD
[DataField("name", required: true)] [DataField("name", required: true)]
public string Name { get; } = string.Empty; public string Name { get; } = string.Empty;
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = string.Empty; public string ID { get; } = string.Empty;
[DataField("path", required: true)] [DataField("path", required: true)]

View File

@@ -1,10 +1,9 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Inventory; namespace Content.Shared.Inventory;
public abstract class InventoryComponent : Component public abstract class InventoryComponent : Component
{ {
[DataField("templateId", required: true, [DataField("templateId", customTypeSerializer: typeof(PrototypeIdSerializer<InventoryTemplatePrototype>))]
customTypeSerializer: typeof(PrototypeIdSerializer<InventoryTemplatePrototype>))]
public string TemplateId { get; } = "human"; public string TemplateId { get; } = "human";
} }

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Inventory;
[Prototype("inventoryTemplate")] [Prototype("inventoryTemplate")]
public sealed class InventoryTemplatePrototype : IPrototype public sealed class InventoryTemplatePrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = string.Empty; public string ID { get; } = string.Empty;
[DataField("slots")] [DataField("slots")]

View File

@@ -17,7 +17,7 @@ namespace Content.Shared.Kitchen
public sealed class FoodRecipePrototype : IPrototype public sealed class FoodRecipePrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name")] [DataField("name")]

View File

@@ -13,16 +13,16 @@ namespace Content.Shared.Maps
[Prototype("tile")] [Prototype("tile")]
public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
{ {
[DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ContentTileDefinition>))] [ParentDataFieldAttribute(typeof(PrototypeIdSerializer<ContentTileDefinition>))]
public string? Parent { get; private set; } public string? Parent { get; private set; }
[NeverPushInheritance] [NeverPushInheritance]
[DataField("abstract")] [AbstractDataFieldAttribute]
public bool Abstract { get; private set; } public bool Abstract { get; private set; }
public string Path => "/Textures/Tiles/"; public string Path => "/Textures/Tiles/";
[DataField("id", required: true)] public string ID { get; } = string.Empty; [IdDataFieldAttribute] public string ID { get; } = string.Empty;
public ushort TileId { get; private set; } public ushort TileId { get; private set; }

View File

@@ -1,10 +1,7 @@
using Content.Shared.Stacks; using Content.Shared.Stacks;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Shared.Materials namespace Content.Shared.Materials
{ {
@@ -16,15 +13,15 @@ namespace Content.Shared.Materials
public sealed class MaterialPrototype : IPrototype, IInheritingPrototype public sealed class MaterialPrototype : IPrototype, IInheritingPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("parent")] [ParentDataField(typeof(PrototypeIdSerializer<MaterialPrototype>))]
public string? Parent { get; } = null; public string? Parent { get; } = null;
[ViewVariables] [ViewVariables]
[DataField("abstract")] [AbstractDataFieldAttribute]
public bool Abstract { get; } = false; public bool Abstract { get; } = false;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]

View File

@@ -5,7 +5,7 @@ namespace Content.Shared.NameIdentifier;
[Prototype("nameIdentifierGroup")] [Prototype("nameIdentifierGroup")]
public sealed class NameIdentifierGroupPrototype : IPrototype public sealed class NameIdentifierGroupPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.PDA
public sealed class UplinkStoreListingPrototype : IPrototype public sealed class UplinkStoreListingPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("itemId", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))] [DataField("itemId", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Research.Prototypes
public sealed class LatheRecipePrototype : IPrototype public sealed class LatheRecipePrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name")] [DataField("name")]

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Research.Prototypes
/// The ID of this technology prototype. /// The ID of this technology prototype.
/// </summary> /// </summary>
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.Roles
public sealed class AntagPrototype : IPrototype public sealed class AntagPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -18,7 +18,7 @@ namespace Content.Shared.Roles
private string _name = string.Empty; private string _name = string.Empty;
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("supervisors")] [DataField("supervisors")]

View File

@@ -33,7 +33,7 @@ namespace Content.Shared.Roles
private Dictionary<string, string> _inHand = new(0); private Dictionary<string, string> _inHand = new(0);
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = string.Empty; public string ID { get; } = string.Empty;
public string GetGear(string slot, HumanoidCharacterProfile? profile) public string GetGear(string slot, HumanoidCharacterProfile? profile)

View File

@@ -2,7 +2,6 @@ using System;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.Manager.Result;
using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Serialization.Markdown.Validation;
using Robust.Shared.Serialization.Markdown.Value; using Robust.Shared.Serialization.Markdown.Value;
@@ -30,17 +29,17 @@ namespace Content.Shared.Sound
return typeof(SoundPathSpecifier); return typeof(SoundPathSpecifier);
} }
public DeserializationResult Read(ISerializationManager serializationManager, MappingDataNode node, public SoundSpecifier Read(ISerializationManager serializationManager, MappingDataNode node,
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null) IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, SoundSpecifier? _ = null)
{ {
var type = GetType(node); var type = GetType(node);
return serializationManager.Read(type, node, context, skipHook); return (SoundSpecifier) serializationManager.Read(type, node, context, skipHook)!;
} }
public DeserializationResult Read(ISerializationManager serializationManager, ValueDataNode node, public SoundSpecifier Read(ISerializationManager serializationManager, ValueDataNode node,
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null) IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, SoundSpecifier? _ = null)
{ {
return new DeserializedValue<SoundSpecifier>(new SoundPathSpecifier(node.Value)); return new SoundPathSpecifier(node.Value);
} }
public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node, public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node,

View File

@@ -11,7 +11,7 @@ public sealed class SpeciesPrototype : IPrototype
/// <summary> /// <summary>
/// Prototype ID of the species. /// Prototype ID of the species.
/// </summary> /// </summary>
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -10,7 +10,7 @@ namespace Content.Shared.Stacks
public sealed class StackPrototype : IPrototype public sealed class StackPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.StatusEffect
[Prototype("statusEffect")] [Prototype("statusEffect")]
public sealed class StatusEffectPrototype : IPrototype public sealed class StatusEffectPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("alert")] [DataField("alert")]

View File

@@ -13,7 +13,7 @@ namespace Content.Shared.Tag
public sealed class TagPrototype : IPrototype public sealed class TagPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
} }
} }

View File

@@ -9,7 +9,7 @@ namespace Content.Shared.Tools
[Prototype("tool")] [Prototype("tool")]
public sealed class ToolQualityPrototype : IPrototype public sealed class ToolQualityPrototype : IPrototype
{ {
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
/// <summary> /// <summary>

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.VendingMachines
public sealed class VendingMachineInventoryPrototype : IPrototype public sealed class VendingMachineInventoryPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[DataField("name")] [DataField("name")]

View File

@@ -11,7 +11,7 @@ namespace Content.Shared.Weapons.Melee
public sealed class MeleeWeaponAnimationPrototype : IPrototype public sealed class MeleeWeaponAnimationPrototype : IPrototype
{ {
[ViewVariables] [ViewVariables]
[DataField("id", required: true)] [IdDataFieldAttribute]
public string ID { get; } = default!; public string ID { get; } = default!;
[ViewVariables] [ViewVariables]

View File

@@ -16,13 +16,11 @@ namespace Content.Tests.Shared.Alert
{ {
const string PROTOTYPES = @" const string PROTOTYPES = @"
- type: alert - type: alert
name: AlertLowPressure id: LowPressure
alertType: LowPressure
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
- type: alert - type: alert
name: AlertHighPressure id: HighPressure
alertType: HighPressure
icon: /Textures/Interface/Alerts/Pressure/highpressure.png icon: /Textures/Interface/Alerts/Pressure/highpressure.png
"; ";

View File

@@ -25,50 +25,40 @@ namespace Content.Tests.Shared.Alert
- category: Temperature - category: Temperature
- type: alert - type: alert
name: AlertLowPressure id: LowPressure
category: Pressure category: Pressure
alertType: LowPressure
- type: alert - type: alert
name: AlertOverfed id: Overfed
category: Hunger category: Hunger
alertType: Overfed
- type: alert - type: alert
name: AlertHighPressure id: HighPressure
category: Pressure category: Pressure
alertType: HighPressure
- type: alert - type: alert
name: AlertPeckish id: Peckish
category: Hunger category: Hunger
alertType: Peckish
- type: alert - type: alert
name: AlertStun id: Stun
alertType: Stun
- type: alert - type: alert
name: AlertHandcuffed id: Handcuffed
alertType: Handcuffed
- type: alert - type: alert
name: AlertHot id: Hot
category: Temperature category: Temperature
alertType: Hot
- type: alert - type: alert
name: AlertCold id: Cold
category: Temperature category: Temperature
alertType: Cold
- type: alert - type: alert
name: AlertWeightless id: Weightless
alertType: Weightless
- type: alert - type: alert
name: AlertPilotingShuttle id: PilotingShuttle
alertType: PilotingShuttle
"; ";
[Test] [Test]
@@ -78,7 +68,7 @@ namespace Content.Tests.Shared.Alert
var prototypeManager = IoCManager.Resolve<IPrototypeManager>(); var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
prototypeManager.Initialize(); prototypeManager.Initialize();
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
prototypeManager.Resync(); prototypeManager.ResolveResults();
var alertOrder = prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault(); var alertOrder = prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault();

View File

@@ -15,7 +15,7 @@ namespace Content.Tests.Shared.Alert
{ {
private const string Prototypes = @" private const string Prototypes = @"
- type: alert - type: alert
alertType: HumanHealth id: HumanHealth
category: Health category: Health
icon: /Textures/Interface/Alerts/Human/human.rsi/human.png icon: /Textures/Interface/Alerts/Human/human.rsi/human.png
name: Health name: Health
@@ -78,7 +78,7 @@ namespace Content.Tests.Shared.Alert
var proto = (YamlMappingNode) rootNode[0]; var proto = (YamlMappingNode) rootNode[0];
var serMan = IoCManager.Resolve<ISerializationManager>(); var serMan = IoCManager.Resolve<ISerializationManager>();
return serMan.ReadValue<AlertPrototype>(new MappingDataNode(proto)); return serMan.Read<AlertPrototype>(new MappingDataNode(proto));
} }
} }
} }

View File

@@ -16,14 +16,12 @@ namespace Content.Tests.Shared.Alert
{ {
const string PROTOTYPES = @" const string PROTOTYPES = @"
- type: alert - type: alert
name: AlertLowPressure id: LowPressure
alertType: LowPressure
category: Pressure category: Pressure
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
- type: alert - type: alert
name: AlertHighPressure id: HighPressure
alertType: HighPressure
category: Pressure category: Pressure
icon: /Textures/Interface/Alerts/Pressure/highpressure.png icon: /Textures/Interface/Alerts/Pressure/highpressure.png
"; ";
@@ -42,7 +40,7 @@ namespace Content.Tests.Shared.Alert
var factory = IoCManager.Resolve<IComponentFactory>(); var factory = IoCManager.Resolve<IComponentFactory>();
factory.RegisterClass<AlertsComponent>(); factory.RegisterClass<AlertsComponent>();
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
prototypeManager.Resync(); prototypeManager.ResolveResults();
var entSys = IoCManager.Resolve<IEntitySystemManager>(); var entSys = IoCManager.Resolve<IEntitySystemManager>();
entSys.LoadExtraSystemType<ServerAlertsSystem>(); entSys.LoadExtraSystemType<ServerAlertsSystem>();

View File

@@ -29,7 +29,7 @@ namespace Content.Tests.Shared.Chemistry
var serializationManager = IoCManager.Resolve<ISerializationManager>(); var serializationManager = IoCManager.Resolve<ISerializationManager>();
serializationManager.Initialize(); serializationManager.Initialize();
var newReagent = serializationManager.ReadValue<ReagentPrototype>(new MappingDataNode(proto)); var newReagent = serializationManager.Read<ReagentPrototype>(new MappingDataNode(proto));
Assert.That(defType, Is.EqualTo("reagent")); Assert.That(defType, Is.EqualTo("reagent"));
Assert.That(newReagent.ID, Is.EqualTo("H2")); Assert.That(newReagent.ID, Is.EqualTo("H2"));
@@ -43,6 +43,7 @@ namespace Content.Tests.Shared.Chemistry
id: H2 id: H2
name: Hydrogen name: Hydrogen
desc: A light, flammable gas. desc: A light, flammable gas.
physicalDesc: A light, flammable gas.
color: " + "\"#008080\""; color: " + "\"#008080\"";
} }
} }

View File

@@ -44,7 +44,7 @@ namespace Content.Tests.Shared
_prototypeManager = IoCManager.Resolve<IPrototypeManager>(); _prototypeManager = IoCManager.Resolve<IPrototypeManager>();
_prototypeManager.Initialize(); _prototypeManager.Initialize();
_prototypeManager.LoadString(_damagePrototypes); _prototypeManager.LoadString(_damagePrototypes);
_prototypeManager.Resync(); _prototypeManager.ResolveResults();
// Create a damage data set // Create a damage data set
_damageSpec = new(_prototypeManager.Index<DamageGroupPrototype>("Brute"), 6); _damageSpec = new(_prototypeManager.Index<DamageGroupPrototype>("Brute"), 6);

View File

@@ -29,6 +29,7 @@ namespace Content.Tests.Shared.Utility
prototypeManager.Initialize(); prototypeManager.Initialize();
prototypeManager.LoadFromStream(new StringReader(Prototypes)); prototypeManager.LoadFromStream(new StringReader(Prototypes));
prototypeManager.ResolveResults();
var dataSet = prototypeManager.Index<DatasetPrototype>(TestDatasetId); var dataSet = prototypeManager.Index<DatasetPrototype>(TestDatasetId);
var random = IoCManager.Resolve<IRobustRandom>(); var random = IoCManager.Resolve<IRobustRandom>();

View File

@@ -19,7 +19,7 @@
- alertType: Magboots - alertType: Magboots
- type: alert - type: alert
alertType: LowOxygen id: LowOxygen
category: Breathing category: Breathing
icon: icon:
sprite: /Textures/Interface/Alerts/breathing.rsi sprite: /Textures/Interface/Alerts/breathing.rsi
@@ -28,7 +28,7 @@
description: "There is [color=red]not enough oxygen[/color] in the air you are breathing. Put on [color=green]internals[/color]." description: "There is [color=red]not enough oxygen[/color] in the air you are breathing. Put on [color=green]internals[/color]."
- type: alert - type: alert
alertType: Toxins id: Toxins
category: Toxins category: Toxins
icon: icon:
sprite: /Textures/Interface/Alerts/breathing.rsi sprite: /Textures/Interface/Alerts/breathing.rsi
@@ -37,7 +37,7 @@
description: "There are [color=red]too many toxins[/color] in the air you are breathing. Put on [color=green]internals[/color] or get away." description: "There are [color=red]too many toxins[/color] in the air you are breathing. Put on [color=green]internals[/color] or get away."
- type: alert - type: alert
alertType: LowPressure id: LowPressure
category: Pressure category: Pressure
icon: icon:
sprite: /Textures/Interface/Alerts/pressure.rsi sprite: /Textures/Interface/Alerts/pressure.rsi
@@ -47,7 +47,7 @@
description: "The air around you is [color=red]hazardously thin[/color]. A [color=green]space suit[/color] would protect you." description: "The air around you is [color=red]hazardously thin[/color]. A [color=green]space suit[/color] would protect you."
- type: alert - type: alert
alertType: HighPressure id: HighPressure
category: Pressure category: Pressure
icon: icon:
sprite: /Textures/Interface/Alerts/pressure.rsi sprite: /Textures/Interface/Alerts/pressure.rsi
@@ -57,14 +57,14 @@
description: "The air around you is [color=red]hazardously thick[/color]. A [color=green]pressurized suit[/color] would be enough protect you" description: "The air around you is [color=red]hazardously thick[/color]. A [color=green]pressurized suit[/color] would be enough protect you"
- type: alert - type: alert
alertType: Fire id: Fire
icon: /Textures/Interface/Alerts/Fire/fire.png icon: /Textures/Interface/Alerts/Fire/fire.png
onClick: !type:ResistFire { } onClick: !type:ResistFire { }
name: "[color=red]On Fire[/color]" name: "[color=red]On Fire[/color]"
description: "You're [color=red]on fire[/color]. Click the alert to stop, drop and roll to put the fire out or move to a vacuum area." description: "You're [color=red]on fire[/color]. Click the alert to stop, drop and roll to put the fire out or move to a vacuum area."
- type: alert - type: alert
alertType: Cold id: Cold
category: Temperature category: Temperature
icon: icon:
sprite: /Textures/Interface/Alerts/temperature.rsi sprite: /Textures/Interface/Alerts/temperature.rsi
@@ -74,7 +74,7 @@
description: "You're [color=cyan]freezing cold![/color] Get somewhere warmer and take off any insulating clothing like a space suit." description: "You're [color=cyan]freezing cold![/color] Get somewhere warmer and take off any insulating clothing like a space suit."
- type: alert - type: alert
alertType: Hot id: Hot
category: Temperature category: Temperature
icon: icon:
sprite: /Textures/Interface/Alerts/temperature.rsi sprite: /Textures/Interface/Alerts/temperature.rsi
@@ -84,7 +84,7 @@
description: "It's [color=red]too hot![/color] Get somewhere colder, take off any insulating clothing like a space suit, or at least get away from the flames." description: "It's [color=red]too hot![/color] Get somewhere colder, take off any insulating clothing like a space suit, or at least get away from the flames."
- type: alert - type: alert
alertType: Weightless id: Weightless
icon: /Textures/Interface/Alerts/Weightless/weightless.png icon: /Textures/Interface/Alerts/Weightless/weightless.png
name: Weightless name: Weightless
description: > description: >
@@ -92,20 +92,20 @@
Mag-boots or jetpacks would help you move with more control Mag-boots or jetpacks would help you move with more control
- type: alert - type: alert
alertType: Stun id: Stun
icon: /Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png #Should probably draw a proper icon icon: /Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png #Should probably draw a proper icon
name: "[color=yellow]Stunned[/color]" name: "[color=yellow]Stunned[/color]"
description: "You're [color=yellow]stunned[/color]! Something is impairing your ability to move or interact with objects" description: "You're [color=yellow]stunned[/color]! Something is impairing your ability to move or interact with objects"
- type: alert - type: alert
alertType: Handcuffed id: Handcuffed
onClick: !type:RemoveCuffs { } onClick: !type:RemoveCuffs { }
icon: /Textures/Interface/Alerts/Handcuffed/Handcuffed.png icon: /Textures/Interface/Alerts/Handcuffed/Handcuffed.png
name: "[color=yellow]Handcuffed[/color]" name: "[color=yellow]Handcuffed[/color]"
description: "You're [color=yellow]handcuffed[/color] and can't use your hands. If anyone drags you, you won't be able to resist." description: "You're [color=yellow]handcuffed[/color] and can't use your hands. If anyone drags you, you won't be able to resist."
- type: alert - type: alert
alertType: Buckled id: Buckled
category: Buckled category: Buckled
onClick: !type:Unbuckle { } onClick: !type:Unbuckle { }
icon: /Textures/Interface/Alerts/Buckle/buckled.png icon: /Textures/Interface/Alerts/Buckle/buckled.png
@@ -113,7 +113,7 @@
description: "You've been [color=yellow]buckled[/color] to something. Click the alert to unbuckle unless you're [color=yellow]handcuffed.[/color]" description: "You've been [color=yellow]buckled[/color] to something. Click the alert to unbuckle unless you're [color=yellow]handcuffed.[/color]"
- type: alert - type: alert
alertType: HumanCrit id: HumanCrit
category: Health category: Health
icon: icon:
sprite: /Textures/Interface/Alerts/human_health.rsi sprite: /Textures/Interface/Alerts/human_health.rsi
@@ -122,7 +122,7 @@
description: "You're severely injured and unconscious." description: "You're severely injured and unconscious."
- type: alert - type: alert
alertType: HumanDead id: HumanDead
category: Health category: Health
icon: icon:
sprite: /Textures/Interface/Alerts/human_health.rsi sprite: /Textures/Interface/Alerts/human_health.rsi
@@ -131,7 +131,7 @@
description: You're dead, note that you can still be revived! description: You're dead, note that you can still be revived!
- type: alert - type: alert
alertType: HumanHealth id: HumanHealth
category: Health category: Health
icon: icon:
sprite: /Textures/Interface/Alerts/human_health.rsi sprite: /Textures/Interface/Alerts/human_health.rsi
@@ -142,7 +142,7 @@
maxSeverity: 6 maxSeverity: 6
- type: alert - type: alert
alertType: PilotingShuttle id: PilotingShuttle
category: Piloting category: Piloting
onClick: !type:StopPiloting { } onClick: !type:StopPiloting { }
icon: /Textures/Interface/Alerts/piloting.png icon: /Textures/Interface/Alerts/piloting.png
@@ -150,93 +150,93 @@
description: You are piloting a shuttle. Click the alert to stop. description: You are piloting a shuttle. Click the alert to stop.
- type: alert - type: alert
alertType: Overfed id: Overfed
category: Hunger category: Hunger
icon: /Textures/Interface/Alerts/Hunger/Overfed.png icon: /Textures/Interface/Alerts/Hunger/Overfed.png
name: "[color=yellow]Overfed[/color]" name: "[color=yellow]Overfed[/color]"
description: You ate too much food, lardass. Run around the station and lose some weight. description: You ate too much food, lardass. Run around the station and lose some weight.
- type: alert - type: alert
alertType: Peckish id: Peckish
category: Hunger category: Hunger
icon: /Textures/Interface/Alerts/Hunger/Peckish.png icon: /Textures/Interface/Alerts/Hunger/Peckish.png
name: "[color=yellow]Peckish[/color]" name: "[color=yellow]Peckish[/color]"
description: Some food would be good right about now. description: Some food would be good right about now.
- type: alert - type: alert
alertType: Starving id: Starving
category: Hunger category: Hunger
icon: /Textures/Interface/Alerts/Hunger/Starving.png icon: /Textures/Interface/Alerts/Hunger/Starving.png
name: "[color=red]Starving[/color]" name: "[color=red]Starving[/color]"
description: You're severely malnourished. The hunger pains make moving around a chore. description: You're severely malnourished. The hunger pains make moving around a chore.
- type: alert - type: alert
alertType: Overhydrated id: Overhydrated
category: Thirst category: Thirst
icon: /Textures/Interface/Alerts/Thirst/OverHydrated.png icon: /Textures/Interface/Alerts/Thirst/OverHydrated.png
name: "[color=yellow]Overhydrated[/color]" name: "[color=yellow]Overhydrated[/color]"
description: You drank too much. description: You drank too much.
- type: alert - type: alert
alertType: Thirsty id: Thirsty
category: Thirst category: Thirst
icon: /Textures/Interface/Alerts/Thirst/Thirsty.png icon: /Textures/Interface/Alerts/Thirst/Thirsty.png
name: "[color=yellow]Thirsty[/color]" name: "[color=yellow]Thirsty[/color]"
description: Something to drink would be good right about now. description: Something to drink would be good right about now.
- type: alert - type: alert
alertType: Parched id: Parched
category: Thirst category: Thirst
icon: /Textures/Interface/Alerts/Thirst/Parched.png icon: /Textures/Interface/Alerts/Thirst/Parched.png
name: "[color=red]Parched[/color]" name: "[color=red]Parched[/color]"
description: You're severely thirsty. The thirst makes moving around a chore. description: You're severely thirsty. The thirst makes moving around a chore.
- type: alert - type: alert
alertType: Pulled id: Pulled
icon: /Textures/Interface/Alerts/Pull/pulled.png icon: /Textures/Interface/Alerts/Pull/pulled.png
onClick: !type:StopBeingPulled { } onClick: !type:StopBeingPulled { }
name: Pulled name: Pulled
description: You're being pulled. Move to break free. description: You're being pulled. Move to break free.
- type: alert - type: alert
alertType: Pulling id: Pulling
icon: /Textures/Interface/Alerts/Pull/pulling.png icon: /Textures/Interface/Alerts/Pull/pulling.png
onClick: !type:StopPulling { } onClick: !type:StopPulling { }
name: Pulling name: Pulling
description: You're pulling something. Click the alert to stop. description: You're pulling something. Click the alert to stop.
- type: alert - type: alert
alertType: Debug1 id: Debug1
icon: /Textures/Interface/Alerts/human_health.rsi/health1.png icon: /Textures/Interface/Alerts/human_health.rsi/health1.png
name: Debug1 name: Debug1
description: Debug description: Debug
- type: alert - type: alert
alertType: Debug2 id: Debug2
icon: /Textures/Interface/Alerts/human_health.rsi/health2.png icon: /Textures/Interface/Alerts/human_health.rsi/health2.png
name: Debug2 name: Debug2
description: Debug description: Debug
- type: alert - type: alert
alertType: Debug3 id: Debug3
icon: /Textures/Interface/Alerts/human_health.rsi/health3.png icon: /Textures/Interface/Alerts/human_health.rsi/health3.png
name: Debug3 name: Debug3
description: Debug description: Debug
- type: alert - type: alert
alertType: Debug4 id: Debug4
icon: /Textures/Interface/Alerts/human_health.rsi/health4.png icon: /Textures/Interface/Alerts/human_health.rsi/health4.png
name: Debug4 name: Debug4
description: Debug description: Debug
- type: alert - type: alert
alertType: Debug5 id: Debug5
icon: /Textures/Interface/Alerts/human_health.rsi/health5.png icon: /Textures/Interface/Alerts/human_health.rsi/health5.png
name: Debug5 name: Debug5
description: Debug description: Debug
- type: alert - type: alert
alertType: Debug6 id: Debug6
icon: /Textures/Interface/Alerts/human_health.rsi/health6.png icon: /Textures/Interface/Alerts/human_health.rsi/health6.png
name: Debug6 name: Debug6
description: Debug description: Debug

View File

@@ -1,5 +1,5 @@
- type: alert - type: alert
alertType: Magboots id: Magboots
icon: { sprite: "/Textures/Clothing/Shoes/Boots/magboots.rsi", state: "icon-on" } icon: { sprite: "/Textures/Clothing/Shoes/Boots/magboots.rsi", state: "icon-on" }
name: "Magboots" name: "Magboots"
description: You are immume to airflow, but slightly slower. description: You are immume to airflow, but slightly slower.

View File

@@ -16,7 +16,7 @@
id: HandsAnimal id: HandsAnimal
name: "animal hands" name: "animal hands"
parent: PartAnimal parent: PartAnimal
abstract: true noSpawn: true
components: components:
- type: BodyPart - type: BodyPart
partType: Hand partType: Hand
@@ -28,7 +28,7 @@
id: LegsAnimal id: LegsAnimal
name: "animal legs" name: "animal legs"
parent: PartAnimal parent: PartAnimal
abstract: true noSpawn: true
components: components:
- type: BodyPart - type: BodyPart
partType: Leg partType: Leg
@@ -39,7 +39,7 @@
id: FeetAnimal id: FeetAnimal
name: "animal feet" name: "animal feet"
parent: PartAnimal parent: PartAnimal
abstract: true noSpawn: true
components: components:
- type: BodyPart - type: BodyPart
partType: Foot partType: Foot
@@ -50,7 +50,7 @@
id: TorsoAnimal id: TorsoAnimal
name: "animal torso" name: "animal torso"
parent: PartAnimal parent: PartAnimal
abstract: true noSpawn: true
components: components:
- type: BodyPart - type: BodyPart
partType: Torso partType: Torso
@@ -76,7 +76,7 @@
id: OrganAnimalLungs id: OrganAnimalLungs
parent: BaseAnimalOrgan parent: BaseAnimalOrgan
name: lungs name: lungs
abstract: true noSpawn: true
components: components:
- type: Mechanism - type: Mechanism
size: 1 size: 1
@@ -95,7 +95,7 @@
id: OrganAnimalStomach id: OrganAnimalStomach
parent: BaseAnimalOrgan parent: BaseAnimalOrgan
name: stomach name: stomach
abstract: true noSpawn: true
components: components:
- type: Mechanism - type: Mechanism
size: 1 size: 1
@@ -118,7 +118,7 @@
id: OrganAnimalLiver id: OrganAnimalLiver
parent: BaseAnimalOrgan parent: BaseAnimalOrgan
name: liver name: liver
abstract: true noSpawn: true
components: components:
- type: Mechanism - type: Mechanism
size: 1 size: 1
@@ -134,7 +134,7 @@
id: OrganAnimalHeart id: OrganAnimalHeart
parent: BaseAnimalOrgan parent: BaseAnimalOrgan
name: heart name: heart
abstract: true noSpawn: true
components: components:
- type: Mechanism - type: Mechanism
size: 1 size: 1
@@ -151,7 +151,7 @@
id: OrganAnimalKidneys id: OrganAnimalKidneys
parent: BaseAnimalOrgan parent: BaseAnimalOrgan
name: kidneys name: kidneys
abstract: true noSpawn: true
components: components:
- type: Mechanism - type: Mechanism
size: 1 size: 1

View File

@@ -1,5 +1,4 @@
- type: entity - type: entity
abstract: true
parent: ClothingBackpack parent: ClothingBackpack
id: ClothingBackpackFilled id: ClothingBackpackFilled
components: components:

View File

@@ -4,6 +4,7 @@
name: demonomicon name: demonomicon
parent: BookBase parent: BookBase
id: BookDemonomicon id: BookDemonomicon
abstract: true
description: 'Who knows what dark spells may be contained in these horrid pages?' description: 'Who knows what dark spells may be contained in these horrid pages?'
components: components:
- type: Sprite - type: Sprite
@@ -27,7 +28,6 @@
- type: entity - type: entity
parent: BookDemonomicon parent: BookDemonomicon
id: BookDemonomicon1 id: BookDemonomicon1
abstract: true
suffix: 1 suffix: 1
components: components:
- type: Paper - type: Paper
@@ -40,7 +40,6 @@
- type: entity - type: entity
parent: BookDemonomicon parent: BookDemonomicon
id: BookDemonomicon2 id: BookDemonomicon2
abstract: true
suffix: 2 suffix: 2
components: components:
- type: Paper - type: Paper
@@ -54,7 +53,6 @@
- type: entity - type: entity
parent: BookDemonomicon parent: BookDemonomicon
id: BookDemonomicon3 id: BookDemonomicon3
abstract: true
suffix: 3 suffix: 3
components: components:
- type: Paper - type: Paper

View File

@@ -7,7 +7,7 @@
components: components:
- type: StorageFill - type: StorageFill
contents: contents:
- id: MagazineClRifleBase - id: MagazineClRiflePistol
amount: 6 amount: 6
- type: Sprite - type: Sprite
layers: layers:
@@ -26,7 +26,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .25 caseless (practice) magazines name: box of .25 caseless (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -40,12 +40,12 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .25 caseless (rubber) magazines name: box of .25 caseless (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
id: BoxMagazineClRifleRubber id: BoxMagazineClRifleRubber
description: A box full of description: A box full of
components: components:
- type: StorageFill - type: StorageFill
contents: contents:
@@ -55,7 +55,7 @@
layers: layers:
- state: box - state: box
# LRifle # LRifle
- type: entity - type: entity
name: box of .30 rifle magazines name: box of .30 rifle magazines
parent: BoxCardboard parent: BoxCardboard
@@ -69,7 +69,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .30 rifle (high-velocity) magazines name: box of .30 rifle (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -83,7 +83,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .30 rifle (practice) magazines name: box of .30 rifle (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -97,7 +97,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .30 rifle (rubber) magazines name: box of .30 rifle (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -126,7 +126,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Lamia (flash) magazines. name: box of .40 Lamia (flash) magazines.
parent: BoxCardboard parent: BoxCardboard
@@ -140,7 +140,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Lamia (high-velocity) magazines name: box of .40 Lamia (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -154,7 +154,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Lamia (practice) magazines name: box of .40 Lamia (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -168,7 +168,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Drozd magazines name: box of .40 Drozd magazines
parent: BoxCardboard parent: BoxCardboard
@@ -182,7 +182,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Drozd (high-velocity) magazines name: box of .40 Drozd (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -196,7 +196,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Drozd (practice) magazines name: box of .40 Drozd (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -210,7 +210,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .40 Drozd (rubber) magazines name: box of .40 Drozd (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -239,7 +239,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of Calico .35 auto magazines name: box of Calico .35 auto magazines
parent: BoxCardboard parent: BoxCardboard
@@ -253,7 +253,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of pistol .35 auto magazines name: box of pistol .35 auto magazines
parent: BoxCardboard parent: BoxCardboard
@@ -267,7 +267,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of pistol .35 auto (flash) magazines name: box of pistol .35 auto (flash) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -281,7 +281,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of pistol .35 auto (high-velocity) magazines name: box of pistol .35 auto (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -295,7 +295,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of pistol .35 auto (practice) magazines name: box of pistol .35 auto (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -309,7 +309,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of pistol .35 auto (rubber) magazines name: box of pistol .35 auto (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -323,7 +323,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of machine pistol .35 auto magazines name: box of machine pistol .35 auto magazines
parent: BoxCardboard parent: BoxCardboard
@@ -337,7 +337,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of machine pistol .35 auto (high-velocity) magazines name: box of machine pistol .35 auto (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -351,7 +351,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of machine pistol .35 auto (practice) magazines name: box of machine pistol .35 auto (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -365,7 +365,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of machine pistol .35 auto (rubber) magazines name: box of machine pistol .35 auto (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -379,7 +379,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of SMG .35 auto magazines name: box of SMG .35 auto magazines
parent: BoxCardboard parent: BoxCardboard
@@ -393,7 +393,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of SMG .35 auto (flash) magazines name: box of SMG .35 auto (flash) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -407,7 +407,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of SMG .35 auto (high-velocity) magazines name: box of SMG .35 auto (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -421,7 +421,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of SMG .35 auto (practice) magazines name: box of SMG .35 auto (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -435,7 +435,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of SMG .35 auto (rubber) magazines name: box of SMG .35 auto (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -464,7 +464,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of (.50 beanbag) ammo drums name: box of (.50 beanbag) ammo drums
parent: BoxCardboard parent: BoxCardboard
@@ -478,7 +478,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of (.50 slug) ammo drums name: box of (.50 slug) ammo drums
parent: BoxCardboard parent: BoxCardboard
@@ -492,7 +492,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of (.50 incendiary) ammo drums name: box of (.50 incendiary) ammo drums
parent: BoxCardboard parent: BoxCardboard
@@ -536,7 +536,7 @@
layers: layers:
- state: boxwide - state: boxwide
- state: shelllethal - state: shelllethal
- type: entity - type: entity
name: box of shotgun slug cartridges name: box of shotgun slug cartridges
parent: BoxCardboard parent: BoxCardboard
@@ -551,7 +551,7 @@
layers: layers:
- state: boxwide - state: boxwide
- state: shellslug - state: shellslug
- type: entity - type: entity
name: box of shotgun flare cartridges name: box of shotgun flare cartridges
parent: BoxCardboard parent: BoxCardboard
@@ -566,7 +566,7 @@
layers: layers:
- state: boxwide - state: boxwide
- state: shellflare - state: shellflare
- type: entity - type: entity
name: box of shotgun flash cartridges name: box of shotgun flash cartridges
parent: BoxCardboard parent: BoxCardboard
@@ -581,7 +581,7 @@
layers: layers:
- state: boxwide - state: boxwide
- state: shellflash - state: shellflash
- type: entity - type: entity
name: box of shotgun incendiary cartridges name: box of shotgun incendiary cartridges
parent: BoxCardboard parent: BoxCardboard
@@ -596,7 +596,7 @@
layers: layers:
- state: boxwide - state: boxwide
- state: shellincendiary - state: shellincendiary
- type: entity - type: entity
name: box of shotgun practice cartridges name: box of shotgun practice cartridges
parent: BoxCardboard parent: BoxCardboard
@@ -611,7 +611,7 @@
layers: layers:
- state: boxwide - state: boxwide
- state: shellpractice - state: shellpractice
- type: entity - type: entity
name: box of tranquilizer cartridges name: box of tranquilizer cartridges
parent: BoxCardboard parent: BoxCardboard
@@ -641,7 +641,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .20 rifle (flash) magazines name: box of .20 rifle (flash) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -655,7 +655,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .20 rifle (high-velocity) magazines name: box of .20 rifle (high-velocity) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -669,7 +669,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .20 rifle (practice) magazines name: box of .20 rifle (practice) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -683,7 +683,7 @@
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box
- type: entity - type: entity
name: box of .20 rifle (rubber) magazines name: box of .20 rifle (rubber) magazines
parent: BoxCardboard parent: BoxCardboard
@@ -696,4 +696,4 @@
amount: 6 amount: 6
- type: Sprite - type: Sprite
layers: layers:
- state: box - state: box

View File

@@ -24,7 +24,7 @@
- type: entity - type: entity
id: CrateSalvageAssortedGoodies id: CrateSalvageAssortedGoodies
suffix: Filled, Salvage Random suffix: Filled, Salvage Random
abstract: true # You should use SalvageMaterialCrateSpawner instead noSpawn: true # You should use SalvageMaterialCrateSpawner instead
parent: CrateGenericSteel parent: CrateGenericSteel
components: components:
- type: StorageFill - type: StorageFill

View File

@@ -2,7 +2,7 @@
- type: entity - type: entity
id: PaperWrittenSalvageLoreMedium1PlasmaTrap id: PaperWrittenSalvageLoreMedium1PlasmaTrap
abstract: true # keep this from spamming spawn sheet noSpawn: true # keep this from spamming spawn sheet
suffix: "Salvage: Lore: Medium 1: Plasma Trap" suffix: "Salvage: Lore: Medium 1: Plasma Trap"
parent: PaperWritten parent: PaperWritten
components: components:
@@ -34,7 +34,7 @@
- type: entity - type: entity
id: PaperWrittenSalvageLoreGaming1 id: PaperWrittenSalvageLoreGaming1
abstract: true # keep this from spamming spawn sheet noSpawn: true # keep this from spamming spawn sheet
suffix: "Salvage: Lore: Gaming 1" suffix: "Salvage: Lore: Gaming 1"
parent: PaperWritten parent: PaperWritten
components: components:
@@ -48,7 +48,7 @@
- type: entity - type: entity
id: PaperWrittenSalvageLoreGaming2 id: PaperWrittenSalvageLoreGaming2
abstract: true # keep this from spamming spawn sheet noSpawn: true # keep this from spamming spawn sheet
suffix: "Salvage: Lore: Gaming 2" suffix: "Salvage: Lore: Gaming 2"
parent: PaperWritten parent: PaperWritten
components: components:
@@ -63,14 +63,14 @@
Int: 528,491 Int: 528,491
Wis: 1 Wis: 1
Cha: 1 Cha: 1
Where's the age? Where's the age?
Why are those ability scores so ridiculous? Why are those ability scores so ridiculous?
What even are you trying to do here, Leah? - Your Friendly DM What even are you trying to do here, Leah? - Your Friendly DM
- type: entity - type: entity
id: PaperWrittenSalvageLoreGaming3 id: PaperWrittenSalvageLoreGaming3
abstract: true # keep this from spamming spawn sheet noSpawn: true # keep this from spamming spawn sheet
suffix: "Salvage: Lore: Gaming 3" suffix: "Salvage: Lore: Gaming 3"
parent: PaperWritten parent: PaperWritten
components: components:
@@ -85,7 +85,7 @@
- type: entity - type: entity
id: PaperWrittenSalvageLoreGaming4 id: PaperWrittenSalvageLoreGaming4
abstract: true # keep this from spamming spawn sheet noSpawn: true # keep this from spamming spawn sheet
suffix: "Salvage: Lore: Gaming 4" suffix: "Salvage: Lore: Gaming 4"
parent: PaperWritten parent: PaperWritten
components: components:

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
id: Smoke id: Smoke
name: smoke name: smoke
abstract: true noSpawn: true
components: components:
- type: Sprite - type: Sprite
drawdepth: Effects drawdepth: Effects
@@ -23,7 +23,7 @@
- type: entity - type: entity
id: Foam id: Foam
name: foam name: foam
abstract: true noSpawn: true
components: components:
- type: Sprite - type: Sprite
netsync: false netsync: false
@@ -62,7 +62,7 @@
- type: entity - type: entity
id: IronMetalFoam id: IronMetalFoam
name: iron metal foam name: iron metal foam
abstract: true noSpawn: true
parent: Foam parent: Foam
components: components:
- type: Sprite - type: Sprite
@@ -90,7 +90,7 @@
- type: entity - type: entity
id: AluminiumMetalFoam id: AluminiumMetalFoam
name: aluminium metal foam name: aluminium metal foam
abstract: true noSpawn: true
parent: Foam parent: Foam
components: components:
- type: Sprite - type: Sprite

View File

@@ -7,4 +7,4 @@
- type: RadiationPulse - type: RadiationPulse
minPulseLifespan: 0.8 minPulseLifespan: 0.8
maxPulseLifespan: 2.5 maxPulseLifespan: 2.5
radsPerSecond: 5 radsPerSecond: 5

Some files were not shown because too many files have changed in this diff Show More