Salvage expeditions (#12745)
This commit is contained in:
11
Content.Shared/Salvage/Expeditions/Modifiers/ISalvageMod.cs
Normal file
11
Content.Shared/Salvage/Expeditions/Modifiers/ISalvageMod.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
public interface ISalvageMod
|
||||
{
|
||||
/// <summary>
|
||||
/// Player-friendly version describing this modifier.
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
float Cost { get; }
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Content.Shared.Parallax.Biomes;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
/// <summary>
|
||||
/// Affects the biome to be used for salvage.
|
||||
/// </summary>
|
||||
[Prototype("salvageBiomeMod")]
|
||||
public sealed class SalvageBiomeMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// Is weather allowed to apply to this biome.
|
||||
/// </summary>
|
||||
[DataField("weather")]
|
||||
public bool Weather = true;
|
||||
|
||||
[DataField("biome", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<BiomeTemplatePrototype>))]
|
||||
public string? BiomePrototype;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Content.Shared.Procedural;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageDungeonMod")]
|
||||
public sealed class SalvageDungeonMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
[DataField("proto", customTypeSerializer:typeof(PrototypeIdSerializer<DungeonConfigPrototype>))]
|
||||
public string Proto = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// Biomes this dungeon can occur in.
|
||||
/// </summary>
|
||||
[DataField("biomeMods", customTypeSerializer:typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? BiomeMods;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageLightMod")]
|
||||
public sealed class SalvageLightMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
[DataField("color", required: true)] public Color? Color;
|
||||
|
||||
/// <summary>
|
||||
/// Biomes that this color applies to.
|
||||
/// </summary>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes;
|
||||
}
|
||||
20
Content.Shared/Salvage/Expeditions/Modifiers/SalvageMod.cs
Normal file
20
Content.Shared/Salvage/Expeditions/Modifiers/SalvageMod.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
/// <summary>
|
||||
/// Generic modifiers with no additional data
|
||||
/// </summary>
|
||||
[Prototype("salvageMod")]
|
||||
public sealed class SalvageMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageTimeMod")]
|
||||
public sealed class SalvageTimeMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
[DataField("minDuration")]
|
||||
public int MinDuration = 600;
|
||||
|
||||
[DataField("maxDuration")]
|
||||
public int MaxDuration = 660;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using Content.Shared.Parallax.Biomes;
|
||||
using Content.Shared.Weather;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageWeatherMod")]
|
||||
public sealed class SalvageWeatherMod : IPrototype, ISalvageMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
[DataField("weather", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<WeatherPrototype>))]
|
||||
public string WeatherPrototype = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Whitelist for biomes. If empty assumed any allowed.
|
||||
/// </summary>
|
||||
[DataField("biomes", customTypeSerializer:typeof(PrototypeIdListSerializer<BiomeTemplatePrototype>))]
|
||||
public List<string> Biomes = new();
|
||||
}
|
||||
Reference in New Issue
Block a user