did a few things
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using LabApi.Events.Arguments.PlayerEvents;
|
||||
using CustomPlayerEffects;
|
||||
using LabApi.Events.Arguments.PlayerEvents;
|
||||
using LabApi.Events.Handlers;
|
||||
using LabApi.Features;
|
||||
using LabApi.Features.Console;
|
||||
@@ -6,6 +7,8 @@ using LabApi.Features.Wrappers;
|
||||
using LabApi.Loader.Features.Plugins;
|
||||
using Mirror;
|
||||
using PlayerRoles;
|
||||
using PlayerRoles.PlayableScps.Scp3114;
|
||||
using PlayerRoles.Ragdolls;
|
||||
|
||||
namespace CuffedFrenemies;
|
||||
|
||||
@@ -30,7 +33,6 @@ public class CuffedFrenemies : Plugin
|
||||
|
||||
private static void OnCuff(PlayerCuffedEventArgs ev)
|
||||
{
|
||||
Logger.Debug($"Team: {ev.Target.Team}");
|
||||
if (ev.Target.Team is Team.ClassD or Team.Scientists)
|
||||
{
|
||||
return;
|
||||
@@ -42,6 +44,28 @@ public class CuffedFrenemies : Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev.Target.RoleBase is Scp3114Role scp3114)
|
||||
{
|
||||
var stolenRole = scp3114.CurIdentity.StolenRole;
|
||||
var ragdoll = scp3114.CurIdentity.Ragdoll.Info;
|
||||
switch (stolenRole)
|
||||
{
|
||||
case RoleTypeId.ChaosConscript or RoleTypeId.ChaosMarauder or RoleTypeId.ChaosRepressor
|
||||
or RoleTypeId.ChaosRifleman:
|
||||
scp3114.CurIdentity.Ragdoll.Info = new RagdollData(ragdoll.OwnerHub, ragdoll.Handler, RoleTypeId.NtfPrivate, ragdoll.StartPosition, ragdoll.StartRotation, ragdoll.Nickname, ragdoll.CreationTime);
|
||||
return;
|
||||
case RoleTypeId.NtfPrivate or RoleTypeId.NtfCaptain or RoleTypeId.NtfSergeant
|
||||
or RoleTypeId.NtfSpecialist:
|
||||
scp3114.CurIdentity.Ragdoll.Info = new RagdollData(ragdoll.OwnerHub, ragdoll.Handler, RoleTypeId.ChaosConscript, ragdoll.StartPosition, ragdoll.StartRotation, ragdoll.Nickname, ragdoll.CreationTime);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ev.Target.Team is Team.SCPs or Team.Dead)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var newRole = ev.Target.Team == Team.ChaosInsurgency ? RoleTypeId.NtfPrivate : RoleTypeId.ChaosConscript;
|
||||
Logger.Debug($"Setting role to {newRole}");
|
||||
var newItems = new List<Item>();
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
<Reference Include="Mirror">
|
||||
<HintPath>..\..\.local\share\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Mirror.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Pooling">
|
||||
<HintPath>..\..\.local\share\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Pooling.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\..\.local\share\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
Reference in New Issue
Block a user