Compare commits
4 Commits
ac35d6fb69
...
d419b2e3d7
Author | SHA1 | Date | |
---|---|---|---|
|
d419b2e3d7 | ||
9bf05f87aa | |||
fb5baf321c | |||
|
8b44d63602 |
@ -14,10 +14,10 @@ namespace CuffedFrenemies;
|
|||||||
|
|
||||||
public class CuffedFrenemies : Plugin
|
public class CuffedFrenemies : Plugin
|
||||||
{
|
{
|
||||||
public override string Name => "GamblingCoin";
|
public override string Name => "CuffedFrenemies";
|
||||||
public override string Author => "Code002Lover";
|
public override string Author => "Code002Lover";
|
||||||
public override Version Version { get; } = new(1, 0, 0);
|
public override Version Version { get; } = new(1, 0, 0);
|
||||||
public override string Description => "Gamble your life away";
|
public override string Description => "Cuff your enemies";
|
||||||
public override Version RequiredApiVersion { get; } = new (LabApiProperties.CompiledVersion);
|
public override Version RequiredApiVersion { get; } = new (LabApiProperties.CompiledVersion);
|
||||||
|
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
@ -44,23 +44,6 @@ public class CuffedFrenemies : Plugin
|
|||||||
return;
|
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)
|
if (ev.Target.Team is Team.SCPs or Team.Dead)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -5,7 +5,7 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
public class GamblingCoinChancesConfig
|
public class GamblingCoinChancesConfig
|
||||||
{
|
{
|
||||||
public int NukeChance { get; set; } = 20;
|
public int NukeChance { get; set; } = 10;
|
||||||
public int SpawnWaveChance { get; set; } = 150;
|
public int SpawnWaveChance { get; set; } = 150;
|
||||||
public int CommonItemChance { get; set; } = 600;
|
public int CommonItemChance { get; set; } = 600;
|
||||||
public int UncommonItemChance { get; set; } = 400;
|
public int UncommonItemChance { get; set; } = 400;
|
||||||
@ -14,15 +14,16 @@ namespace GamblingCoin
|
|||||||
public int LegendaryItemChance { get; set; } = 30;
|
public int LegendaryItemChance { get; set; } = 30;
|
||||||
public int RandomTeleportChance { get; set; } = 200;
|
public int RandomTeleportChance { get; set; } = 200;
|
||||||
public int StealItemChance { get; set; } = 100;
|
public int StealItemChance { get; set; } = 100;
|
||||||
public int ExplosionChance { get; set; } = 15;
|
public int ExplosionChance { get; set; } = 40;
|
||||||
public int AntiMicroChance { get; set; } = 10;
|
public int AntiMicroChance { get; set; } = 10;
|
||||||
public int GrenadeChance { get; set; } = 50;
|
public int GrenadeChance { get; set; } = 50;
|
||||||
public int PocketDimensionChance { get; set; } = 75;
|
public int PocketDimensionChance { get; set; } = 30;
|
||||||
public int SwitchInventoryChance { get; set; } = 150;
|
public int SwitchInventoryChance { get; set; } = 150;
|
||||||
public int PositiveEffectChance { get; set; } = 300;
|
public int PositiveEffectChance { get; set; } = 300;
|
||||||
public int NegativeEffectChance { get; set; } = 250;
|
public int NegativeEffectChance { get; set; } = 350;
|
||||||
public int AdvancedPositiveEffectChance { get; set; } = 150;
|
public int AdvancedPositiveEffectChance { get; set; } = 150;
|
||||||
public int AdvancedNegativeEffectChance { get; set; } = 250;
|
public int AdvancedNegativeEffectChance { get; set; } = 250;
|
||||||
|
public int RemoveCoinChance { get; set; } = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GamblingCoinMessages
|
public class GamblingCoinMessages
|
||||||
@ -99,7 +100,6 @@ namespace GamblingCoin
|
|||||||
ItemType.KeycardO5,
|
ItemType.KeycardO5,
|
||||||
ItemType.MicroHID,
|
ItemType.MicroHID,
|
||||||
ItemType.Jailbird,
|
ItemType.Jailbird,
|
||||||
ItemType.ParticleDisruptor,
|
|
||||||
ItemType.GunCom45,
|
ItemType.GunCom45,
|
||||||
ItemType.Coin
|
ItemType.Coin
|
||||||
};
|
};
|
||||||
@ -148,17 +148,19 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
public AdvancedEffectSettings AdvancedNegative { get; set; } = new()
|
public AdvancedEffectSettings AdvancedNegative { get; set; } = new()
|
||||||
{
|
{
|
||||||
Effects = new[] { nameof(InsufficientLighting) },
|
Effects = new[] { nameof(InsufficientLighting), nameof(AmnesiaVision) },
|
||||||
Settings = new Dictionary<string, EffectSettings>
|
Settings = new Dictionary<string, EffectSettings>
|
||||||
{
|
{
|
||||||
{ nameof(InsufficientLighting), new EffectSettings(1, 20f, true) }
|
{ nameof(InsufficientLighting), new EffectSettings(1, 20f, true) },
|
||||||
|
{ nameof(AmnesiaVision), new EffectSettings(3, 30f, true) },
|
||||||
|
{ nameof(Bleeding), new EffectSettings(3, 40f, true) },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AdvancedEffectSettings
|
public class AdvancedEffectSettings
|
||||||
{
|
{
|
||||||
public String[] Effects { get; set; }
|
public string[] Effects { get; set; }
|
||||||
public Dictionary<string, EffectSettings> Settings { get; set; }
|
public Dictionary<string, EffectSettings> Settings { get; set; }
|
||||||
|
|
||||||
public AdvancedEffectSettings(){}
|
public AdvancedEffectSettings(){}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using CustomPlayerEffects;
|
||||||
|
using InventorySystem.Items;
|
||||||
using LabApi.Events.Arguments.PlayerEvents;
|
using LabApi.Events.Arguments.PlayerEvents;
|
||||||
using LabApi.Features.Wrappers;
|
using LabApi.Features.Wrappers;
|
||||||
using MapGeneration;
|
using MapGeneration;
|
||||||
@ -7,6 +10,7 @@ using PlayerRoles;
|
|||||||
using Respawning.Waves;
|
using Respawning.Waves;
|
||||||
using Utils;
|
using Utils;
|
||||||
using Logger = LabApi.Features.Console.Logger;
|
using Logger = LabApi.Features.Console.Logger;
|
||||||
|
using MicroHIDItem = InventorySystem.Items.MicroHID.MicroHIDItem;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
namespace GamblingCoin
|
namespace GamblingCoin
|
||||||
@ -60,14 +64,54 @@ namespace GamblingCoin
|
|||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
x.Player.SendBroadcast(configMessages.LegendaryItemSpawnMessage, configGameplay.BroadcastDuration);
|
x.Player.SendBroadcast(configMessages.LegendaryItemSpawnMessage, configGameplay.BroadcastDuration);
|
||||||
SpawnRandomItemAtPlayer(x.Player, configGameplay.Items.LegendaryItems);
|
|
||||||
|
var player = x.Player;
|
||||||
|
var items = configGameplay.Items.LegendaryItems;
|
||||||
|
|
||||||
|
var itemIndex = Random.Range(0, items.Length);
|
||||||
|
var item = items[itemIndex];
|
||||||
|
|
||||||
|
var pickup = Pickup.Create(item, player.Position + new UnityEngine.Vector3(0,1,0));
|
||||||
|
if (pickup == null) return;
|
||||||
|
|
||||||
|
if (item is ItemType.MicroHID)
|
||||||
|
{
|
||||||
|
var host = Player.List.First(player1 => player1.IsHost);
|
||||||
|
var micro = host.AddItem(pickup)!.Base;
|
||||||
|
|
||||||
|
var microItem = (MicroHIDItem)micro;
|
||||||
|
microItem.EnergyManager.ServerSetEnergy(microItem.ItemId.SerialNumber, 100);
|
||||||
|
|
||||||
|
var newPickup = host.DropItem(micro);
|
||||||
|
newPickup.Position = player.Position + new UnityEngine.Vector3(0, 1, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pickup.Spawn();
|
||||||
}, configChances.LegendaryItemChance)
|
}, configChances.LegendaryItemChance)
|
||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
x.Player.SendBroadcast(configMessages.RandomTeleportMessage, configGameplay.BroadcastDuration);
|
x.Player.SendBroadcast(configMessages.RandomTeleportMessage, configGameplay.BroadcastDuration);
|
||||||
|
|
||||||
var randomRoom = Map.GetRandomRoom();
|
var randomRoom = Map.GetRandomRoom();
|
||||||
if (randomRoom == null) return;
|
if(randomRoom == null) return;
|
||||||
|
|
||||||
|
var isInOtherZone = randomRoom is { Zone: FacilityZone.Other };
|
||||||
|
var isDetonated = Warhead.IsDetonated;
|
||||||
|
var isDecontaminating = Decontamination.IsDecontaminating;
|
||||||
|
|
||||||
|
var isInDetonatedZone = isDetonated && randomRoom.Zone is FacilityZone.HeavyContainment
|
||||||
|
or FacilityZone.LightContainment or FacilityZone.Entrance;
|
||||||
|
var isInDecontaminatedZone = isDecontaminating && randomRoom.Zone is FacilityZone.LightContainment;
|
||||||
|
while (isInOtherZone || isInDetonatedZone || isInDecontaminatedZone)
|
||||||
|
{
|
||||||
|
randomRoom = Map.GetRandomRoom();
|
||||||
|
if(randomRoom == null) return;
|
||||||
|
|
||||||
|
isInOtherZone = randomRoom is { Zone: FacilityZone.Other };
|
||||||
|
isInDetonatedZone = isDetonated && randomRoom.Zone is FacilityZone.HeavyContainment
|
||||||
|
or FacilityZone.LightContainment or FacilityZone.Entrance;
|
||||||
|
isInDecontaminatedZone = isDecontaminating && randomRoom.Zone is FacilityZone.LightContainment;
|
||||||
|
}
|
||||||
|
|
||||||
var newPos = randomRoom.Position;
|
var newPos = randomRoom.Position;
|
||||||
|
|
||||||
@ -85,7 +129,7 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
x.Player.ClearInventory();
|
x.Player.ClearInventory();
|
||||||
|
|
||||||
ExplosionUtils.ServerExplode(x.Player.ReferenceHub, ExplosionType.Custom);
|
TimedGrenadeProjectile.SpawnActive(x.Player.Position, ItemType.GrenadeHE, x.Player);
|
||||||
}, configChances.ExplosionChance)
|
}, configChances.ExplosionChance)
|
||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
@ -97,9 +141,7 @@ namespace GamblingCoin
|
|||||||
{
|
{
|
||||||
x.Player.SendBroadcast(configMessages.GrenadeMessage, configGameplay.BroadcastDuration);
|
x.Player.SendBroadcast(configMessages.GrenadeMessage, configGameplay.BroadcastDuration);
|
||||||
|
|
||||||
var grenade = (TimedGrenadeProjectile)Pickup.Create(ItemType.GrenadeHE, x.Player.Position);
|
TimedGrenadeProjectile.SpawnActive(x.Player.Position, ItemType.GrenadeHE, x.Player, 2);
|
||||||
grenade?.Spawn();
|
|
||||||
grenade?.FuseEnd();
|
|
||||||
}, configChances.GrenadeChance)
|
}, configChances.GrenadeChance)
|
||||||
.AddAction(x =>
|
.AddAction(x =>
|
||||||
{
|
{
|
||||||
@ -107,6 +149,8 @@ namespace GamblingCoin
|
|||||||
|
|
||||||
var newPos = Map.Rooms.First(roomIdentifier => roomIdentifier.Zone==FacilityZone.Other).Position;
|
var newPos = Map.Rooms.First(roomIdentifier => roomIdentifier.Zone==FacilityZone.Other).Position;
|
||||||
|
|
||||||
|
x.Player.ReferenceHub.playerEffectsController.ChangeState(nameof(Corroding),1, 999, true);
|
||||||
|
|
||||||
x.Player.Position = newPos + new UnityEngine.Vector3(0, configGameplay.TeleportHeightOffset, 0);
|
x.Player.Position = newPos + new UnityEngine.Vector3(0, configGameplay.TeleportHeightOffset, 0);
|
||||||
},
|
},
|
||||||
configChances.PocketDimensionChance)
|
configChances.PocketDimensionChance)
|
||||||
@ -156,7 +200,11 @@ namespace GamblingCoin
|
|||||||
{
|
{
|
||||||
x.Player.AddItem(randomPlayerItem.Type);
|
x.Player.AddItem(randomPlayerItem.Type);
|
||||||
}
|
}
|
||||||
}, configChances.SwitchInventoryChance);
|
}, configChances.SwitchInventoryChance)
|
||||||
|
.AddAction(x =>
|
||||||
|
{
|
||||||
|
x.Player.CurrentItem?.DropItem().Destroy();
|
||||||
|
}, configChances.RemoveCoinChance);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.2"/>
|
<PackageReference Include="coverlet.collector" Version="6.0.4"/>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0"/>
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0"/>
|
||||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||||
<PackageReference Include="NUnit.Analyzers" Version="4.4.0"/>
|
<PackageReference Include="NUnit.Analyzers" Version="4.4.0"/>
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
using System;
|
using HintServiceMeow.Core.Enum;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Timers;
|
|
||||||
using HintServiceMeow.Core.Enum;
|
|
||||||
using HintServiceMeow.Core.Models.Hints;
|
using HintServiceMeow.Core.Models.Hints;
|
||||||
using HintServiceMeow.Core.Utilities;
|
using HintServiceMeow.Core.Utilities;
|
||||||
using LabApi.Events.Arguments.PlayerEvents;
|
using LabApi.Events.Arguments.PlayerEvents;
|
||||||
@ -12,9 +8,9 @@ using LabApi.Features.Console;
|
|||||||
using LabApi.Features.Wrappers;
|
using LabApi.Features.Wrappers;
|
||||||
using PlayerRoles;
|
using PlayerRoles;
|
||||||
using PlayerRoles.PlayableScps.Scp079;
|
using PlayerRoles.PlayableScps.Scp079;
|
||||||
using PlayerRoles.PlayableScps.Scp079.GUI;
|
|
||||||
using PlayerRoles.PlayableScps.Scp096;
|
using PlayerRoles.PlayableScps.Scp096;
|
||||||
using PlayerRoles.PlayableScps.Scp3114;
|
using PlayerRoles.PlayableScps.Scp3114;
|
||||||
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace SCPTeamHint
|
namespace SCPTeamHint
|
||||||
{
|
{
|
||||||
@ -51,6 +47,7 @@ namespace SCPTeamHint
|
|||||||
|
|
||||||
foreach (var player in Player.List)
|
foreach (var player in Player.List)
|
||||||
{
|
{
|
||||||
|
if (player.IsDummy || player.IsHost) continue;
|
||||||
if (!player.IsSCP) continue;
|
if (!player.IsSCP) continue;
|
||||||
|
|
||||||
var text = $" <size=25><color=red>{player.RoleBase.RoleName}</color> | <color=#6761cd>{player.HumeShield}</color> | <color=#da0101>{player.Health}</color> | <color=grey>{player.Zone}</color></size> ";
|
var text = $" <size=25><color=red>{player.RoleBase.RoleName}</color> | <color=#6761cd>{player.HumeShield}</color> | <color=#da0101>{player.Health}</color> | <color=grey>{player.Zone}</color></size> ";
|
||||||
|
@ -19,28 +19,32 @@
|
|||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="0Harmony">
|
|
||||||
<HintPath>..\dependencies\0Harmony.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Assembly-CSharp">
|
|
||||||
<HintPath>..\dependencies\Assembly-CSharp.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="HintServiceMeow">
|
|
||||||
<HintPath>..\dependencies\HintServiceMeow-LabAPI.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Mirror">
|
|
||||||
<HintPath>..\dependencies\Mirror.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Pooling">
|
|
||||||
<HintPath>..\dependencies\Pooling.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="UnityEngine.CoreModule">
|
|
||||||
<HintPath>..\dependencies\UnityEngine.CoreModule.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Northwood.LabAPI" Version="1.0.2" />
|
<PackageReference Include="Northwood.LabAPI" Version="1.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="0Harmony">
|
||||||
|
<HintPath>..\dependencies\0Harmony.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Assembly-CSharp">
|
||||||
|
<HintPath>..\dependencies\Assembly-CSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HintServiceMeow">
|
||||||
|
<HintPath>..\dependencies\HintServiceMeow-LabAPI.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mirror">
|
||||||
|
<HintPath>..\dependencies\Mirror.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Pooling">
|
||||||
|
<HintPath>..\dependencies\Pooling.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
|
<HintPath>..\dependencies\UnityEngine.CoreModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user