Fix various errors/exceptions (#22841)
* Fix entity storage localization * Fix HumanoidAppearanceComponent resolve * Fix null reference exceptions * Fix duplicate key error * Fix artifact error spam * actually maybe this is what its meant to do * Fix entities playing sounds on deletion
This commit is contained in:
@@ -8,6 +8,7 @@ using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Worldgen.Systems.Debris;
|
||||
|
||||
@@ -162,6 +163,12 @@ public sealed class DebrisFeaturePlacerSystem : BaseWorldSystem
|
||||
var failures = 0; // Avoid severe log spam.
|
||||
foreach (var point in points)
|
||||
{
|
||||
if (component.OwnedDebris.TryGetValue(point, out var existing))
|
||||
{
|
||||
DebugTools.Assert(Exists(existing));
|
||||
continue;
|
||||
}
|
||||
|
||||
var pointDensity = _noiseIndex.Evaluate(uid, densityChannel, WorldGen.WorldToChunkCoords(point));
|
||||
if (pointDensity == 0 && component.DensityClip || _random.Prob(component.RandomCancellationChance))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user