12 [Icon(ManiaMapResources.Icons.RoomFlag3DIcon)]
19 [Export]
public bool EditId {
get => _editId;
set => SetValidatedField(ref _editId, value); }
22 [Export]
public int Id {
get;
set; } = -1;
24 private void SetValidatedField<T>(ref T field, T value)
27 NotifyPropertyListChanged();
30 public override void _ValidateProperty(Godot.Collections.Dictionary property)
32 base._ValidateProperty(property);
33 var name =
property[
"name"].AsStringName();
35 if (name == PropertyName.Id)
37 var flag =
EditId ? PropertyUsageFlags.None : PropertyUsageFlags.ReadOnly;
38 property[
"usage"] = (int)(PropertyUsageFlags.Default | flag);
45 base.AutoAssign(room);
The base class for elements tied to a RoomNode3D's cell index.
Contains the random number generator used for ID and random seed assignments.
static int AutoAssignId(int id)
If the specified ID is less than or equal to zero, returns a new random positive integer ID....
A room flag that can be set or toggled to alter the LayoutState.
override void AutoAssign(RoomNode3D room)
Assigns the room and any auto assigned values to the object.
bool EditId
If true, the Id property becomes editable in the inspector.
A node serving as the top level of a 3D room.
A room flag that can be set or toggled to alter the LayoutState.