コード例 #1
0
ファイル: EssConfig.cs プロジェクト: nausofficial/uEssentials
        public override void LoadDefaults()
        {
            Locale = "en";

            BackDelay = 10;

            UnfreezeOnDeath = true;
            UnfreezeOnQuit  = true;

            EnableJoinLeaveMessage       = true;
            EnableTextCommands           = true;
            EnableDeathMessages          = true;
            ShowPermissionOnErrorMessage = true;
            SaveCommandCooldowns         = false;

            EnablePollRunningMessage   = true;
            PollRunningMessageCooldown = 20;
            ServerFrameRate            = -1; // http://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html

            AutoAnnouncer = new AutoAnnouncer();
            AutoAnnouncer.LoadDefaults();

            AutoCommands = new AutoCommands();
            AutoCommands.LoadDefaults();

            PrivateMessage = new PrivateMessageSettings {
                FormatFrom         = "(From {0}): {1}",
                FormatTo           = "(To {0}): {1}",
                FormatSpy          = "<gray>Spy: {0} -> {1}: {2}",
                ConsoleDisplayName = "*console*"
            };

            AntiSpam = new AntiSpamSettings {
                Enabled  = true,
                Interval = 3
            };

            Updater = new UpdaterSettings {
                CheckUpdates   = true,
                DownloadLatest = true,
                AlertOnJoin    = true
            };

            Home = new HomeCommandSettings {
                TeleportDelay          = 5,
                CancelTeleportWhenMove = true
            };

            Warp = new WarpCommandSettings {
                TeleportDelay          = 5,
                PerWarpPermission      = true,
                CancelTeleportWhenMove = false
            };

            Kit = new KitSettings {
                ShowCost                   = true,
                ShowCostIfZero             = false,
                CostFormat                 = "{0}({1}{2})",
                GlobalCooldown             = 0,
                ResetGlobalCooldownWhenDie = false
            };

            Tpa = new TpaSettings {
                ExpireDelay            = 10,
                TeleportDelay          = 5,
                CancelTeleportWhenMove = true
            };

            Economy = new EconomySettings {
                UseXp           = false,
                UconomyCurrency = "$",
                XpCurrency      = "Xp"
            };

            VehicleFeatures = new VehicleFeaturesSettings {
                RefuelPercentage = 20,
                RepairPercentage = 70
            };

            ItemFeatures = new ItemFeaturesSettings {
                ReloadPercentage = 80,
                RepairPercentage = 80
            };

            GiveItemBlacklist  = new HashSet <ushort>();
            VehicleBlacklist   = new HashSet <ushort>();
            DisabledCommands   = new List <string>();
            CommandsToOverride = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase);
            EnabledSystems     = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase)
            {
                "kits", "warps"
            };

            ItemSpawnLimit = 10;
        }
コード例 #2
0
ファイル: EssConfig.cs プロジェクト: demiit/uEssentials
        public override void LoadDefaults()
        {
            Locale = "en";

            PMFormatFrom = "(From {0}): {1}";
            PMFormatTo   = "(To {0}): {1}";

            UnfreezeOnDeath = true;
            UnfreezeOnQuit  = true;

            EnableJoinLeaveMessage       = true;
            EnableTextCommands           = true;
            EnableDeathMessages          = true;
            ShowPermissionOnErrorMessage = true;

            EnablePollRunningMessage   = true;
            PollRunningMessageCooldown = 20;
            ServerFrameRate            = -1; // http://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html

            AutoAnnouncer = new AutoAnnouncer();
            AutoAnnouncer.LoadDefaults();

            AutoCommands = new AutoCommands();
            AutoCommands.LoadDefaults();

            AntiSpam = new AntiSpamSettings {
                Enabled  = true,
                Interval = 3
            };

            Updater = new UpdaterSettings {
                CheckUpdates   = true,
                DownloadLatest = true,
                AlertOnJoin    = true
            };

            HomeCommand = new HomeCommandSettings {
                Cooldown = 30,
                Delay    = 5,
                CancelTeleportWhenMove = true
            };

            WarpCommand = new WarpCommandSettings {
                Cooldown               = 5,
                PerWarpPermission      = true,
                CancelTeleportWhenMove = false
            };

            WebKits = new WebKitsSettings {
                Enabled = false,
                Url     = ""
            };

            WebConfig = new WebConfigSettings {
                Enabled = false,
                Url     = ""
            };

            Kit = new KitSettings {
                ShowCost                   = true,
                ShowCostIfZero             = false,
                CostFormat                 = "{0}({1}{2})",
                GlobalCooldown             = 0,
                ResetGlobalCooldownWhenDie = false
            };

            Tpa = new TpaSettings {
                ExpireDelay   = 10,
                TeleportDelay = 5
            };

            Economy = new EconomySettings {
                UseXp           = false,
                UconomyCurrency = "$",
                XpCurrency      = "Xp"
            };

            VehicleFeatures = new VehicleFeaturesSettings {
                RefuelPercentage = 20,
                RepairPercentage = 70
            };

            GiveItemBlacklist = new List <ushort>();
            VehicleBlacklist  = new List <ushort>();
            DisabledCommands  = new List <string>();
            EnabledSystems    = new List <string> {
                "kits", "warps"
            };

            ItemSpawnLimit = 10;
        }