re-added the kill server command (can only be used if run as admin)
less warns when using a disposed socket topstats added to tokens as {{TOPSTATS}} fixed topstats reporting for only a single server added fix to iw4 regex for negative score tokens now support multiple lines (using Environment.NewLine to separate) localization includes culture again
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
@ -7,6 +8,30 @@ namespace SharedLibraryCore.Localization
|
||||
public class Layout
|
||||
{
|
||||
public string LocalizationName { get; set; }
|
||||
public Dictionary<string, string> LocalizationSet { get; set; }
|
||||
public Index LocalizationIndex { get; set; }
|
||||
|
||||
public Layout(Dictionary<string, string> set)
|
||||
{
|
||||
LocalizationIndex = new Index()
|
||||
{
|
||||
Set = set
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class Index
|
||||
{
|
||||
public Dictionary<string, string> Set { get; set; }
|
||||
|
||||
public string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!Set.TryGetValue(key, out string value))
|
||||
throw new Exception($"Invalid locale key {key}");
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user