Add Locked items config
This commit is contained in:
parent
8fc7adf35a
commit
9375466863
14
Domain/Config/LockedItemConfig.cs
Normal file
14
Domain/Config/LockedItemConfig.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using Domain.Enums;
|
||||||
|
|
||||||
|
namespace Domain.Config;
|
||||||
|
|
||||||
|
public class LockedItemConfig
|
||||||
|
{
|
||||||
|
public const string LOCKED_SECTION = "Locked";
|
||||||
|
|
||||||
|
public int ItemId { get; set; }
|
||||||
|
|
||||||
|
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||||
|
public UnlockType ItemType { get; set; }
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
"TenpoName": "店舗1",
|
"TenpoName": "店舗1",
|
||||||
"Pref": "東京都",
|
"Pref": "東京都",
|
||||||
"Location": "渋谷区",
|
"Location": "渋谷区",
|
||||||
"Mac": "000000000000"
|
"Mac": "00155D6ACF78"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
9
MainServer/Configurations/locked.json
Normal file
9
MainServer/Configurations/locked.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Locked":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"ItemId": 11,
|
||||||
|
"ItemType": "Avatar"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -42,6 +42,7 @@ try
|
|||||||
.AddJsonFile($"{configurationsDirectory}/matching.json", optional: true, reloadOnChange: false)
|
.AddJsonFile($"{configurationsDirectory}/matching.json", optional: true, reloadOnChange: false)
|
||||||
.AddJsonFile($"{configurationsDirectory}/auth.json", optional: true, reloadOnChange: false)
|
.AddJsonFile($"{configurationsDirectory}/auth.json", optional: true, reloadOnChange: false)
|
||||||
.AddJsonFile($"{configurationsDirectory}/rank.json", optional: true, reloadOnChange: false)
|
.AddJsonFile($"{configurationsDirectory}/rank.json", optional: true, reloadOnChange: false)
|
||||||
|
.AddJsonFile($"{configurationsDirectory}/locked.json", optional: true, reloadOnChange: false)
|
||||||
.AddJsonFile($"{configurationsDirectory}/server.json", optional: true, reloadOnChange: false);
|
.AddJsonFile($"{configurationsDirectory}/server.json", optional: true, reloadOnChange: false);
|
||||||
|
|
||||||
builder.Services.Configure<EventConfig>(
|
builder.Services.Configure<EventConfig>(
|
||||||
@ -52,6 +53,8 @@ try
|
|||||||
builder.Configuration.GetSection(GameConfig.GAME_SECTION));
|
builder.Configuration.GetSection(GameConfig.GAME_SECTION));
|
||||||
builder.Services.Configure<AuthConfig>(
|
builder.Services.Configure<AuthConfig>(
|
||||||
builder.Configuration.GetSection(AuthConfig.AUTH_SECTION));
|
builder.Configuration.GetSection(AuthConfig.AUTH_SECTION));
|
||||||
|
builder.Services.Configure<LockedItemConfig>(
|
||||||
|
builder.Configuration.GetSection(LockedItemConfig.LOCKED_SECTION));
|
||||||
builder.Services.AddOptions<RankConfig>()
|
builder.Services.AddOptions<RankConfig>()
|
||||||
.Bind(builder.Configuration.GetSection(RankConfig.RANK_SECTION))
|
.Bind(builder.Configuration.GetSection(RankConfig.RANK_SECTION))
|
||||||
.ValidateDataAnnotations()
|
.ValidateDataAnnotations()
|
||||||
|
Loading…
Reference in New Issue
Block a user