fix field validation in EngineTheme
This commit is contained in:
@@ -98,9 +98,5 @@ namespace EscapeRoomEngine.Engine.Runtime
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateUI() => UpdateUIEvent?.Invoke();
|
private void UpdateUI() => UpdateUIEvent?.Invoke();
|
||||||
|
|
||||||
// ReSharper disable once SuggestBaseTypeForParameter
|
|
||||||
// ReSharper disable once UnusedMember.Local
|
|
||||||
private bool IsNotEmpty(List<DoorModuleDescription> modules) => modules.Count > 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using EscapeRoomEngine.Engine.Runtime.Modules;
|
using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using NaughtyAttributes;
|
using NaughtyAttributes;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ namespace EscapeRoomEngine.Engine.Runtime
|
|||||||
[BoxGroup("Doors")] [Required]
|
[BoxGroup("Doors")] [Required]
|
||||||
public DoorModuleDescription spawnDoor;
|
public DoorModuleDescription spawnDoor;
|
||||||
|
|
||||||
[BoxGroup("Doors")] [ValidateInput("IsNotEmpty", "At least one exit door type is required")]
|
[BoxGroup("Doors")] [ValidateInput("IsNotEmpty", "At least one exit door type is required.")]
|
||||||
public List<DoorModuleDescription> exitDoorTypes;
|
public List<DoorModuleDescription> exitDoorTypes;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -51,5 +52,8 @@ namespace EscapeRoomEngine.Engine.Runtime
|
|||||||
public List<PuzzleModuleDescription> puzzleTypes;
|
public List<PuzzleModuleDescription> puzzleTypes;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
|
private bool IsNotEmpty(List<DoorModuleDescription> modules) => modules.Count > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user