more expedition changes (#17403)
Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
public interface IBiomeSpecificMod : ISalvageMod
|
||||
{
|
||||
/// <summary>
|
||||
/// Whitelist for biomes. If null then any biome is allowed.
|
||||
/// </summary>
|
||||
List<string>? Biomes { get; }
|
||||
}
|
||||
@@ -7,5 +7,8 @@ public interface ISalvageMod
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
float Cost { get; }
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
/// Which one is selected depends on the mission difficulty, different weightedRandoms are picked from.
|
||||
/// </summary>
|
||||
[Prototype("salvageAirMod")]
|
||||
public sealed class SalvageAirMod : IPrototype, ISalvageMod
|
||||
public sealed class SalvageAirMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
@@ -23,6 +23,10 @@ public sealed class SalvageAirMod : IPrototype, ISalvageMod
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes { get; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Set to true if this planet will have no atmosphere.
|
||||
/// </summary>
|
||||
@@ -34,10 +38,4 @@ public sealed class SalvageAirMod : IPrototype, ISalvageMod
|
||||
/// </summary>
|
||||
[DataField("gases")]
|
||||
public float[] Gases = new float[Atmospherics.AdjustedNumberOfGases];
|
||||
|
||||
/// <summary>
|
||||
/// Biomes this air mixture is allowed to occur in.
|
||||
/// </summary>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes;
|
||||
}
|
||||
|
||||
@@ -6,24 +6,23 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageDungeonMod")]
|
||||
public sealed class SalvageDungeonMod : IPrototype, ISalvageMod
|
||||
public sealed class SalvageDungeonMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[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>
|
||||
/// <inheridoc/>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
/// <inheridoc/>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes { get; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Biomes this dungeon can occur in.
|
||||
/// The config to use for spawning the dungeon.
|
||||
/// </summary>
|
||||
[DataField("biomeMods", customTypeSerializer:typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? BiomeMods;
|
||||
[DataField("proto", customTypeSerializer: typeof(PrototypeIdSerializer<DungeonConfigPrototype>))]
|
||||
public string Proto = string.Empty;
|
||||
}
|
||||
|
||||
@@ -4,23 +4,19 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageLightMod")]
|
||||
public sealed class SalvageLightMod : IPrototype, ISalvageMod
|
||||
public sealed class SalvageLightMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
[DataField("color", required: true)] public Color? Color;
|
||||
|
||||
/// <summary>
|
||||
/// Biomes that this color applies to.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes;
|
||||
public List<string>? Biomes { get; } = null;
|
||||
|
||||
[DataField("color", required: true)] public Color? Color;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
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("salvageTemperatureMod")]
|
||||
public sealed class SalvageTemperatureMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
/// <inheritdoc/>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes { get; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Temperature in the planets air mix.
|
||||
/// </summary>
|
||||
[DataField("temperature")]
|
||||
public float Temperature = 293.15f;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
using Content.Shared.Parallax.Biomes;
|
||||
using Content.Shared.Weather;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
@@ -7,24 +6,23 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Shared.Salvage.Expeditions.Modifiers;
|
||||
|
||||
[Prototype("salvageWeatherMod")]
|
||||
public sealed class SalvageWeatherMod : IPrototype, ISalvageMod
|
||||
public sealed class SalvageWeatherMod : IPrototype, IBiomeSpecificMod
|
||||
{
|
||||
[IdDataField] public string ID { get; } = default!;
|
||||
|
||||
[DataField("desc")] public string Description { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for difficulty modifiers.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
[DataField("cost")]
|
||||
public float Cost { get; } = 0f;
|
||||
|
||||
[DataField("weather", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<WeatherPrototype>))]
|
||||
public string WeatherPrototype = string.Empty;
|
||||
/// <inheritdoc/>
|
||||
[DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer<SalvageBiomeMod>))]
|
||||
public List<string>? Biomes { get; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Whitelist for biomes. If empty assumed any allowed.
|
||||
/// Weather prototype to use on the planet.
|
||||
/// </summary>
|
||||
[DataField("biomes", customTypeSerializer:typeof(PrototypeIdListSerializer<BiomeTemplatePrototype>))]
|
||||
public List<string> Biomes = new();
|
||||
[DataField("weather", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<WeatherPrototype>))]
|
||||
public string WeatherPrototype = string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user