-
Notifications
You must be signed in to change notification settings - Fork 10
/
Map.cs.dt
30 lines (28 loc) · 818 Bytes
/
Map.cs.dt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{
const maps = require('./.maps.json');
const enumName = function(name) { return name.toUpperCase().replace(/['-]/, '').replace(/[^A-Z0-9]+/g, '_'); };
}}
// This file is automatically generated.
// Do not directly edit.
// Generated on {{= (new Date).toISOString() }}
using System.ComponentModel.DataAnnotations;
namespace MingweiSamuel.Camille.Enums
{
/// <summary>
/// Maps enum based on maps.json.
/// </summary>
#if USE_SYSTEXTJSON
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
#endif
public enum Map
{
{{
for (let { mapId, mapName, notes } of maps) {
}}
[Display(Name = "{{= mapName}}", Description = "{{= notes}}")]
{{= enumName(mapName + "_" + notes) }} = {{= mapId }},
{{
}
}}
}
}