Skip to content

Commit

Permalink
5.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco authored and Francesco committed Jan 17, 2023
1 parent c43e1bc commit 5c19277
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 25 deletions.
14 changes: 7 additions & 7 deletions SCPUtils/Commands/SwapRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
case "SCP939":
case "939":

target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp939);
target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp939);
if (target == null)
{
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
return false;
}
break;
Expand All @@ -80,7 +80,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp049);
if (target == null)
{
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
return false;
}
break;
Expand All @@ -92,7 +92,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp0492);
if (target == null)
{
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
return false;
}
break;
Expand All @@ -104,7 +104,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp106);
if (target == null)
{
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
return false;
}
break;
Expand All @@ -116,7 +116,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp096);
if (target == null)
{
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
return false;
}
break;
Expand All @@ -140,7 +140,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
target = Eplayer.List.FirstOrDefault(x => x.Role.Type == PlayerRoles.RoleTypeId.Scp173);
if (target == null)
{
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
response = $"<color=red>{arguments.Array[1].ToString().ToUpper() } didn't spawned!</color>";
return false;
}
break;
Expand Down
2 changes: 1 addition & 1 deletion SCPUtils/Commands/SwapRequestAccept.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
return false;
}

if(!target.IsScp)
if (!target.IsScp)
{
response = $"<color=red>Target is not an SCP</color>";
return false;
Expand Down
2 changes: 1 addition & 1 deletion SCPUtils/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public class Configs : IConfig
{ DamageTypes.Firearm.ToString().ToUpper(), DamageTypes.Firearm.ToString().ToUpper() }, { DamageTypes.FriendlyFireDetector.ToString().ToUpper(), DamageTypes.FriendlyFireDetector.ToString().ToUpper() }, { DamageTypes.Fsp9.ToString().ToUpper(), DamageTypes.Fsp9.ToString().ToUpper() }, { DamageTypes.Hypothermia.ToString().ToUpper(), DamageTypes.Hypothermia.ToString().ToUpper() }, { DamageTypes.Logicer.ToString().ToUpper(), DamageTypes.Logicer.ToString().ToUpper() },
{ DamageTypes.MicroHid.ToString().ToUpper(), DamageTypes.MicroHid.ToString().ToUpper() }, { DamageTypes.ParticleDisruptor.ToString().ToUpper(), DamageTypes.ParticleDisruptor.ToString().ToUpper() }, { DamageTypes.PocketDimension.ToString().ToUpper(), DamageTypes.PocketDimension.ToString().ToUpper() }, { DamageTypes.Poison.ToString().ToUpper(), DamageTypes.Poison.ToString().ToUpper() }, { DamageTypes.Recontainment.ToString().ToUpper(), DamageTypes.Recontainment.ToString().ToUpper() },
{ DamageTypes.Scp.ToString().ToUpper(), DamageTypes.Scp.ToString().ToUpper() }, { DamageTypes.Scp018.ToString().ToUpper(), DamageTypes.Scp018.ToString().ToUpper() }, { DamageTypes.Scp049.ToString().ToUpper(), DamageTypes.Scp049.ToString().ToUpper() }, { DamageTypes.Scp0492.ToString().ToUpper(), DamageTypes.Scp0492.ToString().ToUpper() }, { DamageTypes.Scp096.ToString().ToUpper(), DamageTypes.Scp096.ToString().ToUpper() }, { DamageTypes.Scp106.ToString().ToUpper(), DamageTypes.Scp106.ToString().ToUpper() },
{ DamageTypes.Scp173.ToString().ToUpper(), DamageTypes.Scp173.ToString().ToUpper() }, { DamageTypes.Scp207.ToString().ToUpper(), DamageTypes.Scp207.ToString().ToUpper() }, { DamageTypes.Scp939.ToString().ToUpper(), DamageTypes.Scp939.ToString().ToUpper() }, { DamageTypes.Scp956.ToString().ToUpper(), DamageTypes.Scp956.ToString().ToUpper() }, { DamageTypes.SeveredHands.ToString().ToUpper(), DamageTypes.SeveredHands.ToString().ToUpper() },
{ DamageTypes.Scp173.ToString().ToUpper(), DamageTypes.Scp173.ToString().ToUpper() }, { DamageTypes.Scp207.ToString().ToUpper(), DamageTypes.Scp207.ToString().ToUpper() }, { DamageTypes.Scp939.ToString().ToUpper(), DamageTypes.Scp939.ToString().ToUpper() }, { DamageTypes.SeveredHands.ToString().ToUpper(), DamageTypes.SeveredHands.ToString().ToUpper() },
{ DamageTypes.Shotgun.ToString().ToUpper(), DamageTypes.Shotgun.ToString().ToUpper() }, { DamageTypes.Tesla.ToString().ToUpper(), DamageTypes.Tesla.ToString().ToUpper() }, { DamageTypes.Unknown.ToString().ToUpper(), DamageTypes.Unknown.ToString().ToUpper() }, { DamageTypes.Warhead.ToString().ToUpper(), DamageTypes.Warhead.ToString().ToUpper() }};

