mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add minItems, maxItems, and uniqueItems to nomai coords
This commit is contained in:
parent
304f3f359e
commit
6e6a8923f0
10
NewHorizons/External/Configs/StarSystemConfig.cs
vendored
10
NewHorizons/External/Configs/StarSystemConfig.cs
vendored
@ -1,5 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NewHorizons.Utility;
|
using NewHorizons.Utility;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@ -102,8 +102,16 @@ namespace NewHorizons.External.Configs
|
|||||||
|
|
||||||
public class NomaiCoordinates
|
public class NomaiCoordinates
|
||||||
{
|
{
|
||||||
|
[MinLength(2)]
|
||||||
|
[MaxLength(6)]
|
||||||
public int[] x;
|
public int[] x;
|
||||||
|
|
||||||
|
[MinLength(2)]
|
||||||
|
[MaxLength(6)]
|
||||||
public int[] y;
|
public int[] y;
|
||||||
|
|
||||||
|
[MinLength(2)]
|
||||||
|
[MaxLength(6)]
|
||||||
public int[] z;
|
public int[] z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,14 @@ public static class SchemaExporter
|
|||||||
{"title", _title},
|
{"title", _title},
|
||||||
{"description", _description}
|
{"description", _description}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (_title == "Star System Schema")
|
||||||
|
{
|
||||||
|
schema.Definitions["NomaiCoordinates"].Properties["x"].UniqueItems = true;
|
||||||
|
schema.Definitions["NomaiCoordinates"].Properties["y"].UniqueItems = true;
|
||||||
|
schema.Definitions["NomaiCoordinates"].Properties["z"].UniqueItems = true;
|
||||||
|
}
|
||||||
|
|
||||||
return schema;
|
return schema;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user