2018-04-08 02:44:42 -04:00
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2018-03-18 22:25:11 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2018-03-14 01:36:25 -04:00
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
namespace SharedLibraryCore.Configuration
|
2018-03-14 01:36:25 -04:00
|
|
|
|
{
|
2018-03-18 22:25:11 -04:00
|
|
|
|
public class ApplicationConfiguration : IBaseConfiguration
|
2018-03-14 01:36:25 -04:00
|
|
|
|
{
|
|
|
|
|
public bool EnableMultipleOwners { get; set; }
|
2018-03-24 17:35:54 -04:00
|
|
|
|
public bool EnableSteppedHierarchy { get; set; }
|
2018-03-14 01:36:25 -04:00
|
|
|
|
public bool EnableClientVPNs { get; set; }
|
|
|
|
|
public bool EnableDiscordLink { get; set; }
|
2018-03-30 00:13:40 -04:00
|
|
|
|
public bool EnableCustomSayName { get; set; }
|
|
|
|
|
public string CustomSayName { get; set; }
|
2018-03-14 01:36:25 -04:00
|
|
|
|
public string DiscordInviteCode { get; set; }
|
|
|
|
|
public string IPHubAPIKey { get; set; }
|
|
|
|
|
public List<ServerConfiguration> Servers { get; set; }
|
2018-03-14 14:22:04 -04:00
|
|
|
|
public int AutoMessagePeriod { get; set; }
|
|
|
|
|
public List<string> AutoMessages { get; set; }
|
2018-03-18 22:25:11 -04:00
|
|
|
|
public List<string> GlobalRules { get; set; }
|
2018-03-14 14:22:04 -04:00
|
|
|
|
public List<MapConfiguration> Maps { get; set; }
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
|
|
|
|
public IBaseConfiguration Generate()
|
|
|
|
|
{
|
2018-03-30 00:13:40 -04:00
|
|
|
|
EnableMultipleOwners = Utilities.PromptBool("Enable multiple owners");
|
|
|
|
|
EnableSteppedHierarchy = Utilities.PromptBool("Enable stepped privilege hierarchy");
|
|
|
|
|
EnableCustomSayName = Utilities.PromptBool("Enable custom say name");
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
2018-03-30 00:13:40 -04:00
|
|
|
|
if (EnableCustomSayName)
|
|
|
|
|
CustomSayName = Utilities.PromptString("Enter custom say name");
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
2018-03-30 00:13:40 -04:00
|
|
|
|
EnableClientVPNs = Utilities.PromptBool("Enable client VPNS");
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
2018-03-24 17:35:54 -04:00
|
|
|
|
if (!EnableClientVPNs)
|
2018-03-30 00:13:40 -04:00
|
|
|
|
IPHubAPIKey = Utilities.PromptString("Enter iphub.info api key");
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
2018-03-30 00:13:40 -04:00
|
|
|
|
EnableDiscordLink = Utilities.PromptBool("Display discord link on webfront");
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
|
|
|
|
if (EnableDiscordLink)
|
2018-03-30 00:13:40 -04:00
|
|
|
|
DiscordInviteCode = Utilities.PromptString("Enter discord invite link");
|
2018-03-18 22:25:11 -04:00
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name() => "ApplicationConfiguration";
|
2018-03-14 01:36:25 -04:00
|
|
|
|
}
|
2018-03-18 22:25:11 -04:00
|
|
|
|
}
|