Add RoomFill markers (#22293)

* Add RoomFill markers

* weh

* Also deez

* Working

* Randomised fills working

* Fixes

* Fix lack of prototypes

* Fix tests

* Fix tests?
This commit is contained in:
metalgearsloth
2024-01-04 15:17:04 +11:00
committed by GitHub
parent a3516e60e7
commit f533a1a543
6 changed files with 363 additions and 135 deletions

View File

@@ -0,0 +1,37 @@
using Content.Shared.Procedural;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;
namespace Content.Server.Procedural;
/// <summary>
/// Marker that indicates the specified room prototype should occupy this space.
/// </summary>
[RegisterComponent]
public sealed partial class RoomFillComponent : Component
{
/// <summary>
/// Are we allowed to rotate room templates?
/// If the room is not a square this will only do 180 degree rotations.
/// </summary>
[DataField]
public bool Rotation = true;
/// <summary>
/// Size of the room to fill.
/// </summary>
[DataField(required: true)]
public Vector2i Size;
/// <summary>
/// Rooms allowed for the marker.
/// </summary>
[DataField]
public EntityWhitelist? RoomWhitelist;
/// <summary>
/// Should any existing entities / decals be bulldozed first.
/// </summary>
[DataField]
public bool ClearExisting;
}