Adds settings (#126)
This commit is contained in:
parent
8028a85ffe
commit
f336a56364
17 changed files with 229 additions and 99 deletions
|
|
@ -9,7 +9,7 @@ namespace Server.Ethics
|
|||
{
|
||||
public abstract class Ethic
|
||||
{
|
||||
public static readonly bool Enabled = false;
|
||||
public static bool Enabled { get; private set; }
|
||||
|
||||
public static readonly Ethic Hero = new HeroEthic();
|
||||
public static readonly Ethic Evil = new EvilEthic();
|
||||
|
|
@ -98,6 +98,8 @@ namespace Server.Ethics
|
|||
|
||||
public static void Initialize()
|
||||
{
|
||||
Enabled = ServerConfiguration.GetOrUpdateSetting("ethics.enabled", false);
|
||||
|
||||
if (Enabled)
|
||||
EventSink.Speech += EventSink_Speech;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue