public List <CPluginVariable> GetPluginVariables() { return(new List <CPluginVariable> { new CPluginVariable(VariableName.PunishCommand, typeof(string[]), _punishCommand), new CPluginVariable(VariableName.ForgiveCommand, typeof(string[]), _forgiveCommand), new CPluginVariable(VariableName.AllowKillersToApologizeToAvoidPunishment, CreateEnumString(typeof(enumBoolYesNo)), _allowKillersToApologizeToAvoidPunishment.ToString()), new CPluginVariable(VariableName.SorryCommand, typeof(string[]), _sorryCommand), new CPluginVariable(VariableName.ShameCommand, typeof(string[]), _shameCommand), new CPluginVariable(VariableName.KillerMessages, typeof(string[]), _killerMessages), new CPluginVariable(VariableName.VictimMessages, typeof(string[]), _victimMessages), new CPluginVariable(VariableName.PunishedMessage, typeof(string), _punishedMessage), new CPluginVariable(VariableName.ForgivenMessage, typeof(string), _forgivenMessage), new CPluginVariable(VariableName.ApologizedMessage, typeof(string), _apologizedMessage), new CPluginVariable(VariableName.KickMessage, typeof(string), _kickMessage), new CPluginVariable(VariableName.NoOneToPunishMessage, typeof(string), _noOneToPunishMessage), new CPluginVariable(VariableName.NoOneToForgiveMessage, typeof(string), _noOneToForgiveMessage), new CPluginVariable(VariableName.NoOneToApologizeToMessage, typeof(string), _noOneToApologizeToMessage), new CPluginVariable(VariableName.ShameAllOnRoundEnd, typeof(enumBoolYesNo), _shameAllOnRoundEnd), new CPluginVariable(VariableName.NoOneToShameOnRoundEndMessage, typeof(string), _noOneToShameOnRoundEndMessage), new CPluginVariable(VariableName.NoOneToShameMessage, typeof(string), _noOneToShameMessage), new CPluginVariable(VariableName.VictimWindow, typeof(int), _victimWindow.TotalSeconds), new CPluginVariable(VariableName.AutoAction, CreateEnumString(typeof(Action)), _protect.ToString()), new CPluginVariable(VariableName.HasPunishLimit, CreateEnumString(typeof(enumBoolYesNo)), _hasPunishLimit.ToString()), new CPluginVariable(VariableName.PunishLimit, typeof(int), _punishLimit), new CPluginVariable(VariableName.PlayerCountThresholdForKick, typeof(int), _playerCountThresholdForKick), new CPluginVariable(VariableName.Protected, CreateEnumString(typeof(Protect)), _protect.ToString()), new CPluginVariable(VariableName.Whitelist, typeof(string[]), _whitelist), new CPluginVariable(VariableName.ShouldSuicideCountAsATeamKill, typeof(enumBoolYesNo), _shouldSuicideCountAsATeamKill), new CPluginVariable(VariableName.OutputToChat, CreateEnumString(typeof(Chat)), _outputToChat.ToString()), new CPluginVariable(VariableName.UseAdKats, typeof(enumBoolYesNo), _useAdKats) }); }
public List <CPluginVariable> GetDisplayPluginVariables() { var list = new List <CPluginVariable> { new CPluginVariable(VariableGroup.Commands + VariableName.PunishCommand, typeof(string[]), _punishCommand), new CPluginVariable(VariableGroup.Commands + VariableName.ForgiveCommand, typeof(string[]), _forgiveCommand), new CPluginVariable(VariableGroup.Commands + VariableName.AllowKillersToApologizeToAvoidPunishment, typeof(enumBoolYesNo), _allowKillersToApologizeToAvoidPunishment), new CPluginVariable(VariableGroup.Commands + VariableName.ShameCommand, typeof(string[]), _shameCommand), new CPluginVariable(VariableGroup.Messages + VariableName.KillerMessages, typeof(string[]), _killerMessages), new CPluginVariable(VariableGroup.Messages + VariableName.VictimMessages, typeof(string[]), _victimMessages), new CPluginVariable(VariableGroup.Messages + VariableName.PunishedMessage, typeof(string), _punishedMessage), new CPluginVariable(VariableGroup.Messages + VariableName.ForgivenMessage, typeof(string), _forgivenMessage), new CPluginVariable(VariableGroup.Messages + VariableName.ApologizedMessage, typeof(string), _apologizedMessage), new CPluginVariable(VariableGroup.Messages + VariableName.KickMessage, typeof(string), _kickMessage), new CPluginVariable(VariableGroup.Messages + VariableName.NoOneToPunishMessage, typeof(string), _noOneToPunishMessage), new CPluginVariable(VariableGroup.Messages + VariableName.NoOneToForgiveMessage, typeof(string), _noOneToForgiveMessage), new CPluginVariable(VariableGroup.Messages + VariableName.NoOneToApologizeToMessage, typeof(string), _noOneToApologizeToMessage), new CPluginVariable(VariableGroup.Messages + VariableName.ShameAllOnRoundEnd, typeof(enumBoolYesNo), _shameAllOnRoundEnd), new CPluginVariable(VariableGroup.Messages + VariableName.NoOneToShameMessage, typeof(string), _noOneToShameMessage), new CPluginVariable(VariableGroup.Limits + VariableName.VictimWindow, typeof(int), _victimWindow.TotalSeconds), new CPluginVariable(VariableGroup.Limits + VariableName.AutoAction, CreateEnumString(typeof(Action)), _autoAction.ToString()), new CPluginVariable(VariableGroup.Limits + VariableName.HasPunishLimit, CreateEnumString(typeof(enumBoolYesNo)), _hasPunishLimit.ToString()), new CPluginVariable(VariableGroup.Protection + VariableName.Protected, CreateEnumString(typeof(Protect)), _protect.ToString()), new CPluginVariable(VariableGroup.Debug + VariableName.ShouldSuicideCountAsATeamKill, typeof(enumBoolYesNo), _shouldSuicideCountAsATeamKill), new CPluginVariable(VariableGroup.Debug + VariableName.OutputToChat, CreateEnumString(typeof(Chat)), _outputToChat.ToString()), new CPluginVariable(VariableGroup.Protection + VariableName.UseAdKats, typeof(enumBoolYesNo), _useAdKats), }; // Sorry var insertAt = list.FindIndex(v => v.Name.EndsWith(VariableName.AllowKillersToApologizeToAvoidPunishment)) + 1; var sorry = new List <CPluginVariable> { new CPluginVariable(VariableGroup.Commands + VariableName.SorryCommand, typeof(string[]), _sorryCommand) }; if (_allowKillersToApologizeToAvoidPunishment == enumBoolYesNo.Yes) { list.InsertRange(insertAt, sorry); } // Shame insertAt = list.FindIndex(v => v.Name.EndsWith(VariableName.ShameAllOnRoundEnd)) + 1; var shame = new List <CPluginVariable> { new CPluginVariable(VariableGroup.Messages + VariableName.NoOneToShameOnRoundEndMessage, typeof(string), _noOneToShameOnRoundEndMessage) }; if (_shameAllOnRoundEnd == enumBoolYesNo.Yes) { list.InsertRange(insertAt, shame); } // Limits insertAt = list.FindIndex(v => v.Name.EndsWith(VariableName.HasPunishLimit)) + 1; var limits = new List <CPluginVariable> { new CPluginVariable(VariableGroup.Limits + VariableName.PunishLimit, typeof(int), _punishLimit), new CPluginVariable(VariableGroup.Limits + VariableName.PlayerCountThresholdForKick, typeof(int), _playerCountThresholdForKick) }; if (_hasPunishLimit == enumBoolYesNo.Yes) { list.InsertRange(insertAt, limits); } // Protection insertAt = list.FindIndex(v => v.Name.EndsWith(VariableName.Protected)) + 1; var whitelist = new List <CPluginVariable> { new CPluginVariable(VariableGroup.Protection + VariableName.Whitelist, typeof(string[]), _whitelist) }; if (_protect == Protect.Whitelist || _protect == Protect.AdminsAndWhitelist) { list.InsertRange(insertAt, whitelist); } return(list); }