Biome rework (#37735)
* DungeonData rework Back to fields, serializes better, just make new layers dumby. * wawawewa * Fix this * Fixes * Port the work over * wawawewa * zoom * Kinda workin * Adjust wawa * Unloading work * Ore + entitytable fixes Iterate every dungeon not just last. * Big shot * wawawewa * Fixes * true * Fixes # Conflicts: # Content.Server/Procedural/DungeonJob/DungeonJob.cs * wawawewa * Fixes * Fix * Lot of work * wawawewa * Fixing * eh? * a * Fix a heap of stuff * Better ignored check * Reserve tile changes * biome * changes * wawawewa * Fixes & snow * Shadow fixes * wawawewa * smol * Add layer API * More work * wawawewa * Preloads and running again * wawawewa * Modified * Replacements and command * Runtime support * werk * Fix expeds + dungeon alltiles * reh --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
@@ -113,7 +113,7 @@ public sealed partial class DungeonSystem
|
||||
return roomRotation;
|
||||
}
|
||||
|
||||
public void SpawnRoom(
|
||||
public DungeonData SpawnRoom(
|
||||
EntityUid gridUid,
|
||||
MapGridComponent grid,
|
||||
Matrix3x2 roomTransform,
|
||||
@@ -126,6 +126,7 @@ public sealed partial class DungeonSystem
|
||||
var templateMapUid = _maps.GetMapOrInvalid(roomMap);
|
||||
var templateGrid = Comp<MapGridComponent>(templateMapUid);
|
||||
var roomDimensions = room.Size;
|
||||
var data = new DungeonData();
|
||||
|
||||
var finalRoomRotation = roomTransform.Rotation();
|
||||
|
||||
@@ -154,6 +155,7 @@ public sealed partial class DungeonSystem
|
||||
}
|
||||
|
||||
_tiles.Add((rounded, tileRef.Tile));
|
||||
data.Tiles[rounded] = tileRef.Tile;
|
||||
|
||||
if (clearExisting)
|
||||
{
|
||||
@@ -186,6 +188,7 @@ public sealed partial class DungeonSystem
|
||||
|
||||
// TODO: Copy the templated entity as is with serv
|
||||
var ent = Spawn(protoId, new EntityCoordinates(gridUid, childPos));
|
||||
data.Entities.Add(ent, childPos.Floored());
|
||||
|
||||
var childXform = _xformQuery.GetComponent(ent);
|
||||
var anchored = templateXform.Anchored;
|
||||
@@ -256,14 +259,18 @@ public sealed partial class DungeonSystem
|
||||
var result = _decals.TryAddDecal(
|
||||
decal.Id,
|
||||
new EntityCoordinates(gridUid, position),
|
||||
out _,
|
||||
out var did,
|
||||
decal.Color,
|
||||
angle,
|
||||
decal.ZIndex,
|
||||
decal.Cleanable);
|
||||
|
||||
data.Decals.Add(did, position);
|
||||
|
||||
DebugTools.Assert(result);
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user