diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index 99577a0199..1904ff9b18 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -35,13 +35,13 @@ namespace Content.Client.Actions [UsedImplicitly] public sealed class ActionsSystem : SharedActionsSystem { - + [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IUserInterfaceManager _uiManager = default!; [Dependency] private readonly IItemSlotManager _itemSlotManager = default!; [Dependency] private readonly ISerializationManager _serializationManager = 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 InteractionOutlineSystem _interactionOutline = 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 // handled and prevent further interactions. - return !action.InteractOnMiss; + return !action.InteractOnMiss; } switch (action) @@ -611,7 +611,7 @@ namespace Content.Client.Actions /*public void SaveActionAssignments(string path) { - + // 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 // actions needs to keep the same uid. @@ -666,9 +666,7 @@ namespace Content.Client.Actions if (!map.TryGet("action", out var actionNode)) continue; - var action = _serializationManager.ReadValueCast(typeof(ActionType), actionNode); - if (action == null) - continue; + var action = _serializationManager.Read(actionNode); if (Ui.Component.Actions.TryGetValue(action, out var existingAction)) { @@ -681,9 +679,7 @@ namespace Content.Client.Actions if (!map.TryGet("assignments", out var assignmentNode)) continue; - var assignments = _serializationManager.ReadValueCast>(typeof(List<(byte Hotbar, byte Slot)>), assignmentNode); - if (assignments == null) - continue; + var assignments = _serializationManager.Read>(assignmentNode); foreach (var index in assignments) { diff --git a/Content.Client/Administration/Managers/GamePrototypeLoadManager.cs b/Content.Client/Administration/Managers/GamePrototypeLoadManager.cs index d5e2919786..2958cd71fa 100644 --- a/Content.Client/Administration/Managers/GamePrototypeLoadManager.cs +++ b/Content.Client/Administration/Managers/GamePrototypeLoadManager.cs @@ -22,7 +22,7 @@ public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager private void LoadGamePrototype(GamePrototypeLoadMessage message) { _prototypeManager.LoadString(message.PrototypeData, true); - _prototypeManager.Resync(); + _prototypeManager.ResolveResults(); _localizationManager.ReloadLocalizations(); GamePrototypeLoaded?.Invoke(); Logger.InfoS("adminbus", "Loaded adminbus prototype data."); diff --git a/Content.Client/Changelog/ChangelogManager.cs b/Content.Client/Changelog/ChangelogManager.cs index 51f41d718f..9652622fa3 100644 --- a/Content.Client/Changelog/ChangelogManager.cs +++ b/Content.Client/Changelog/ChangelogManager.cs @@ -81,7 +81,7 @@ namespace Content.Client.Changelog return new List(); var node = (MappingDataNode)yamlData.Documents[0].RootNode.ToDataNode(); - return _serialization.ReadValueOrThrow>(node["Entries"]); + return _serialization.Read>(node["Entries"]); }); } diff --git a/Content.IntegrationTests/ContentIntegrationTest.cs b/Content.IntegrationTests/ContentIntegrationTest.cs index e73ff6f3ea..489ada34da 100644 --- a/Content.IntegrationTests/ContentIntegrationTest.cs +++ b/Content.IntegrationTests/ContentIntegrationTest.cs @@ -259,7 +259,7 @@ namespace Content.IntegrationTests if (client.Options?.ExtraPrototypes is { } extra) { prototypes.LoadString(extra, true); - prototypes.Resync(); + prototypes.ResolveResults(); } }); @@ -306,7 +306,7 @@ namespace Content.IntegrationTests if (server.Options?.ExtraPrototypes is { } extra) { prototypes.LoadString(extra, true); - prototypes.Resync(); + prototypes.ResolveResults(); } }); diff --git a/Content.IntegrationTests/Tests/Body/LungTest.cs b/Content.IntegrationTests/Tests/Body/LungTest.cs index 69f8eed35c..fbe96b905d 100644 --- a/Content.IntegrationTests/Tests/Body/LungTest.cs +++ b/Content.IntegrationTests/Tests/Body/LungTest.cs @@ -40,6 +40,12 @@ namespace Content.IntegrationTests.Tests.Body normalBodyTemperature: 310.15 thermalRegulationTemperatureThreshold: 25 - type: Respirator + damage: + types: + Asphyxiation: 1.5 + damageRecovery: + types: + Asphyxiation: -1.5 "; [Test] diff --git a/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs b/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs index 2e9b769c51..81c416b1c1 100644 --- a/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs +++ b/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs @@ -21,7 +21,7 @@ namespace Content.IntegrationTests.Tests.Chemistry public void DeserializeNullTest() { var node = new ValueDataNode("null"); - var unit = Serialization.ReadValue(node); + var unit = Serialization.Read(node); Assert.That(unit, Is.Null); } @@ -30,7 +30,7 @@ namespace Content.IntegrationTests.Tests.Chemistry public void DeserializeNullDefinitionTest() { var node = new MappingDataNode().Add("unit", "null"); - var definition = Serialization.ReadValueOrThrow(node); + var definition = Serialization.Read(node); Assert.That(definition.Unit, Is.Null); } diff --git a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs index 00defdebc2..a970dd23ae 100644 --- a/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs +++ b/Content.IntegrationTests/Tests/Disposal/DisposalUnitTest.cs @@ -78,6 +78,9 @@ namespace Content.IntegrationTests.Tests.Disposal id: HumanDummy components: - type: Body + template: HumanoidTemplate + preset: HumanPreset + centerSlot: torso - type: MobState - type: Damageable damageContainer: Biological diff --git a/Content.IntegrationTests/Tests/DummyIconTest.cs b/Content.IntegrationTests/Tests/DummyIconTest.cs index 8cb1e2b6ec..d918c01b2f 100644 --- a/Content.IntegrationTests/Tests/DummyIconTest.cs +++ b/Content.IntegrationTests/Tests/DummyIconTest.cs @@ -24,7 +24,7 @@ namespace Content.IntegrationTests.Tests { foreach (var proto in prototypeManager.EnumeratePrototypes()) { - if (proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue; + if (proto.NoSpawn || proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue; Assert.DoesNotThrow(() => { diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index 08d12b69dd..e24e4be9fe 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -69,7 +69,7 @@ namespace Content.IntegrationTests.Tests //Generate list of non-abstract prototypes to test foreach (var prototype in prototypeMan.EnumeratePrototypes()) { - if (prototype.Abstract) + if (prototype.NoSpawn || prototype.Abstract) { continue; } diff --git a/Content.Server/AI/Components/AiFactionPrototype.cs b/Content.Server/AI/Components/AiFactionPrototype.cs index fa14617a12..676ae3a23c 100644 --- a/Content.Server/AI/Components/AiFactionPrototype.cs +++ b/Content.Server/AI/Components/AiFactionPrototype.cs @@ -11,7 +11,7 @@ namespace Content.Server.AI.Components // These are immutable so any dynamic changes aren't saved back over. // AiFactionSystem will just read these and then store them. [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("hostile")] diff --git a/Content.Server/AI/Utility/BehaviorSetPrototype.cs b/Content.Server/AI/Utility/BehaviorSetPrototype.cs index b8a5cb67b9..dc6d0e162c 100644 --- a/Content.Server/AI/Utility/BehaviorSetPrototype.cs +++ b/Content.Server/AI/Utility/BehaviorSetPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Server.AI.Utility /// Name of the BehaviorSet. /// [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Server/Administration/GamePrototypeLoadManager.cs b/Content.Server/Administration/GamePrototypeLoadManager.cs index 16514b3451..39d16028ba 100644 --- a/Content.Server/Administration/GamePrototypeLoadManager.cs +++ b/Content.Server/Administration/GamePrototypeLoadManager.cs @@ -53,7 +53,7 @@ public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager msg.PrototypeData = prototypeData; _netManager.ServerSendToAll(msg); // everyone load it up! _prototypeManager.LoadString(prototypeData, true); // server needs it too. - _prototypeManager.Resync(); + _prototypeManager.ResolveResults(); _localizationManager.ReloadLocalizations(); GamePrototypeLoaded?.Invoke(); } diff --git a/Content.Server/Advertisements/AdvertisementsPackPrototype.cs b/Content.Server/Advertisements/AdvertisementsPackPrototype.cs index 46f748a8fd..a959dd2032 100644 --- a/Content.Server/Advertisements/AdvertisementsPackPrototype.cs +++ b/Content.Server/Advertisements/AdvertisementsPackPrototype.cs @@ -10,7 +10,7 @@ namespace Content.Server.Advertisements public sealed class AdvertisementsPackPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("advertisements")] diff --git a/Content.Server/Atmos/Reactions/GasReactionPrototype.cs b/Content.Server/Atmos/Reactions/GasReactionPrototype.cs index dd2c310a60..2dfb41d6a9 100644 --- a/Content.Server/Atmos/Reactions/GasReactionPrototype.cs +++ b/Content.Server/Atmos/Reactions/GasReactionPrototype.cs @@ -26,7 +26,7 @@ namespace Content.Server.Atmos.Reactions public sealed class GasReactionPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Server/BarSign/BarSignPrototype.cs b/Content.Server/BarSign/BarSignPrototype.cs index a783866a8b..54daef7372 100644 --- a/Content.Server/BarSign/BarSignPrototype.cs +++ b/Content.Server/BarSign/BarSignPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Server.BarSign private string _name = string.Empty; [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; diff --git a/Content.Server/Bible/Components/BibleComponent.cs b/Content.Server/Bible/Components/BibleComponent.cs index 8b2dde5262..d6b42a2e5c 100644 --- a/Content.Server/Bible/Components/BibleComponent.cs +++ b/Content.Server/Bible/Components/BibleComponent.cs @@ -27,7 +27,7 @@ namespace Content.Server.Bible.Components public DamageSpecifier DamageOnUntrainedUse = default!; //Chance the bible will fail to heal someone with no helmet - [DataField("failChance", required:true)] + [DataField("failChance")] [ViewVariables(VVAccess.ReadWrite)] public float FailChance = 0.34f; diff --git a/Content.Server/Botany/SeedPrototype.cs b/Content.Server/Botany/SeedPrototype.cs index 2855446d6e..ee45530925 100644 --- a/Content.Server/Botany/SeedPrototype.cs +++ b/Content.Server/Botany/SeedPrototype.cs @@ -70,7 +70,7 @@ public sealed class SeedPrototype : IPrototype { public const string Prototype = "SeedBase"; - [DataField("id", required: true)] public string ID { get; private init; } = default!; + [IdDataFieldAttribute] public string ID { get; private init; } = default!; /// /// Unique identifier of this seed. Do NOT set this. diff --git a/Content.Server/Construction/Completions/AdminLog.cs b/Content.Server/Construction/Completions/AdminLog.cs index 62ec29986d..52f34bb65b 100644 --- a/Content.Server/Construction/Completions/AdminLog.cs +++ b/Content.Server/Construction/Completions/AdminLog.cs @@ -11,7 +11,7 @@ namespace Content.Server.Construction.Completions; [UsedImplicitly] public sealed class AdminLog : IGraphAction { - [DataField("logType", required: true)] + [DataField("logType")] public LogType LogType = LogType.Construction; [DataField("impact")] diff --git a/Content.Server/GameTicking/Presets/GamePresetPrototype.cs b/Content.Server/GameTicking/Presets/GamePresetPrototype.cs index f1fa1a1919..d05fd10d9f 100644 --- a/Content.Server/GameTicking/Presets/GamePresetPrototype.cs +++ b/Content.Server/GameTicking/Presets/GamePresetPrototype.cs @@ -13,7 +13,7 @@ namespace Content.Server.GameTicking.Presets [Prototype("gamePreset")] public sealed class GamePresetPrototype : IPrototype { - [DataField("id", required:true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("alias")] diff --git a/Content.Server/GameTicking/Rules/GameRulePrototype.cs b/Content.Server/GameTicking/Rules/GameRulePrototype.cs index 7d6de84836..e785715620 100644 --- a/Content.Server/GameTicking/Rules/GameRulePrototype.cs +++ b/Content.Server/GameTicking/Rules/GameRulePrototype.cs @@ -6,6 +6,6 @@ namespace Content.Server.GameTicking.Rules; [Prototype("gameRule")] public sealed class GameRulePrototype : IPrototype { - [DataField("id", required:true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } diff --git a/Content.Server/Holiday/HolidayPrototype.cs b/Content.Server/Holiday/HolidayPrototype.cs index bd7b30cb42..435a0f4e04 100644 --- a/Content.Server/Holiday/HolidayPrototype.cs +++ b/Content.Server/Holiday/HolidayPrototype.cs @@ -15,7 +15,7 @@ namespace Content.Server.Holiday [ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty; [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Server/Kudzu/SpreaderSystem.cs b/Content.Server/Kudzu/SpreaderSystem.cs index e4205b3b57..6bf703a8cb 100644 --- a/Content.Server/Kudzu/SpreaderSystem.cs +++ b/Content.Server/Kudzu/SpreaderSystem.cs @@ -102,7 +102,7 @@ public sealed class SpreaderSystem : EntitySystem { var direction = (DirectionFlag) (1 << i); 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); if (ents.Any(x => IsTileBlockedFrom(x, direction))) continue; diff --git a/Content.Server/Maps/GameMapPrototype.cs b/Content.Server/Maps/GameMapPrototype.cs index 16c0251f28..2d427c0a78 100644 --- a/Content.Server/Maps/GameMapPrototype.cs +++ b/Content.Server/Maps/GameMapPrototype.cs @@ -16,7 +16,7 @@ namespace Content.Server.Maps; public sealed class GameMapPrototype : IPrototype { /// - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Server/Objectives/ObjectivePrototype.cs b/Content.Server/Objectives/ObjectivePrototype.cs index e7b35d843c..5695fcf9fd 100644 --- a/Content.Server/Objectives/ObjectivePrototype.cs +++ b/Content.Server/Objectives/ObjectivePrototype.cs @@ -11,7 +11,7 @@ namespace Content.Server.Objectives public sealed class ObjectivePrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown"; diff --git a/Content.Server/Projectiles/Components/ProjectileComponent.cs b/Content.Server/Projectiles/Components/ProjectileComponent.cs index 58ce7c0198..00afe13fb1 100644 --- a/Content.Server/Projectiles/Components/ProjectileComponent.cs +++ b/Content.Server/Projectiles/Components/ProjectileComponent.cs @@ -19,8 +19,8 @@ namespace Content.Server.Projectiles.Components public bool DeleteOnCollide { get; } = true; // Get that juicy FPS hit sound - [DataField("soundHit", required: true)] public SoundSpecifier? SoundHit = default!; - [DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies = null; + [DataField("soundHit")] public SoundSpecifier? SoundHit; + [DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies; public bool DamagedEntity; diff --git a/Content.Server/Salvage/SalvageMapPrototype.cs b/Content.Server/Salvage/SalvageMapPrototype.cs index 3c7661c395..1aa1004a58 100644 --- a/Content.Server/Salvage/SalvageMapPrototype.cs +++ b/Content.Server/Salvage/SalvageMapPrototype.cs @@ -13,7 +13,7 @@ namespace Content.Server.Salvage public sealed class SalvageMapPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Server/Speech/Components/ReplacementAccentComponent.cs b/Content.Server/Speech/Components/ReplacementAccentComponent.cs index f98eee15aa..d19ea511aa 100644 --- a/Content.Server/Speech/Components/ReplacementAccentComponent.cs +++ b/Content.Server/Speech/Components/ReplacementAccentComponent.cs @@ -10,7 +10,7 @@ namespace Content.Server.Speech.Components public sealed class ReplacementAccentPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("words")] diff --git a/Content.Server/Speech/Components/VocalComponent.cs b/Content.Server/Speech/Components/VocalComponent.cs index 6f84290d33..634a2aca10 100644 --- a/Content.Server/Speech/Components/VocalComponent.cs +++ b/Content.Server/Speech/Components/VocalComponent.cs @@ -28,7 +28,7 @@ public sealed class VocalComponent : Component 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. - [DataField("action", required: true)] + [DataField("action")] public InstantAction Action = new() { UseDelay = TimeSpan.FromSeconds(10), diff --git a/Content.Server/Temperature/Components/TemperatureComponent.cs b/Content.Server/Temperature/Components/TemperatureComponent.cs index fcf8bbd675..3f88d8286c 100644 --- a/Content.Server/Temperature/Components/TemperatureComponent.cs +++ b/Content.Server/Temperature/Components/TemperatureComponent.cs @@ -52,13 +52,13 @@ namespace Content.Server.Temperature.Components } } - [DataField("coldDamage", required: true)] + [DataField("coldDamage")] [ViewVariables(VVAccess.ReadWrite)] - public DamageSpecifier ColdDamage = default!; + public DamageSpecifier ColdDamage = new(); - [DataField("heatDamage", required: true)] + [DataField("heatDamage")] [ViewVariables(VVAccess.ReadWrite)] - public DamageSpecifier HeatDamage = default!; + public DamageSpecifier HeatDamage = new(); /// /// Temperature won't do more than this amount of damage per second. diff --git a/Content.Shared/Access/AccessGroupPrototype.cs b/Content.Shared/Access/AccessGroupPrototype.cs index 529a4146a1..e30fecb061 100644 --- a/Content.Shared/Access/AccessGroupPrototype.cs +++ b/Content.Shared/Access/AccessGroupPrototype.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Access; [Prototype("accessGroup")] public sealed class AccessGroupPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("tags", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer))] diff --git a/Content.Shared/Access/AccessLevelPrototype.cs b/Content.Shared/Access/AccessLevelPrototype.cs index e4880c77aa..607378c7b0 100644 --- a/Content.Shared/Access/AccessLevelPrototype.cs +++ b/Content.Shared/Access/AccessLevelPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Shared.Access public sealed class AccessLevelPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Alert/AlertOrderPrototype.cs b/Content.Shared/Alert/AlertOrderPrototype.cs index 21b64705fc..8725a471da 100644 --- a/Content.Shared/Alert/AlertOrderPrototype.cs +++ b/Content.Shared/Alert/AlertOrderPrototype.cs @@ -15,7 +15,7 @@ namespace Content.Shared.Alert public sealed class AlertOrderPrototype : IPrototype, IComparer, ISerializationHooks { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("order")] private readonly List<(string type, string alert)> _order = new(); diff --git a/Content.Shared/Alert/AlertPrototype.cs b/Content.Shared/Alert/AlertPrototype.cs index d50dbed1a1..04ce3f6b9a 100644 --- a/Content.Shared/Alert/AlertPrototype.cs +++ b/Content.Shared/Alert/AlertPrototype.cs @@ -21,7 +21,7 @@ namespace Content.Shared.Alert /// /// Type of alert, no 2 alert prototypes should have the same one. /// - [DataField("alertType")] + [IdDataFieldAttribute] public AlertType AlertType { get; private set; } /// diff --git a/Content.Shared/Atmos/Monitor/AtmosAlarmThresholdPrototype.cs b/Content.Shared/Atmos/Monitor/AtmosAlarmThresholdPrototype.cs index 37e3ad03bf..7d93d2e5b9 100644 --- a/Content.Shared/Atmos/Monitor/AtmosAlarmThresholdPrototype.cs +++ b/Content.Shared/Atmos/Monitor/AtmosAlarmThresholdPrototype.cs @@ -14,7 +14,7 @@ namespace Content.Shared.Atmos.Monitor [Serializable, NetSerializable] public sealed class AtmosAlarmThreshold : IPrototype, ISerializationHooks { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] [DataField("ignore")] diff --git a/Content.Shared/Atmos/Prototypes/GasPrototype.cs b/Content.Shared/Atmos/Prototypes/GasPrototype.cs index 9478275106..18ca116f6b 100644 --- a/Content.Shared/Atmos/Prototypes/GasPrototype.cs +++ b/Content.Shared/Atmos/Prototypes/GasPrototype.cs @@ -15,7 +15,7 @@ namespace Content.Shared.Atmos.Prototypes // TODO: Add interfaces for gas behaviours e.g. breathing, burning [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Audio/SoundCollectionPrototype.cs b/Content.Shared/Audio/SoundCollectionPrototype.cs index 5b9c78f025..0b88ff9800 100644 --- a/Content.Shared/Audio/SoundCollectionPrototype.cs +++ b/Content.Shared/Audio/SoundCollectionPrototype.cs @@ -10,7 +10,7 @@ namespace Content.Shared.Audio public sealed class SoundCollectionPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("files")] diff --git a/Content.Shared/Body/Prototypes/BodyPresetPrototype.cs b/Content.Shared/Body/Prototypes/BodyPresetPrototype.cs index c83dff9e1a..af28adbbb8 100644 --- a/Content.Shared/Body/Prototypes/BodyPresetPrototype.cs +++ b/Content.Shared/Body/Prototypes/BodyPresetPrototype.cs @@ -15,7 +15,7 @@ namespace Content.Shared.Body.Prototypes public sealed class BodyPresetPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("partIDs")] diff --git a/Content.Shared/Body/Prototypes/BodyTemplatePrototype.cs b/Content.Shared/Body/Prototypes/BodyTemplatePrototype.cs index 9432532405..085742d40c 100644 --- a/Content.Shared/Body/Prototypes/BodyTemplatePrototype.cs +++ b/Content.Shared/Body/Prototypes/BodyTemplatePrototype.cs @@ -28,7 +28,7 @@ namespace Content.Shared.Body.Prototypes private Dictionary _mechanismLayers = new(); [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Shared/Body/Prototypes/MetabolismGroupPrototype.cs b/Content.Shared/Body/Prototypes/MetabolismGroupPrototype.cs index 62a72b1849..87bfe39cf0 100644 --- a/Content.Shared/Body/Prototypes/MetabolismGroupPrototype.cs +++ b/Content.Shared/Body/Prototypes/MetabolismGroupPrototype.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Body.Prototypes [Prototype("metabolismGroup")] public sealed class MetabolismGroupPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } } diff --git a/Content.Shared/Body/Prototypes/MetabolizerTypePrototype.cs b/Content.Shared/Body/Prototypes/MetabolizerTypePrototype.cs index 5b8c55763a..ac50b0162e 100644 --- a/Content.Shared/Body/Prototypes/MetabolizerTypePrototype.cs +++ b/Content.Shared/Body/Prototypes/MetabolizerTypePrototype.cs @@ -6,7 +6,7 @@ namespace Content.Shared.Body.Prototypes [Prototype("metabolizerType")] public sealed class MetabolizerTypePrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } } diff --git a/Content.Shared/Cargo/CargoProductPrototype.cs b/Content.Shared/Cargo/CargoProductPrototype.cs index aa0ee8af2f..b529dd26c4 100644 --- a/Content.Shared/Cargo/CargoProductPrototype.cs +++ b/Content.Shared/Cargo/CargoProductPrototype.cs @@ -18,7 +18,7 @@ namespace Content.Shared.Cargo [DataField("description")] private string _description = string.Empty; [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/CharacterAppearance/SpriteAccessoryPrototype.cs b/Content.Shared/CharacterAppearance/SpriteAccessoryPrototype.cs index bc5a966f88..48a4b33d23 100644 --- a/Content.Shared/CharacterAppearance/SpriteAccessoryPrototype.cs +++ b/Content.Shared/CharacterAppearance/SpriteAccessoryPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Shared.CharacterAppearance [Prototype("spriteAccessory")] public sealed class SpriteAccessoryPrototype : IPrototype, ISerializationHooks { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("categories", required: true)] diff --git a/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs b/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs index 8948e10d2a..b3448e247e 100644 --- a/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs +++ b/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs @@ -22,7 +22,7 @@ namespace Content.Shared.Chemistry.Dispenser private List _inventory = new(); [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; public List Inventory => _inventory; diff --git a/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs b/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs index 6ecbade184..665d78e219 100644 --- a/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs +++ b/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs @@ -18,7 +18,7 @@ namespace Content.Shared.Chemistry.Reaction public sealed class ReactionPrototype : IPrototype, IComparable { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name")] diff --git a/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs b/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs index 5d59464406..7b3cc835eb 100644 --- a/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs +++ b/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs @@ -37,7 +37,8 @@ public sealed class ReactiveReagentEffectEntry [DataField("effects", required: true)] public List Effects = default!; - [DataField("groups", required: true, readOnly: true, serverOnly: true, + + [DataField("groups", readOnly: true, serverOnly: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer, ReactiveGroupPrototype>))] public Dictionary> ReactiveGroups { get; } = default!; } diff --git a/Content.Shared/Chemistry/Reaction/ReactiveGroupPrototype.cs b/Content.Shared/Chemistry/Reaction/ReactiveGroupPrototype.cs index 20cc233645..4504587f13 100644 --- a/Content.Shared/Chemistry/Reaction/ReactiveGroupPrototype.cs +++ b/Content.Shared/Chemistry/Reaction/ReactiveGroupPrototype.cs @@ -6,6 +6,6 @@ namespace Content.Shared.Chemistry.Reaction; [Prototype("reactiveGroup")] public sealed class ReactiveGroupPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index 81cb7b2fba..3618c22d40 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -25,7 +25,7 @@ namespace Content.Shared.Chemistry.Reagent public sealed class ReagentPrototype : IPrototype, IInheritingPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name", required: true)] @@ -34,11 +34,11 @@ namespace Content.Shared.Chemistry.Reagent [DataField("group")] public string Group { get; } = "Unknown"; - [DataField("parent", customTypeSerializer: typeof(PrototypeIdSerializer))] + [ParentDataFieldAttribute(typeof(PrototypeIdSerializer))] public string? Parent { get; private set; } [NeverPushInheritance] - [DataField("abstract")] + [AbstractDataFieldAttribute] public bool Abstract { get; private set; } [DataField("desc", required: true)] diff --git a/Content.Shared/Construction/Prototypes/ConstructionGraphPrototype.cs b/Content.Shared/Construction/Prototypes/ConstructionGraphPrototype.cs index 6a459c21ce..bdc2506dbe 100644 --- a/Content.Shared/Construction/Prototypes/ConstructionGraphPrototype.cs +++ b/Content.Shared/Construction/Prototypes/ConstructionGraphPrototype.cs @@ -18,7 +18,7 @@ namespace Content.Shared.Construction.Prototypes private readonly Dictionary> _pathfinding = new(); [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs b/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs index 9cbca8ef48..6b17273201 100644 --- a/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs +++ b/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs @@ -60,7 +60,7 @@ namespace Content.Shared.Construction.Prototypes [DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure; [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("placementMode")] diff --git a/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs b/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs index c60c08b653..a5f5043277 100644 --- a/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs +++ b/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs @@ -2,7 +2,6 @@ using Robust.Shared.IoC; using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.Serialization.Manager.Result; using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Serialization.TypeSerializers.Interfaces; @@ -47,17 +46,17 @@ namespace Content.Shared.Construction.Steps return null; } - public DeserializationResult Read(ISerializationManager serializationManager, + public ConstructionGraphStep Read(ISerializationManager serializationManager, MappingDataNode node, IDependencyCollection dependencies, bool skipHook, - ISerializationContext? context = null) + ISerializationContext? context = null, ConstructionGraphStep? _ = null) { var type = GetType(node) ?? throw new ArgumentException( "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, diff --git a/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs b/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs index 7ce876f871..841d6a5771 100644 --- a/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs @@ -21,7 +21,7 @@ namespace Content.Shared.Damage.Prototypes public sealed class DamageContainerPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs b/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs index b2abd8e93f..0b4dec0e3c 100644 --- a/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs @@ -18,7 +18,7 @@ namespace Content.Shared.Damage.Prototypes [Serializable, NetSerializable] 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))] public List DamageTypes { get; } = default!; diff --git a/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs b/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs index af47c2209d..fdb7a7394d 100644 --- a/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageModifierSetPrototype.cs @@ -19,7 +19,7 @@ namespace Content.Shared.Damage.Prototypes public sealed class DamageModifierSetPrototype : DamageModifierSet, IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } } diff --git a/Content.Shared/Damage/Prototypes/DamageTypePrototype.cs b/Content.Shared/Damage/Prototypes/DamageTypePrototype.cs index 52effb9467..9b6a56b6de 100644 --- a/Content.Shared/Damage/Prototypes/DamageTypePrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageTypePrototype.cs @@ -12,7 +12,7 @@ namespace Content.Shared.Damage.Prototypes [Serializable, NetSerializable] public sealed class DamageTypePrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } } diff --git a/Content.Shared/Damage/Prototypes/ExaminableDamagePrototype.cs b/Content.Shared/Damage/Prototypes/ExaminableDamagePrototype.cs index ae7f55c22b..baf7bcc7bc 100644 --- a/Content.Shared/Damage/Prototypes/ExaminableDamagePrototype.cs +++ b/Content.Shared/Damage/Prototypes/ExaminableDamagePrototype.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Prototypes; [Prototype("examinableDamage")] public sealed class ExaminableDamagePrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Dataset/DatasetPrototype.cs b/Content.Shared/Dataset/DatasetPrototype.cs index 527b679b37..fde288d8d8 100644 --- a/Content.Shared/Dataset/DatasetPrototype.cs +++ b/Content.Shared/Dataset/DatasetPrototype.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Dataset public sealed class DatasetPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("values")] public IReadOnlyList Values { get; } = new List(); diff --git a/Content.Shared/Decals/ColorPalettePrototype.cs b/Content.Shared/Decals/ColorPalettePrototype.cs index 5698e0e077..98fdd6eb5f 100644 --- a/Content.Shared/Decals/ColorPalettePrototype.cs +++ b/Content.Shared/Decals/ColorPalettePrototype.cs @@ -5,7 +5,7 @@ namespace Content.Shared.Decals; [Prototype("palette")] 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("colors")] public Dictionary Colors { get; } = null!; } diff --git a/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs b/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs index 2197777263..f1ef3549e5 100644 --- a/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs +++ b/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs @@ -3,7 +3,6 @@ using Robust.Shared.IoC; using Robust.Shared.Maths; using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.Serialization.Manager.Result; using Robust.Shared.Serialization.Markdown; using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Validation; @@ -20,12 +19,10 @@ namespace Content.Shared.Decals return serializationManager.ValidateNode>>(node, context); } - public DeserializationResult Read(ISerializationManager serializationManager, MappingDataNode node, - IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null) + public DecalGridComponent.DecalGridChunkCollection Read(ISerializationManager serializationManager, MappingDataNode node, + IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, DecalGridComponent.DecalGridChunkCollection? _ = null) { - //todo this read method does not support pushing inheritance - var dictionary = - serializationManager.ReadValueOrThrow>>(node, context, skipHook); + var dictionary = serializationManager.Read>>(node, context, skipHook: skipHook); var uids = new SortedSet(); var uidChunkMap = new Dictionary(); @@ -54,8 +51,7 @@ namespace Content.Shared.Decals newDict[indices][newUid] = dictionary[indices][oldUid]; } - return new DeserializedValue( - new DecalGridComponent.DecalGridChunkCollection(newDict){NextUid = nextIndex}); + return new DecalGridComponent.DecalGridChunkCollection(newDict){NextUid = nextIndex}; } public DataNode Write(ISerializationManager serializationManager, DecalGridComponent.DecalGridChunkCollection value, bool alwaysWrite = false, diff --git a/Content.Shared/Decals/DecalPrototype.cs b/Content.Shared/Decals/DecalPrototype.cs index d834a37971..9da946afbd 100644 --- a/Content.Shared/Decals/DecalPrototype.cs +++ b/Content.Shared/Decals/DecalPrototype.cs @@ -8,7 +8,7 @@ namespace Content.Shared.Decals [Prototype("decal")] 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("tags")] public List Tags = new(); } diff --git a/Content.Shared/Disease/DiseasePrototype.cs b/Content.Shared/Disease/DiseasePrototype.cs index 18d324f40f..93c3a51aaf 100644 --- a/Content.Shared/Disease/DiseasePrototype.cs +++ b/Content.Shared/Disease/DiseasePrototype.cs @@ -12,17 +12,17 @@ namespace Content.Shared.Disease public sealed class DiseasePrototype : IPrototype, IInheritingPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name")] public string Name { get; } = string.Empty; - [DataField("parent", customTypeSerializer: typeof(PrototypeIdSerializer))] + [ParentDataFieldAttribute(typeof(PrototypeIdSerializer))] public string? Parent { get; private set; } [NeverPushInheritance] - [DataField("abstract")] + [AbstractDataFieldAttribute] public bool Abstract { get; private set; } /// diff --git a/Content.Shared/EntityList/EntityListPrototype.cs b/Content.Shared/EntityList/EntityListPrototype.cs index df4c8ad7ba..21975b5033 100644 --- a/Content.Shared/EntityList/EntityListPrototype.cs +++ b/Content.Shared/EntityList/EntityListPrototype.cs @@ -12,7 +12,7 @@ namespace Content.Shared.EntityList public sealed class EntityListPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Shared/Explosion/ExplosionPrototype.cs b/Content.Shared/Explosion/ExplosionPrototype.cs index 3d5e03952b..8bd1d13c7e 100644 --- a/Content.Shared/Explosion/ExplosionPrototype.cs +++ b/Content.Shared/Explosion/ExplosionPrototype.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Explosion; [Prototype("explosion")] public sealed class ExplosionPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataField] public string ID { get; } = default!; /// @@ -27,14 +27,14 @@ public sealed class ExplosionPrototype : IPrototype /// /// This set of points, together with 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. /// [DataField("tileBreakChance")] private readonly float[] _tileBreakChance = { 0f, 1f }; /// /// This set of points, together with 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. /// [DataField("tileBreakIntensity")] private readonly float[] _tileBreakIntensity = {0f, 15f }; diff --git a/Content.Shared/HUD/HudThemePrototype.cs b/Content.Shared/HUD/HudThemePrototype.cs index a8b244c43d..824bdef021 100644 --- a/Content.Shared/HUD/HudThemePrototype.cs +++ b/Content.Shared/HUD/HudThemePrototype.cs @@ -9,7 +9,7 @@ namespace Content.Shared.HUD [DataField("name", required: true)] public string Name { get; } = string.Empty; - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = string.Empty; [DataField("path", required: true)] diff --git a/Content.Shared/Inventory/InventoryComponent.cs b/Content.Shared/Inventory/InventoryComponent.cs index 79bead9873..c118dc92f8 100644 --- a/Content.Shared/Inventory/InventoryComponent.cs +++ b/Content.Shared/Inventory/InventoryComponent.cs @@ -1,10 +1,9 @@ -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Inventory; public abstract class InventoryComponent : Component { - [DataField("templateId", required: true, - customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("templateId", customTypeSerializer: typeof(PrototypeIdSerializer))] public string TemplateId { get; } = "human"; } diff --git a/Content.Shared/Inventory/InventoryTemplatePrototype.cs b/Content.Shared/Inventory/InventoryTemplatePrototype.cs index 128430593f..6a50fc57f2 100644 --- a/Content.Shared/Inventory/InventoryTemplatePrototype.cs +++ b/Content.Shared/Inventory/InventoryTemplatePrototype.cs @@ -10,7 +10,7 @@ namespace Content.Shared.Inventory; [Prototype("inventoryTemplate")] public sealed class InventoryTemplatePrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = string.Empty; [DataField("slots")] diff --git a/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs b/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs index f0d1c083a9..9b46cdf8f0 100644 --- a/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs +++ b/Content.Shared/Kitchen/MicrowaveMealRecipePrototype.cs @@ -17,7 +17,7 @@ namespace Content.Shared.Kitchen public sealed class FoodRecipePrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name")] diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index cb0557aa43..ebbb6e727f 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -13,16 +13,16 @@ namespace Content.Shared.Maps [Prototype("tile")] public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition { - [DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer))] + [ParentDataFieldAttribute(typeof(PrototypeIdSerializer))] public string? Parent { get; private set; } [NeverPushInheritance] - [DataField("abstract")] + [AbstractDataFieldAttribute] public bool Abstract { get; private set; } 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; } diff --git a/Content.Shared/Materials/MaterialPrototype.cs b/Content.Shared/Materials/MaterialPrototype.cs index 1423021b32..0b9d6c59ac 100644 --- a/Content.Shared/Materials/MaterialPrototype.cs +++ b/Content.Shared/Materials/MaterialPrototype.cs @@ -1,10 +1,7 @@ using Content.Shared.Stacks; -using Robust.Shared.Maths; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Utility; -using Robust.Shared.ViewVariables; namespace Content.Shared.Materials { @@ -16,15 +13,15 @@ namespace Content.Shared.Materials public sealed class MaterialPrototype : IPrototype, IInheritingPrototype { [ViewVariables] - [DataField("parent")] + [ParentDataField(typeof(PrototypeIdSerializer))] public string? Parent { get; } = null; [ViewVariables] - [DataField("abstract")] + [AbstractDataFieldAttribute] public bool Abstract { get; } = false; [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Shared/NameIdentifier/NameIdentifierGroupPrototype.cs b/Content.Shared/NameIdentifier/NameIdentifierGroupPrototype.cs index 5e25f215a0..959f7c8580 100644 --- a/Content.Shared/NameIdentifier/NameIdentifierGroupPrototype.cs +++ b/Content.Shared/NameIdentifier/NameIdentifierGroupPrototype.cs @@ -5,7 +5,7 @@ namespace Content.Shared.NameIdentifier; [Prototype("nameIdentifierGroup")] public sealed class NameIdentifierGroupPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/PDA/UplinkStoreListingPrototype.cs b/Content.Shared/PDA/UplinkStoreListingPrototype.cs index 28cac2d8f0..c616b45fa9 100644 --- a/Content.Shared/PDA/UplinkStoreListingPrototype.cs +++ b/Content.Shared/PDA/UplinkStoreListingPrototype.cs @@ -10,7 +10,7 @@ namespace Content.Shared.PDA public sealed class UplinkStoreListingPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("itemId", customTypeSerializer:typeof(PrototypeIdSerializer))] diff --git a/Content.Shared/Research/Prototypes/LatheRecipePrototype.cs b/Content.Shared/Research/Prototypes/LatheRecipePrototype.cs index 229eb94ac9..e247d5ada8 100644 --- a/Content.Shared/Research/Prototypes/LatheRecipePrototype.cs +++ b/Content.Shared/Research/Prototypes/LatheRecipePrototype.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Research.Prototypes public sealed class LatheRecipePrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name")] diff --git a/Content.Shared/Research/Prototypes/TechnologyPrototype.cs b/Content.Shared/Research/Prototypes/TechnologyPrototype.cs index 9714ca07f0..78f85d0e56 100644 --- a/Content.Shared/Research/Prototypes/TechnologyPrototype.cs +++ b/Content.Shared/Research/Prototypes/TechnologyPrototype.cs @@ -16,7 +16,7 @@ namespace Content.Shared.Research.Prototypes /// The ID of this technology prototype. /// [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Roles/AntagPrototype.cs b/Content.Shared/Roles/AntagPrototype.cs index a365d7b3e7..b7d60cd526 100644 --- a/Content.Shared/Roles/AntagPrototype.cs +++ b/Content.Shared/Roles/AntagPrototype.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Roles public sealed class AntagPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Roles/JobPrototype.cs b/Content.Shared/Roles/JobPrototype.cs index 0c338c8600..6212a94a47 100644 --- a/Content.Shared/Roles/JobPrototype.cs +++ b/Content.Shared/Roles/JobPrototype.cs @@ -18,7 +18,7 @@ namespace Content.Shared.Roles private string _name = string.Empty; [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("supervisors")] diff --git a/Content.Shared/Roles/StartingGearPrototype.cs b/Content.Shared/Roles/StartingGearPrototype.cs index ac21006c31..ff0d2377f0 100644 --- a/Content.Shared/Roles/StartingGearPrototype.cs +++ b/Content.Shared/Roles/StartingGearPrototype.cs @@ -33,7 +33,7 @@ namespace Content.Shared.Roles private Dictionary _inHand = new(0); [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = string.Empty; public string GetGear(string slot, HumanoidCharacterProfile? profile) diff --git a/Content.Shared/Sound/SoundSpecifierTypeSerializer.cs b/Content.Shared/Sound/SoundSpecifierTypeSerializer.cs index 8497b76a44..d6af1f1d4f 100644 --- a/Content.Shared/Sound/SoundSpecifierTypeSerializer.cs +++ b/Content.Shared/Sound/SoundSpecifierTypeSerializer.cs @@ -2,7 +2,6 @@ using System; using Robust.Shared.IoC; using Robust.Shared.Serialization.Manager; using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.Serialization.Manager.Result; using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Serialization.Markdown.Value; @@ -30,17 +29,17 @@ namespace Content.Shared.Sound return typeof(SoundPathSpecifier); } - public DeserializationResult Read(ISerializationManager serializationManager, MappingDataNode node, - IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null) + public SoundSpecifier Read(ISerializationManager serializationManager, MappingDataNode node, + IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, SoundSpecifier? _ = null) { 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, - IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null) + public SoundSpecifier Read(ISerializationManager serializationManager, ValueDataNode node, + IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, SoundSpecifier? _ = null) { - return new DeserializedValue(new SoundPathSpecifier(node.Value)); + return new SoundPathSpecifier(node.Value); } public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node, diff --git a/Content.Shared/Species/SpeciesPrototype.cs b/Content.Shared/Species/SpeciesPrototype.cs index c5b7ffceee..435b93c540 100644 --- a/Content.Shared/Species/SpeciesPrototype.cs +++ b/Content.Shared/Species/SpeciesPrototype.cs @@ -11,7 +11,7 @@ public sealed class SpeciesPrototype : IPrototype /// /// Prototype ID of the species. /// - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/Stacks/StackPrototype.cs b/Content.Shared/Stacks/StackPrototype.cs index d54d745605..77b011242e 100644 --- a/Content.Shared/Stacks/StackPrototype.cs +++ b/Content.Shared/Stacks/StackPrototype.cs @@ -10,7 +10,7 @@ namespace Content.Shared.Stacks public sealed class StackPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/StatusEffect/StatusEffectPrototype.cs b/Content.Shared/StatusEffect/StatusEffectPrototype.cs index 6b3e3846c9..b47af4d713 100644 --- a/Content.Shared/StatusEffect/StatusEffectPrototype.cs +++ b/Content.Shared/StatusEffect/StatusEffectPrototype.cs @@ -7,7 +7,7 @@ namespace Content.Shared.StatusEffect [Prototype("statusEffect")] public sealed class StatusEffectPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("alert")] diff --git a/Content.Shared/Tag/TagPrototype.cs b/Content.Shared/Tag/TagPrototype.cs index 6cca137b27..b653ec95c3 100644 --- a/Content.Shared/Tag/TagPrototype.cs +++ b/Content.Shared/Tag/TagPrototype.cs @@ -13,7 +13,7 @@ namespace Content.Shared.Tag public sealed class TagPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; } } diff --git a/Content.Shared/Tools/ToolQualityPrototype.cs b/Content.Shared/Tools/ToolQualityPrototype.cs index 9b3db28362..b8a52b9470 100644 --- a/Content.Shared/Tools/ToolQualityPrototype.cs +++ b/Content.Shared/Tools/ToolQualityPrototype.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Tools [Prototype("tool")] public sealed class ToolQualityPrototype : IPrototype { - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; /// diff --git a/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs b/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs index 9b2d5e7514..84e57dc9b6 100644 --- a/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs +++ b/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs @@ -11,7 +11,7 @@ namespace Content.Shared.VendingMachines public sealed class VendingMachineInventoryPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [DataField("name")] diff --git a/Content.Shared/Weapons/Melee/MeleeWeaponAnimationPrototype.cs b/Content.Shared/Weapons/Melee/MeleeWeaponAnimationPrototype.cs index 939e39e14d..947640859c 100644 --- a/Content.Shared/Weapons/Melee/MeleeWeaponAnimationPrototype.cs +++ b/Content.Shared/Weapons/Melee/MeleeWeaponAnimationPrototype.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Weapons.Melee public sealed class MeleeWeaponAnimationPrototype : IPrototype { [ViewVariables] - [DataField("id", required: true)] + [IdDataFieldAttribute] public string ID { get; } = default!; [ViewVariables] diff --git a/Content.Tests/Shared/Alert/AlertManagerTests.cs b/Content.Tests/Shared/Alert/AlertManagerTests.cs index 803da7d25e..6c00b88c4f 100644 --- a/Content.Tests/Shared/Alert/AlertManagerTests.cs +++ b/Content.Tests/Shared/Alert/AlertManagerTests.cs @@ -16,13 +16,11 @@ namespace Content.Tests.Shared.Alert { const string PROTOTYPES = @" - type: alert - name: AlertLowPressure - alertType: LowPressure + id: LowPressure icon: /Textures/Interface/Alerts/Pressure/lowpressure.png - type: alert - name: AlertHighPressure - alertType: HighPressure + id: HighPressure icon: /Textures/Interface/Alerts/Pressure/highpressure.png "; diff --git a/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs b/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs index 977c5f4658..46ce5a81d7 100644 --- a/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs +++ b/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs @@ -25,50 +25,40 @@ namespace Content.Tests.Shared.Alert - category: Temperature - type: alert - name: AlertLowPressure + id: LowPressure category: Pressure - alertType: LowPressure - type: alert - name: AlertOverfed + id: Overfed category: Hunger - alertType: Overfed - type: alert - name: AlertHighPressure + id: HighPressure category: Pressure - alertType: HighPressure - type: alert - name: AlertPeckish + id: Peckish category: Hunger - alertType: Peckish - type: alert - name: AlertStun - alertType: Stun + id: Stun - type: alert - name: AlertHandcuffed - alertType: Handcuffed + id: Handcuffed - type: alert - name: AlertHot + id: Hot category: Temperature - alertType: Hot - type: alert - name: AlertCold + id: Cold category: Temperature - alertType: Cold - type: alert - name: AlertWeightless - alertType: Weightless + id: Weightless - type: alert - name: AlertPilotingShuttle - alertType: PilotingShuttle + id: PilotingShuttle "; [Test] @@ -78,7 +68,7 @@ namespace Content.Tests.Shared.Alert var prototypeManager = IoCManager.Resolve(); prototypeManager.Initialize(); prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); - prototypeManager.Resync(); + prototypeManager.ResolveResults(); var alertOrder = prototypeManager.EnumeratePrototypes().FirstOrDefault(); diff --git a/Content.Tests/Shared/Alert/AlertPrototypeTests.cs b/Content.Tests/Shared/Alert/AlertPrototypeTests.cs index cdc7d0208a..096107cf16 100644 --- a/Content.Tests/Shared/Alert/AlertPrototypeTests.cs +++ b/Content.Tests/Shared/Alert/AlertPrototypeTests.cs @@ -15,7 +15,7 @@ namespace Content.Tests.Shared.Alert { private const string Prototypes = @" - type: alert - alertType: HumanHealth + id: HumanHealth category: Health icon: /Textures/Interface/Alerts/Human/human.rsi/human.png name: Health @@ -78,7 +78,7 @@ namespace Content.Tests.Shared.Alert var proto = (YamlMappingNode) rootNode[0]; var serMan = IoCManager.Resolve(); - return serMan.ReadValue(new MappingDataNode(proto)); + return serMan.Read(new MappingDataNode(proto)); } } } diff --git a/Content.Tests/Shared/Alert/ServerAlertsComponentTests.cs b/Content.Tests/Shared/Alert/ServerAlertsComponentTests.cs index d317803592..6e1957b986 100644 --- a/Content.Tests/Shared/Alert/ServerAlertsComponentTests.cs +++ b/Content.Tests/Shared/Alert/ServerAlertsComponentTests.cs @@ -16,14 +16,12 @@ namespace Content.Tests.Shared.Alert { const string PROTOTYPES = @" - type: alert - name: AlertLowPressure - alertType: LowPressure + id: LowPressure category: Pressure icon: /Textures/Interface/Alerts/Pressure/lowpressure.png - type: alert - name: AlertHighPressure - alertType: HighPressure + id: HighPressure category: Pressure icon: /Textures/Interface/Alerts/Pressure/highpressure.png "; @@ -42,7 +40,7 @@ namespace Content.Tests.Shared.Alert var factory = IoCManager.Resolve(); factory.RegisterClass(); prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); - prototypeManager.Resync(); + prototypeManager.ResolveResults(); var entSys = IoCManager.Resolve(); entSys.LoadExtraSystemType(); diff --git a/Content.Tests/Shared/Chemistry/ReagentPrototype_Tests.cs b/Content.Tests/Shared/Chemistry/ReagentPrototype_Tests.cs index d3ebb7eff0..da822b6a85 100644 --- a/Content.Tests/Shared/Chemistry/ReagentPrototype_Tests.cs +++ b/Content.Tests/Shared/Chemistry/ReagentPrototype_Tests.cs @@ -29,7 +29,7 @@ namespace Content.Tests.Shared.Chemistry var serializationManager = IoCManager.Resolve(); serializationManager.Initialize(); - var newReagent = serializationManager.ReadValue(new MappingDataNode(proto)); + var newReagent = serializationManager.Read(new MappingDataNode(proto)); Assert.That(defType, Is.EqualTo("reagent")); Assert.That(newReagent.ID, Is.EqualTo("H2")); @@ -43,6 +43,7 @@ namespace Content.Tests.Shared.Chemistry id: H2 name: Hydrogen desc: A light, flammable gas. + physicalDesc: A light, flammable gas. color: " + "\"#008080\""; } } diff --git a/Content.Tests/Shared/DamageTest.cs b/Content.Tests/Shared/DamageTest.cs index d19aa64860..4f8647b3e4 100644 --- a/Content.Tests/Shared/DamageTest.cs +++ b/Content.Tests/Shared/DamageTest.cs @@ -44,7 +44,7 @@ namespace Content.Tests.Shared _prototypeManager = IoCManager.Resolve(); _prototypeManager.Initialize(); _prototypeManager.LoadString(_damagePrototypes); - _prototypeManager.Resync(); + _prototypeManager.ResolveResults(); // Create a damage data set _damageSpec = new(_prototypeManager.Index("Brute"), 6); diff --git a/Content.Tests/Shared/Utility/RandomExtensionsTests.cs b/Content.Tests/Shared/Utility/RandomExtensionsTests.cs index f051daa32d..ea9d9f1730 100644 --- a/Content.Tests/Shared/Utility/RandomExtensionsTests.cs +++ b/Content.Tests/Shared/Utility/RandomExtensionsTests.cs @@ -29,6 +29,7 @@ namespace Content.Tests.Shared.Utility prototypeManager.Initialize(); prototypeManager.LoadFromStream(new StringReader(Prototypes)); + prototypeManager.ResolveResults(); var dataSet = prototypeManager.Index(TestDatasetId); var random = IoCManager.Resolve(); diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml index 5e02ebe15e..73c16846c2 100644 --- a/Resources/Prototypes/Alerts/alerts.yml +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -19,7 +19,7 @@ - alertType: Magboots - type: alert - alertType: LowOxygen + id: LowOxygen category: Breathing icon: 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]." - type: alert - alertType: Toxins + id: Toxins category: Toxins icon: 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." - type: alert - alertType: LowPressure + id: LowPressure category: Pressure icon: 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." - type: alert - alertType: HighPressure + id: HighPressure category: Pressure icon: 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" - type: alert - alertType: Fire + id: Fire icon: /Textures/Interface/Alerts/Fire/fire.png onClick: !type:ResistFire { } 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." - type: alert - alertType: Cold + id: Cold category: Temperature icon: 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." - type: alert - alertType: Hot + id: Hot category: Temperature icon: 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." - type: alert - alertType: Weightless + id: Weightless icon: /Textures/Interface/Alerts/Weightless/weightless.png name: Weightless description: > @@ -92,20 +92,20 @@ Mag-boots or jetpacks would help you move with more control - type: alert - alertType: Stun + id: Stun icon: /Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png #Should probably draw a proper icon name: "[color=yellow]Stunned[/color]" description: "You're [color=yellow]stunned[/color]! Something is impairing your ability to move or interact with objects" - type: alert - alertType: Handcuffed + id: Handcuffed onClick: !type:RemoveCuffs { } icon: /Textures/Interface/Alerts/Handcuffed/Handcuffed.png 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." - type: alert - alertType: Buckled + id: Buckled category: Buckled onClick: !type:Unbuckle { } 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]" - type: alert - alertType: HumanCrit + id: HumanCrit category: Health icon: sprite: /Textures/Interface/Alerts/human_health.rsi @@ -122,7 +122,7 @@ description: "You're severely injured and unconscious." - type: alert - alertType: HumanDead + id: HumanDead category: Health icon: sprite: /Textures/Interface/Alerts/human_health.rsi @@ -131,7 +131,7 @@ description: You're dead, note that you can still be revived! - type: alert - alertType: HumanHealth + id: HumanHealth category: Health icon: sprite: /Textures/Interface/Alerts/human_health.rsi @@ -142,7 +142,7 @@ maxSeverity: 6 - type: alert - alertType: PilotingShuttle + id: PilotingShuttle category: Piloting onClick: !type:StopPiloting { } icon: /Textures/Interface/Alerts/piloting.png @@ -150,93 +150,93 @@ description: You are piloting a shuttle. Click the alert to stop. - type: alert - alertType: Overfed + id: Overfed category: Hunger icon: /Textures/Interface/Alerts/Hunger/Overfed.png name: "[color=yellow]Overfed[/color]" description: You ate too much food, lardass. Run around the station and lose some weight. - type: alert - alertType: Peckish + id: Peckish category: Hunger icon: /Textures/Interface/Alerts/Hunger/Peckish.png name: "[color=yellow]Peckish[/color]" description: Some food would be good right about now. - type: alert - alertType: Starving + id: Starving category: Hunger icon: /Textures/Interface/Alerts/Hunger/Starving.png name: "[color=red]Starving[/color]" description: You're severely malnourished. The hunger pains make moving around a chore. - type: alert - alertType: Overhydrated + id: Overhydrated category: Thirst icon: /Textures/Interface/Alerts/Thirst/OverHydrated.png name: "[color=yellow]Overhydrated[/color]" description: You drank too much. - type: alert - alertType: Thirsty + id: Thirsty category: Thirst icon: /Textures/Interface/Alerts/Thirst/Thirsty.png name: "[color=yellow]Thirsty[/color]" description: Something to drink would be good right about now. - type: alert - alertType: Parched + id: Parched category: Thirst icon: /Textures/Interface/Alerts/Thirst/Parched.png name: "[color=red]Parched[/color]" description: You're severely thirsty. The thirst makes moving around a chore. - type: alert - alertType: Pulled + id: Pulled icon: /Textures/Interface/Alerts/Pull/pulled.png onClick: !type:StopBeingPulled { } name: Pulled description: You're being pulled. Move to break free. - type: alert - alertType: Pulling + id: Pulling icon: /Textures/Interface/Alerts/Pull/pulling.png onClick: !type:StopPulling { } name: Pulling description: You're pulling something. Click the alert to stop. - type: alert - alertType: Debug1 + id: Debug1 icon: /Textures/Interface/Alerts/human_health.rsi/health1.png name: Debug1 description: Debug - type: alert - alertType: Debug2 + id: Debug2 icon: /Textures/Interface/Alerts/human_health.rsi/health2.png name: Debug2 description: Debug - type: alert - alertType: Debug3 + id: Debug3 icon: /Textures/Interface/Alerts/human_health.rsi/health3.png name: Debug3 description: Debug - type: alert - alertType: Debug4 + id: Debug4 icon: /Textures/Interface/Alerts/human_health.rsi/health4.png name: Debug4 description: Debug - type: alert - alertType: Debug5 + id: Debug5 icon: /Textures/Interface/Alerts/human_health.rsi/health5.png name: Debug5 description: Debug - type: alert - alertType: Debug6 + id: Debug6 icon: /Textures/Interface/Alerts/human_health.rsi/health6.png name: Debug6 description: Debug diff --git a/Resources/Prototypes/Alerts/magboots.yml b/Resources/Prototypes/Alerts/magboots.yml index a39374c762..d2e7464184 100644 --- a/Resources/Prototypes/Alerts/magboots.yml +++ b/Resources/Prototypes/Alerts/magboots.yml @@ -1,5 +1,5 @@ - type: alert - alertType: Magboots + id: Magboots icon: { sprite: "/Textures/Clothing/Shoes/Boots/magboots.rsi", state: "icon-on" } name: "Magboots" description: You are immume to airflow, but slightly slower. diff --git a/Resources/Prototypes/Body/Parts/animal.yml b/Resources/Prototypes/Body/Parts/animal.yml index cedf350566..1697a7826a 100644 --- a/Resources/Prototypes/Body/Parts/animal.yml +++ b/Resources/Prototypes/Body/Parts/animal.yml @@ -16,7 +16,7 @@ id: HandsAnimal name: "animal hands" parent: PartAnimal - abstract: true + noSpawn: true components: - type: BodyPart partType: Hand @@ -28,7 +28,7 @@ id: LegsAnimal name: "animal legs" parent: PartAnimal - abstract: true + noSpawn: true components: - type: BodyPart partType: Leg @@ -39,7 +39,7 @@ id: FeetAnimal name: "animal feet" parent: PartAnimal - abstract: true + noSpawn: true components: - type: BodyPart partType: Foot @@ -50,7 +50,7 @@ id: TorsoAnimal name: "animal torso" parent: PartAnimal - abstract: true + noSpawn: true components: - type: BodyPart partType: Torso @@ -76,7 +76,7 @@ id: OrganAnimalLungs parent: BaseAnimalOrgan name: lungs - abstract: true + noSpawn: true components: - type: Mechanism size: 1 @@ -95,7 +95,7 @@ id: OrganAnimalStomach parent: BaseAnimalOrgan name: stomach - abstract: true + noSpawn: true components: - type: Mechanism size: 1 @@ -118,7 +118,7 @@ id: OrganAnimalLiver parent: BaseAnimalOrgan name: liver - abstract: true + noSpawn: true components: - type: Mechanism size: 1 @@ -134,7 +134,7 @@ id: OrganAnimalHeart parent: BaseAnimalOrgan name: heart - abstract: true + noSpawn: true components: - type: Mechanism size: 1 @@ -151,7 +151,7 @@ id: OrganAnimalKidneys parent: BaseAnimalOrgan name: kidneys - abstract: true + noSpawn: true components: - type: Mechanism size: 1 diff --git a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml index b78527bb84..7e2ebdbea1 100644 --- a/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml +++ b/Resources/Prototypes/Catalog/Fills/Backpacks/StarterGear/backpack.yml @@ -1,5 +1,4 @@ - type: entity - abstract: true parent: ClothingBackpack id: ClothingBackpackFilled components: diff --git a/Resources/Prototypes/Catalog/Fills/Books/lore.yml b/Resources/Prototypes/Catalog/Fills/Books/lore.yml index d8bdd33554..d0f0d5d778 100644 --- a/Resources/Prototypes/Catalog/Fills/Books/lore.yml +++ b/Resources/Prototypes/Catalog/Fills/Books/lore.yml @@ -4,6 +4,7 @@ name: demonomicon parent: BookBase id: BookDemonomicon + abstract: true description: 'Who knows what dark spells may be contained in these horrid pages?' components: - type: Sprite @@ -27,7 +28,6 @@ - type: entity parent: BookDemonomicon id: BookDemonomicon1 - abstract: true suffix: 1 components: - type: Paper @@ -40,7 +40,6 @@ - type: entity parent: BookDemonomicon id: BookDemonomicon2 - abstract: true suffix: 2 components: - type: Paper @@ -54,7 +53,6 @@ - type: entity parent: BookDemonomicon id: BookDemonomicon3 - abstract: true suffix: 3 components: - type: Paper diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml b/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml index d01a506a63..fe3e687846 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml @@ -7,7 +7,7 @@ components: - type: StorageFill contents: - - id: MagazineClRifleBase + - id: MagazineClRiflePistol amount: 6 - type: Sprite layers: @@ -26,7 +26,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .25 caseless (practice) magazines parent: BoxCardboard @@ -40,12 +40,12 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .25 caseless (rubber) magazines parent: BoxCardboard id: BoxMagazineClRifleRubber - description: A box full of + description: A box full of components: - type: StorageFill contents: @@ -55,7 +55,7 @@ layers: - state: box -# LRifle +# LRifle - type: entity name: box of .30 rifle magazines parent: BoxCardboard @@ -69,7 +69,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .30 rifle (high-velocity) magazines parent: BoxCardboard @@ -83,7 +83,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .30 rifle (practice) magazines parent: BoxCardboard @@ -97,7 +97,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .30 rifle (rubber) magazines parent: BoxCardboard @@ -126,7 +126,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Lamia (flash) magazines. parent: BoxCardboard @@ -140,7 +140,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Lamia (high-velocity) magazines parent: BoxCardboard @@ -154,7 +154,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Lamia (practice) magazines parent: BoxCardboard @@ -168,7 +168,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Drozd magazines parent: BoxCardboard @@ -182,7 +182,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Drozd (high-velocity) magazines parent: BoxCardboard @@ -196,7 +196,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Drozd (practice) magazines parent: BoxCardboard @@ -210,7 +210,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .40 Drozd (rubber) magazines parent: BoxCardboard @@ -239,7 +239,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of Calico .35 auto magazines parent: BoxCardboard @@ -253,7 +253,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of pistol .35 auto magazines parent: BoxCardboard @@ -267,7 +267,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of pistol .35 auto (flash) magazines parent: BoxCardboard @@ -281,7 +281,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of pistol .35 auto (high-velocity) magazines parent: BoxCardboard @@ -295,7 +295,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of pistol .35 auto (practice) magazines parent: BoxCardboard @@ -309,7 +309,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of pistol .35 auto (rubber) magazines parent: BoxCardboard @@ -323,7 +323,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of machine pistol .35 auto magazines parent: BoxCardboard @@ -337,7 +337,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of machine pistol .35 auto (high-velocity) magazines parent: BoxCardboard @@ -351,7 +351,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of machine pistol .35 auto (practice) magazines parent: BoxCardboard @@ -365,7 +365,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of machine pistol .35 auto (rubber) magazines parent: BoxCardboard @@ -379,7 +379,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of SMG .35 auto magazines parent: BoxCardboard @@ -393,7 +393,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of SMG .35 auto (flash) magazines parent: BoxCardboard @@ -407,7 +407,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of SMG .35 auto (high-velocity) magazines parent: BoxCardboard @@ -421,7 +421,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of SMG .35 auto (practice) magazines parent: BoxCardboard @@ -435,7 +435,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of SMG .35 auto (rubber) magazines parent: BoxCardboard @@ -464,7 +464,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of (.50 beanbag) ammo drums parent: BoxCardboard @@ -478,7 +478,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of (.50 slug) ammo drums parent: BoxCardboard @@ -492,7 +492,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of (.50 incendiary) ammo drums parent: BoxCardboard @@ -536,7 +536,7 @@ layers: - state: boxwide - state: shelllethal - + - type: entity name: box of shotgun slug cartridges parent: BoxCardboard @@ -551,7 +551,7 @@ layers: - state: boxwide - state: shellslug - + - type: entity name: box of shotgun flare cartridges parent: BoxCardboard @@ -566,7 +566,7 @@ layers: - state: boxwide - state: shellflare - + - type: entity name: box of shotgun flash cartridges parent: BoxCardboard @@ -581,7 +581,7 @@ layers: - state: boxwide - state: shellflash - + - type: entity name: box of shotgun incendiary cartridges parent: BoxCardboard @@ -596,7 +596,7 @@ layers: - state: boxwide - state: shellincendiary - + - type: entity name: box of shotgun practice cartridges parent: BoxCardboard @@ -611,7 +611,7 @@ layers: - state: boxwide - state: shellpractice - + - type: entity name: box of tranquilizer cartridges parent: BoxCardboard @@ -641,7 +641,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .20 rifle (flash) magazines parent: BoxCardboard @@ -655,7 +655,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .20 rifle (high-velocity) magazines parent: BoxCardboard @@ -669,7 +669,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .20 rifle (practice) magazines parent: BoxCardboard @@ -683,7 +683,7 @@ - type: Sprite layers: - state: box - + - type: entity name: box of .20 rifle (rubber) magazines parent: BoxCardboard @@ -696,4 +696,4 @@ amount: 6 - type: Sprite layers: - - state: box \ No newline at end of file + - state: box diff --git a/Resources/Prototypes/Catalog/Fills/Crates/salvage.yml b/Resources/Prototypes/Catalog/Fills/Crates/salvage.yml index 5e8edbae8e..13134e625d 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/salvage.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/salvage.yml @@ -24,7 +24,7 @@ - type: entity id: CrateSalvageAssortedGoodies suffix: Filled, Salvage Random - abstract: true # You should use SalvageMaterialCrateSpawner instead + noSpawn: true # You should use SalvageMaterialCrateSpawner instead parent: CrateGenericSteel components: - type: StorageFill diff --git a/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml b/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml index ec09546423..8f044922d0 100644 --- a/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml +++ b/Resources/Prototypes/Catalog/Fills/Paper/salvage_lore.yml @@ -2,7 +2,7 @@ - type: entity 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" parent: PaperWritten components: @@ -34,7 +34,7 @@ - type: entity id: PaperWrittenSalvageLoreGaming1 - abstract: true # keep this from spamming spawn sheet + noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 1" parent: PaperWritten components: @@ -48,7 +48,7 @@ - type: entity id: PaperWrittenSalvageLoreGaming2 - abstract: true # keep this from spamming spawn sheet + noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 2" parent: PaperWritten components: @@ -63,14 +63,14 @@ Int: 528,491 Wis: 1 Cha: 1 - + Where's the age? Why are those ability scores so ridiculous? What even are you trying to do here, Leah? - Your Friendly DM - type: entity id: PaperWrittenSalvageLoreGaming3 - abstract: true # keep this from spamming spawn sheet + noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 3" parent: PaperWritten components: @@ -85,7 +85,7 @@ - type: entity id: PaperWrittenSalvageLoreGaming4 - abstract: true # keep this from spamming spawn sheet + noSpawn: true # keep this from spamming spawn sheet suffix: "Salvage: Lore: Gaming 4" parent: PaperWritten components: diff --git a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml index a264e2e103..7453919561 100644 --- a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml +++ b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml @@ -1,7 +1,7 @@ - type: entity id: Smoke name: smoke - abstract: true + noSpawn: true components: - type: Sprite drawdepth: Effects @@ -23,7 +23,7 @@ - type: entity id: Foam name: foam - abstract: true + noSpawn: true components: - type: Sprite netsync: false @@ -62,7 +62,7 @@ - type: entity id: IronMetalFoam name: iron metal foam - abstract: true + noSpawn: true parent: Foam components: - type: Sprite @@ -90,7 +90,7 @@ - type: entity id: AluminiumMetalFoam name: aluminium metal foam - abstract: true + noSpawn: true parent: Foam components: - type: Sprite diff --git a/Resources/Prototypes/Entities/Effects/radiation.yml b/Resources/Prototypes/Entities/Effects/radiation.yml index 2f26bd1d5e..7cd840bff7 100644 --- a/Resources/Prototypes/Entities/Effects/radiation.yml +++ b/Resources/Prototypes/Entities/Effects/radiation.yml @@ -7,4 +7,4 @@ - type: RadiationPulse minPulseLifespan: 0.8 maxPulseLifespan: 2.5 - radsPerSecond: 5 \ No newline at end of file + radsPerSecond: 5 diff --git a/Resources/Prototypes/Entities/Markers/Spawners/jobs.yml b/Resources/Prototypes/Entities/Markers/Spawners/jobs.yml index f91a110ffb..855936073f 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/jobs.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/jobs.yml @@ -158,7 +158,7 @@ layers: - state: green - state: chaplain - + - type: entity id: SpawnPointLibrarian parent: SpawnPointJobBase @@ -181,7 +181,7 @@ - type: Sprite layers: - state: green - - state: lawyer + - state: lawyer - type: entity id: SpawnPointJanitor diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index f0a9ba4d63..abc11279f5 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -709,9 +709,11 @@ combatToggleAction: enabled: false autoPopulate: false + name: action-name-combat disarmAction: enabled: false autoPopulate: false + name: action-name-disarm - type: Bloodstream bloodMaxVolume: 50 - type: DiseaseCarrier #The other class lab animal and disease vector @@ -1001,6 +1003,7 @@ path: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg #funny sfx use beepInterval: 1 - type: Explosive + explosionType: Default devastationRange: 1 heavyImpactRange: 2 lightImpactRange: 3 diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index 4513f4e297..9769b4f927 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -1,7 +1,7 @@ - type: entity id: MobObserver name: observer - abstract: true + noSpawn: true save: false description: Boo! components: diff --git a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml index e07ba16064..f40a537a14 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/dwarf.yml @@ -109,7 +109,7 @@ name: Urist McHands parent: MobHumanDummy id: MobDwarfDummy - abstract: true + noSpawn: true description: A dummy human meant to be used in character setup. components: - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index dae8a37952..d057ad619c 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -4,7 +4,7 @@ name: Urist McHands id: MobHumanBase description: A miserable pile of secrets. - abstract: true + noSpawn: true components: - type: Tag tags: @@ -302,7 +302,7 @@ save: false name: Urist McHands id: MobHumanDummy - abstract: true + noSpawn: true description: A dummy human meant to be used in character setup. components: - type: Hands diff --git a/Resources/Prototypes/Entities/Mobs/Species/slime.yml b/Resources/Prototypes/Entities/Mobs/Species/slime.yml index 3bf0cba0bb..b738d3daaf 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/slime.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/slime.yml @@ -145,7 +145,7 @@ name: Urist McHands parent: MobHumanDummy id: MobSlimePersonDummy - abstract: true + noSpawn: true description: A dummy slime meant to be used in character setup. components: - type: Sprite diff --git a/Resources/Prototypes/Entities/Mobs/Species/vox.yml b/Resources/Prototypes/Entities/Mobs/Species/vox.yml index dc95e4c244..083453b537 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/vox.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/vox.yml @@ -1,6 +1,6 @@ - type: entity parent: MobHuman - abstract: True + abstract: true id: BaseVox components: - type: Icon diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index f45a184026..99edb8d10b 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -195,7 +195,7 @@ # Trash - type: entity - abstract: true + noSpawn: true parent: BaseItem id: FoodPacketTrash description: This is rubbish. @@ -213,7 +213,7 @@ - type: Recyclable - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketBoritosTrash name: boritos bag @@ -224,7 +224,7 @@ color: blue - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketCheesieTrash name: cheesie honkers @@ -235,7 +235,7 @@ color: orange - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketChipsTrash name: chips @@ -246,7 +246,7 @@ color: green - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketChocolateTrash name: chocolate wrapper @@ -257,7 +257,7 @@ color: red - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketEnergyTrash name: energybar wrapper @@ -268,7 +268,7 @@ color: green - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketPistachioTrash name: pistachios packet @@ -279,7 +279,7 @@ color: green - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketPopcornTrash name: popcorn box @@ -290,7 +290,7 @@ state: blue - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketRaisinsTrash name: 4no raisins @@ -301,7 +301,7 @@ color: red - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketSemkiTrash name: semki packet @@ -312,7 +312,7 @@ color: orange - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketSusTrash name: sus jerky @@ -323,7 +323,7 @@ color: red - type: entity - abstract: true + noSpawn: true parent: FoodPacketTrash id: FoodPacketSyndiTrash name: syndi-cakes box diff --git a/Resources/Prototypes/Entities/Objects/Devices/payload.yml b/Resources/Prototypes/Entities/Objects/Devices/payload.yml index 0ab0a37a64..e8c4f64068 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/payload.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/payload.yml @@ -29,6 +29,7 @@ sprite: Objects/Devices/payload.rsi state: payload-explosive-armed - type: Explosive + explosionType: Default devastationRange: 0 heavyImpactRange: 2 lightImpactRange: 4 @@ -60,7 +61,7 @@ state: payload-empty - type: ChemicalPayload beakerSlotA: &slotDef - whitelist: + whitelist: components: - FitsInDispenser swap: false diff --git a/Resources/Prototypes/Entities/Objects/Misc/briefcases.yml b/Resources/Prototypes/Entities/Objects/Misc/briefcases.yml index 67c9557dbd..48167059d7 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/briefcases.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/briefcases.yml @@ -21,4 +21,4 @@ sprite: Objects/Storage/Briefcases/briefcase_brown.rsi state: icon - type: Item - sprite: Objects/Storage/Briefcases/briefcase_brown.rsi \ No newline at end of file + sprite: Objects/Storage/Briefcases/briefcase_brown.rsi diff --git a/Resources/Prototypes/Entities/Objects/Misc/carpets.yml b/Resources/Prototypes/Entities/Objects/Misc/carpets.yml index f05aa48775..6d317b6eab 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/carpets.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/carpets.yml @@ -11,6 +11,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetRed - type: entity name: black carpet @@ -24,6 +26,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetBlack - type: entity name: blue carpet @@ -37,6 +41,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetBlue - type: entity name: green carpet @@ -50,6 +56,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetGreen - type: entity name: orange carpet @@ -63,6 +71,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetOrange - type: entity name: sky blue carpet @@ -76,6 +86,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetSkyBlue - type: entity name: purple carpet @@ -89,6 +101,8 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetPurple - type: entity name: pink carpet @@ -102,3 +116,5 @@ - type: FloorTile outputs: - plating + - type: Stack + stackType: FloorCarpetPink diff --git a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml index e2ac85c9c6..ae7821399f 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml @@ -3,7 +3,7 @@ id: IDCardStandard name: identification card description: A card necessary to access various areas aboard the station. - abstract: true + noSpawn: true components: - type: Sprite sprite: Objects/Misc/id_cards.rsi diff --git a/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml b/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml index 7c7b870d6a..b30a4288d4 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/kudzu.yml @@ -67,6 +67,7 @@ - type: AtmosExposed - type: Spreader growthResult: Kudzu + chance: 1 - type: GrowingKudzu growthTickSkipChance: 0.1666 - type: SlowContacts diff --git a/Resources/Prototypes/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/Entities/Objects/Misc/paper.yml index a0edd85007..8b7cf6681f 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/paper.yml @@ -141,8 +141,8 @@ visuals: - type: MappedItemVisualizer - - + + - type: entity id: BoxFolderRed parent: BoxFolderBase diff --git a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml index cb7cc5fbad..8a1fe624ae 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml @@ -198,6 +198,8 @@ outputs: - plating - floor_elevator_shaft + - type: Stack + stackType: FloorTileElevatorShaft - type: entity name: rock vault tile @@ -212,6 +214,8 @@ outputs: - plating - floor_rock_vault + - type: Stack + stackType: FloorTileRockVault - type: entity name: blue tile @@ -226,6 +230,8 @@ outputs: - plating - floor_blue + - type: Stack + stackType: FloorTileBlue # Departamental - type: entity @@ -289,6 +295,8 @@ outputs: - plating - floor_bar + - type: Stack + stackType: FloorTileBar - type: entity name: clown tile @@ -303,6 +311,8 @@ outputs: - plating - floor_clown + - type: Stack + stackType: FloorTileClown - type: entity name: mime tile @@ -317,6 +327,8 @@ outputs: - plating - floor_mime + - type: Stack + stackType: FloorTileMime - type: entity name: kitchen tile @@ -331,6 +343,8 @@ outputs: - plating - floor_kitchen + - type: Stack + stackType: FloorTileKitchen - type: entity name: laundry tile @@ -345,6 +359,8 @@ outputs: - plating - floor_laundry + - type: Stack + stackType: FloorTileLaundry # Carpets - type: entity @@ -506,6 +522,8 @@ outputs: - plating - floor_silver + - type: Stack + stackType: FloorTileSilver # Circuits - type: entity @@ -521,6 +539,8 @@ outputs: - plating - floor_green_circuit + - type: Stack + stackType: FloorTileGCircuit - type: entity name: blue circuit floor @@ -535,6 +555,8 @@ outputs: - plating - floor_blue_circuit + - type: Stack + stackType: FloorTileBCircuit # Terrain - type: entity @@ -550,6 +572,8 @@ outputs: - plating - floor_grass + - type: Stack + stackType: FloorTileGrass - type: entity name: jungle grass tile @@ -564,6 +588,8 @@ outputs: - plating - FloorGrassJungle + - type: Stack + stackType: FloorTileGrassJungle - type: entity name: snow tile @@ -578,3 +604,5 @@ outputs: - plating - floor_snow + - type: Stack + stackType: FloorTileSnow diff --git a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml index 1983339287..4b95251c01 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/cable_coils.yml @@ -4,7 +4,7 @@ - type: entity id: CableStack - abstract: true + noSpawn: true parent: BaseItem name: cable stack suffix: Full diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml index 7fffd2e68f..16340a289c 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml @@ -71,13 +71,13 @@ groups: Burn: 10 - type: PointLight - enabled: true + enabled: true color: "#ff4300" radius: 2.0 energy: 7.0 - type: IgniteOnCollide fireStacks: 1 - + - type: entity id: PelletShotgunPractice name: pellet (.50 practice) @@ -132,9 +132,9 @@ groups: Burn: 20 - type: PointLight - enabled: true + enabled: true color: "#FF8080" radius: 15.0 energy: 9.0 - type: IgniteOnCollide - fireStacks: 4 \ No newline at end of file + fireStacks: 4 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index c3684fb7a0..43315d285d 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -19,7 +19,7 @@ - type: PowerCellSlot cellSlot: ejectOnUse: true - soundOptions: + soundOptions: volume: -2 - type: Appearance visuals: @@ -125,7 +125,7 @@ - type: PowerCellSlot cellSlot: ejectOnUse: true - soundOptions: + soundOptions: volume: -2 startingItem: PowerCellSmallHigh @@ -176,7 +176,7 @@ - type: PowerCellSlot cellSlot: ejectOnUse: true - soundOptions: + soundOptions: volume: -2 startingItem: PowerCellSmallHigh @@ -206,7 +206,7 @@ - type: PowerCellSlot cellSlot: ejectOnUse: true - soundOptions: + soundOptions: volume: -2 startingItem: PowerCellSmallSuper @@ -236,7 +236,7 @@ - type: PowerCellSlot cellSlot: ejectOnUse: true - soundOptions: + soundOptions: volume: -2 startingItem: PowerCellSmallSuper - type: Appearance @@ -281,7 +281,7 @@ - type: PowerCellSlot descFormatString : "" # empty string for no examine-text (cell is not ejectable) cellSlot: - soundOptions: + soundOptions: volume: -2 locked: true - type: Appearance diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/meteors.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/meteors.yml index 02c3acf4f1..9973da6de2 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/meteors.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/meteors.yml @@ -1,7 +1,7 @@ - type: entity id: MeteorLarge name: meteor - abstract: true + noSpawn: true components: - type: Sprite noRot: false diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index 4c51c726f7..3c94cc5c5a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -208,6 +208,7 @@ state: frag - type: ExplodeOnTrigger - type: Explosive + explosionType: Default devastationRange: 0 heavyImpactRange: 0 lightImpactRange: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml index 36519aa63d..7ff8a3a7d7 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml @@ -152,7 +152,7 @@ currentSelector: Single allSelectors: - Single - fillPrototype: CartridgePistol + fillPrototype: CartridgePistol caliber: Pistol capacity: 5 soundEmpty: diff --git a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml index 549c840d2b..20b1fa26bf 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml @@ -184,4 +184,4 @@ bounds: "-0.49,-0.49,0.49,0.49" mass: 50 layer: - - Opaque \ No newline at end of file + - Opaque diff --git a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml index 46530cc8c5..c09df1b414 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml @@ -43,7 +43,7 @@ - type: entity id: DisposalHolder - abstract: true + noSpawn: true name: disposal holder components: - type: DisposalHolder diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml index 2ed868b2cd..1f5e7b9d7e 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/ame.yml @@ -74,7 +74,7 @@ supplyRate: 0 - type: entity - abstract: true + noSpawn: true parent: AMEController id: AMEControllerUnanchored suffix: Unanchored diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml index 379449aee6..52cf16849d 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml @@ -62,6 +62,7 @@ path: /Audio/Effects/metalbreak.ogg - !type:ExplodeBehavior - type: Explosive + explosionType: Default devastationRange: 1 heavyImpactRange: 3 lightImpactRange: 5 @@ -123,7 +124,7 @@ # Construction Frames - type: entity - abstract: true + noSpawn: true id: BaseGeneratorWallmountFrame name: wallmount generator frame description: A construction frame for a wallmount generator. @@ -160,7 +161,7 @@ components: - type: PowerSupplier supplyRate: 3000 - + - type: entity parent: BaseGenerator id: GeneratorPlasma @@ -179,7 +180,7 @@ LayoutId: GeneratorPlasma - type: Machine board: GeneratorPlasmaMachineCircuitboard - + - type: entity parent: BaseGenerator id: GeneratorUranium @@ -222,7 +223,7 @@ supplyRate: 6000 - type: Construction graph: WallmountGenerator - node: APU + node: APU # RTG - no fuel requirement diff --git a/Resources/Prototypes/Entities/Structures/Power/apc.yml b/Resources/Prototypes/Entities/Structures/Power/apc.yml index 440dc5e729..a5a87b1e05 100644 --- a/Resources/Prototypes/Entities/Structures/Power/apc.yml +++ b/Resources/Prototypes/Entities/Structures/Power/apc.yml @@ -1,5 +1,5 @@ - type: entity - abstract: true + noSpawn: true id: BaseAPC name: APC description: A control terminal for the area's electrical systems. diff --git a/Resources/Prototypes/Entities/Structures/Power/smes.yml b/Resources/Prototypes/Entities/Structures/Power/smes.yml index e18ed75833..0904d3ecf0 100644 --- a/Resources/Prototypes/Entities/Structures/Power/smes.yml +++ b/Resources/Prototypes/Entities/Structures/Power/smes.yml @@ -69,4 +69,4 @@ components: - type: Battery maxCharge: 10000000 - startingCharge: 10000000 \ No newline at end of file + startingCharge: 10000000 diff --git a/Resources/Prototypes/Entities/Structures/Power/substation.yml b/Resources/Prototypes/Entities/Structures/Power/substation.yml index fed74d69eb..f25c1fd4ee 100644 --- a/Resources/Prototypes/Entities/Structures/Power/substation.yml +++ b/Resources/Prototypes/Entities/Structures/Power/substation.yml @@ -77,7 +77,7 @@ # Compact Wall Substation Base - type: entity id: BaseSubstationWall - abstract: true + noSpawn: true name: wallmount substation description: A substation designed for compact shuttles and spaces. placement: @@ -150,7 +150,7 @@ - !type:PlaySoundBehavior sound: path: /Audio/Effects/metalbreak.ogg - + # Substations in use - type: entity @@ -161,7 +161,7 @@ - type: Battery maxCharge: 4000000 startingCharge: 4000000 - + - type: entity parent: BaseSubstationWall id: SubstationWallBasic @@ -173,11 +173,11 @@ - type: Construction graph: WallmountSubstation node: substation - + # Construction Frame - type: entity id: BaseSubstationWallFrame - abstract: true + noSpawn: true name: wallmount substation frame description: A substation frame for construction placement: @@ -203,4 +203,4 @@ - state: substation_wall - type: Construction graph: WallmountSubstation - node: frame \ No newline at end of file + node: frame diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml index bef2554e9a..caf8af5365 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base_structurecrates.yml @@ -1,7 +1,7 @@ - type: entity id: CrateGeneric parent: BaseStructureDynamic - abstract: true + noSpawn: true name: crate description: A large container for items. components: @@ -64,7 +64,7 @@ - type: entity id: CrateBaseSecure parent: BaseStructureDynamic - abstract: true + noSpawn: true name: crate description: A large container for items. components: diff --git a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml b/Resources/Prototypes/Entities/Structures/Walls/barricades.yml index 6028351e04..dbd772b275 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/barricades.yml @@ -43,6 +43,9 @@ - type: AtmosExposed - type: Flammable fireSpread: true + damage: + types: + Heat: 1 #per second, scales with number of fire 'stacks' - type: Appearance visuals: - type: FireVisualizer diff --git a/Resources/Prototypes/Entities/Structures/lighting_ground.yml b/Resources/Prototypes/Entities/Structures/lighting_ground.yml index 2b2536bdc1..189a610484 100644 --- a/Resources/Prototypes/Entities/Structures/lighting_ground.yml +++ b/Resources/Prototypes/Entities/Structures/lighting_ground.yml @@ -110,4 +110,4 @@ hasLampOnSpawn: LightTube damage: types: - Heat: 20 \ No newline at end of file + Heat: 20 diff --git a/Resources/Prototypes/Stacks/consumable_stacks.yml b/Resources/Prototypes/Stacks/consumable_stacks.yml index a5cec6cfcc..36f0bb97b0 100644 --- a/Resources/Prototypes/Stacks/consumable_stacks.yml +++ b/Resources/Prototypes/Stacks/consumable_stacks.yml @@ -3,6 +3,7 @@ - type: stack id: Pancake name: pancake + spawn: FoodBakedPancake # Food Containers @@ -17,23 +18,29 @@ - type: stack id: PaperRolling name: paper rolling + spawn: PaperRolling - type: stack id: CigaretteFilter name: cigarette filter + spawn: CigaretteFilter - type: stack id: GroundTobacco name: ground tobacco + spawn: GroundTobacco - type: stack id: GroundCannabis name: ground cannabis + spawn: GroundCannabis - type: stack id: LeavesTobaccoDried name: dried tobacco leaves + spawn: LeavesTobaccoDried - type: stack id: LeavesCannabisDried name: dried cannabis leaves + spawn: LeavesCannabisDried diff --git a/Resources/Prototypes/Stacks/floor_tile_stacks.yml b/Resources/Prototypes/Stacks/floor_tile_stacks.yml index 53ba8a4529..a8d3a6c117 100644 --- a/Resources/Prototypes/Stacks/floor_tile_stacks.yml +++ b/Resources/Prototypes/Stacks/floor_tile_stacks.yml @@ -72,38 +72,148 @@ id: FloorTileStackShuttleWhite name: white shuttle tile spawn: FloorTileItemShuttleWhite - + - type: stack id: FloorTileStackShuttleBlue name: blue shuttle tile spawn: FloorTileItemShuttleBlue - + - type: stack id: FloorTileStackShuttleOrange name: orange shuttle tile spawn: FloorTileItemShuttleOrange - + - type: stack id: FloorTileStackShuttlePurple name: purple shuttle tile spawn: FloorTileItemShuttlePurple - + - type: stack id: FloorTileStackShuttleRed name: red shuttle tile spawn: FloorTileItemShuttleRed - + - type: stack id: FloorTileStackEighties name: eighties floor tile spawn: FloorTileItemEighties - + - type: stack id: FloorTileStackArcadeBlue name: blue arcade tile spawn: FloorTileItemArcadeBlue - + - type: stack id: FloorTileStackArcadeRed name: red arcade tile - spawn: FloorTileItemArcadeRed \ No newline at end of file + spawn: FloorTileItemArcadeRed + +- type: stack + id: FloorCarpetRed + name: red carpet tile + spawn: FloorCarpetItemRed + +- type: stack + id: FloorCarpetBlack + name: block carpet tile + spawn: FloorCarpetItemBlack + +- type: stack + id: FloorCarpetBlue + name: blue carpet tile + spawn: FloorCarpetItemBlue + +- type: stack + id: FloorCarpetGreen + name: green carpet tile + spawn: FloorCarpetItemGreen + +- type: stack + id: FloorCarpetOrange + name: orange carpet tile + spawn: FloorCarpetItemOrange + +- type: stack + id: FloorCarpetSkyBlue + name: skyblue carpet tile + spawn: FloorCarpetItemSkyBlue + +- type: stack + id: FloorCarpetPurple + name: purple carpet tile + spawn: FloorCarpetItemPurple + +- type: stack + id: FloorCarpetPink + name: pink carpet tile + spawn: FloorCarpetItemPink + +- type: stack + id: FloorTileElevatorShaft + name: elevator shaft tile + spawn: FloorTileItemElevatorShaft + +- type: stack + id: FloorTileRockVault + name: rock vault tile + spawn: FloorTileItemRockVault + +- type: stack + id: FloorTileBlue + name: blue floor tile + spawn: FloorTileItemBlue + +- type: stack + id: FloorTileBar + name: item bar floor tile + spawn: FloorTileItemBar + +- type: stack + id: FloorTileClown + name: clown floor tile + spawn: FloorTileItemClown + +- type: stack + id: FloorTileMime + name: mime floor tile + spawn: FloorTileItemMime + +- type: stack + id: FloorTileKitchen + name: kitchen floor tile + spawn: FloorTileItemKitchen + +- type: stack + id: FloorTileLaundry + name: laundry floor tile + spawn: FloorTileItemLaundry + +- type: stack + id: FloorTileSilver + name: silver floor tile + spawn: FloorTileItemSilver + +- type: stack + id: FloorTileGCircuit + name: gcircuit floor tile + spawn: FloorTileItemGCircuit + +- type: stack + id: FloorTileBCircuit + name: bcircuit floor tile + spawn: FloorTileItemBCircuit + +- type: stack + id: FloorTileGrass + name: grass floor tile + spawn: FloorTileItemGrass + +- type: stack + id: FloorTileGrassJungle + name: grass jungle floor tile + spawn: FloorTileItemGrassJungle + +- type: stack + id: FloorTileSnow + name: snow floor tile + spawn: FloorTileItemSnow