Remove AllComponentsOneEntityDeleteTest (#19965)
* Remove AllComponentsOneEntityDeleteTest * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
This commit is contained in:
@@ -20,5 +20,5 @@ public sealed partial class RandomFillSolutionComponent : Component
|
||||
/// Weighted random fill prototype Id. Used to pick reagent and quantity.
|
||||
/// </summary>
|
||||
[DataField("weightedRandomId", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<WeightedRandomFillSolutionPrototype>))]
|
||||
public string WeightedRandomId { get; set; } = "default";
|
||||
public string? WeightedRandomId;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ public sealed class SolutionRandomFillSystem : EntitySystem
|
||||
|
||||
private void OnRandomSolutionFillMapInit(EntityUid uid, RandomFillSolutionComponent component, MapInitEvent args)
|
||||
{
|
||||
if (component.WeightedRandomId == null)
|
||||
return;
|
||||
|
||||
var target = _solutionsSystem.EnsureSolution(uid, component.Solution);
|
||||
var pick = _proto.Index<WeightedRandomFillSolutionPrototype>(component.WeightedRandomId).Pick(_random);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user