Expeditions rework (#18960)
This commit is contained in:
33
Content.Shared/Procedural/Loot/RandomSpawnsLoot.cs
Normal file
33
Content.Shared/Procedural/Loot/RandomSpawnsLoot.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Content.Shared.Random;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Procedural.Loot;
|
||||
|
||||
/// <summary>
|
||||
/// Randomly places loot in free areas inside the dungeon.
|
||||
/// </summary>
|
||||
public sealed partial class RandomSpawnsLoot : IDungeonLoot
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("entries", required: true)]
|
||||
public List<RandomSpawnLootEntry> Entries = new();
|
||||
}
|
||||
|
||||
[DataDefinition]
|
||||
public partial record struct RandomSpawnLootEntry : IBudgetEntry
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("proto", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Proto { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Cost for this loot to spawn.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("cost")]
|
||||
public float Cost { get; set; } = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Unit probability for this entry. Weighted against the entire table.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("prob")]
|
||||
public float Prob { get; set; } = 1f;
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using Content.Shared.Salvage;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
|
||||
namespace Content.Shared.Procedural.Loot;
|
||||
|
||||
@@ -17,14 +15,6 @@ public sealed class SalvageLootPrototype : IPrototype
|
||||
/// </summary>
|
||||
[DataField("guaranteed")] public bool Guaranteed;
|
||||
|
||||
[DataField("desc")] public string Description = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Mission types this loot is not allowed to spawn for
|
||||
/// </summary>
|
||||
[DataField("blacklist")]
|
||||
public List<SalvageMissionType> Blacklist = new();
|
||||
|
||||
/// <summary>
|
||||
/// All of the loot rules
|
||||
/// </summary>
|
||||
|
||||
36
Content.Shared/Procedural/SalvageDifficultyPrototype.cs
Normal file
36
Content.Shared/Procedural/SalvageDifficultyPrototype.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Procedural;
|
||||
|
||||
[Prototype("salvageDifficulty")]
|
||||
public sealed class SalvageDifficultyPrototype : IPrototype
|
||||
{
|
||||
[IdDataField] public string ID { get; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Color to be used in UI.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("color")]
|
||||
public Color Color = Color.White;
|
||||
|
||||
/// <summary>
|
||||
/// How much loot this difficulty is allowed to spawn.
|
||||
/// </summary>
|
||||
[DataField("lootBudget", required : true)]
|
||||
public float LootBudget;
|
||||
|
||||
/// <summary>
|
||||
/// How many mobs this difficulty is allowed to spawn.
|
||||
/// </summary>
|
||||
[DataField("mobBudget", required : true)]
|
||||
public float MobBudget;
|
||||
|
||||
/// <summary>
|
||||
/// Budget allowed for mission modifiers like no light, etc.
|
||||
/// </summary>
|
||||
[DataField("modifierBudget")]
|
||||
public float ModifierBudget;
|
||||
|
||||
[DataField("recommendedPlayers", required: true)]
|
||||
public int RecommendedPlayers;
|
||||
}
|
||||
Reference in New Issue
Block a user