Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 26a0095

Browse files
authored
Build for SMod 3.10.2, fixing some typos (#124)
1 parent 5906f24 commit 26a0095

28 files changed

+92
-92
lines changed

AdminToolbox/AdminToolbox/API/ATWeb.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace AdminToolbox.API
88
{
99
using API.Webhook;
1010
/// <summary>
11-
/// Static <see cref="AdminToolbox"/> class that contains all of the plugins web-based methods
11+
/// Static <see cref="AdminToolbox"/> class that contains all of the plugin web-based methods
1212
/// </summary>
1313
public static class ATWeb
1414
{

AdminToolbox/AdminToolbox/API/ExtentionMethods.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ internal static bool IsPermitted(this ICommandSender sender, string[] commandKey
110110
{
111111
command.Trim();
112112
if (string.IsNullOrEmpty(command)) continue;
113-
//Gets a array of whitelisted users (if any)
113+
//Gets a array of white-listed users (if any)
114114
string[] configList = ConfigManager.Manager.Config.GetListValue("admintoolbox_" + command.ToLower() + "_whitelist", new string[0]);
115115
if (configList.Length > 0)
116116
validConfigs++;
117117
if (configList.ContainsPlayer(pl))
118118
return true;
119119
}
120120
string reply = "You are not permitted to use the (" + string.Join(" / ", commandKey) + ") command!";
121-
denied = mustBeListed ? new string[] { reply, "You are required to be spesificly whitelisted to use this command." } : new string[] { reply };
121+
denied = mustBeListed ? new string[] { reply, "You are required to be specifically white-listed to use this command." } : new string[] { reply };
122122
return (mustBeListed || ConfigManager.Manager.Config.GetBoolValue("admintoolbox_whitelist_required", false)) && validConfigs < 1
123123
? false
124124
: !(validConfigs > 0);
@@ -128,7 +128,7 @@ internal static bool IsPermitted(this ICommandSender sender, string[] commandKey
128128
}
129129
catch
130130
{
131-
denied = new string[] { "Error during command whitelist calculation!" };
131+
denied = new string[] { "Error during command white-list calculation!" };
132132
return false;
133133
}
134134
}

AdminToolbox/AdminToolbox/API/GetFromString.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static Player GetPlayer(string arg)
5454
}
5555

5656
/// <summary>
57-
/// Gets list of players from <see cref="string"/> <paramref name="name"/> param
57+
/// Gets list of players from <see cref="string"/> <paramref name="name"/> parameter
5858
/// </summary>
5959
/// <returns><see cref="System.Array"/> of <see cref="Player"/></returns>
6060
public static Player[] GetGroup(string name)
@@ -69,7 +69,7 @@ public static Player[] GetGroup(string name)
6969
}
7070

7171
/// <summary>
72-
/// Gets list of players from <see cref="string"/> <paramref name="name"/> param
72+
/// Gets list of players from <see cref="string"/> <paramref name="name"/> parameter
7373
/// </summary>
7474
/// <returns><see cref="System.Array"/> of <see cref="Player"/></returns>
7575
public static Player[] GetRole(string name)
@@ -84,7 +84,7 @@ public static Player[] GetRole(string name)
8484
}
8585

8686
/// <summary>
87-
/// Gets list of players from <see cref="string"/> <paramref name="name"/> param
87+
/// Gets list of players from <see cref="string"/> <paramref name="name"/> parameter
8888
/// </summary>
8989
/// <returns><see cref="System.Array"/> of <see cref="Player"/></returns>
9090
public static Player[] GetTeam(string name)

