diff --git a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs index 692bde32be..6abea76ec0 100644 --- a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs +++ b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs @@ -7,7 +7,7 @@ namespace Content.Server.Kitchen.Components [RegisterComponent, Access(typeof(KitchenSpikeSystem))] public sealed class KitchenSpikeComponent : SharedKitchenSpikeComponent { - public List? PrototypesToSpawn; + public List? PrototypesToSpawn; // TODO: Spiking alive mobs? (Replace with uid) (deal damage to their limbs on spiking, kill on first butcher attempt?) public string MeatSource1p = "?"; diff --git a/Content.Shared/EntityList/EntityLootTablePrototype.cs b/Content.Shared/EntityList/EntityLootTablePrototype.cs index 8b61543fbc..df81b454e0 100644 --- a/Content.Shared/EntityList/EntityLootTablePrototype.cs +++ b/Content.Shared/EntityList/EntityLootTablePrototype.cs @@ -15,7 +15,7 @@ public sealed class EntityLootTablePrototype : IPrototype public ImmutableList Entries = ImmutableList.Empty; /// - public List GetSpawns(IRobustRandom? random = null) + public List GetSpawns(IRobustRandom? random = null) { return EntitySpawnCollection.GetSpawns(Entries, random); } diff --git a/Content.Shared/Storage/EntitySpawnEntry.cs b/Content.Shared/Storage/EntitySpawnEntry.cs index 2efbea010f..0cf236d427 100644 --- a/Content.Shared/Storage/EntitySpawnEntry.cs +++ b/Content.Shared/Storage/EntitySpawnEntry.cs @@ -13,8 +13,8 @@ namespace Content.Shared.Storage; public struct EntitySpawnEntry : IPopulateDefaultValues { [ViewVariables(VVAccess.ReadWrite)] - [DataField("id", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] - public string PrototypeId; + [DataField("id", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string? PrototypeId; /// /// The probability that an item will spawn. Takes decimal form so 0.05 is 5%, 0.50 is 50% etc. @@ -83,12 +83,12 @@ public static class EntitySpawnCollection /// The entity spawn entries. /// Resolve param. /// A list of entity prototypes that should be spawned. - public static List GetSpawns(IEnumerable entries, + public static List GetSpawns(IEnumerable entries, IRobustRandom? random = null) { IoCManager.Resolve(ref random); - var spawned = new List(); + var spawned = new List(); var orGroupedSpawns = new Dictionary(); // collect groups together, create singular items that pass probability diff --git a/Resources/Prototypes/LootTables/mining_loot_table.yml b/Resources/Prototypes/LootTables/mining_loot_table.yml index c53921f2b0..c1122a03ac 100644 --- a/Resources/Prototypes/LootTables/mining_loot_table.yml +++ b/Resources/Prototypes/LootTables/mining_loot_table.yml @@ -1,43 +1,47 @@ - type: entityLootTable id: MiningLootTable entries: + - prob: 0.5 #null value, doesn't drop anything + orGroup: Asteroid - id: SteelOre1 - prob: 0.25 + prob: 0.125 orGroup: Asteroid - id: GoldOre1 - prob: 0.05 + prob: 0.025 orGroup: Asteroid - id: SpaceQuartz1 - prob: 0.20 - orGroup: Asteroid - - id: PlasmaOre1 prob: 0.10 orGroup: Asteroid + - id: PlasmaOre1 + prob: 0.05 + orGroup: Asteroid - id: SilverOre1 - prob: 0.025 + prob: 0.0125 orGroup: Asteroid - id: UraniumOre1 - prob: 0.025 + prob: 0.0125 orGroup: Asteroid - type: entityLootTable id: MiningLootTableLowYield entries: + - prob: 0.75 #null value, doesn't drop anything + orGroup: Asteroid - id: SteelOre1 - prob: 0.05 + prob: 0.0125 orGroup: Asteroid - id: GoldOre1 - prob: 0.01 + prob: 0.0025 orGroup: Asteroid - id: SpaceQuartz1 - prob: 0.05 + prob: 0.0125 orGroup: Asteroid - id: PlasmaOre1 - prob: 0.025 + prob: 0.00625 orGroup: Asteroid - id: SilverOre1 - prob: 0.02 + prob: 0.005 orGroup: Asteroid - id: UraniumOre1 - prob: 0.02 + prob: 0.005 orGroup: Asteroid