Roof data rework (#35388)

This commit is contained in:
metalgearsloth
2025-02-23 18:23:00 +11:00
committed by GitHub
parent cb0d2b3472
commit a457551108
12 changed files with 107 additions and 53 deletions

View File

@@ -129,7 +129,7 @@ public abstract class SharedBiomeSystem : EntitySystem
if (layer is not BiomeTileLayer tileLayer)
continue;
if (TryGetTile(indices, noiseCopy, tileLayer.Invert, tileLayer.Threshold, ProtoManager.Index(tileLayer.Tile), tileLayer.Flags, tileLayer.Variants, out tile))
if (TryGetTile(indices, noiseCopy, tileLayer.Invert, tileLayer.Threshold, ProtoManager.Index(tileLayer.Tile), tileLayer.Variants, out tile))
{
return true;
}
@@ -142,7 +142,7 @@ public abstract class SharedBiomeSystem : EntitySystem
/// <summary>
/// Gets the underlying biome tile, ignoring any existing tile that may be there.
/// </summary>
private bool TryGetTile(Vector2i indices, FastNoiseLite noise, bool invert, float threshold, ContentTileDefinition tileDef, byte tileFlags, List<byte>? variants, [NotNullWhen(true)] out Tile? tile)
private bool TryGetTile(Vector2i indices, FastNoiseLite noise, bool invert, float threshold, ContentTileDefinition tileDef, List<byte>? variants, [NotNullWhen(true)] out Tile? tile)
{
var found = noise.GetNoise(indices.X, indices.Y);
found = invert ? found * -1 : found;
@@ -163,7 +163,7 @@ public abstract class SharedBiomeSystem : EntitySystem
variant = _tile.PickVariant(tileDef, (int) variantValue);
}
tile = new Tile(tileDef.TileId, flags: tileFlags, variant);
tile = new Tile(tileDef.TileId, variant);
return true;
}