AdminToolbox/AdminToolbox/API/JailHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static bool SendToJail(Smod2.API.Player player, DateTime? jailedToTime)
7575
if (a != AmmoType.NONE)
7676
psetting.Ammo[a] = player.GetAmmo(a);
7777
}
78-
//Changes role to Tutorial, teleports to jail, removes inv.
78+
//Changes role to Tutorial, teleport to jail, removes inventory.
7979
Debug($"Variables stored, sending \"{player.Name}\" to jail");
8080
player.ChangeRole(Smod2.API.RoleType.TUTORIAL, true, false);
8181
player.Teleport(JailPos, true);
@@ -102,7 +102,7 @@ public static bool ReturnFromJail(Player player)
102102
Debug("Return: Player or UserID null/empty");
103103
return false;
104104
}
105-
Debug($"Attempting to unjail \"{player.Name}\"");
105+
Debug($"Attempting to un-jail \"{player.Name}\"");
106106
if (AdminToolbox.ATPlayerDict.TryGetValue(player.UserID, out PlayerSettings psetting))
107107
{
108108
psetting.isJailed = false;

AdminToolbox/AdminToolbox/API/SetPlayerVariables.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace AdminToolbox.API
99
public static class SetPlayerVariables
1010
{
1111
/// <summary>
12-
/// For setting <see cref="API.PlayerSettings"/> bools by <paramref name="UserID"/>
12+
/// For setting <see cref="API.PlayerSettings"/> booleans by <paramref name="UserID"/>
1313
/// <para>Returns false if <paramref name="UserID"/> is not in <see cref="AdminToolbox.ATPlayerDict"/></para>
1414
/// </summary>
1515
public static bool SetPlayerBools(string UserID, bool? spectatorOnly = null, bool? godMode = null, bool? dmgOff = null, bool? destroyDoor = null, bool? keepSettings = null, bool? lockDown = null, bool? instantKill = null, bool? isJailed = null)
@@ -30,13 +30,13 @@ public static bool SetPlayerBools(string UserID, bool? spectatorOnly = null, boo
3030

3131
}
3232
/// <summary>
33-
/// For setting <see cref="API.PlayerSettings"/> bools on a <see cref="Player"/>
33+
/// For setting <see cref="API.PlayerSettings"/> booleans on a <see cref="Player"/>
3434
/// <para>Returns false if <paramref name="player"/>'s UserID is not in <see cref="AdminToolbox.ATPlayerDict"/></para>
3535
/// </summary>
3636
public static bool SetPlayerBools(Player player, bool? spectatorOnly = null, bool? godMode = null, bool? dmgOff = null, bool? destroyDoor = null, bool? keepSettings = null, bool? lockDown = null, bool? instantKill = null, bool? isJailed = null)
3737
=> SetPlayerBools(player.UserID, spectatorOnly, godMode, dmgOff, destroyDoor, keepSettings, lockDown, instantKill, isJailed);
3838
/// <summary>
39-
/// For setting <see cref="API.PlayerSettings"/> bools on a list of <see cref="Player"/>s
39+
/// For setting <see cref="API.PlayerSettings"/> booleans on a list of <see cref="Player"/>s
4040
/// <para>Returns false if one or more of <paramref name="players"/> UserID's is not in <see cref="AdminToolbox.ATPlayerDict"/></para>
4141
/// </summary>
4242
public static bool SetPlayerBools(List<Player> players, bool? spectatorOnly = null, bool? godMode = null, bool? dmgOff = null, bool? destroyDoor = null, bool? keepSettings = null, bool? lockDown = null, bool? instantKill = null, bool? isJailed = null)

AdminToolbox/AdminToolbox/API/Utility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ internal static DiscordWebhook BuildBanWebhook(Player player, int duration, stri
159159
{
160160
DiscordWebhook webH;
161161
List<Field> listOfFields = new List<Field>();
162-
CultureInfo timeFormat = new CultureInfo("ja-JP");
163-
listOfFields.AddField("Playername: ", player?.Name ?? "TEST", true);
162+
CultureInfo timeFormat = new CultureInfo("ja-JP"); //Don't ask why Japanese, I just liked the formatting.
163+
listOfFields.AddField("Player-name: ", player?.Name ?? "TEST", true);
164164
listOfFields.AddField("Duration: ", (duration / 60).ToString("0", CultureInfo.InvariantCulture) + " minutes", true);
165165
listOfFields.AddField("Timespan: ", $"[{DateTime.UtcNow.ToString(timeFormat)}] -> [{DateTime.UtcNow.AddSeconds(duration).ToString(timeFormat)}]");
166166
if (!string.IsNullOrEmpty(reason))

AdminToolbox/AdminToolbox/AdminToolbox.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ namespace AdminToolbox
2424
version = AT_Version + "-" + AT_Revision,
2525
SmodMajor = 3,
2626
SmodMinor = 10,
27-
SmodRevision = 0
27+
SmodRevision = 2
2828
)]
2929
public class AdminToolbox : Plugin
3030
{
31-
internal const string AT_Version = "1.3.9";
31+
internal const string AT_Version = "1.3.10";
3232
internal const string AT_Revision = "0";
3333
internal const string SModLetter = "";
3434

@@ -40,12 +40,12 @@ public class AdminToolbox : Plugin
4040
public static readonly LogManager LogManager = new LogManager();
4141

4242
/// <summary>
43-
/// The plugin's instance instance of <see cref="Managers.WarpManager"/>
43+
/// The plugin's instance of <see cref="Managers.WarpManager"/>
4444
/// </summary>
4545
public static readonly WarpManager WarpManager = new WarpManager();
4646

4747
/// <summary>
48-
/// The plugin's instance instance of <see cref="Managers.ATFile"/>
48+
/// The plugin's instance of <see cref="Managers.ATFile"/>
4949
/// </summary>
5050
public static readonly ATFile FileManager = new ATFile();
5151

@@ -171,22 +171,22 @@ internal void RegisterCommands()
171171
internal void UnRegisterCommands() => PluginManager.CommandManager.UnregisterCommands(this);
172172
internal void RegisterConfigs()
173173
{
174-
#region Core-configs
174+
#region Core-configurations
175175
this.AddConfig(new ConfigSetting("admintoolbox_enable", true, true, "Enable/Disable AdminToolbox"));
176176
this.AddConfig(new ConfigSetting("admintoolbox_colors", false, true, "Enable/Disable AdminToolbox colors in server window"));
177177
this.AddConfig(new ConfigSetting("admintoolbox_tracking", true, true, "Appends the AdminToolbox version to your server name, this is for tracking how many servers are running the plugin"));
178178
#endregion
179179

180-
this.AddConfig(new ConfigSetting("admintoolbox_tutorial_dmg_allowed", new int[] { -1 }, true, "What (int)damagetypes TUTORIAL is allowed to take"));
180+
this.AddConfig(new ConfigSetting("admintoolbox_tutorial_dmg_allowed", new int[] { -1 }, true, "What (int)damage-types TUTORIAL is allowed to take"));
181181

182182
#region Debug
183-
this.AddConfig(new ConfigSetting("admintoolbox_debug_damagetypes", Utility.HumanDamageTypes, true, "What (int)damagetypes to debug"));
183+
this.AddConfig(new ConfigSetting("admintoolbox_debug_damagetypes", Utility.HumanDamageTypes, true, "What (int)damage-types to debug"));
184184
this.AddConfig(new ConfigSetting("admintoolbox_debug_server_damage", false, true, "Debugs damage dealt by server"));
185185
this.AddConfig(new ConfigSetting("admintoolbox_debug_spectator_damage", false, true, "Debugs damage done to/by spectators"));
186186
this.AddConfig(new ConfigSetting("admintoolbox_debug_tutorial_damage", false, true, "Debugs damage done to tutorial"));
187187
this.AddConfig(new ConfigSetting("admintoolbox_debug_player_damage", false, true, "Debugs damage to all players except teammates"));
188188
this.AddConfig(new ConfigSetting("admintoolbox_debug_friendly_damage", false, true, "Debugs damage to teammates"));
189-
this.AddConfig(new ConfigSetting("admintoolbox_debug_player_kill", false, true, "Debugs player kills except teamkills"));
189+
this.AddConfig(new ConfigSetting("admintoolbox_debug_player_kill", false, true, "Debugs player kills except team-kills"));
190190
this.AddConfig(new ConfigSetting("admintoolbox_debug_friendly_kill", true, true, "Debugs team-kills"));
191191
this.AddConfig(new ConfigSetting("admintoolbox_debug_scp_and_self_killed", false, true, "Debug suicides and SCP kills"));
192192
#endregion
@@ -196,29 +196,29 @@ internal void RegisterConfigs()
196196
this.AddConfig(new ConfigSetting("admintoolbox_round_damagemultiplier", 1f, true, "Damage multiplier"));
197197
this.AddConfig(new ConfigSetting("admintoolbox_decontamination_damagemultiplier", 1f, true, "Damage multiplier for the decontamination of LCZ"));
198198
this.AddConfig(new ConfigSetting("admintoolbox_friendlyfire_damagemultiplier", 1f, true, "Damage multiplier for friendly fire"));
199-
this.AddConfig(new ConfigSetting("admintoolbox_pocketdimention_damagemultiplier", 1f, true, "Damage multiplier for pocket dimention damage"));
199+
this.AddConfig(new ConfigSetting("admintoolbox_pocketdimention_damagemultiplier", 1f, true, "Damage multiplier for pocket dimension damage"));
200200
#endregion
201201
#region Cards
202-
this.AddConfig(new ConfigSetting("admintoolbox_custom_nuke_cards", false, true, "Enables the use of custom keycards for the activation of the nuke"));
202+
this.AddConfig(new ConfigSetting("admintoolbox_custom_nuke_cards", false, true, "Enables the use of custom key-cards for the activation of the nuke"));
203203
this.AddConfig(new ConfigSetting("admintoolbox_nuke_card_list", new int[] { (int)ItemType.KeycardContainmentEngineer, (int)ItemType.KeycardFacilityManager, (int)ItemType.KeycardO5 }, true, "List of all cards that can enable the nuke"));
204204
#endregion
205205
#region Log-Stuff
206-
this.AddConfig(new ConfigSetting("admintoolbox_log_teamkills", false, true, "Writing logfiles for teamkills"));
207-
this.AddConfig(new ConfigSetting("admintoolbox_log_kills", false, true, "Writing logfiles for regular kills"));
208-
this.AddConfig(new ConfigSetting("admintoolbox_log_commands", false, true, "Writing logfiles for all AT command usage"));
206+
this.AddConfig(new ConfigSetting("admintoolbox_log_teamkills", false, true, "Writing log-files for team-kills"));
207+
this.AddConfig(new ConfigSetting("admintoolbox_log_kills", false, true, "Writing log-files for regular kills"));
208+
this.AddConfig(new ConfigSetting("admintoolbox_log_commands", false, true, "Writing log-files for all AT command usage"));
209209

210210
this.AddConfig(new ConfigSetting("admintoolbox_round_info", true, true, "Prints round count and player number on round start & end"));
211211
this.AddConfig(new ConfigSetting("admintoolbox_player_join_info", true, true, "Writes player name in console on players joining"));
212212
#endregion
213213
#region Intercom
214214
//this.AddConfig(new Smod2.Config.ConfigSetting("admintoolbox_intercom_whitelist", new string[] { string.Empty }, Smod2.Config.SettingType.LIST, true, "What ServerRank can use the Intercom to your specified settings"));
215215
this.AddConfig(new ConfigSetting("admintoolbox_intercom_UserID_blacklist", new string[0], true, "Blacklist of UserID's that cannot use the intercom"));
216-
this.AddConfig(new ConfigSetting("admintoolbox_intercomlock", false, true, "If set to true, locks the command for all non-whitelist players"));
216+
this.AddConfig(new ConfigSetting("admintoolbox_intercomlock", false, true, "If set to true, locks the command for all non- white-list players"));
217217
#endregion
218218

219219
this.AddConfig(new ConfigSetting("admintoolbox_block_role_damage", new string[0], true, "What roles cannot attack other roles"));
220220

221-
this.AddConfig(new ConfigSetting("admintoolbox_ban_webhooks", new string[0], true, "Links to channel webhooks for bans"));
221+
this.AddConfig(new ConfigSetting("admintoolbox_ban_webhooks", new string[0], true, "Links to channel web-hooks for bans"));
222222
}
223223

224224
/// <summary>

AdminToolbox/AdminToolbox/Commands/AT_TemplateCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public string[] OnCall(ICommandSender sender, string[] args)
2727

2828
if (args.Length > 0)
2929
{
30-
//Get player from first arguement of OnCall
30+
//Get player from first argument of OnCall
3131
Player targetPlayer = Server.GetPlayers(args[0]).FirstOrDefault();
3232

3333
//If player could not be found, return reply to command user
@@ -41,7 +41,7 @@ public string[] OnCall(ICommandSender sender, string[] args)
4141
}
4242
else if (caller != null)
4343
{
44-
//Do something on calling player without any arguements
44+
//Do something on calling player without any arguments
4545
return new string[] { "We did something to player: " + caller.Name + "!" };
4646
}
4747
else

AdminToolbox/AdminToolbox/Commands/Facility/IntercomLockCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class IntercomLockCommand : ICommandHandler
99
private readonly AdminToolbox plugin;
1010

1111
public IntercomLockCommand(AdminToolbox plugin) => this.plugin = plugin;
12-
public string GetCommandDescription() => "Enables/Disables the intercom for non-whitelisted players";
12+
public string GetCommandDescription() => "Enables/Disables the intercom for non- white-listed players";
1313
public string GetUsage() => "(" + string.Join(" / ", CommandAliases) + ") <bool>";
1414

1515
public static readonly string[] CommandAliases = new string[] { "INTERCOMLOCK", "INTERLOCK", "ILOCK", "IL" };

AdminToolbox/AdminToolbox/Commands/Facility/JailCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public string[] OnCall(ICommandSender sender, string[] args)
5454
return new string[] { "\"" + myPlayer.Name + "\" sent to jail for 1 year" };
5555
}
5656
else
57-
return new string[] { "Failed to jail/unjail " + myPlayer.Name + "!", "Error: Player not in dictionary" };
57+
return new string[] { "Failed to jail/un-jail " + myPlayer.Name + "!", "Error: Player not in dictionary" };
5858
}
5959
else
6060
return new string[] { GetUsage() };

AdminToolbox/AdminToolbox/Commands/Facility/WarpsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace AdminToolbox.Command
66
using API.Extentions;
77
public class WarpsCommmand : ICommandHandler
88
{
9-
public string GetCommandDescription() => "Returns a list of warps. Use arguement \"Refresh\" to reload warps from file";
9+
public string GetCommandDescription() => "Returns a list of warps. Use argument \"Refresh\" to reload warps from file";
1010
public string GetUsage() => "(" + string.Join(" / ", CommandAliases) + ") <REFRESH / R>";
1111

1212
public static readonly string[] CommandAliases = new string[] { "WARPS", "ATWARPS", "WARPLIST" };

AdminToolbox/AdminToolbox/Commands/Player/EmptyCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private string[] DropItems(Player player, Smod2.API.ItemType itemFilter = Smod2.
5858
Smod2.API.ItemType ammoFlag = Smod2.API.ItemType.AMMO_12_GAUGE | Smod2.API.ItemType.AMMO_44_CAL | Smod2.API.ItemType.AMMO_556_X45 | Smod2.API.ItemType.AMMO_762_X39 | Smod2.API.ItemType.AMMO_9_X19;
5959

6060
if (player == null)
61-
return new string[] { "Player not spesified!" };
61+
return new string[] { "Player not specified!" };
6262
if (player.PlayerRole.RoleID == Smod2.API.RoleType.NONE)
6363
return new string[] { "Player not properly initialized!" };
6464
if (player.PlayerRole.RoleID == Smod2.API.RoleType.SPECTATOR)

AdminToolbox/AdminToolbox/Commands/Player/GodModeCommand.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class GodModeCommand : ICommandHandler
1414

1515
private Server Server => PluginManager.Manager.Server;
1616

17-
public string GetCommandDescription() => "Switch on/off godmode for player";
17+
public string GetCommandDescription() => "Switch on/off god-mode for player";
1818
public string GetUsage() => "(" + string.Join(" / ", CommandAliases) + ") [PLAYER] (BOOL)";
1919

2020
public static readonly string[] CommandAliases = new string[] { "ATGOD", "ATGODMODE", "AT-GOD", "AT-GODMODE" };
@@ -46,9 +46,9 @@ public string[] OnCall(ICommandSender sender, string[] args)
4646
playerNum++;
4747
}
4848
}
49-
outPut += "\nSet " + playerNum + " player's AT-Godmode to " + j;
50-
if (changedState) return new string[] { "\n" + "Set " + playerNum + " player's AT-Godmode to " + j, "\n" + "NoDmg for theese " + playerNum + " players set to: " + j };
51-
return new string[] { "\n" + "Set " + playerNum + " player's AT-Godmode to " + j };
49+
outPut += "\nSet " + playerNum + " player's AT-God-mode to " + j;
50+
if (changedState) return new string[] { "\n" + "Set " + playerNum + " player's AT-God-ode to " + j, "\n" + "NoDmg for " + playerNum + " players set to: " + j };
51+
return new string[] { "\n" + "Set " + playerNum + " player's AT-God-mode to " + j };
5252
}
5353
else
5454
{
@@ -62,12 +62,12 @@ public string[] OnCall(ICommandSender sender, string[] args)
6262
if (AdminToolbox.ATPlayerDict.TryGetValue(pl.UserID, out PlayerSettings psetting))
6363
psetting.godMode = !psetting.godMode;
6464
}
65-
return new string[] { "Toggled all players AT-Godmodes" };
65+
return new string[] { "Toggled all players AT-God-modes" };
6666
}
6767
}
6868
else if (args[0].ToLower() == "list" || args[0].ToLower() == "get")
6969
{
70-
string str = "\n" + "Players with AT-Godmode enabled: " + "\n";
70+
string str = "\n" + "Players with AT-God-mode enabled: " + "\n";
7171
List<string> myPlayerList = new List<string>();
7272
foreach (Player pl in Server.GetPlayers())
7373
{
@@ -85,7 +85,7 @@ public string[] OnCall(ICommandSender sender, string[] args)
8585
str += "\n - " + item;
8686
}
8787
}
88-
else str = "\n" + "No players with \"AT-Godmode\" enabled!";
88+
else str = "\n" + "No players with \"AT-God-mode\" enabled!";
8989
return new string[] { str };
9090
}
9191
Player myPlayer = GetFromString.GetPlayer(args[0]);
@@ -101,15 +101,15 @@ public string[] OnCall(ICommandSender sender, string[] args)
101101
if (changedValue)
102102
{
103103
pls.dmgOff = pls.godMode;
104-
return new string[] { myPlayer.Name + " AT-Godmode: " + pls.godMode, myPlayer.Name + " No Dmg: " + pls.dmgOff };
104+
return new string[] { myPlayer.Name + " AT-God-mode: " + pls.godMode, myPlayer.Name + " No Dmg: " + pls.dmgOff };
105105
}
106106
else
107-
return new string[] { myPlayer.Name + " AT-Godmode: " + pls.godMode };
107+
return new string[] { myPlayer.Name + " AT-God-mode: " + pls.godMode };
108108
}
109109
else
110110
{
111111
pls.godMode = !pls.godMode;
112-
return new string[] { myPlayer.Name + " AT-Godmode: " + pls.godMode };
112+
return new string[] { myPlayer.Name + " AT-God-mode: " + pls.godMode };
113113
}
114114
}
115115
else

0 commit comments

Comments
 (0)