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

Commit

Permalink
3.1.2 (#41)
Browse files Browse the repository at this point in the history
* New Event, Fix RoleDamages

- Added event for intercom cooldown check so players can interrupt the cooldown if whitelisted
- Tried fixing the RoleDamages config (Untested)

* Update README.md

* Sync with desktop PC

* 1.3.2 Test Build

- Changed the intercom system
- More dict cheks
- Removed duplicate commands
- Intercom blacklist

* TempFix

* Update README.md

* Update README.md

* Update README.md

* Update RESOURCES.md

* Update README.md

Fixed bad stuff

* Fixing alot of stuff

- ATColor command + config
- ATDisable command
- InstantKill command
- Removed depricated FullAccess command

- Fixed RoleDamages config, closes #34
- Fixed Teamkilling not showing properly
- Fixed warpVectors not clearing on round restart
- Removed code leading to intercom locking, closing #35
- General code cleaning

* Possible logfile fix

* Brand new logfile stuff + more

- 3 different logfile configs
- Working steamID blacklist for intercom
- Brand new logging system, closes #5
- Rounds Played stat for each player
- Properly fixed `admintoolbox_block_role_damage` config
- Fixed bug related to plugin.Warn

* Test 1.3.2 for 3.1.8

- Temp removing intercom whitelist
- adding `admintoolbox_round_damageMultiplier`
- changing both multipliers to float

* Create version (#37)

* fix version file (#38)

* Create version

* Rename version to version.md

* Delete version

* Typo fix in Query log

* Update README.md

* Update README.md

* Update version.md
  • Loading branch information
Rnen authored Jul 15, 2018
1 parent 77ebafb commit f046069
Show file tree
Hide file tree
Showing 31 changed files with 612 additions and 234 deletions.
35 changes: 20 additions & 15 deletions .github/RESOURCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
|#13 | Nine-Tailed Fox Cadet | HP: 100 |
|#14 | TUTORIAL | HP: 100 |
|#15 | Facility Guard | HP: 100 |
|#16 | SCP-939-53 | HP: 2300 |
|#17 | SCP-939-89 | HP: 2300 |

#
## Item ID's
Expand Down Expand Up @@ -60,8 +62,8 @@
|#22| SFA Ammo (E- 11 Rifle Ammo)
|#23| MP4
|#24| Logicer (Chaos Weapon)
|#25| Postitron Granade
|#26| Smoke Granade
|#25| Frag Granade
|#26| Flash Granade
|#27| Disarmer
|#28| RAT Ammo (MP7, Logicer ammo)
|#29| PAT ammo (Com15, P90 ammo)
Expand All @@ -75,19 +77,22 @@
#2| SCP_049_2 | Zombie attack
#3| NUKE | Nuke explosion
#4| WALL | Crush damage
#5| TESLA | Granade (& previously tesla gate) damage
#6| SCP_173 | Peanut neck snap
#7| SCP_106 | The damage dealt when 106 attacks players
#8| CONTAIN | Decontamination? (Not sure about this one)
#9| SCP_096 | Shy Guy
#10| SCP_049 | Plague Doctor
#11| POCKET | The damage you take each second in the pocket dimension
#12| FALLDOWN | Falldamage
#13| COM15 |
#14| E11_STANDARD_RIFLE |
#15| P90 |
#16| MP7 |
#17| LOGICER | Chaos Weapon
#5| DECONT | Decontamination
#6| TESLA | Tesla gates
#7| FRAG | Boom boom
#8| SCP_939 | Doggo
#9| SCP_173 | Peanut
#10| SCP_106 | Larry / Old man
#11| CONTAIN | What kills Larry when the button is pressed
#12| SCP_096 | Shy Guy
#13| SCP_049 | Plague doctor
#14| POCKET | Per-second damage in the pocket dim
#15| FALLDOWN | Fall damage
#16| COM15 | Pistol
#17| E11_STANDARD_RIFLE | NTF Rifle
#18| P90 |
#19| MP7 |
#20| LOGICER | Chaos weapon

#
## Team ID's
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,5 @@ Assembly-CSharp.dll
sourcecode.zip
Builds/
obj/
AdminToolbox/Checklist.txt
AdminToolbox/Checklist.txt
240 changes: 193 additions & 47 deletions AdminToolbox/AdminToolbox/AdminToolbox.cs

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions AdminToolbox/AdminToolbox/AdminToolbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AdminToolbox</RootNamespace>
<AssemblyName>AdminToolbox</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -33,13 +33,13 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=11.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\SCPSL\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Smod2, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Smod2">
<HintPath>..\..\..\SCPSL\Smod2.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -49,11 +49,13 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Commands\ATDisableCommand.cs" />
<Compile Include="Commands\KeepSettingsCommand.cs" />
<Compile Include="Commands\BreakDoorsCommand.cs" />
<Compile Include="Commands\FullAccessCommand.cs" />
<Compile Include="Commands\InstantKillCommand.cs" />
<Compile Include="Commands\LockdownCommand.cs" />
<Compile Include="Commands\DoorCommand.cs" />
<Compile Include="Commands\ATColorCommand.cs" />
<Compile Include="Commands\RoundLockCommand.cs" />
<Compile Include="Commands\WarpCommand.cs" />
<Compile Include="Commands\PosCommand.cs" />
Expand Down
58 changes: 58 additions & 0 deletions AdminToolbox/AdminToolbox/Commands/ATColorCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using Smod2.Commands;
using Smod2;
using Smod2.API;

namespace AdminToolbox.Command
{
class ATColorCommand : ICommandHandler
{
private AdminToolbox plugin;

public ATColorCommand(AdminToolbox plugin)
{
this.plugin = plugin;
}

public string GetCommandDescription()
{
return "Enables/Disables color for Admintoolbox in the server window";
}

public string GetUsage()
{
return "ATCOLOR (bool)";
}

public string[] OnCall(ICommandSender sender, string[] args)
{
Server server = PluginManager.Manager.Server;
if (args.Length >= 1)
{
if (bool.TryParse(args[0], out bool x))
{
AdminToolbox.isColored = x;
AdminToolbox.isColoredCommand = true;
if (AdminToolbox.isColored)
plugin.Info("@#fg=Yellow;AdminToolbox@#fg=Default; colors is set to @#fg=Green;" + AdminToolbox.isColored + "@#fg=Default;");
else
plugin.Info("AdminToolbox colors set to" + AdminToolbox.isColored);
return new string[] { "AdminToolbox colors set to" + AdminToolbox.isColored };
}
else
return new string[] { "\"ATCOLOR "+ args[0] +"\" is not a valid bool" };
}
else if (args.Length == 0)
{
AdminToolbox.isColored = !AdminToolbox.isColored;
AdminToolbox.isColoredCommand = true;
if (AdminToolbox.isColored)
plugin.Info("@#fg=Yellow;AdminToolbox@#fg=Default; colors is set to @#fg=Green;"+AdminToolbox.isColored+"@#fg=Default;");
else
plugin.Info("AdminToolbox colors set to "+AdminToolbox.isColored);
return new string[] { "AdminToolbox colors set to " + AdminToolbox.isColored };
}
else
return new string[] { GetUsage() };
}
}
}
34 changes: 34 additions & 0 deletions AdminToolbox/AdminToolbox/Commands/ATDisableCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Smod2.Commands;
using Smod2;
using Smod2.API;
using System.IO;

namespace AdminToolbox.Command
{
class ATDisableCommand : ICommandHandler
{
private AdminToolbox plugin;

public ATDisableCommand(AdminToolbox plugin)
{
this.plugin = plugin;
}

public string GetCommandDescription()
{
return "Disables Admintoolbox";
}

public string GetUsage()
{
return "ATDISABLE";
}

public string[] OnCall(ICommandSender sender, string[] args)
{
plugin.Info(sender + " ran the " + GetUsage() + " command!");
this.plugin.pluginManager.DisablePlugin(this.plugin);
return new string[] { "AdminToolbox Disabled" };
}
}
}
5 changes: 2 additions & 3 deletions AdminToolbox/AdminToolbox/Commands/BreakDoorsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public string GetUsage()

public string[] OnCall(ICommandSender sender, string[] args)
{
AdminToolbox.AddMissingPlayerVariables();
Server server = PluginManager.Manager.Server;
if (args.Length > 0)
{
if (args[0].ToLower() == "all" || args[0].ToLower() == "*")
{
if (args.Length > 1)
{
bool j;
if (bool.TryParse(args[1], out j))
if (bool.TryParse(args[1], out bool j))
{
string outPut = null;
int playerNum = 0;
Expand All @@ -43,7 +43,6 @@ public string[] OnCall(ICommandSender sender, string[] args)
playerNum++;
}
outPut += "\nSet " + playerNum + " player's BreakDoors to " + j;
//plugin.Info("Set " + playerNum + " player's Godmode to " + j);
return new string[] { "\nSet " + playerNum + " player's BreakDoors to " + j };
}
else
Expand Down
1 change: 1 addition & 0 deletions AdminToolbox/AdminToolbox/Commands/DoorCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public string GetUsage()

public string[] OnCall(ICommandSender sender, string[] args)
{
AdminToolbox.AddMissingPlayerVariables();
Server server = PluginManager.Manager.Server;
if (args.Length > 0)
{
Expand Down
4 changes: 2 additions & 2 deletions AdminToolbox/AdminToolbox/Commands/GodModeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ public string GetUsage()

public string[] OnCall(ICommandSender sender, string[] args)
{
AdminToolbox.AddMissingPlayerVariables();
Server server = PluginManager.Manager.Server;
if (args.Length > 0)
{
if (args[0].ToLower() == "all" || args[0].ToLower() == "*")
{
if (args.Length > 1)
{
bool j;
if (bool.TryParse(args[1], out j))
if (bool.TryParse(args[1], out bool j))
{
string outPut = null;
bool changedState = false;
Expand Down
14 changes: 3 additions & 11 deletions AdminToolbox/AdminToolbox/Commands/HealCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public string GetUsage()

public string[] OnCall(ICommandSender sender, string[] args)
{
AdminToolbox.AddMissingPlayerVariables();
Server server = PluginManager.Manager.Server;
if (args.Length > 0)
{
if(args[0].ToLower() == "all"||args[0].ToLower() == "*")
{
if (args.Length > 1)
{
int j;
if (Int32.TryParse(args[1], out j))
if (Int32.TryParse(args[1], out int j))
{
int playerNum = 0;
foreach (Player pl in server.GetPlayers())
Expand All @@ -44,14 +44,11 @@ public string[] OnCall(ICommandSender sender, string[] args)
}
if (playerNum > 1)
return new string[] { "Added " + j + " HP to " + playerNum + " player(s)" };
//plugin.Info("Added " + j + " HP to " + playerNum + " player(s)");
else
return new string[] { "Added " + j + " HP to " + playerNum + " player" };
//plugin.Info("Added " + j + " HP to " + playerNum + " player");
}
else
{
//plugin.Info("Not a valid number!");
return new string[] { "Not a valid number!" };
}
}
Expand All @@ -66,28 +63,23 @@ public string[] OnCall(ICommandSender sender, string[] args)
if (myPlayer == null) { /*plugin.Info("Couldn't find player: " + args[0]);*/ return new string[] { "Couldn't find player: " + args[0] }; }
if (args.Length > 1)
{
int j;
if (Int32.TryParse(args[1], out j))
if (Int32.TryParse(args[1], out int j))
{
//plugin.Info("Added " + j + " HP " + " to " + myPlayer.Name);
myPlayer.AddHealth(j);
return new string[] { "Added " + j + " HP " + " to " + myPlayer.Name };
}
else
return new string[] { "Not a valid number!" };
//plugin.Info("Not a valid number!");
}
else
{
//plugin.Info("Set " + myPlayer.Name + " to full HP");
myPlayer.SetHealth(myPlayer.TeamRole.MaxHP);
return new string[] { "Set " + myPlayer.Name + " to full HP" };
}
}
else
{
return new string[] { GetUsage() };
//plugin.Info(GetUsage());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@

namespace AdminToolbox.Command
{
class FullAccessCommand : ICommandHandler
class InstantKillCommand : ICommandHandler
{
private AdminToolbox plugin;

public FullAccessCommand(AdminToolbox plugin)
public InstantKillCommand(AdminToolbox plugin)
{
this.plugin = plugin;
}

public string GetCommandDescription()
{
return "Lets specified players open all doors";
return "Lets specified players instantly kill targets";
}

public string GetUsage()
{
return "FULLACCESS [PLAYER] [BOOLEAN]";
return "INSTANTKILL [PLAYER] [BOOLEAN]";
}

public string[] OnCall(ICommandSender sender, string[] args)
{
AdminToolbox.AddMissingPlayerVariables();
Server server = PluginManager.Manager.Server;
if (args.Length > 0)
{
Expand All @@ -42,7 +43,7 @@ public string[] OnCall(ICommandSender sender, string[] args)
AdminToolbox.playerdict[pl.SteamId][6] = j;
playerNum++;
}
outPut += "\nSet " + playerNum + " player's FullAccess to " + j;
outPut += "\nSet " + playerNum + " player's InstantKill to " + j;
return new string[] { outPut };
}
else
Expand All @@ -54,12 +55,12 @@ public string[] OnCall(ICommandSender sender, string[] args)
else
{
foreach (Player pl in server.GetPlayers()) { AdminToolbox.playerdict[pl.SteamId][6] = !AdminToolbox.playerdict[pl.SteamId][6]; }
return new string[] { "Toggled all players FullAccess" };
return new string[] { "Toggled all players InstantKill" };
}
}
else if (args[0].ToLower() == "list" || args[0].ToLower() == "get")
{
string str = "\nPlayers with FullAccess enabled: \n";
string str = "\nPlayers with InstantKill enabled: \n";
List<string> myPlayerList = new List<string>();
foreach (Player pl in server.GetPlayers())
{
Expand All @@ -77,7 +78,7 @@ public string[] OnCall(ICommandSender sender, string[] args)
str += "\n - " + item;
}
}
else str = "\nNo players with \"FullAccess\" enabled!";
else str = "\nNo players with \"InstantKill\" enabled!";
return new string[] { str };
}
Player myPlayer = GetPlayerFromString.GetPlayer(args[0], out myPlayer);
Expand All @@ -88,12 +89,12 @@ public string[] OnCall(ICommandSender sender, string[] args)
else if (args[1].ToLower() == "on") { AdminToolbox.playerdict[myPlayer.SteamId][6] = true; }
else if (args[1].ToLower() == "off") { AdminToolbox.playerdict[myPlayer.SteamId][6] = false; }
else return new string[] { GetUsage() };
return new string[] { myPlayer.Name + " FullAccess: " + AdminToolbox.playerdict[myPlayer.SteamId][6] };
return new string[] { myPlayer.Name + " InstantKill: " + AdminToolbox.playerdict[myPlayer.SteamId][6] };
}
else
{
AdminToolbox.playerdict[myPlayer.SteamId][6] = !AdminToolbox.playerdict[myPlayer.SteamId][6];
return new string[] { myPlayer.Name + " FullAccess: " + AdminToolbox.playerdict[myPlayer.SteamId][6] };
return new string[] { myPlayer.Name + " InstantKill: " + AdminToolbox.playerdict[myPlayer.SteamId][6] };
}

}
Expand Down
Loading

0 comments on commit f046069

Please sign in to comment.