Serv3 rework content changes (#7145)
This commit is contained in:
@@ -666,9 +666,7 @@ namespace Content.Client.Actions
|
|||||||
if (!map.TryGet("action", out var actionNode))
|
if (!map.TryGet("action", out var actionNode))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var action = _serializationManager.ReadValueCast<ActionType>(typeof(ActionType), actionNode);
|
var action = _serializationManager.Read<ActionType>(actionNode);
|
||||||
if (action == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (Ui.Component.Actions.TryGetValue(action, out var existingAction))
|
if (Ui.Component.Actions.TryGetValue(action, out var existingAction))
|
||||||
{
|
{
|
||||||
@@ -681,9 +679,7 @@ namespace Content.Client.Actions
|
|||||||
if (!map.TryGet("assignments", out var assignmentNode))
|
if (!map.TryGet("assignments", out var assignmentNode))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var assignments = _serializationManager.ReadValueCast<List<(byte Hotbar, byte Slot)>>(typeof(List<(byte Hotbar, byte Slot)>), assignmentNode);
|
var assignments = _serializationManager.Read<List<(byte Hotbar, byte Slot)>>(assignmentNode);
|
||||||
if (assignments == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
foreach (var index in assignments)
|
foreach (var index in assignments)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager
|
|||||||
private void LoadGamePrototype(GamePrototypeLoadMessage message)
|
private void LoadGamePrototype(GamePrototypeLoadMessage message)
|
||||||
{
|
{
|
||||||
_prototypeManager.LoadString(message.PrototypeData, true);
|
_prototypeManager.LoadString(message.PrototypeData, true);
|
||||||
_prototypeManager.Resync();
|
_prototypeManager.ResolveResults();
|
||||||
_localizationManager.ReloadLocalizations();
|
_localizationManager.ReloadLocalizations();
|
||||||
GamePrototypeLoaded?.Invoke();
|
GamePrototypeLoaded?.Invoke();
|
||||||
Logger.InfoS("adminbus", "Loaded adminbus prototype data.");
|
Logger.InfoS("adminbus", "Loaded adminbus prototype data.");
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace Content.Client.Changelog
|
|||||||
return new List<ChangelogEntry>();
|
return new List<ChangelogEntry>();
|
||||||
|
|
||||||
var node = (MappingDataNode)yamlData.Documents[0].RootNode.ToDataNode();
|
var node = (MappingDataNode)yamlData.Documents[0].RootNode.ToDataNode();
|
||||||
return _serialization.ReadValueOrThrow<List<ChangelogEntry>>(node["Entries"]);
|
return _serialization.Read<List<ChangelogEntry>>(node["Entries"]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ namespace Content.IntegrationTests
|
|||||||
if (client.Options?.ExtraPrototypes is { } extra)
|
if (client.Options?.ExtraPrototypes is { } extra)
|
||||||
{
|
{
|
||||||
prototypes.LoadString(extra, true);
|
prototypes.LoadString(extra, true);
|
||||||
prototypes.Resync();
|
prototypes.ResolveResults();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ namespace Content.IntegrationTests
|
|||||||
if (server.Options?.ExtraPrototypes is { } extra)
|
if (server.Options?.ExtraPrototypes is { } extra)
|
||||||
{
|
{
|
||||||
prototypes.LoadString(extra, true);
|
prototypes.LoadString(extra, true);
|
||||||
prototypes.Resync();
|
prototypes.ResolveResults();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ namespace Content.IntegrationTests.Tests.Body
|
|||||||
normalBodyTemperature: 310.15
|
normalBodyTemperature: 310.15
|
||||||
thermalRegulationTemperatureThreshold: 25
|
thermalRegulationTemperatureThreshold: 25
|
||||||
- type: Respirator
|
- type: Respirator
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Asphyxiation: 1.5
|
||||||
|
damageRecovery:
|
||||||
|
types:
|
||||||
|
Asphyxiation: -1.5
|
||||||
";
|
";
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Content.IntegrationTests.Tests.Chemistry
|
|||||||
public void DeserializeNullTest()
|
public void DeserializeNullTest()
|
||||||
{
|
{
|
||||||
var node = new ValueDataNode("null");
|
var node = new ValueDataNode("null");
|
||||||
var unit = Serialization.ReadValue<FixedPoint2?>(node);
|
var unit = Serialization.Read<FixedPoint2?>(node);
|
||||||
|
|
||||||
Assert.That(unit, Is.Null);
|
Assert.That(unit, Is.Null);
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,7 @@ namespace Content.IntegrationTests.Tests.Chemistry
|
|||||||
public void DeserializeNullDefinitionTest()
|
public void DeserializeNullDefinitionTest()
|
||||||
{
|
{
|
||||||
var node = new MappingDataNode().Add("unit", "null");
|
var node = new MappingDataNode().Add("unit", "null");
|
||||||
var definition = Serialization.ReadValueOrThrow<FixedPoint2TestDefinition>(node);
|
var definition = Serialization.Read<FixedPoint2TestDefinition>(node);
|
||||||
|
|
||||||
Assert.That(definition.Unit, Is.Null);
|
Assert.That(definition.Unit, Is.Null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ namespace Content.IntegrationTests.Tests.Disposal
|
|||||||
id: HumanDummy
|
id: HumanDummy
|
||||||
components:
|
components:
|
||||||
- type: Body
|
- type: Body
|
||||||
|
template: HumanoidTemplate
|
||||||
|
preset: HumanPreset
|
||||||
|
centerSlot: torso
|
||||||
- type: MobState
|
- type: MobState
|
||||||
- type: Damageable
|
- type: Damageable
|
||||||
damageContainer: Biological
|
damageContainer: Biological
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Content.IntegrationTests.Tests
|
|||||||
{
|
{
|
||||||
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
|
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
|
||||||
{
|
{
|
||||||
if (proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue;
|
if (proto.NoSpawn || proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue;
|
||||||
|
|
||||||
Assert.DoesNotThrow(() =>
|
Assert.DoesNotThrow(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace Content.IntegrationTests.Tests
|
|||||||
//Generate list of non-abstract prototypes to test
|
//Generate list of non-abstract prototypes to test
|
||||||
foreach (var prototype in prototypeMan.EnumeratePrototypes<EntityPrototype>())
|
foreach (var prototype in prototypeMan.EnumeratePrototypes<EntityPrototype>())
|
||||||
{
|
{
|
||||||
if (prototype.Abstract)
|
if (prototype.NoSpawn || prototype.Abstract)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Server.AI.Components
|
|||||||
// These are immutable so any dynamic changes aren't saved back over.
|
// These are immutable so any dynamic changes aren't saved back over.
|
||||||
// AiFactionSystem will just read these and then store them.
|
// AiFactionSystem will just read these and then store them.
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("hostile")]
|
[DataField("hostile")]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Server.AI.Utility
|
|||||||
/// Name of the BehaviorSet.
|
/// Name of the BehaviorSet.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public sealed class GamePrototypeLoadManager : IGamePrototypeLoadManager
|
|||||||
msg.PrototypeData = prototypeData;
|
msg.PrototypeData = prototypeData;
|
||||||
_netManager.ServerSendToAll(msg); // everyone load it up!
|
_netManager.ServerSendToAll(msg); // everyone load it up!
|
||||||
_prototypeManager.LoadString(prototypeData, true); // server needs it too.
|
_prototypeManager.LoadString(prototypeData, true); // server needs it too.
|
||||||
_prototypeManager.Resync();
|
_prototypeManager.ResolveResults();
|
||||||
_localizationManager.ReloadLocalizations();
|
_localizationManager.ReloadLocalizations();
|
||||||
GamePrototypeLoaded?.Invoke();
|
GamePrototypeLoaded?.Invoke();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Server.Advertisements
|
|||||||
public sealed class AdvertisementsPackPrototype : IPrototype
|
public sealed class AdvertisementsPackPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("advertisements")]
|
[DataField("advertisements")]
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Content.Server.Atmos.Reactions
|
|||||||
public sealed class GasReactionPrototype : IPrototype
|
public sealed class GasReactionPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Server.BarSign
|
|||||||
private string _name = string.Empty;
|
private string _name = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Content.Server.Bible.Components
|
|||||||
public DamageSpecifier DamageOnUntrainedUse = default!;
|
public DamageSpecifier DamageOnUntrainedUse = default!;
|
||||||
|
|
||||||
//Chance the bible will fail to heal someone with no helmet
|
//Chance the bible will fail to heal someone with no helmet
|
||||||
[DataField("failChance", required:true)]
|
[DataField("failChance")]
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float FailChance = 0.34f;
|
public float FailChance = 0.34f;
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public sealed class SeedPrototype : IPrototype
|
|||||||
{
|
{
|
||||||
public const string Prototype = "SeedBase";
|
public const string Prototype = "SeedBase";
|
||||||
|
|
||||||
[DataField("id", required: true)] public string ID { get; private init; } = default!;
|
[IdDataFieldAttribute] public string ID { get; private init; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unique identifier of this seed. Do NOT set this.
|
/// Unique identifier of this seed. Do NOT set this.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Server.Construction.Completions;
|
|||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public sealed class AdminLog : IGraphAction
|
public sealed class AdminLog : IGraphAction
|
||||||
{
|
{
|
||||||
[DataField("logType", required: true)]
|
[DataField("logType")]
|
||||||
public LogType LogType = LogType.Construction;
|
public LogType LogType = LogType.Construction;
|
||||||
|
|
||||||
[DataField("impact")]
|
[DataField("impact")]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Server.GameTicking.Presets
|
|||||||
[Prototype("gamePreset")]
|
[Prototype("gamePreset")]
|
||||||
public sealed class GamePresetPrototype : IPrototype
|
public sealed class GamePresetPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required:true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("alias")]
|
[DataField("alias")]
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ namespace Content.Server.GameTicking.Rules;
|
|||||||
[Prototype("gameRule")]
|
[Prototype("gameRule")]
|
||||||
public sealed class GameRulePrototype : IPrototype
|
public sealed class GameRulePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required:true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Server.Holiday
|
|||||||
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty;
|
[ViewVariables] [DataField("name")] public string Name { get; private set; } = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public sealed class SpreaderSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
var direction = (DirectionFlag) (1 << i);
|
var direction = (DirectionFlag) (1 << i);
|
||||||
var coords = transform.Coordinates.Offset(direction.AsDir().ToVec());
|
var coords = transform.Coordinates.Offset(direction.AsDir().ToVec());
|
||||||
if (grid.GetTileRef(coords).Tile.IsEmpty || _robustRandom.Prob(spreader.Chance)) continue;
|
if (grid.GetTileRef(coords).Tile.IsEmpty || _robustRandom.Prob(1 - spreader.Chance)) continue;
|
||||||
var ents = grid.GetLocal(coords);
|
var ents = grid.GetLocal(coords);
|
||||||
|
|
||||||
if (ents.Any(x => IsTileBlockedFrom(x, direction))) continue;
|
if (ents.Any(x => IsTileBlockedFrom(x, direction))) continue;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Content.Server.Maps;
|
|||||||
public sealed class GameMapPrototype : IPrototype
|
public sealed class GameMapPrototype : IPrototype
|
||||||
{
|
{
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Server.Objectives
|
|||||||
public sealed class ObjectivePrototype : IPrototype
|
public sealed class ObjectivePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown";
|
[ViewVariables] [DataField("issuer")] public string Issuer { get; private set; } = "Unknown";
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ namespace Content.Server.Projectiles.Components
|
|||||||
public bool DeleteOnCollide { get; } = true;
|
public bool DeleteOnCollide { get; } = true;
|
||||||
|
|
||||||
// Get that juicy FPS hit sound
|
// Get that juicy FPS hit sound
|
||||||
[DataField("soundHit", required: true)] public SoundSpecifier? SoundHit = default!;
|
[DataField("soundHit")] public SoundSpecifier? SoundHit;
|
||||||
[DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies = null;
|
[DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies;
|
||||||
|
|
||||||
public bool DamagedEntity;
|
public bool DamagedEntity;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Server.Salvage
|
|||||||
public sealed class SalvageMapPrototype : IPrototype
|
public sealed class SalvageMapPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Server.Speech.Components
|
|||||||
public sealed class ReplacementAccentPrototype : IPrototype
|
public sealed class ReplacementAccentPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("words")]
|
[DataField("words")]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public sealed class VocalComponent : Component
|
|||||||
public const float Variation = 0.125f;
|
public const float Variation = 0.125f;
|
||||||
|
|
||||||
// Not using the in-build sound support for actions, given that the sound is modified non-prototype specific factors like gender.
|
// Not using the in-build sound support for actions, given that the sound is modified non-prototype specific factors like gender.
|
||||||
[DataField("action", required: true)]
|
[DataField("action")]
|
||||||
public InstantAction Action = new()
|
public InstantAction Action = new()
|
||||||
{
|
{
|
||||||
UseDelay = TimeSpan.FromSeconds(10),
|
UseDelay = TimeSpan.FromSeconds(10),
|
||||||
|
|||||||
@@ -52,13 +52,13 @@ namespace Content.Server.Temperature.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DataField("coldDamage", required: true)]
|
[DataField("coldDamage")]
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public DamageSpecifier ColdDamage = default!;
|
public DamageSpecifier ColdDamage = new();
|
||||||
|
|
||||||
[DataField("heatDamage", required: true)]
|
[DataField("heatDamage")]
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public DamageSpecifier HeatDamage = default!;
|
public DamageSpecifier HeatDamage = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Temperature won't do more than this amount of damage per second.
|
/// Temperature won't do more than this amount of damage per second.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Shared.Access;
|
|||||||
[Prototype("accessGroup")]
|
[Prototype("accessGroup")]
|
||||||
public sealed class AccessGroupPrototype : IPrototype
|
public sealed class AccessGroupPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("tags", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<AccessLevelPrototype>))]
|
[DataField("tags", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<AccessLevelPrototype>))]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Shared.Access
|
|||||||
public sealed class AccessLevelPrototype : IPrototype
|
public sealed class AccessLevelPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Shared.Alert
|
|||||||
public sealed class AlertOrderPrototype : IPrototype, IComparer<AlertPrototype>, ISerializationHooks
|
public sealed class AlertOrderPrototype : IPrototype, IComparer<AlertPrototype>, ISerializationHooks
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("order")] private readonly List<(string type, string alert)> _order = new();
|
[DataField("order")] private readonly List<(string type, string alert)> _order = new();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Content.Shared.Alert
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Type of alert, no 2 alert prototypes should have the same one.
|
/// Type of alert, no 2 alert prototypes should have the same one.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("alertType")]
|
[IdDataFieldAttribute]
|
||||||
public AlertType AlertType { get; private set; }
|
public AlertType AlertType { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace Content.Shared.Atmos.Monitor
|
|||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public sealed class AtmosAlarmThreshold : IPrototype, ISerializationHooks
|
public sealed class AtmosAlarmThreshold : IPrototype, ISerializationHooks
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("ignore")]
|
[DataField("ignore")]
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Shared.Atmos.Prototypes
|
|||||||
// TODO: Add interfaces for gas behaviours e.g. breathing, burning
|
// TODO: Add interfaces for gas behaviours e.g. breathing, burning
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Shared.Audio
|
|||||||
public sealed class SoundCollectionPrototype : IPrototype
|
public sealed class SoundCollectionPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("files")]
|
[DataField("files")]
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Shared.Body.Prototypes
|
|||||||
public sealed class BodyPresetPrototype : IPrototype
|
public sealed class BodyPresetPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("partIDs")]
|
[DataField("partIDs")]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace Content.Shared.Body.Prototypes
|
|||||||
private Dictionary<string, string> _mechanismLayers = new();
|
private Dictionary<string, string> _mechanismLayers = new();
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Body.Prototypes
|
|||||||
[Prototype("metabolismGroup")]
|
[Prototype("metabolismGroup")]
|
||||||
public sealed class MetabolismGroupPrototype : IPrototype
|
public sealed class MetabolismGroupPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Body.Prototypes
|
|||||||
[Prototype("metabolizerType")]
|
[Prototype("metabolizerType")]
|
||||||
public sealed class MetabolizerTypePrototype : IPrototype
|
public sealed class MetabolizerTypePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Cargo
|
|||||||
[DataField("description")] private string _description = string.Empty;
|
[DataField("description")] private string _description = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Shared.CharacterAppearance
|
|||||||
[Prototype("spriteAccessory")]
|
[Prototype("spriteAccessory")]
|
||||||
public sealed class SpriteAccessoryPrototype : IPrototype, ISerializationHooks
|
public sealed class SpriteAccessoryPrototype : IPrototype, ISerializationHooks
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("categories", required: true)]
|
[DataField("categories", required: true)]
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Content.Shared.Chemistry.Dispenser
|
|||||||
private List<string> _inventory = new();
|
private List<string> _inventory = new();
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
public List<string> Inventory => _inventory;
|
public List<string> Inventory => _inventory;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Chemistry.Reaction
|
|||||||
public sealed class ReactionPrototype : IPrototype, IComparable<ReactionPrototype>
|
public sealed class ReactionPrototype : IPrototype, IComparable<ReactionPrototype>
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ public sealed class ReactiveReagentEffectEntry
|
|||||||
|
|
||||||
[DataField("effects", required: true)]
|
[DataField("effects", required: true)]
|
||||||
public List<ReagentEffect> Effects = default!;
|
public List<ReagentEffect> Effects = default!;
|
||||||
[DataField("groups", required: true, readOnly: true, serverOnly: true,
|
|
||||||
|
[DataField("groups", readOnly: true, serverOnly: true,
|
||||||
customTypeSerializer:typeof(PrototypeIdDictionarySerializer<HashSet<ReactionMethod>, ReactiveGroupPrototype>))]
|
customTypeSerializer:typeof(PrototypeIdDictionarySerializer<HashSet<ReactionMethod>, ReactiveGroupPrototype>))]
|
||||||
public Dictionary<string, HashSet<ReactionMethod>> ReactiveGroups { get; } = default!;
|
public Dictionary<string, HashSet<ReactionMethod>> ReactiveGroups { get; } = default!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Chemistry.Reaction;
|
|||||||
[Prototype("reactiveGroup")]
|
[Prototype("reactiveGroup")]
|
||||||
public sealed class ReactiveGroupPrototype : IPrototype
|
public sealed class ReactiveGroupPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
public sealed class ReagentPrototype : IPrototype, IInheritingPrototype
|
public sealed class ReagentPrototype : IPrototype, IInheritingPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("name", required: true)]
|
[DataField("name", required: true)]
|
||||||
@@ -34,11 +34,11 @@ namespace Content.Shared.Chemistry.Reagent
|
|||||||
[DataField("group")]
|
[DataField("group")]
|
||||||
public string Group { get; } = "Unknown";
|
public string Group { get; } = "Unknown";
|
||||||
|
|
||||||
[DataField("parent", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))]
|
[ParentDataFieldAttribute(typeof(PrototypeIdSerializer<ReagentPrototype>))]
|
||||||
public string? Parent { get; private set; }
|
public string? Parent { get; private set; }
|
||||||
|
|
||||||
[NeverPushInheritance]
|
[NeverPushInheritance]
|
||||||
[DataField("abstract")]
|
[AbstractDataFieldAttribute]
|
||||||
public bool Abstract { get; private set; }
|
public bool Abstract { get; private set; }
|
||||||
|
|
||||||
[DataField("desc", required: true)]
|
[DataField("desc", required: true)]
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Construction.Prototypes
|
|||||||
private readonly Dictionary<string, Dictionary<ConstructionGraphNode, ConstructionGraphNode?>> _pathfinding = new();
|
private readonly Dictionary<string, Dictionary<ConstructionGraphNode, ConstructionGraphNode?>> _pathfinding = new();
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Content.Shared.Construction.Prototypes
|
|||||||
[DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure;
|
[DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("placementMode")]
|
[DataField("placementMode")]
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Serialization.Manager;
|
using Robust.Shared.Serialization.Manager;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Serialization.Manager.Result;
|
|
||||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||||
using Robust.Shared.Serialization.Markdown.Validation;
|
using Robust.Shared.Serialization.Markdown.Validation;
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Interfaces;
|
using Robust.Shared.Serialization.TypeSerializers.Interfaces;
|
||||||
@@ -47,17 +46,17 @@ namespace Content.Shared.Construction.Steps
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeserializationResult Read(ISerializationManager serializationManager,
|
public ConstructionGraphStep Read(ISerializationManager serializationManager,
|
||||||
MappingDataNode node,
|
MappingDataNode node,
|
||||||
IDependencyCollection dependencies,
|
IDependencyCollection dependencies,
|
||||||
bool skipHook,
|
bool skipHook,
|
||||||
ISerializationContext? context = null)
|
ISerializationContext? context = null, ConstructionGraphStep? _ = null)
|
||||||
{
|
{
|
||||||
var type = GetType(node) ??
|
var type = GetType(node) ??
|
||||||
throw new ArgumentException(
|
throw new ArgumentException(
|
||||||
"Tried to convert invalid YAML node mapping to ConstructionGraphStep!");
|
"Tried to convert invalid YAML node mapping to ConstructionGraphStep!");
|
||||||
|
|
||||||
return serializationManager.Read(type, node, context, skipHook);
|
return (ConstructionGraphStep)serializationManager.Read(type, node, context, skipHook)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node,
|
public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Content.Shared.Damage.Prototypes
|
|||||||
public sealed class DamageContainerPrototype : IPrototype
|
public sealed class DamageContainerPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Damage.Prototypes
|
|||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public sealed class DamageGroupPrototype : IPrototype
|
public sealed class DamageGroupPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)] public string ID { get; } = default!;
|
[IdDataFieldAttribute] public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<DamageTypePrototype>))]
|
[DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<DamageTypePrototype>))]
|
||||||
public List<string> DamageTypes { get; } = default!;
|
public List<string> DamageTypes { get; } = default!;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Content.Shared.Damage.Prototypes
|
|||||||
public sealed class DamageModifierSetPrototype : DamageModifierSet, IPrototype
|
public sealed class DamageModifierSetPrototype : DamageModifierSet, IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Shared.Damage.Prototypes
|
|||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
public sealed class DamageTypePrototype : IPrototype
|
public sealed class DamageTypePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Prototypes;
|
|||||||
[Prototype("examinableDamage")]
|
[Prototype("examinableDamage")]
|
||||||
public sealed class ExaminableDamagePrototype : IPrototype
|
public sealed class ExaminableDamagePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Dataset
|
|||||||
public sealed class DatasetPrototype : IPrototype
|
public sealed class DatasetPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("values")] public IReadOnlyList<string> Values { get; } = new List<string>();
|
[DataField("values")] public IReadOnlyList<string> Values { get; } = new List<string>();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Content.Shared.Decals;
|
|||||||
[Prototype("palette")]
|
[Prototype("palette")]
|
||||||
public sealed class ColorPalettePrototype : IPrototype
|
public sealed class ColorPalettePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id")] public string ID { get; } = null!;
|
[IdDataFieldAttribute] public string ID { get; } = null!;
|
||||||
[DataField("name")] public string Name { get; } = null!;
|
[DataField("name")] public string Name { get; } = null!;
|
||||||
[DataField("colors")] public Dictionary<string, Color> Colors { get; } = null!;
|
[DataField("colors")] public Dictionary<string, Color> Colors { get; } = null!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using Robust.Shared.IoC;
|
|||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Serialization.Manager;
|
using Robust.Shared.Serialization.Manager;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Serialization.Manager.Result;
|
|
||||||
using Robust.Shared.Serialization.Markdown;
|
using Robust.Shared.Serialization.Markdown;
|
||||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||||
using Robust.Shared.Serialization.Markdown.Validation;
|
using Robust.Shared.Serialization.Markdown.Validation;
|
||||||
@@ -20,12 +19,10 @@ namespace Content.Shared.Decals
|
|||||||
return serializationManager.ValidateNode<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context);
|
return serializationManager.ValidateNode<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeserializationResult Read(ISerializationManager serializationManager, MappingDataNode node,
|
public DecalGridComponent.DecalGridChunkCollection Read(ISerializationManager serializationManager, MappingDataNode node,
|
||||||
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null)
|
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, DecalGridComponent.DecalGridChunkCollection? _ = null)
|
||||||
{
|
{
|
||||||
//todo this read method does not support pushing inheritance
|
var dictionary = serializationManager.Read<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context, skipHook: skipHook);
|
||||||
var dictionary =
|
|
||||||
serializationManager.ReadValueOrThrow<Dictionary<Vector2i, Dictionary<uint, Decal>>>(node, context, skipHook);
|
|
||||||
|
|
||||||
var uids = new SortedSet<uint>();
|
var uids = new SortedSet<uint>();
|
||||||
var uidChunkMap = new Dictionary<uint, Vector2i>();
|
var uidChunkMap = new Dictionary<uint, Vector2i>();
|
||||||
@@ -54,8 +51,7 @@ namespace Content.Shared.Decals
|
|||||||
newDict[indices][newUid] = dictionary[indices][oldUid];
|
newDict[indices][newUid] = dictionary[indices][oldUid];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new DeserializedValue<DecalGridComponent.DecalGridChunkCollection>(
|
return new DecalGridComponent.DecalGridChunkCollection(newDict){NextUid = nextIndex};
|
||||||
new DecalGridComponent.DecalGridChunkCollection(newDict){NextUid = nextIndex});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataNode Write(ISerializationManager serializationManager, DecalGridComponent.DecalGridChunkCollection value, bool alwaysWrite = false,
|
public DataNode Write(ISerializationManager serializationManager, DecalGridComponent.DecalGridChunkCollection value, bool alwaysWrite = false,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Content.Shared.Decals
|
|||||||
[Prototype("decal")]
|
[Prototype("decal")]
|
||||||
public sealed class DecalPrototype : IPrototype
|
public sealed class DecalPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id")] public string ID { get; } = null!;
|
[IdDataFieldAttribute] public string ID { get; } = null!;
|
||||||
[DataField("sprite")] public SpriteSpecifier Sprite { get; } = SpriteSpecifier.Invalid;
|
[DataField("sprite")] public SpriteSpecifier Sprite { get; } = SpriteSpecifier.Invalid;
|
||||||
[DataField("tags")] public List<string> Tags = new();
|
[DataField("tags")] public List<string> Tags = new();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ namespace Content.Shared.Disease
|
|||||||
public sealed class DiseasePrototype : IPrototype, IInheritingPrototype
|
public sealed class DiseasePrototype : IPrototype, IInheritingPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
public string Name { get; } = string.Empty;
|
public string Name { get; } = string.Empty;
|
||||||
|
|
||||||
[DataField("parent", customTypeSerializer: typeof(PrototypeIdSerializer<DiseasePrototype>))]
|
[ParentDataFieldAttribute(typeof(PrototypeIdSerializer<DiseasePrototype>))]
|
||||||
public string? Parent { get; private set; }
|
public string? Parent { get; private set; }
|
||||||
|
|
||||||
[NeverPushInheritance]
|
[NeverPushInheritance]
|
||||||
[DataField("abstract")]
|
[AbstractDataFieldAttribute]
|
||||||
public bool Abstract { get; private set; }
|
public bool Abstract { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Content.Shared.EntityList
|
|||||||
public sealed class EntityListPrototype : IPrototype
|
public sealed class EntityListPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Content.Shared.Explosion;
|
|||||||
[Prototype("explosion")]
|
[Prototype("explosion")]
|
||||||
public sealed class ExplosionPrototype : IPrototype
|
public sealed class ExplosionPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataField]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Shared.HUD
|
|||||||
[DataField("name", required: true)]
|
[DataField("name", required: true)]
|
||||||
public string Name { get; } = string.Empty;
|
public string Name { get; } = string.Empty;
|
||||||
|
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = string.Empty;
|
public string ID { get; } = string.Empty;
|
||||||
|
|
||||||
[DataField("path", required: true)]
|
[DataField("path", required: true)]
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
|
|
||||||
namespace Content.Shared.Inventory;
|
namespace Content.Shared.Inventory;
|
||||||
|
|
||||||
public abstract class InventoryComponent : Component
|
public abstract class InventoryComponent : Component
|
||||||
{
|
{
|
||||||
[DataField("templateId", required: true,
|
[DataField("templateId", customTypeSerializer: typeof(PrototypeIdSerializer<InventoryTemplatePrototype>))]
|
||||||
customTypeSerializer: typeof(PrototypeIdSerializer<InventoryTemplatePrototype>))]
|
|
||||||
public string TemplateId { get; } = "human";
|
public string TemplateId { get; } = "human";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Shared.Inventory;
|
|||||||
[Prototype("inventoryTemplate")]
|
[Prototype("inventoryTemplate")]
|
||||||
public sealed class InventoryTemplatePrototype : IPrototype
|
public sealed class InventoryTemplatePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = string.Empty;
|
public string ID { get; } = string.Empty;
|
||||||
|
|
||||||
[DataField("slots")]
|
[DataField("slots")]
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Content.Shared.Kitchen
|
|||||||
public sealed class FoodRecipePrototype : IPrototype
|
public sealed class FoodRecipePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
|
|||||||
@@ -13,16 +13,16 @@ namespace Content.Shared.Maps
|
|||||||
[Prototype("tile")]
|
[Prototype("tile")]
|
||||||
public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
|
public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
|
||||||
{
|
{
|
||||||
[DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ContentTileDefinition>))]
|
[ParentDataFieldAttribute(typeof(PrototypeIdSerializer<ContentTileDefinition>))]
|
||||||
public string? Parent { get; private set; }
|
public string? Parent { get; private set; }
|
||||||
|
|
||||||
[NeverPushInheritance]
|
[NeverPushInheritance]
|
||||||
[DataField("abstract")]
|
[AbstractDataFieldAttribute]
|
||||||
public bool Abstract { get; private set; }
|
public bool Abstract { get; private set; }
|
||||||
|
|
||||||
public string Path => "/Textures/Tiles/";
|
public string Path => "/Textures/Tiles/";
|
||||||
|
|
||||||
[DataField("id", required: true)] public string ID { get; } = string.Empty;
|
[IdDataFieldAttribute] public string ID { get; } = string.Empty;
|
||||||
|
|
||||||
public ushort TileId { get; private set; }
|
public ushort TileId { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
using Content.Shared.Stacks;
|
using Content.Shared.Stacks;
|
||||||
using Robust.Shared.Maths;
|
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
|
||||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
|
||||||
|
|
||||||
namespace Content.Shared.Materials
|
namespace Content.Shared.Materials
|
||||||
{
|
{
|
||||||
@@ -16,15 +13,15 @@ namespace Content.Shared.Materials
|
|||||||
public sealed class MaterialPrototype : IPrototype, IInheritingPrototype
|
public sealed class MaterialPrototype : IPrototype, IInheritingPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("parent")]
|
[ParentDataField(typeof(PrototypeIdSerializer<MaterialPrototype>))]
|
||||||
public string? Parent { get; } = null;
|
public string? Parent { get; } = null;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("abstract")]
|
[AbstractDataFieldAttribute]
|
||||||
public bool Abstract { get; } = false;
|
public bool Abstract { get; } = false;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Content.Shared.NameIdentifier;
|
|||||||
[Prototype("nameIdentifierGroup")]
|
[Prototype("nameIdentifierGroup")]
|
||||||
public sealed class NameIdentifierGroupPrototype : IPrototype
|
public sealed class NameIdentifierGroupPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Shared.PDA
|
|||||||
public sealed class UplinkStoreListingPrototype : IPrototype
|
public sealed class UplinkStoreListingPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("itemId", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
[DataField("itemId", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Content.Shared.Research.Prototypes
|
|||||||
public sealed class LatheRecipePrototype : IPrototype
|
public sealed class LatheRecipePrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Content.Shared.Research.Prototypes
|
|||||||
/// The ID of this technology prototype.
|
/// The ID of this technology prototype.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Shared.Roles
|
|||||||
public sealed class AntagPrototype : IPrototype
|
public sealed class AntagPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Roles
|
|||||||
private string _name = string.Empty;
|
private string _name = string.Empty;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("supervisors")]
|
[DataField("supervisors")]
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Content.Shared.Roles
|
|||||||
private Dictionary<string, string> _inHand = new(0);
|
private Dictionary<string, string> _inHand = new(0);
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = string.Empty;
|
public string ID { get; } = string.Empty;
|
||||||
|
|
||||||
public string GetGear(string slot, HumanoidCharacterProfile? profile)
|
public string GetGear(string slot, HumanoidCharacterProfile? profile)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ using System;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Serialization.Manager;
|
using Robust.Shared.Serialization.Manager;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Serialization.Manager.Result;
|
|
||||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||||
using Robust.Shared.Serialization.Markdown.Validation;
|
using Robust.Shared.Serialization.Markdown.Validation;
|
||||||
using Robust.Shared.Serialization.Markdown.Value;
|
using Robust.Shared.Serialization.Markdown.Value;
|
||||||
@@ -30,17 +29,17 @@ namespace Content.Shared.Sound
|
|||||||
return typeof(SoundPathSpecifier);
|
return typeof(SoundPathSpecifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeserializationResult Read(ISerializationManager serializationManager, MappingDataNode node,
|
public SoundSpecifier Read(ISerializationManager serializationManager, MappingDataNode node,
|
||||||
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null)
|
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, SoundSpecifier? _ = null)
|
||||||
{
|
{
|
||||||
var type = GetType(node);
|
var type = GetType(node);
|
||||||
return serializationManager.Read(type, node, context, skipHook);
|
return (SoundSpecifier) serializationManager.Read(type, node, context, skipHook)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeserializationResult Read(ISerializationManager serializationManager, ValueDataNode node,
|
public SoundSpecifier Read(ISerializationManager serializationManager, ValueDataNode node,
|
||||||
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null)
|
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, SoundSpecifier? _ = null)
|
||||||
{
|
{
|
||||||
return new DeserializedValue<SoundSpecifier>(new SoundPathSpecifier(node.Value));
|
return new SoundPathSpecifier(node.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node,
|
public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public sealed class SpeciesPrototype : IPrototype
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Prototype ID of the species.
|
/// Prototype ID of the species.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace Content.Shared.Stacks
|
|||||||
public sealed class StackPrototype : IPrototype
|
public sealed class StackPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace Content.Shared.StatusEffect
|
|||||||
[Prototype("statusEffect")]
|
[Prototype("statusEffect")]
|
||||||
public sealed class StatusEffectPrototype : IPrototype
|
public sealed class StatusEffectPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("alert")]
|
[DataField("alert")]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Content.Shared.Tag
|
|||||||
public sealed class TagPrototype : IPrototype
|
public sealed class TagPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Tools
|
|||||||
[Prototype("tool")]
|
[Prototype("tool")]
|
||||||
public sealed class ToolQualityPrototype : IPrototype
|
public sealed class ToolQualityPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Shared.VendingMachines
|
|||||||
public sealed class VendingMachineInventoryPrototype : IPrototype
|
public sealed class VendingMachineInventoryPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[DataField("name")]
|
[DataField("name")]
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Content.Shared.Weapons.Melee
|
|||||||
public sealed class MeleeWeaponAnimationPrototype : IPrototype
|
public sealed class MeleeWeaponAnimationPrototype : IPrototype
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
[DataField("id", required: true)]
|
[IdDataFieldAttribute]
|
||||||
public string ID { get; } = default!;
|
public string ID { get; } = default!;
|
||||||
|
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -16,13 +16,11 @@ namespace Content.Tests.Shared.Alert
|
|||||||
{
|
{
|
||||||
const string PROTOTYPES = @"
|
const string PROTOTYPES = @"
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertLowPressure
|
id: LowPressure
|
||||||
alertType: LowPressure
|
|
||||||
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
|
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertHighPressure
|
id: HighPressure
|
||||||
alertType: HighPressure
|
|
||||||
icon: /Textures/Interface/Alerts/Pressure/highpressure.png
|
icon: /Textures/Interface/Alerts/Pressure/highpressure.png
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|||||||
@@ -25,50 +25,40 @@ namespace Content.Tests.Shared.Alert
|
|||||||
- category: Temperature
|
- category: Temperature
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertLowPressure
|
id: LowPressure
|
||||||
category: Pressure
|
category: Pressure
|
||||||
alertType: LowPressure
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertOverfed
|
id: Overfed
|
||||||
category: Hunger
|
category: Hunger
|
||||||
alertType: Overfed
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertHighPressure
|
id: HighPressure
|
||||||
category: Pressure
|
category: Pressure
|
||||||
alertType: HighPressure
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertPeckish
|
id: Peckish
|
||||||
category: Hunger
|
category: Hunger
|
||||||
alertType: Peckish
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertStun
|
id: Stun
|
||||||
alertType: Stun
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertHandcuffed
|
id: Handcuffed
|
||||||
alertType: Handcuffed
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertHot
|
id: Hot
|
||||||
category: Temperature
|
category: Temperature
|
||||||
alertType: Hot
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertCold
|
id: Cold
|
||||||
category: Temperature
|
category: Temperature
|
||||||
alertType: Cold
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertWeightless
|
id: Weightless
|
||||||
alertType: Weightless
|
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertPilotingShuttle
|
id: PilotingShuttle
|
||||||
alertType: PilotingShuttle
|
|
||||||
";
|
";
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@@ -78,7 +68,7 @@ namespace Content.Tests.Shared.Alert
|
|||||||
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
||||||
prototypeManager.Initialize();
|
prototypeManager.Initialize();
|
||||||
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
|
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
|
||||||
prototypeManager.Resync();
|
prototypeManager.ResolveResults();
|
||||||
|
|
||||||
var alertOrder = prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault();
|
var alertOrder = prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault();
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Content.Tests.Shared.Alert
|
|||||||
{
|
{
|
||||||
private const string Prototypes = @"
|
private const string Prototypes = @"
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: HumanHealth
|
id: HumanHealth
|
||||||
category: Health
|
category: Health
|
||||||
icon: /Textures/Interface/Alerts/Human/human.rsi/human.png
|
icon: /Textures/Interface/Alerts/Human/human.rsi/human.png
|
||||||
name: Health
|
name: Health
|
||||||
@@ -78,7 +78,7 @@ namespace Content.Tests.Shared.Alert
|
|||||||
var proto = (YamlMappingNode) rootNode[0];
|
var proto = (YamlMappingNode) rootNode[0];
|
||||||
var serMan = IoCManager.Resolve<ISerializationManager>();
|
var serMan = IoCManager.Resolve<ISerializationManager>();
|
||||||
|
|
||||||
return serMan.ReadValue<AlertPrototype>(new MappingDataNode(proto));
|
return serMan.Read<AlertPrototype>(new MappingDataNode(proto));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,12 @@ namespace Content.Tests.Shared.Alert
|
|||||||
{
|
{
|
||||||
const string PROTOTYPES = @"
|
const string PROTOTYPES = @"
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertLowPressure
|
id: LowPressure
|
||||||
alertType: LowPressure
|
|
||||||
category: Pressure
|
category: Pressure
|
||||||
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
|
icon: /Textures/Interface/Alerts/Pressure/lowpressure.png
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
name: AlertHighPressure
|
id: HighPressure
|
||||||
alertType: HighPressure
|
|
||||||
category: Pressure
|
category: Pressure
|
||||||
icon: /Textures/Interface/Alerts/Pressure/highpressure.png
|
icon: /Textures/Interface/Alerts/Pressure/highpressure.png
|
||||||
";
|
";
|
||||||
@@ -42,7 +40,7 @@ namespace Content.Tests.Shared.Alert
|
|||||||
var factory = IoCManager.Resolve<IComponentFactory>();
|
var factory = IoCManager.Resolve<IComponentFactory>();
|
||||||
factory.RegisterClass<AlertsComponent>();
|
factory.RegisterClass<AlertsComponent>();
|
||||||
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
|
prototypeManager.LoadFromStream(new StringReader(PROTOTYPES));
|
||||||
prototypeManager.Resync();
|
prototypeManager.ResolveResults();
|
||||||
|
|
||||||
var entSys = IoCManager.Resolve<IEntitySystemManager>();
|
var entSys = IoCManager.Resolve<IEntitySystemManager>();
|
||||||
entSys.LoadExtraSystemType<ServerAlertsSystem>();
|
entSys.LoadExtraSystemType<ServerAlertsSystem>();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace Content.Tests.Shared.Chemistry
|
|||||||
var serializationManager = IoCManager.Resolve<ISerializationManager>();
|
var serializationManager = IoCManager.Resolve<ISerializationManager>();
|
||||||
serializationManager.Initialize();
|
serializationManager.Initialize();
|
||||||
|
|
||||||
var newReagent = serializationManager.ReadValue<ReagentPrototype>(new MappingDataNode(proto));
|
var newReagent = serializationManager.Read<ReagentPrototype>(new MappingDataNode(proto));
|
||||||
|
|
||||||
Assert.That(defType, Is.EqualTo("reagent"));
|
Assert.That(defType, Is.EqualTo("reagent"));
|
||||||
Assert.That(newReagent.ID, Is.EqualTo("H2"));
|
Assert.That(newReagent.ID, Is.EqualTo("H2"));
|
||||||
@@ -43,6 +43,7 @@ namespace Content.Tests.Shared.Chemistry
|
|||||||
id: H2
|
id: H2
|
||||||
name: Hydrogen
|
name: Hydrogen
|
||||||
desc: A light, flammable gas.
|
desc: A light, flammable gas.
|
||||||
|
physicalDesc: A light, flammable gas.
|
||||||
color: " + "\"#008080\"";
|
color: " + "\"#008080\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace Content.Tests.Shared
|
|||||||
_prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
_prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
||||||
_prototypeManager.Initialize();
|
_prototypeManager.Initialize();
|
||||||
_prototypeManager.LoadString(_damagePrototypes);
|
_prototypeManager.LoadString(_damagePrototypes);
|
||||||
_prototypeManager.Resync();
|
_prototypeManager.ResolveResults();
|
||||||
|
|
||||||
// Create a damage data set
|
// Create a damage data set
|
||||||
_damageSpec = new(_prototypeManager.Index<DamageGroupPrototype>("Brute"), 6);
|
_damageSpec = new(_prototypeManager.Index<DamageGroupPrototype>("Brute"), 6);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace Content.Tests.Shared.Utility
|
|||||||
prototypeManager.Initialize();
|
prototypeManager.Initialize();
|
||||||
|
|
||||||
prototypeManager.LoadFromStream(new StringReader(Prototypes));
|
prototypeManager.LoadFromStream(new StringReader(Prototypes));
|
||||||
|
prototypeManager.ResolveResults();
|
||||||
|
|
||||||
var dataSet = prototypeManager.Index<DatasetPrototype>(TestDatasetId);
|
var dataSet = prototypeManager.Index<DatasetPrototype>(TestDatasetId);
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
- alertType: Magboots
|
- alertType: Magboots
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: LowOxygen
|
id: LowOxygen
|
||||||
category: Breathing
|
category: Breathing
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/breathing.rsi
|
sprite: /Textures/Interface/Alerts/breathing.rsi
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
description: "There is [color=red]not enough oxygen[/color] in the air you are breathing. Put on [color=green]internals[/color]."
|
description: "There is [color=red]not enough oxygen[/color] in the air you are breathing. Put on [color=green]internals[/color]."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Toxins
|
id: Toxins
|
||||||
category: Toxins
|
category: Toxins
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/breathing.rsi
|
sprite: /Textures/Interface/Alerts/breathing.rsi
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
description: "There are [color=red]too many toxins[/color] in the air you are breathing. Put on [color=green]internals[/color] or get away."
|
description: "There are [color=red]too many toxins[/color] in the air you are breathing. Put on [color=green]internals[/color] or get away."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: LowPressure
|
id: LowPressure
|
||||||
category: Pressure
|
category: Pressure
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/pressure.rsi
|
sprite: /Textures/Interface/Alerts/pressure.rsi
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
description: "The air around you is [color=red]hazardously thin[/color]. A [color=green]space suit[/color] would protect you."
|
description: "The air around you is [color=red]hazardously thin[/color]. A [color=green]space suit[/color] would protect you."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: HighPressure
|
id: HighPressure
|
||||||
category: Pressure
|
category: Pressure
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/pressure.rsi
|
sprite: /Textures/Interface/Alerts/pressure.rsi
|
||||||
@@ -57,14 +57,14 @@
|
|||||||
description: "The air around you is [color=red]hazardously thick[/color]. A [color=green]pressurized suit[/color] would be enough protect you"
|
description: "The air around you is [color=red]hazardously thick[/color]. A [color=green]pressurized suit[/color] would be enough protect you"
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Fire
|
id: Fire
|
||||||
icon: /Textures/Interface/Alerts/Fire/fire.png
|
icon: /Textures/Interface/Alerts/Fire/fire.png
|
||||||
onClick: !type:ResistFire { }
|
onClick: !type:ResistFire { }
|
||||||
name: "[color=red]On Fire[/color]"
|
name: "[color=red]On Fire[/color]"
|
||||||
description: "You're [color=red]on fire[/color]. Click the alert to stop, drop and roll to put the fire out or move to a vacuum area."
|
description: "You're [color=red]on fire[/color]. Click the alert to stop, drop and roll to put the fire out or move to a vacuum area."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Cold
|
id: Cold
|
||||||
category: Temperature
|
category: Temperature
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/temperature.rsi
|
sprite: /Textures/Interface/Alerts/temperature.rsi
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
description: "You're [color=cyan]freezing cold![/color] Get somewhere warmer and take off any insulating clothing like a space suit."
|
description: "You're [color=cyan]freezing cold![/color] Get somewhere warmer and take off any insulating clothing like a space suit."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Hot
|
id: Hot
|
||||||
category: Temperature
|
category: Temperature
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/temperature.rsi
|
sprite: /Textures/Interface/Alerts/temperature.rsi
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
description: "It's [color=red]too hot![/color] Get somewhere colder, take off any insulating clothing like a space suit, or at least get away from the flames."
|
description: "It's [color=red]too hot![/color] Get somewhere colder, take off any insulating clothing like a space suit, or at least get away from the flames."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Weightless
|
id: Weightless
|
||||||
icon: /Textures/Interface/Alerts/Weightless/weightless.png
|
icon: /Textures/Interface/Alerts/Weightless/weightless.png
|
||||||
name: Weightless
|
name: Weightless
|
||||||
description: >
|
description: >
|
||||||
@@ -92,20 +92,20 @@
|
|||||||
Mag-boots or jetpacks would help you move with more control
|
Mag-boots or jetpacks would help you move with more control
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Stun
|
id: Stun
|
||||||
icon: /Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png #Should probably draw a proper icon
|
icon: /Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png #Should probably draw a proper icon
|
||||||
name: "[color=yellow]Stunned[/color]"
|
name: "[color=yellow]Stunned[/color]"
|
||||||
description: "You're [color=yellow]stunned[/color]! Something is impairing your ability to move or interact with objects"
|
description: "You're [color=yellow]stunned[/color]! Something is impairing your ability to move or interact with objects"
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Handcuffed
|
id: Handcuffed
|
||||||
onClick: !type:RemoveCuffs { }
|
onClick: !type:RemoveCuffs { }
|
||||||
icon: /Textures/Interface/Alerts/Handcuffed/Handcuffed.png
|
icon: /Textures/Interface/Alerts/Handcuffed/Handcuffed.png
|
||||||
name: "[color=yellow]Handcuffed[/color]"
|
name: "[color=yellow]Handcuffed[/color]"
|
||||||
description: "You're [color=yellow]handcuffed[/color] and can't use your hands. If anyone drags you, you won't be able to resist."
|
description: "You're [color=yellow]handcuffed[/color] and can't use your hands. If anyone drags you, you won't be able to resist."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Buckled
|
id: Buckled
|
||||||
category: Buckled
|
category: Buckled
|
||||||
onClick: !type:Unbuckle { }
|
onClick: !type:Unbuckle { }
|
||||||
icon: /Textures/Interface/Alerts/Buckle/buckled.png
|
icon: /Textures/Interface/Alerts/Buckle/buckled.png
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
description: "You've been [color=yellow]buckled[/color] to something. Click the alert to unbuckle unless you're [color=yellow]handcuffed.[/color]"
|
description: "You've been [color=yellow]buckled[/color] to something. Click the alert to unbuckle unless you're [color=yellow]handcuffed.[/color]"
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: HumanCrit
|
id: HumanCrit
|
||||||
category: Health
|
category: Health
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/human_health.rsi
|
sprite: /Textures/Interface/Alerts/human_health.rsi
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
description: "You're severely injured and unconscious."
|
description: "You're severely injured and unconscious."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: HumanDead
|
id: HumanDead
|
||||||
category: Health
|
category: Health
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/human_health.rsi
|
sprite: /Textures/Interface/Alerts/human_health.rsi
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
description: You're dead, note that you can still be revived!
|
description: You're dead, note that you can still be revived!
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: HumanHealth
|
id: HumanHealth
|
||||||
category: Health
|
category: Health
|
||||||
icon:
|
icon:
|
||||||
sprite: /Textures/Interface/Alerts/human_health.rsi
|
sprite: /Textures/Interface/Alerts/human_health.rsi
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
maxSeverity: 6
|
maxSeverity: 6
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: PilotingShuttle
|
id: PilotingShuttle
|
||||||
category: Piloting
|
category: Piloting
|
||||||
onClick: !type:StopPiloting { }
|
onClick: !type:StopPiloting { }
|
||||||
icon: /Textures/Interface/Alerts/piloting.png
|
icon: /Textures/Interface/Alerts/piloting.png
|
||||||
@@ -150,93 +150,93 @@
|
|||||||
description: You are piloting a shuttle. Click the alert to stop.
|
description: You are piloting a shuttle. Click the alert to stop.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Overfed
|
id: Overfed
|
||||||
category: Hunger
|
category: Hunger
|
||||||
icon: /Textures/Interface/Alerts/Hunger/Overfed.png
|
icon: /Textures/Interface/Alerts/Hunger/Overfed.png
|
||||||
name: "[color=yellow]Overfed[/color]"
|
name: "[color=yellow]Overfed[/color]"
|
||||||
description: You ate too much food, lardass. Run around the station and lose some weight.
|
description: You ate too much food, lardass. Run around the station and lose some weight.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Peckish
|
id: Peckish
|
||||||
category: Hunger
|
category: Hunger
|
||||||
icon: /Textures/Interface/Alerts/Hunger/Peckish.png
|
icon: /Textures/Interface/Alerts/Hunger/Peckish.png
|
||||||
name: "[color=yellow]Peckish[/color]"
|
name: "[color=yellow]Peckish[/color]"
|
||||||
description: Some food would be good right about now.
|
description: Some food would be good right about now.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Starving
|
id: Starving
|
||||||
category: Hunger
|
category: Hunger
|
||||||
icon: /Textures/Interface/Alerts/Hunger/Starving.png
|
icon: /Textures/Interface/Alerts/Hunger/Starving.png
|
||||||
name: "[color=red]Starving[/color]"
|
name: "[color=red]Starving[/color]"
|
||||||
description: You're severely malnourished. The hunger pains make moving around a chore.
|
description: You're severely malnourished. The hunger pains make moving around a chore.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Overhydrated
|
id: Overhydrated
|
||||||
category: Thirst
|
category: Thirst
|
||||||
icon: /Textures/Interface/Alerts/Thirst/OverHydrated.png
|
icon: /Textures/Interface/Alerts/Thirst/OverHydrated.png
|
||||||
name: "[color=yellow]Overhydrated[/color]"
|
name: "[color=yellow]Overhydrated[/color]"
|
||||||
description: You drank too much.
|
description: You drank too much.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Thirsty
|
id: Thirsty
|
||||||
category: Thirst
|
category: Thirst
|
||||||
icon: /Textures/Interface/Alerts/Thirst/Thirsty.png
|
icon: /Textures/Interface/Alerts/Thirst/Thirsty.png
|
||||||
name: "[color=yellow]Thirsty[/color]"
|
name: "[color=yellow]Thirsty[/color]"
|
||||||
description: Something to drink would be good right about now.
|
description: Something to drink would be good right about now.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Parched
|
id: Parched
|
||||||
category: Thirst
|
category: Thirst
|
||||||
icon: /Textures/Interface/Alerts/Thirst/Parched.png
|
icon: /Textures/Interface/Alerts/Thirst/Parched.png
|
||||||
name: "[color=red]Parched[/color]"
|
name: "[color=red]Parched[/color]"
|
||||||
description: You're severely thirsty. The thirst makes moving around a chore.
|
description: You're severely thirsty. The thirst makes moving around a chore.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Pulled
|
id: Pulled
|
||||||
icon: /Textures/Interface/Alerts/Pull/pulled.png
|
icon: /Textures/Interface/Alerts/Pull/pulled.png
|
||||||
onClick: !type:StopBeingPulled { }
|
onClick: !type:StopBeingPulled { }
|
||||||
name: Pulled
|
name: Pulled
|
||||||
description: You're being pulled. Move to break free.
|
description: You're being pulled. Move to break free.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Pulling
|
id: Pulling
|
||||||
icon: /Textures/Interface/Alerts/Pull/pulling.png
|
icon: /Textures/Interface/Alerts/Pull/pulling.png
|
||||||
onClick: !type:StopPulling { }
|
onClick: !type:StopPulling { }
|
||||||
name: Pulling
|
name: Pulling
|
||||||
description: You're pulling something. Click the alert to stop.
|
description: You're pulling something. Click the alert to stop.
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Debug1
|
id: Debug1
|
||||||
icon: /Textures/Interface/Alerts/human_health.rsi/health1.png
|
icon: /Textures/Interface/Alerts/human_health.rsi/health1.png
|
||||||
name: Debug1
|
name: Debug1
|
||||||
description: Debug
|
description: Debug
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Debug2
|
id: Debug2
|
||||||
icon: /Textures/Interface/Alerts/human_health.rsi/health2.png
|
icon: /Textures/Interface/Alerts/human_health.rsi/health2.png
|
||||||
name: Debug2
|
name: Debug2
|
||||||
description: Debug
|
description: Debug
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Debug3
|
id: Debug3
|
||||||
icon: /Textures/Interface/Alerts/human_health.rsi/health3.png
|
icon: /Textures/Interface/Alerts/human_health.rsi/health3.png
|
||||||
name: Debug3
|
name: Debug3
|
||||||
description: Debug
|
description: Debug
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Debug4
|
id: Debug4
|
||||||
icon: /Textures/Interface/Alerts/human_health.rsi/health4.png
|
icon: /Textures/Interface/Alerts/human_health.rsi/health4.png
|
||||||
name: Debug4
|
name: Debug4
|
||||||
description: Debug
|
description: Debug
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Debug5
|
id: Debug5
|
||||||
icon: /Textures/Interface/Alerts/human_health.rsi/health5.png
|
icon: /Textures/Interface/Alerts/human_health.rsi/health5.png
|
||||||
name: Debug5
|
name: Debug5
|
||||||
description: Debug
|
description: Debug
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: Debug6
|
id: Debug6
|
||||||
icon: /Textures/Interface/Alerts/human_health.rsi/health6.png
|
icon: /Textures/Interface/Alerts/human_health.rsi/health6.png
|
||||||
name: Debug6
|
name: Debug6
|
||||||
description: Debug
|
description: Debug
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
- type: alert
|
- type: alert
|
||||||
alertType: Magboots
|
id: Magboots
|
||||||
icon: { sprite: "/Textures/Clothing/Shoes/Boots/magboots.rsi", state: "icon-on" }
|
icon: { sprite: "/Textures/Clothing/Shoes/Boots/magboots.rsi", state: "icon-on" }
|
||||||
name: "Magboots"
|
name: "Magboots"
|
||||||
description: You are immume to airflow, but slightly slower.
|
description: You are immume to airflow, but slightly slower.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
id: HandsAnimal
|
id: HandsAnimal
|
||||||
name: "animal hands"
|
name: "animal hands"
|
||||||
parent: PartAnimal
|
parent: PartAnimal
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: BodyPart
|
- type: BodyPart
|
||||||
partType: Hand
|
partType: Hand
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
id: LegsAnimal
|
id: LegsAnimal
|
||||||
name: "animal legs"
|
name: "animal legs"
|
||||||
parent: PartAnimal
|
parent: PartAnimal
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: BodyPart
|
- type: BodyPart
|
||||||
partType: Leg
|
partType: Leg
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
id: FeetAnimal
|
id: FeetAnimal
|
||||||
name: "animal feet"
|
name: "animal feet"
|
||||||
parent: PartAnimal
|
parent: PartAnimal
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: BodyPart
|
- type: BodyPart
|
||||||
partType: Foot
|
partType: Foot
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
id: TorsoAnimal
|
id: TorsoAnimal
|
||||||
name: "animal torso"
|
name: "animal torso"
|
||||||
parent: PartAnimal
|
parent: PartAnimal
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: BodyPart
|
- type: BodyPart
|
||||||
partType: Torso
|
partType: Torso
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
id: OrganAnimalLungs
|
id: OrganAnimalLungs
|
||||||
parent: BaseAnimalOrgan
|
parent: BaseAnimalOrgan
|
||||||
name: lungs
|
name: lungs
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Mechanism
|
- type: Mechanism
|
||||||
size: 1
|
size: 1
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
id: OrganAnimalStomach
|
id: OrganAnimalStomach
|
||||||
parent: BaseAnimalOrgan
|
parent: BaseAnimalOrgan
|
||||||
name: stomach
|
name: stomach
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Mechanism
|
- type: Mechanism
|
||||||
size: 1
|
size: 1
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
id: OrganAnimalLiver
|
id: OrganAnimalLiver
|
||||||
parent: BaseAnimalOrgan
|
parent: BaseAnimalOrgan
|
||||||
name: liver
|
name: liver
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Mechanism
|
- type: Mechanism
|
||||||
size: 1
|
size: 1
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
id: OrganAnimalHeart
|
id: OrganAnimalHeart
|
||||||
parent: BaseAnimalOrgan
|
parent: BaseAnimalOrgan
|
||||||
name: heart
|
name: heart
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Mechanism
|
- type: Mechanism
|
||||||
size: 1
|
size: 1
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
id: OrganAnimalKidneys
|
id: OrganAnimalKidneys
|
||||||
parent: BaseAnimalOrgan
|
parent: BaseAnimalOrgan
|
||||||
name: kidneys
|
name: kidneys
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Mechanism
|
- type: Mechanism
|
||||||
size: 1
|
size: 1
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
abstract: true
|
|
||||||
parent: ClothingBackpack
|
parent: ClothingBackpack
|
||||||
id: ClothingBackpackFilled
|
id: ClothingBackpackFilled
|
||||||
components:
|
components:
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
name: demonomicon
|
name: demonomicon
|
||||||
parent: BookBase
|
parent: BookBase
|
||||||
id: BookDemonomicon
|
id: BookDemonomicon
|
||||||
|
abstract: true
|
||||||
description: 'Who knows what dark spells may be contained in these horrid pages?'
|
description: 'Who knows what dark spells may be contained in these horrid pages?'
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
@@ -27,7 +28,6 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
parent: BookDemonomicon
|
parent: BookDemonomicon
|
||||||
id: BookDemonomicon1
|
id: BookDemonomicon1
|
||||||
abstract: true
|
|
||||||
suffix: 1
|
suffix: 1
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
@@ -40,7 +40,6 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
parent: BookDemonomicon
|
parent: BookDemonomicon
|
||||||
id: BookDemonomicon2
|
id: BookDemonomicon2
|
||||||
abstract: true
|
|
||||||
suffix: 2
|
suffix: 2
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
@@ -54,7 +53,6 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
parent: BookDemonomicon
|
parent: BookDemonomicon
|
||||||
id: BookDemonomicon3
|
id: BookDemonomicon3
|
||||||
abstract: true
|
|
||||||
suffix: 3
|
suffix: 3
|
||||||
components:
|
components:
|
||||||
- type: Paper
|
- type: Paper
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
components:
|
components:
|
||||||
- type: StorageFill
|
- type: StorageFill
|
||||||
contents:
|
contents:
|
||||||
- id: MagazineClRifleBase
|
- id: MagazineClRiflePistol
|
||||||
amount: 6
|
amount: 6
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
layers:
|
layers:
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: CrateSalvageAssortedGoodies
|
id: CrateSalvageAssortedGoodies
|
||||||
suffix: Filled, Salvage Random
|
suffix: Filled, Salvage Random
|
||||||
abstract: true # You should use SalvageMaterialCrateSpawner instead
|
noSpawn: true # You should use SalvageMaterialCrateSpawner instead
|
||||||
parent: CrateGenericSteel
|
parent: CrateGenericSteel
|
||||||
components:
|
components:
|
||||||
- type: StorageFill
|
- type: StorageFill
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PaperWrittenSalvageLoreMedium1PlasmaTrap
|
id: PaperWrittenSalvageLoreMedium1PlasmaTrap
|
||||||
abstract: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Medium 1: Plasma Trap"
|
suffix: "Salvage: Lore: Medium 1: Plasma Trap"
|
||||||
parent: PaperWritten
|
parent: PaperWritten
|
||||||
components:
|
components:
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PaperWrittenSalvageLoreGaming1
|
id: PaperWrittenSalvageLoreGaming1
|
||||||
abstract: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 1"
|
suffix: "Salvage: Lore: Gaming 1"
|
||||||
parent: PaperWritten
|
parent: PaperWritten
|
||||||
components:
|
components:
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PaperWrittenSalvageLoreGaming2
|
id: PaperWrittenSalvageLoreGaming2
|
||||||
abstract: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 2"
|
suffix: "Salvage: Lore: Gaming 2"
|
||||||
parent: PaperWritten
|
parent: PaperWritten
|
||||||
components:
|
components:
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PaperWrittenSalvageLoreGaming3
|
id: PaperWrittenSalvageLoreGaming3
|
||||||
abstract: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 3"
|
suffix: "Salvage: Lore: Gaming 3"
|
||||||
parent: PaperWritten
|
parent: PaperWritten
|
||||||
components:
|
components:
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PaperWrittenSalvageLoreGaming4
|
id: PaperWrittenSalvageLoreGaming4
|
||||||
abstract: true # keep this from spamming spawn sheet
|
noSpawn: true # keep this from spamming spawn sheet
|
||||||
suffix: "Salvage: Lore: Gaming 4"
|
suffix: "Salvage: Lore: Gaming 4"
|
||||||
parent: PaperWritten
|
parent: PaperWritten
|
||||||
components:
|
components:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: Smoke
|
id: Smoke
|
||||||
name: smoke
|
name: smoke
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
drawdepth: Effects
|
drawdepth: Effects
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: Foam
|
id: Foam
|
||||||
name: foam
|
name: foam
|
||||||
abstract: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
netsync: false
|
netsync: false
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: IronMetalFoam
|
id: IronMetalFoam
|
||||||
name: iron metal foam
|
name: iron metal foam
|
||||||
abstract: true
|
noSpawn: true
|
||||||
parent: Foam
|
parent: Foam
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
id: AluminiumMetalFoam
|
id: AluminiumMetalFoam
|
||||||
name: aluminium metal foam
|
name: aluminium metal foam
|
||||||
abstract: true
|
noSpawn: true
|
||||||
parent: Foam
|
parent: Foam
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
@@ -709,9 +709,11 @@
|
|||||||
combatToggleAction:
|
combatToggleAction:
|
||||||
enabled: false
|
enabled: false
|
||||||
autoPopulate: false
|
autoPopulate: false
|
||||||
|
name: action-name-combat
|
||||||
disarmAction:
|
disarmAction:
|
||||||
enabled: false
|
enabled: false
|
||||||
autoPopulate: false
|
autoPopulate: false
|
||||||
|
name: action-name-disarm
|
||||||
- type: Bloodstream
|
- type: Bloodstream
|
||||||
bloodMaxVolume: 50
|
bloodMaxVolume: 50
|
||||||
- type: DiseaseCarrier #The other class lab animal and disease vector
|
- 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
|
path: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg #funny sfx use
|
||||||
beepInterval: 1
|
beepInterval: 1
|
||||||
- type: Explosive
|
- type: Explosive
|
||||||
|
explosionType: Default
|
||||||
devastationRange: 1
|
devastationRange: 1
|
||||||
heavyImpactRange: 2
|
heavyImpactRange: 2
|
||||||
lightImpactRange: 3
|
lightImpactRange: 3
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user