[Description("The command name for the unwarn command")]
Expand Down
11 changes: 8 additions & 3 deletions SCPUtils/Functions/EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,26 @@ internal void OnPlayerDeath(DyingEventArgs ev)

else if (!ev.DamageHandler.IsSuicide)
{
if (pluginInstance.Config.ScpSuicideMessage.Show)

if (ev.Attacker == null)
{
if (ev.Attacker == null)
if (pluginInstance.Config.ScpSuicideMessage.Show)
{
var message = pluginInstance.Config.ScpSuicideMessage.Content;
message = message.Replace("%playername%", ev.Player.Nickname).Replace("%scpname%", ev.Player.Role.Type.ToString()).Replace("%reason%", ev.DamageHandler.Type.ToString());
Map.Broadcast(pluginInstance.Config.ScpSuicideMessage.Duration, message, pluginInstance.Config.ScpSuicideMessage.Type);
}
else
}
else
{
if (pluginInstance.Config.ScpDeathMessage.Show)
{
var message = pluginInstance.Config.ScpDeathMessage.Content;
message = message.Replace("%playername%", ev.Player.Nickname).Replace("%scpname%", ev.Player.Role.Type.ToString()).Replace("%killername%", ev.Attacker.Nickname).Replace("%reason%", ev.DamageHandler.Type.ToString());
Map.Broadcast(pluginInstance.Config.ScpDeathMessage.Duration, message, pluginInstance.Config.ScpDeathMessage.Type);
}
}

}
}
}
Expand Down
2 changes: 1 addition & 1 deletion SCPUtils/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ScpUtils : Features.Plugin<Configs>
{
public override string Author { get; } = "Terminator_97#0507";
public override string Name { get; } = "SCPUtils";
public override Version Version { get; } = new Version(5, 1, 2);
public override Version Version { get; } = new Version(5, 1, 3);
public override Version RequiredExiledVersion { get; } = new Version(6, 0, 0);
public EventHandlers EventHandlers { get; private set; }
public Functions Functions { get; private set; }
Expand Down
22 changes: 11 additions & 11 deletions SCPUtils/SCPUtils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,31 @@
<HintPath>G:\SteamLibrary\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-Publicized.dll</HintPath>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\CommandSystem.Core.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.API.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.CreditTags.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.CustomItems.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomRoles, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.CustomRoles.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.CustomRoles.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.Events.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.Loader.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=6.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.Permissions.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Exiled.Updater, Version=3.1.1.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\Exiled.Updater.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\Exiled.Updater.dll</HintPath>
</Reference>
<Reference Include="LiteDB, Version=5.0.15.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
<HintPath>..\packages\LiteDB.5.0.15\lib\net45\LiteDB.dll</HintPath>
Expand All @@ -83,10 +83,10 @@
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\NorthwoodLib.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.6.0.0-beta.21\lib\net48\PluginAPI.dll</HintPath>
<HintPath>..\packages\EXILED.6.0.0-beta.24\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion SCPUtils/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EXILED" version="6.0.0-beta.21" targetFramework="net48" />
<package id="EXILED" version="6.0.0-beta.24" targetFramework="net48" />
<package id="Lib.Harmony" version="2.2.1" targetFramework="net48" />
<package id="LiteDB" version="5.0.15" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.2" targetFramework="net48" />
Expand Down

0 comments on commit 5c19277

Please sign in to comment.