Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,16 @@ public class Config : IConfig
[Description("Whether or not the effect will apply to the specified SCPs when you forceclass them:")]
public bool EffectOnForceclass { get; set; } = true;
*/

[Description("SCP 173s Movement Boost percentage (up to 255). Leave 0 for no boost:")]
public byte SCP173Boost { get; set; } = 0;

[Description("SCP 096s Movement Boost percentage (up to 255). Leave 0 for no boost:")]
public byte SCP096Boost { get; set; } = 0;

[Description("SCP 106s Movement Boost percentage (up to 255). Leave 0 for no boost:")]
public byte SCP106Boost { get; set; } = 0;

[Description("SCP 939s Movement Boost percentage (up to 255). Leave 0 for no boost:")]
public byte SCP939Boost { get; set; } = 0;

[Description("SCP 049s Movement Boost percentage (up to 255). Leave 0 for no boost:")]
public byte SCP049Boost { get; set; } = 0;

[Description("SCP 049-2s Movement Boost percentage (up to 255). Leave 0 for no boost:")]
public byte SCP0492Boost { get; set; } = 0;


[Description("The speed boost for SCPs (up to 255). Leave 0 for no boost:")]
public Dictionary<RoleTypeId, byte> SpeedBoost { get; set; } = new Dictionary<RoleTypeId, byte>
{
[RoleTypeId.Scp173] = 0,
[RoleTypeId.Scp096] = 0,
[RoleTypeId.Scp106] = 0,
[RoleTypeId.Scp939] = 0,
[RoleTypeId.Scp049] = 0,
[RoleTypeId.Scp0492] = 0
};
}
}
29 changes: 4 additions & 25 deletions EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using PlayerRoles;
using MEC;
using Exiled.Events.Handlers;
using Player = Exiled.Events.Handlers.Player;

namespace SCPSpeedBoost
{
Expand All @@ -20,31 +21,9 @@ public static class EventHandlers
{
public static void ChangingRole(ChangingRoleEventArgs ev)
{
switch (ev.NewRole)
{
case RoleTypeId.Scp173:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP173Boost));
break;
case RoleTypeId.Scp096:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP096Boost));
break;
case RoleTypeId.Scp106:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP106Boost));
break;
case RoleTypeId.Scp939:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP939Boost));
break;
case RoleTypeId.Scp049:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP049Boost));
break;
case RoleTypeId.Scp0492:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP0492Boost));
break;
case RoleTypeId.Spectator:
ev.Player.DisableEffect(EffectType.MovementBoost);
break;

}
if (!Plugin.plugin.Config.SpeedBoost.TryGetValue(ev.NewRole, out byte speedBoost)) return;
if (speedBoost <= 0) return;
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, speedBoost));
}
}
}
58 changes: 32 additions & 26 deletions SCPSpeedBoost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,44 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\dependencies\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp.dll</HintPath>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
<HintPath>$(EXILED_REFERENCES)\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\EXILED.6.0.0-beta.26\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.26\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.26\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.26\lib\net48\Exiled.CustomItems.dll</HintPath>
</Reference>
<Reference Include="Exiled.API">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\dependencies\Exiled.API.dll</HintPath>
<Reference Include="Exiled.CustomRoles, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\Exiled.CustomRoles.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\Exiled.CreditTags.dll</HintPath>
<Reference Include="Exiled.Events, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomItems">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\Exiled.CustomItems.dll</HintPath>
<Reference Include="Exiled.Loader, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomRoles">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\Exiled.CustomRoles.dll</HintPath>
<Reference Include="Exiled.Permissions, Version=6.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\Exiled.Events.dll</HintPath>
<Reference Include="Exiled.Updater, Version=3.1.1.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\Exiled.Updater.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader">
<HintPath>..\..\..\..\Documents\SCP Secret Laboratory\PluginAPI\plugins\global\Exiled.Loader.dll</HintPath>
<Reference Include="NorthwoodLib, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\Exiled.Permissions.dll</HintPath>
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=Amd64">
<HintPath>packages\EXILED.6.0.0-beta.26\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -69,12 +78,6 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="YamlDotNet">
<HintPath>..\..\..\..\Documents\EXILED\Plugins\dependencies\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Methods.cs" />
Expand All @@ -83,5 +86,8 @@
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
4 changes: 4 additions & 0 deletions packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EXILED" version="6.0.0-beta.26" targetFramework="net48" />
</packages>