From b6301102536cf7b99ca83f485dbf4b44e6072cb9 Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Tue, 26 Sep 2023 23:21:05 +0200 Subject: [PATCH 1/7] adding more effects --- BetterCoinflips/Configs/Config.cs | 4 +- BetterCoinflips/Configs/Translations.cs | 74 ++----------------------- BetterCoinflips/EventHandlers.cs | 6 +- BetterCoinflips/Types/CoinEffect.cs | 58 ++++++++++++++++++- 4 files changed, 68 insertions(+), 74 deletions(-) diff --git a/BetterCoinflips/Configs/Config.cs b/BetterCoinflips/Configs/Config.cs index 64b76c2..279db8e 100644 --- a/BetterCoinflips/Configs/Config.cs +++ b/BetterCoinflips/Configs/Config.cs @@ -98,7 +98,8 @@ public class Config : IConfig public int PinkCandyEffectChance { get; set; } = 10; public int BadRevoEffectChance { get; set; } = 5; public int EmptyHidEffectChance { get; set; } = 5; - + public int ForceRespawnEffectChance { get; set; } = 15; + [Description("The chance of these bad effects happening. It's a proportional chance not a % chance.")] public int HpReductionEffectChance { get; set; } = 20; public int TpToClassDCellsEffectChance { get; set; } = 5; @@ -117,5 +118,6 @@ public class Config : IConfig public int InventoryResetEffectChance { get; set; } = 20; public int ClassSwapEffectChance { get; set; } = 10; public int InstantExplosionEffectChance { get; set; } = 10; + public int PlayerSwapEffectChance { get; set; } = 20; } } diff --git a/BetterCoinflips/Configs/Translations.cs b/BetterCoinflips/Configs/Translations.cs index 59adf8b..529b7da 100644 --- a/BetterCoinflips/Configs/Translations.cs +++ b/BetterCoinflips/Configs/Translations.cs @@ -5,111 +5,47 @@ namespace BetterCoinflips.Configs { public class Translations : ITranslation { - [Description("The message broadcast to a player trying to throw a coin during cooldown.")] + [Description("Here you can set the message for each of these good coin effects.")] public string TossOnCooldownMessage { get; set; } = "You can't throw the coin yet."; - - [Description("The message broadcast to a player when they receive a facility manager keycard (the red one) from the coin.")] public string RedCardMessage { get; set; } = "You acquired a Facility Manager keycard!"; - - [Description("The message broadcast to a player when they receive a containment engineer keycard (the useless one) from the coin.")] public string ContainmentEngineerCardMessage { get; set; } = "You acquired a Containment Engineer keycard!"; - - [Description("The message broadcast to a player when they receive a medi-kit from the coin.")] public string MediKitMessage { get; set; } = "You received a Medical Kit!"; - - [Description("The message broadcast to a player when they get teleported to the escape area by the coin.")] public string TpToEscapeMessage { get; set; } = "You can now escape! That's what you wanted right?"; - - [Description("The message broadcast to a player when they get magically healed by the coin.")] public string MagicHealMessage { get; set; } = "You've been magically healed!"; - - [Description("The message broadcast to a player when they get their hp increased by 10% by the coin.")] public string HealthIncreaseMessage { get; set; } = "You received 10% more hp!"; - - [Description("The message broadcast to a player when they receive an SCP-268 from the coin.")] public string NeatHatMessage { get; set; } = "You got a neat hat!"; - - [Description("The message broadcast to a player when they receive a random good effect from the coin.")] public string RandomGoodEffectMessage { get; set; } = "You got a random effect."; - - [Description("The message broadcast to a player when they receive a logicer with 1 ammo from the coin.")] public string OneAmmoLogicerMessage { get; set; } = "You got gun."; - - [Description("The message broadcast to a player when they receive an SCP-2176 from the coin.")] public string LightbulbMessage { get; set; } = "You got a shiny lightbulb!"; - - [Description("The message broadcast to a player when they receive a pink candy from the coin.")] public string PinkCandyMessage { get; set; } = "You got a pretty candy!"; - - [Description("The message broadcast to a player when they receive the worst revolver possible from the coin.")] public string BadRevoMessage { get; set; } = "What is this abomination!?"; - - [Description("The message broadcast to a player when they receive an empty micro hid from the coin.")] public string EmptyHidMessage { get; set; } = "DID YOU JUST GET A MICRO HID!?"; - + public string ForceRespawnMessage { get; set; } = "Were they supposed to respawn this early?"; - [Description("The message broadcast to a player when they get their hp reduced by 30% by the coin.")] + + [Description("Here you can set the message for each of these bad coin effects.")] public string HpReductionMessage { get; set; } = "Your hp got reduced by 30%."; - - [Description("The message broadcast to a player when they get teleported to Class D cells by the coin.")] public string TpToClassDCellsMessage { get; set; } = "You got teleported to Class D cells."; - - [Description("The message broadcast to a player when they receive a random bad effect from the coin.")] public string RandomBadEffectMessage { get; set; } = "You got a random effect."; - - [Description("The message broadcast to a player when the warhead has been stopped by the coin.")] public string WarheadStopMessage { get; set; } = "The warhead has been stopped."; - - [Description("The message broadcast to a player when the warhead has been started by the coin.")] public string WarheadStartMessage { get; set; } = "The warhead has been started."; - - [Description("The message broadcast to a player when the lights have been turned off by the coin.")] public string LightsOutMessage { get; set; } = "Lights out."; - - [Description("The message broadcast to a player when a grenade has been dropped on their head by the coin.")] public string LiveGrenadeMessage { get; set; } = "Watch your head!"; - - [Description("The message broadcast to a player when they receive a troll particle disruptor from the coin.")] public string TrollGunMessage { get; set; } = "YOU GOT A WHAT!?"; - - [Description("The message broadcast to a player when a flash that can't blind them is dropped on their head by the coin.")] public string TrollFlashMessage { get; set; } = "You heard something?"; - - [Description("The message broadcast to a player when they are teleported to a random SCP by the coin.")] public string TpToRandomScpMessage { get; set; } = "You were teleported to an SCP."; - - [Description("The message broadcast to a player when they are dealth 15 damage by the coin.")] public string SmallDamageMessage { get; set; } = "You've lost 15hp."; - - [Description("The message broadcast to a player when they are left on 1 hp by the coin.")] public string HugeDamageMessage { get; set; } = "You've lost a lot of hp"; - - [Description("The message broadcast to a player when they a primed vase is spawned on their head.")] public string PrimedVaseMessage { get; set; } = "Your grandma paid you a visit!"; - - [Description("The message broadcast to a player when an SCP-173 tantrum is spawned beneath their feet.")] public string ShitPantsMessage { get; set; } = "You just shit your pants."; - - [Description("The message broadcast to a player when the coin fakes a cassie of an SCP dying.")] public string FakeScpKillMessage { get; set; } = "Did you just kill an SCP?!"; - - [Description("The message broadcast to a player when the are forceclassed to SCP-049-2 by the coin.")] public string ZombieFcMessage { get; set; } = "Get zombified LOL"; - - [Description("The message broadcast to a player when their items are removed by the coin.")] public string InventoryResetMessage { get; set; } = "You lost your stuff."; - - [Description("The message broadcast to a player when the are forceclassed to the opposite team by the coin.")] public string ClassSwapMessage { get; set; } = "That's what I call an UNO reverse card!"; - - [Description("The message to be added the the chosen effect broadcast if the coin breaks after that throw.")] public string CoinBreaksMessage { get; set; } = "\nAlso your coin was used too much and it broke down."; - - [Description("The message to be broadcast if you try to throw a coin that rolled 0 uses.")] public string CoinNoUsesMessage { get; set; } = "Your coin had no uses to begin with!"; - - [Description("The message broadcast to a player when they are exploded by the coin.")] public string InstantExplosionMessage { get; set; } = "You got smoked."; + public string PlayerSwapMessage { get; set; } = "This could be a very awkward situation."; } } \ No newline at end of file diff --git a/BetterCoinflips/EventHandlers.cs b/BetterCoinflips/EventHandlers.cs index 566d3b4..1920f7f 100644 --- a/BetterCoinflips/EventHandlers.cs +++ b/BetterCoinflips/EventHandlers.cs @@ -34,7 +34,8 @@ public class EventHandlers { 8, Cfg.LightbulbEffectChance }, { 9, Cfg.PinkCandyEffectChance }, { 10, Cfg.BadRevoEffectChance }, - { 11, Cfg.EmptyHidEffectChance } + { 11, Cfg.EmptyHidEffectChance }, + { 12, Cfg.ForceRespawnEffectChance }, }; //Dict of all bad coin effect chances with an index @@ -56,7 +57,8 @@ public class EventHandlers { 13, Cfg.ZombieFcEffectChance }, { 14, Cfg.InventoryResetEffectChance }, { 15, Cfg.ClassSwapEffectChance }, - { 16, Cfg.InstantExplosionEffectChance } + { 16, Cfg.InstantExplosionEffectChance }, + { 17, Cfg.PlayerSwapEffectChance }, }; private readonly Dictionary _cooldownDict = new(); diff --git a/BetterCoinflips/Types/CoinEffect.cs b/BetterCoinflips/Types/CoinEffect.cs index 22316a8..63086ea 100644 --- a/BetterCoinflips/Types/CoinEffect.cs +++ b/BetterCoinflips/Types/CoinEffect.cs @@ -9,6 +9,7 @@ using Exiled.API.Features.Pickups; using InventorySystem.Items.Firearms.Attachments; using PlayerRoles; +using Respawning; using UnityEngine; using Player = Exiled.API.Features.Player; @@ -43,39 +44,46 @@ public CoinFlipEffect(Action execute, string message) public static List GoodEffects = new() { + //1 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(flag1 ? ItemType.KeycardFacilityManager : ItemType.KeycardContainmentEngineer, player.Position, new Quaternion()); }, flag1 ? _tr.RedCardMessage : _tr.ContainmentEngineerCardMessage), + //2 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(ItemType.Medkit, player.Position, new Quaternion()); Pickup.CreateAndSpawn(ItemType.Painkillers, player.Position, new Quaternion()); }, _tr.MediKitMessage), + //3 new CoinFlipEffect(player => { player.Teleport(Door.Get(DoorType.EscapeSecondary)); }, _tr.TpToEscapeMessage), + //4 new CoinFlipEffect(player => { player.Heal(25); }, _tr.MagicHealMessage), + //5 new CoinFlipEffect(player => { player.Health *= 1.1f; }, _tr.HealthIncreaseMessage), + //6 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(ItemType.SCP268, player.Position, new Quaternion()); }, _tr.NeatHatMessage), + //7 new CoinFlipEffect(player => { var effect = _cfg.GoodEffects.ToList().RandomItem(); @@ -83,6 +91,7 @@ public CoinFlipEffect(Action execute, string message) Log.Debug($"Chosen random effect: {effect}"); }, _tr.RandomGoodEffectMessage), + //8 new CoinFlipEffect(player => { Firearm gun = (Firearm)Item.Create(ItemType.GunLogicer); @@ -90,11 +99,13 @@ public CoinFlipEffect(Action execute, string message) gun.CreatePickup(player.Position); }, _tr.OneAmmoLogicerMessage), + //9 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(ItemType.SCP2176, player.Position, new Quaternion()); }, _tr.LightbulbMessage), + //10 new CoinFlipEffect(player => { Scp330 candy = (Scp330)Item.Create(ItemType.SCP330); @@ -102,6 +113,7 @@ public CoinFlipEffect(Action execute, string message) candy.CreatePickup(player.Position); }, _tr.PinkCandyMessage), + //11 new CoinFlipEffect(player => { Firearm revo = (Firearm)Item.Create(ItemType.GunRevolver); @@ -110,17 +122,28 @@ public CoinFlipEffect(Action execute, string message) revo.CreatePickup(player.Position); }, _tr.BadRevoMessage), + //12 new CoinFlipEffect(player => { MicroHIDPickup item = (MicroHIDPickup)Pickup.Create(ItemType.MicroHID); item.Position = player.Position; item.Spawn(); item.Energy = 0; - }, _tr.EmptyHidMessage) + }, _tr.EmptyHidMessage), + + //13 + new CoinFlipEffect(player => + { + if (Respawn.NextKnownTeam == SpawnableTeamType.NineTailedFox) + Respawn.ForceWave(SpawnableTeamType.NineTailedFox, true); + else + Respawn.ForceWave(SpawnableTeamType.ChaosInsurgency, true); + }, _tr.ForceRespawnMessage), }; public static List BadEffects = new() { + //1 new CoinFlipEffect(player => { if ((int)player.Health == 1) @@ -129,12 +152,14 @@ public CoinFlipEffect(Action execute, string message) player.Health *= 0.7f; }, _tr.HpReductionMessage), + //2 new CoinFlipEffect(player => { player.Teleport(Door.Get(DoorType.PrisonDoor)); }, _tr.TpToClassDCellsMessage), + //3 new CoinFlipEffect(player => { var effect = _cfg.BadEffects.ToList().RandomItem(); @@ -145,6 +170,7 @@ public CoinFlipEffect(Action execute, string message) Log.Debug($"Chosen random effect: {effect}"); }, _tr.RandomBadEffectMessage), + //4 new CoinFlipEffect(player => { if (Warhead.IsDetonated || !Warhead.IsInProgress) @@ -153,11 +179,13 @@ public CoinFlipEffect(Action execute, string message) Warhead.Stop(); }, Warhead.IsDetonated || !Warhead.IsInProgress ? _tr.WarheadStartMessage : _tr.WarheadStopMessage), + //5 new CoinFlipEffect(player => { Map.TurnOffAllLights(_cfg.MapBlackoutTime); }, _tr.LightsOutMessage), + //6 new CoinFlipEffect(player => { ExplosiveGrenade grenade = (ExplosiveGrenade)Item.Create(ItemType.GrenadeHE); @@ -165,6 +193,7 @@ public CoinFlipEffect(Action execute, string message) grenade.SpawnActive(player.Position + Vector3.up, player); }, _tr.LiveGrenadeMessage), + //7 new CoinFlipEffect(player => { Firearm gun = (Firearm)Item.Create(ItemType.ParticleDisruptor); @@ -172,6 +201,7 @@ public CoinFlipEffect(Action execute, string message) gun.CreatePickup(player.Position); }, _tr.TrollGunMessage), + //8 new CoinFlipEffect(player => { FlashGrenade flash = (FlashGrenade)Item.Create(ItemType.GrenadeFlash); @@ -179,6 +209,7 @@ public CoinFlipEffect(Action execute, string message) flash.SpawnActive(player.Position); }, _tr.TrollFlashMessage), + //9 new CoinFlipEffect(player => { if (Player.Get(Side.Scp).Any()) @@ -194,6 +225,7 @@ public CoinFlipEffect(Action execute, string message) } }, Player.Get(Side.Scp).Any() ? _tr.TpToRandomScpMessage : _tr.SmallDamageMessage), + //10 new CoinFlipEffect(player => { if ((int)player.Health == 1) @@ -202,6 +234,7 @@ public CoinFlipEffect(Action execute, string message) player.Health = 1; }, _tr.HugeDamageMessage), + //11 new CoinFlipEffect(player => { Scp244 vase = (Scp244)Item.Create(ItemType.SCP244a); @@ -209,17 +242,20 @@ public CoinFlipEffect(Action execute, string message) vase.CreatePickup(player.Position); }, _tr.PrimedVaseMessage), + //12 new CoinFlipEffect(player => { player.PlaceTantrum(); }, _tr.ShitPantsMessage), + //13 new CoinFlipEffect(player => { var scpName = _scpNames.ToList().RandomItem(); Cassie.MessageTranslated($"scp {scpName.Key} successfully terminated by automatic security system",$"{scpName.Value} successfully terminated by Automatic Security System."); }, _tr.FakeScpKillMessage), + //14 new CoinFlipEffect(player => { player.DropHeldItem(); @@ -228,12 +264,14 @@ public CoinFlipEffect(Action execute, string message) player.EnableEffect(EffectType.PocketCorroding); }, _tr.ZombieFcMessage), + //15 new CoinFlipEffect(player => { player.DropHeldItem(); player.ResetInventory(new ItemType[] {}); }, _tr.InventoryResetMessage), + //16 new CoinFlipEffect(player => { player.DropItems(); @@ -277,12 +315,28 @@ public CoinFlipEffect(Action execute, string message) } }, _tr.ClassSwapMessage), + //17 new CoinFlipEffect(player => { ExplosiveGrenade instaBoom = (ExplosiveGrenade)Item.Create(ItemType.GrenadeHE); instaBoom.FuseTime = 0.1f; instaBoom.SpawnActive(player.Position, player); - }, _tr.InstantExplosionMessage) + }, _tr.InstantExplosionMessage), + + //18 + new CoinFlipEffect(player => + { + var playerList = Player.List.ToList(); + playerList.Remove(player); + var targetPlayer = playerList.RandomItem(); + playerList.Remove(targetPlayer); + }, _tr.PlayerSwapMessage), + + //19 + new CoinFlipEffect(player => + { + + } ) }; } } \ No newline at end of file From dbb34d0aa205835967f5518537edd21dd95c1d49 Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:17:16 +0200 Subject: [PATCH 2/7] added some more effects --- BetterCoinflips/BetterCoinflips.csproj | 3 +++ BetterCoinflips/Configs/Config.cs | 8 ++++++-- BetterCoinflips/Configs/Translations.cs | 1 + BetterCoinflips/Types/CoinEffect.cs | 11 ++++++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/BetterCoinflips/BetterCoinflips.csproj b/BetterCoinflips/BetterCoinflips.csproj index 6f39767..6c1cf02 100644 --- a/BetterCoinflips/BetterCoinflips.csproj +++ b/BetterCoinflips/BetterCoinflips.csproj @@ -34,6 +34,9 @@ true + + ..\..\..\..\steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Assembly-CSharp-firstpass.dll + ..\..\..\..\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Mirror.dll diff --git a/BetterCoinflips/Configs/Config.cs b/BetterCoinflips/Configs/Config.cs index 279db8e..0c12939 100644 --- a/BetterCoinflips/Configs/Config.cs +++ b/BetterCoinflips/Configs/Config.cs @@ -82,9 +82,12 @@ public class Config : IConfig EffectType.Vitality }; - [Description("The % chance of receiving a Facility Manager keycard instead of a Containment Engineer keycard when that effect is chosen. Default: 15")] + [Description("The % chance of receiving a Facility Manager keycard instead of a Containment Engineer one.")] public int RedCardChance { get; set; } = 15; + [Description("The kick reason.")] + public string KickReason { get; set; } = "The coin kicked your ass."; + [Description("The chance of these good effects happening. It's a proportional chance not a % chance.")] public int KeycardEffectChance { get; set; } = 20; public int MedicalKitEffectChance { get; set; } = 35; @@ -99,7 +102,7 @@ public class Config : IConfig public int BadRevoEffectChance { get; set; } = 5; public int EmptyHidEffectChance { get; set; } = 5; public int ForceRespawnEffectChance { get; set; } = 15; - + [Description("The chance of these bad effects happening. It's a proportional chance not a % chance.")] public int HpReductionEffectChance { get; set; } = 20; public int TpToClassDCellsEffectChance { get; set; } = 5; @@ -119,5 +122,6 @@ public class Config : IConfig public int ClassSwapEffectChance { get; set; } = 10; public int InstantExplosionEffectChance { get; set; } = 10; public int PlayerSwapEffectChance { get; set; } = 20; + public int KickEffectChance { get; set; } = 5; } } diff --git a/BetterCoinflips/Configs/Translations.cs b/BetterCoinflips/Configs/Translations.cs index 529b7da..c693fa9 100644 --- a/BetterCoinflips/Configs/Translations.cs +++ b/BetterCoinflips/Configs/Translations.cs @@ -47,5 +47,6 @@ public class Translations : ITranslation public string CoinNoUsesMessage { get; set; } = "Your coin had no uses to begin with!"; public string InstantExplosionMessage { get; set; } = "You got smoked."; public string PlayerSwapMessage { get; set; } = "This could be a very awkward situation."; + public string KickMessage { get; set; } = "Bye!"; } } \ No newline at end of file diff --git a/BetterCoinflips/Types/CoinEffect.cs b/BetterCoinflips/Types/CoinEffect.cs index 63086ea..3acc3c5 100644 --- a/BetterCoinflips/Types/CoinEffect.cs +++ b/BetterCoinflips/Types/CoinEffect.cs @@ -8,6 +8,7 @@ using Exiled.API.Features.Items; using Exiled.API.Features.Pickups; using InventorySystem.Items.Firearms.Attachments; +using MEC; using PlayerRoles; using Respawning; using UnityEngine; @@ -329,14 +330,18 @@ public CoinFlipEffect(Action execute, string message) var playerList = Player.List.ToList(); playerList.Remove(player); var targetPlayer = playerList.RandomItem(); - playerList.Remove(targetPlayer); + var pos = targetPlayer.Position; + targetPlayer.Teleport(player.Position); + player.Teleport(pos); }, _tr.PlayerSwapMessage), //19 new CoinFlipEffect(player => { - - } ) + Timing.CallDelayed(1f, () => player.Kick(_cfg.KickReason)); + }, _tr.KickMessage), + + }; } } \ No newline at end of file From c99c24b07862710704495d9a4551c30ca4322560 Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:29:07 +0200 Subject: [PATCH 3/7] added even more effects --- BetterCoinflips/Configs/Config.cs | 16 +++++++++++++- BetterCoinflips/Configs/Translations.cs | 4 +++- BetterCoinflips/EventHandlers.cs | 5 ++++- BetterCoinflips/Types/CoinEffect.cs | 29 +++++++++++++++++++++---- 4 files changed, 47 insertions(+), 7 deletions(-) diff --git a/BetterCoinflips/Configs/Config.cs b/BetterCoinflips/Configs/Config.cs index 0c12939..ab8880e 100644 --- a/BetterCoinflips/Configs/Config.cs +++ b/BetterCoinflips/Configs/Config.cs @@ -2,6 +2,7 @@ using System.ComponentModel; using Exiled.API.Enums; using Exiled.API.Interfaces; +using PlayerRoles; namespace BetterCoinflips.Configs { @@ -88,6 +89,17 @@ public class Config : IConfig [Description("The kick reason.")] public string KickReason { get; set; } = "The coin kicked your ass."; + [Description("The list of SCP's that you can turn into by using the coin.")] + public List ValidScps = new() + { + RoleTypeId.Scp049, + RoleTypeId.Scp096, + RoleTypeId.Scp106, + RoleTypeId.Scp173, + RoleTypeId.Scp0492, + RoleTypeId.Scp939, + }; + [Description("The chance of these good effects happening. It's a proportional chance not a % chance.")] public int KeycardEffectChance { get; set; } = 20; public int MedicalKitEffectChance { get; set; } = 35; @@ -117,11 +129,13 @@ public class Config : IConfig public int PrimedVaseEffectChance { get; set; } = 20; public int ShitPantsEffectChance { get; set; } = 40; public int FakeCassieEffectChance { get; set; } = 50; - public int ZombieFcEffectChance { get; set; } = 30; + public int TurnIntoScpEffectChance { get; set; } = 30; public int InventoryResetEffectChance { get; set; } = 20; public int ClassSwapEffectChance { get; set; } = 10; public int InstantExplosionEffectChance { get; set; } = 10; public int PlayerSwapEffectChance { get; set; } = 20; public int KickEffectChance { get; set; } = 5; + public int SpectSwapEffectChance { get; set; } = 10; + public int TeslaTpEffectChance { get; set; } = 15; } } diff --git a/BetterCoinflips/Configs/Translations.cs b/BetterCoinflips/Configs/Translations.cs index c693fa9..b50fd31 100644 --- a/BetterCoinflips/Configs/Translations.cs +++ b/BetterCoinflips/Configs/Translations.cs @@ -40,7 +40,7 @@ public class Translations : ITranslation public string PrimedVaseMessage { get; set; } = "Your grandma paid you a visit!"; public string ShitPantsMessage { get; set; } = "You just shit your pants."; public string FakeScpKillMessage { get; set; } = "Did you just kill an SCP?!"; - public string ZombieFcMessage { get; set; } = "Get zombified LOL"; + public string TurnIntoScpMessage { get; set; } = "Get SCP-fied LOL!"; public string InventoryResetMessage { get; set; } = "You lost your stuff."; public string ClassSwapMessage { get; set; } = "That's what I call an UNO reverse card!"; public string CoinBreaksMessage { get; set; } = "\nAlso your coin was used too much and it broke down."; @@ -48,5 +48,7 @@ public class Translations : ITranslation public string InstantExplosionMessage { get; set; } = "You got smoked."; public string PlayerSwapMessage { get; set; } = "This could be a very awkward situation."; public string KickMessage { get; set; } = "Bye!"; + public string SpectSwapMessage { get; set; } = "You just made someone's round better!"; + public string TeslaTpMessage { get; set; } = "So you're a fan of electricity?"; } } \ No newline at end of file diff --git a/BetterCoinflips/EventHandlers.cs b/BetterCoinflips/EventHandlers.cs index 1920f7f..19ac338 100644 --- a/BetterCoinflips/EventHandlers.cs +++ b/BetterCoinflips/EventHandlers.cs @@ -54,11 +54,14 @@ public class EventHandlers { 10, Cfg.PrimedVaseEffectChance }, { 11, Cfg.ShitPantsEffectChance }, { 12, Cfg.FakeCassieEffectChance }, - { 13, Cfg.ZombieFcEffectChance }, + { 13, Cfg.TurnIntoScpEffectChance }, { 14, Cfg.InventoryResetEffectChance }, { 15, Cfg.ClassSwapEffectChance }, { 16, Cfg.InstantExplosionEffectChance }, { 17, Cfg.PlayerSwapEffectChance }, + { 18, Cfg.KickEffectChance }, + { 19, Cfg.SpectSwapEffectChance }, + { 20, Cfg.TeslaTpEffectChance }, }; private readonly Dictionary _cooldownDict = new(); diff --git a/BetterCoinflips/Types/CoinEffect.cs b/BetterCoinflips/Types/CoinEffect.cs index 3acc3c5..a868bfe 100644 --- a/BetterCoinflips/Types/CoinEffect.cs +++ b/BetterCoinflips/Types/CoinEffect.cs @@ -259,11 +259,12 @@ public CoinFlipEffect(Action execute, string message) //14 new CoinFlipEffect(player => { - player.DropHeldItem(); - player.Role.Set(RoleTypeId.Scp0492, RoleSpawnFlags.AssignInventory); + player.DropItems(); + var randomScp = _cfg.ValidScps.RandomItem(); + player.Role.Set(randomScp, RoleSpawnFlags.AssignInventory); if (player.CurrentRoom.Type == RoomType.Pocket) player.EnableEffect(EffectType.PocketCorroding); - }, _tr.ZombieFcMessage), + }, _tr.TurnIntoScpMessage), //15 new CoinFlipEffect(player => @@ -327,7 +328,7 @@ public CoinFlipEffect(Action execute, string message) //18 new CoinFlipEffect(player => { - var playerList = Player.List.ToList(); + var playerList = Player.List.Where(x => x.Role.Type != RoleTypeId.Spectator).ToList(); playerList.Remove(player); var targetPlayer = playerList.RandomItem(); var pos = targetPlayer.Position; @@ -341,7 +342,27 @@ public CoinFlipEffect(Action execute, string message) Timing.CallDelayed(1f, () => player.Kick(_cfg.KickReason)); }, _tr.KickMessage), + //20 + new CoinFlipEffect(player => + { + var spect = Player.Get(RoleTypeId.Spectator).ToList().RandomItem(); + var helper = player; + player.Role.Set(RoleTypeId.Spectator); + spect.Role.Set(helper.Role.Type); + spect.Teleport(helper.Position); + spect.ResetInventory(helper.Items); + foreach (var ammo in helper.Ammo) + { + spect.Ammo[ammo.Key] = ammo.Value; + } + }, _tr.SpectSwapMessage), + //21 + new CoinFlipEffect(player => + { + player.DropHeldItem(); + player.Teleport(Exiled.API.Features.TeslaGate.List.ToList().RandomItem()); + }, _tr.TeslaTpMessage) }; } } \ No newline at end of file From ee79c21522f4415ad66cb49e26e0893704380e9c Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Fri, 29 Sep 2023 12:05:22 +0200 Subject: [PATCH 4/7] even more effects --- BetterCoinflips/Configs/Config.cs | 69 +++++++++++++----------- BetterCoinflips/Configs/Translations.cs | 16 ++++-- BetterCoinflips/EventHandlers.cs | 71 +++++++++++++------------ BetterCoinflips/Types/CoinEffect.cs | 45 ++++++++++++++-- 4 files changed, 130 insertions(+), 71 deletions(-) diff --git a/BetterCoinflips/Configs/Config.cs b/BetterCoinflips/Configs/Config.cs index ab8880e..2ffe105 100644 --- a/BetterCoinflips/Configs/Config.cs +++ b/BetterCoinflips/Configs/Config.cs @@ -101,41 +101,46 @@ public class Config : IConfig }; [Description("The chance of these good effects happening. It's a proportional chance not a % chance.")] - public int KeycardEffectChance { get; set; } = 20; - public int MedicalKitEffectChance { get; set; } = 35; - public int TpToEscapeEffectChance { get; set; } = 5; - public int HealEffectChance { get; set; } = 10; - public int MoreHpEffectChance { get; set; } = 10; - public int HatEffectChance { get; set; } = 10; + public int KeycardChance { get; set; } = 20; + public int MedicalKitChance { get; set; } = 35; + public int TpToEscapeChance { get; set; } = 5; + public int HealChance { get; set; } = 10; + public int MoreHpChance { get; set; } = 10; + public int HatChance { get; set; } = 10; public int RandomGoodEffectChance { get; set; } = 30; - public int OneAmmoLogicerEffectChance { get; set; } = 1; - public int LightbulbEffectChance { get; set; } = 15; - public int PinkCandyEffectChance { get; set; } = 10; - public int BadRevoEffectChance { get; set; } = 5; - public int EmptyHidEffectChance { get; set; } = 5; - public int ForceRespawnEffectChance { get; set; } = 15; + public int OneAmmoLogicerChance { get; set; } = 1; + public int LightbulbChance { get; set; } = 15; + public int PinkCandyChance { get; set; } = 10; + public int BadRevoChance { get; set; } = 5; + public int EmptyHidChance { get; set; } = 5; + public int ForceRespawnChance { get; set; } = 15; + public int SizeChangeChance { get; set; } = 20; + public int GunZombieChance { get; set; } = 5; [Description("The chance of these bad effects happening. It's a proportional chance not a % chance.")] - public int HpReductionEffectChance { get; set; } = 20; - public int TpToClassDCellsEffectChance { get; set; } = 5; + public int HpReductionChance { get; set; } = 20; + public int TpToClassDCellsChance { get; set; } = 5; public int RandomBadEffectChance { get; set; } = 20; - public int WarheadEffectChance { get; set; } = 10; - public int LightsOutEffectChance { get; set; } = 20; - public int LiveHeEffectChance { get; set; } = 30; - public int TrollGunEffectChance { get; set; } = 50; - public int TrollFlashEffectChance { get; set; } = 50; - public int ScpTpEffectChance { get; set; } = 20; - public int OneHpLeftEffectChance { get; set; } = 15; - public int PrimedVaseEffectChance { get; set; } = 20; - public int ShitPantsEffectChance { get; set; } = 40; - public int FakeCassieEffectChance { get; set; } = 50; - public int TurnIntoScpEffectChance { get; set; } = 30; - public int InventoryResetEffectChance { get; set; } = 20; - public int ClassSwapEffectChance { get; set; } = 10; - public int InstantExplosionEffectChance { get; set; } = 10; - public int PlayerSwapEffectChance { get; set; } = 20; - public int KickEffectChance { get; set; } = 5; - public int SpectSwapEffectChance { get; set; } = 10; - public int TeslaTpEffectChance { get; set; } = 15; + public int WarheadChance { get; set; } = 10; + public int LightsOutChance { get; set; } = 20; + public int LiveHeChance { get; set; } = 30; + public int TrollGunChance { get; set; } = 50; + public int TrollFlashChance { get; set; } = 50; + public int ScpTpChance { get; set; } = 20; + public int OneHpLeftChance { get; set; } = 15; + public int PrimedVaseChance { get; set; } = 20; + public int ShitPantsChance { get; set; } = 40; + public int FakeCassieChance { get; set; } = 50; + public int TurnIntoScpChance { get; set; } = 30; + public int InventoryResetChance { get; set; } = 20; + public int ClassSwapChance { get; set; } = 10; + public int InstantExplosionChance { get; set; } = 10; + public int PlayerSwapChance { get; set; } = 20; + public int KickChance { get; set; } = 5; + public int SpectSwapChance { get; set; } = 10; + public int TeslaTpChance { get; set; } = 15; + public int InventorySwapChance { get; set; } = 20; + public int HandcuffChance { get; set; } = 10; + public int RandomTeleportChance { get; set; } = 15; } } diff --git a/BetterCoinflips/Configs/Translations.cs b/BetterCoinflips/Configs/Translations.cs index b50fd31..dc1b667 100644 --- a/BetterCoinflips/Configs/Translations.cs +++ b/BetterCoinflips/Configs/Translations.cs @@ -5,6 +5,11 @@ namespace BetterCoinflips.Configs { public class Translations : ITranslation { + [Description("This is added to the effect message if the coin breaks.")] + public string CoinBreaksMessage { get; set; } = "\nAlso your coin was used too much and it broke down."; + [Description("The broadcast message when a coin is registered with no uses.")] + public string CoinNoUsesMessage { get; set; } = "Your coin had no uses to begin with!"; + [Description("Here you can set the message for each of these good coin effects.")] public string TossOnCooldownMessage { get; set; } = "You can't throw the coin yet."; public string RedCardMessage { get; set; } = "You acquired a Facility Manager keycard!"; @@ -21,6 +26,8 @@ public class Translations : ITranslation public string BadRevoMessage { get; set; } = "What is this abomination!?"; public string EmptyHidMessage { get; set; } = "DID YOU JUST GET A MICRO HID!?"; public string ForceRespawnMessage { get; set; } = "Were they supposed to respawn this early?"; + public string SizeChangeMessage { get; set; } = "You became a fat fuck."; + public string GunZombieMessage { get; set; } = "Well that's an interesting change of pace."; @@ -43,12 +50,15 @@ public class Translations : ITranslation public string TurnIntoScpMessage { get; set; } = "Get SCP-fied LOL!"; public string InventoryResetMessage { get; set; } = "You lost your stuff."; public string ClassSwapMessage { get; set; } = "That's what I call an UNO reverse card!"; - public string CoinBreaksMessage { get; set; } = "\nAlso your coin was used too much and it broke down."; - public string CoinNoUsesMessage { get; set; } = "Your coin had no uses to begin with!"; public string InstantExplosionMessage { get; set; } = "You got smoked."; public string PlayerSwapMessage { get; set; } = "This could be a very awkward situation."; public string KickMessage { get; set; } = "Bye!"; - public string SpectSwapMessage { get; set; } = "You just made someone's round better!"; + public string SpectSwapPlayerMessage { get; set; } = "You just made someone's round better!"; + public string SpectSwapSpectMessage { get; set; } = "You were chosen as a random spectator to replace this player!"; public string TeslaTpMessage { get; set; } = "So you're a fan of electricity?"; + [Description("This message will be broadcast to both players.")] + public string InventorySwapMessage { get; set; } = "Your inventory was swapped with a random player."; + public string RandomTeleportMessage { get; set; } = "You were randomly teleported."; + public string HandcuffMessage { get; set; } = "You were arrested for uhh commiting war crimes... or something."; } } \ No newline at end of file diff --git a/BetterCoinflips/EventHandlers.cs b/BetterCoinflips/EventHandlers.cs index 19ac338..2a97287 100644 --- a/BetterCoinflips/EventHandlers.cs +++ b/BetterCoinflips/EventHandlers.cs @@ -23,51 +23,56 @@ public class EventHandlers //Dict of all good coin effect chances with an index private readonly Dictionary _goodEffectChances = new() { - { 0, Cfg.KeycardEffectChance }, - { 1, Cfg.MedicalKitEffectChance }, - { 2, Cfg.TpToEscapeEffectChance }, - { 3, Cfg.HealEffectChance }, - { 4, Cfg.MoreHpEffectChance }, - { 5, Cfg.HatEffectChance }, + { 0, Cfg.KeycardChance }, + { 1, Cfg.MedicalKitChance }, + { 2, Cfg.TpToEscapeChance }, + { 3, Cfg.HealChance }, + { 4, Cfg.MoreHpChance }, + { 5, Cfg.HatChance }, { 6, Cfg.RandomGoodEffectChance }, - { 7, Cfg.OneAmmoLogicerEffectChance }, - { 8, Cfg.LightbulbEffectChance }, - { 9, Cfg.PinkCandyEffectChance }, - { 10, Cfg.BadRevoEffectChance }, - { 11, Cfg.EmptyHidEffectChance }, - { 12, Cfg.ForceRespawnEffectChance }, + { 7, Cfg.OneAmmoLogicerChance }, + { 8, Cfg.LightbulbChance }, + { 9, Cfg.PinkCandyChance }, + { 10, Cfg.BadRevoChance }, + { 11, Cfg.EmptyHidChance }, + { 12, Cfg.ForceRespawnChance }, + { 13, Cfg.SizeChangeChance }, + { 14, Cfg.GunZombieChance }, }; //Dict of all bad coin effect chances with an index private readonly Dictionary _badEffectChances = new() { - { 0, Cfg.HpReductionEffectChance }, - { 1, Cfg.TpToClassDCellsEffectChance }, + { 0, Cfg.HpReductionChance }, + { 1, Cfg.TpToClassDCellsChance }, { 2, Cfg.RandomBadEffectChance }, - { 3, Cfg.WarheadEffectChance }, - { 4, Cfg.LightsOutEffectChance }, - { 5, Cfg.LiveHeEffectChance }, - { 6, Cfg.TrollGunEffectChance }, - { 7, Cfg.TrollFlashEffectChance }, - { 8, Cfg.ScpTpEffectChance }, - { 9, Cfg.OneHpLeftEffectChance }, - { 10, Cfg.PrimedVaseEffectChance }, - { 11, Cfg.ShitPantsEffectChance }, - { 12, Cfg.FakeCassieEffectChance }, - { 13, Cfg.TurnIntoScpEffectChance }, - { 14, Cfg.InventoryResetEffectChance }, - { 15, Cfg.ClassSwapEffectChance }, - { 16, Cfg.InstantExplosionEffectChance }, - { 17, Cfg.PlayerSwapEffectChance }, - { 18, Cfg.KickEffectChance }, - { 19, Cfg.SpectSwapEffectChance }, - { 20, Cfg.TeslaTpEffectChance }, + { 3, Cfg.WarheadChance }, + { 4, Cfg.LightsOutChance }, + { 5, Cfg.LiveHeChance }, + { 6, Cfg.TrollGunChance }, + { 7, Cfg.TrollFlashChance }, + { 8, Cfg.ScpTpChance }, + { 9, Cfg.OneHpLeftChance }, + { 10, Cfg.PrimedVaseChance }, + { 11, Cfg.ShitPantsChance }, + { 12, Cfg.FakeCassieChance }, + { 13, Cfg.TurnIntoScpChance }, + { 14, Cfg.InventoryResetChance }, + { 15, Cfg.ClassSwapChance }, + { 16, Cfg.InstantExplosionChance }, + { 17, Cfg.PlayerSwapChance }, + { 18, Cfg.KickChance }, + { 19, Cfg.SpectSwapChance }, + { 20, Cfg.TeslaTpChance }, + { 21, Cfg.InventorySwapChance }, + { 22, Cfg.RandomTeleportChance }, + { 23, Cfg.HandcuffChance }, }; private readonly Dictionary _cooldownDict = new(); //helper method - private void SendBroadcast(Player pl, string message) => pl.Broadcast(Cfg.BroadcastTime, message); + public static void SendBroadcast(Player pl, string message) => pl.Broadcast(new Exiled.API.Features.Broadcast(message, Cfg.BroadcastTime),true); //main plugin logic public void OnCoinFlip(FlippingCoinEventArgs ev) diff --git a/BetterCoinflips/Types/CoinEffect.cs b/BetterCoinflips/Types/CoinEffect.cs index a868bfe..515b5b5 100644 --- a/BetterCoinflips/Types/CoinEffect.cs +++ b/BetterCoinflips/Types/CoinEffect.cs @@ -140,6 +140,21 @@ public CoinFlipEffect(Action execute, string message) else Respawn.ForceWave(SpawnableTeamType.ChaosInsurgency, true); }, _tr.ForceRespawnMessage), + + //14 + new CoinFlipEffect(player => + { + player.Scale = new Vector3(1.3f, 0.5f, 1.3f); + }, _tr.SizeChangeMessage), + + //15 + new CoinFlipEffect(player => + { + player.DropHeldItem(); + player.Role.Set(RoleTypeId.Scp0492); + Firearm gun = (Firearm)Item.Create(ItemType.GunCOM15); + gun.Give(player); + }, _tr.GunZombieMessage), }; public static List BadEffects = new() @@ -270,7 +285,7 @@ public CoinFlipEffect(Action execute, string message) new CoinFlipEffect(player => { player.DropHeldItem(); - player.ResetInventory(new ItemType[] {}); + player.ClearInventory(); }, _tr.InventoryResetMessage), //16 @@ -355,14 +370,38 @@ public CoinFlipEffect(Action execute, string message) { spect.Ammo[ammo.Key] = ammo.Value; } - }, _tr.SpectSwapMessage), + EventHandlers.SendBroadcast(spect, _tr.SpectSwapSpectMessage); + }, _tr.SpectSwapPlayerMessage), //21 new CoinFlipEffect(player => { player.DropHeldItem(); player.Teleport(Exiled.API.Features.TeslaGate.List.ToList().RandomItem()); - }, _tr.TeslaTpMessage) + }, _tr.TeslaTpMessage), + + //22 + new CoinFlipEffect(player => + { + var target = Player.List.Where(x => x != player).ToList().RandomItem(); + var items = target.Items; + target.ResetInventory(player.Items); + player.ResetInventory(items); + EventHandlers.SendBroadcast(target, _tr.InventorySwapMessage); + }, _tr.InventorySwapMessage), + + //23 + new CoinFlipEffect(player => + { + player.RandomTeleport(); + }, _tr.RandomTeleportMessage), + + //24 + new CoinFlipEffect(player => + { + player.Handcuff(); + player.DropItems(); + }, _tr.HandcuffMessage), }; } } \ No newline at end of file From d5723d5a0a0bc85b2ba53176153ec79c705b8f02 Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:42:15 +0200 Subject: [PATCH 5/7] finished adding more effects --- BetterCoinflips/Configs/Config.cs | 1 - BetterCoinflips/Configs/Translations.cs | 5 +- BetterCoinflips/EventHandlers.cs | 11 +- BetterCoinflips/Plugin.cs | 2 +- BetterCoinflips/Types/CoinEffect.cs | 270 ++++++++++++++---------- 5 files changed, 173 insertions(+), 116 deletions(-) diff --git a/BetterCoinflips/Configs/Config.cs b/BetterCoinflips/Configs/Config.cs index 2ffe105..73ea814 100644 --- a/BetterCoinflips/Configs/Config.cs +++ b/BetterCoinflips/Configs/Config.cs @@ -115,7 +115,6 @@ public class Config : IConfig public int EmptyHidChance { get; set; } = 5; public int ForceRespawnChance { get; set; } = 15; public int SizeChangeChance { get; set; } = 20; - public int GunZombieChance { get; set; } = 5; [Description("The chance of these bad effects happening. It's a proportional chance not a % chance.")] public int HpReductionChance { get; set; } = 20; diff --git a/BetterCoinflips/Configs/Translations.cs b/BetterCoinflips/Configs/Translations.cs index dc1b667..0b7cc17 100644 --- a/BetterCoinflips/Configs/Translations.cs +++ b/BetterCoinflips/Configs/Translations.cs @@ -26,8 +26,7 @@ public class Translations : ITranslation public string BadRevoMessage { get; set; } = "What is this abomination!?"; public string EmptyHidMessage { get; set; } = "DID YOU JUST GET A MICRO HID!?"; public string ForceRespawnMessage { get; set; } = "Were they supposed to respawn this early?"; - public string SizeChangeMessage { get; set; } = "You became a fat fuck."; - public string GunZombieMessage { get; set; } = "Well that's an interesting change of pace."; + public string SizeChangeMessage { get; set; } = "You got gnomed."; @@ -52,9 +51,11 @@ public class Translations : ITranslation public string ClassSwapMessage { get; set; } = "That's what I call an UNO reverse card!"; public string InstantExplosionMessage { get; set; } = "You got smoked."; public string PlayerSwapMessage { get; set; } = "This could be a very awkward situation."; + public string PlayerSwapIfOneAliveMessage { get; set; } = "You were supposed to switch places with someone but no one else is alive!"; public string KickMessage { get; set; } = "Bye!"; public string SpectSwapPlayerMessage { get; set; } = "You just made someone's round better!"; public string SpectSwapSpectMessage { get; set; } = "You were chosen as a random spectator to replace this player!"; + public string SpectSwapNoSpectsMessage { get; set; } = "You got lucky cause there are no spectators to take your place."; public string TeslaTpMessage { get; set; } = "So you're a fan of electricity?"; [Description("This message will be broadcast to both players.")] public string InventorySwapMessage { get; set; } = "Your inventory was swapped with a random player."; diff --git a/BetterCoinflips/EventHandlers.cs b/BetterCoinflips/EventHandlers.cs index 2a97287..b921466 100644 --- a/BetterCoinflips/EventHandlers.cs +++ b/BetterCoinflips/EventHandlers.cs @@ -7,6 +7,7 @@ using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Map; using Exiled.Events.EventArgs.Player; +using Unity.Collections.LowLevel.Unsafe; using UnityEngine; namespace BetterCoinflips @@ -37,7 +38,6 @@ public class EventHandlers { 11, Cfg.EmptyHidChance }, { 12, Cfg.ForceRespawnChance }, { 13, Cfg.SizeChangeChance }, - { 14, Cfg.GunZombieChance }, }; //Dict of all bad coin effect chances with an index @@ -145,7 +145,7 @@ public void OnCoinFlip(FlippingCoinEventArgs ev) randomNum -= kvp.Value; } - + Log.Debug($"headsEvent = {headsEvent}"); //use headsevent to choose the effect and execute it @@ -171,7 +171,7 @@ public void OnCoinFlip(FlippingCoinEventArgs ev) randomNum -= kvp.Value; } - + Log.Debug($"tailsEvent = {tailsEvent}"); //use tailsevent to choose the effect and execute it @@ -190,7 +190,10 @@ public void OnCoinFlip(FlippingCoinEventArgs ev) message += _tr.CoinBreaksMessage; } - SendBroadcast(ev.Player, message); + if (message != null) + { + SendBroadcast(ev.Player, message); + } } //removing default coins diff --git a/BetterCoinflips/Plugin.cs b/BetterCoinflips/Plugin.cs index b135896..0ebad27 100644 --- a/BetterCoinflips/Plugin.cs +++ b/BetterCoinflips/Plugin.cs @@ -10,7 +10,7 @@ public class Plugin : Plugin { public static Plugin Instance; public override Version RequiredExiledVersion => new(8, 2, 1, 0); - public override Version Version => new(4, 1, 0); + public override Version Version => new(4, 2, 0); public override string Author => "Miki_hero"; public override string Name => "BetterCoinflips"; public override string Prefix => "better_cf"; diff --git a/BetterCoinflips/Types/CoinEffect.cs b/BetterCoinflips/Types/CoinEffect.cs index 515b5b5..769dcc0 100644 --- a/BetterCoinflips/Types/CoinEffect.cs +++ b/BetterCoinflips/Types/CoinEffect.cs @@ -3,6 +3,7 @@ using System.Linq; using BetterCoinflips.Configs; using Exiled.API.Enums; +using Exiled.API.Extensions; using Exiled.API.Features; using Exiled.API.Features.Doors; using Exiled.API.Features.Items; @@ -18,9 +19,9 @@ namespace BetterCoinflips.Types { public class CoinFlipEffect { - private static readonly Config _cfg = Plugin.Instance.Config; - private static readonly Configs.Translations _tr = Plugin.Instance.Translation; - private static readonly System.Random _rd = new(); + private static readonly Config Cfg = Plugin.Instance.Config; + private static readonly Configs.Translations Translations = Plugin.Instance.Translation; + private static readonly System.Random Rd = new(); public Action Execute { get; set; } public string Message { get; set; } @@ -41,191 +42,182 @@ public CoinFlipEffect(Action execute, string message) { "1 0 6", "SCP-106"} }; - private static bool flag1 = _cfg.RedCardChance > _rd.Next(1, 101); + private static bool flag1 = Cfg.RedCardChance > Rd.Next(1, 101); public static List GoodEffects = new() { - //1 + //0 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(flag1 ? ItemType.KeycardFacilityManager : ItemType.KeycardContainmentEngineer, player.Position, new Quaternion()); - }, flag1 ? _tr.RedCardMessage : _tr.ContainmentEngineerCardMessage), + }, flag1 ? Translations.RedCardMessage : Translations.ContainmentEngineerCardMessage), - //2 + //1 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(ItemType.Medkit, player.Position, new Quaternion()); Pickup.CreateAndSpawn(ItemType.Painkillers, player.Position, new Quaternion()); - }, _tr.MediKitMessage), + }, Translations.MediKitMessage), - //3 + //2 new CoinFlipEffect(player => { player.Teleport(Door.Get(DoorType.EscapeSecondary)); - }, _tr.TpToEscapeMessage), + }, Translations.TpToEscapeMessage), - //4 + //3 new CoinFlipEffect(player => { player.Heal(25); - }, _tr.MagicHealMessage), + }, Translations.MagicHealMessage), - //5 + //4 new CoinFlipEffect(player => { player.Health *= 1.1f; - }, _tr.HealthIncreaseMessage), + }, Translations.HealthIncreaseMessage), - //6 + //5 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(ItemType.SCP268, player.Position, new Quaternion()); - }, _tr.NeatHatMessage), + }, Translations.NeatHatMessage), - //7 + //6 new CoinFlipEffect(player => { - var effect = _cfg.GoodEffects.ToList().RandomItem(); + var effect = Cfg.GoodEffects.ToList().RandomItem(); player.EnableEffect(effect, 5, true); Log.Debug($"Chosen random effect: {effect}"); - }, _tr.RandomGoodEffectMessage), + }, Translations.RandomGoodEffectMessage), - //8 + //7 new CoinFlipEffect(player => { Firearm gun = (Firearm)Item.Create(ItemType.GunLogicer); gun.Ammo = 1; gun.CreatePickup(player.Position); - }, _tr.OneAmmoLogicerMessage), + }, Translations.OneAmmoLogicerMessage), - //9 + //8 new CoinFlipEffect(player => { Pickup.CreateAndSpawn(ItemType.SCP2176, player.Position, new Quaternion()); - }, _tr.LightbulbMessage), + }, Translations.LightbulbMessage), - //10 + //9 new CoinFlipEffect(player => { Scp330 candy = (Scp330)Item.Create(ItemType.SCP330); candy.AddCandy(InventorySystem.Items.Usables.Scp330.CandyKindID.Pink); candy.CreatePickup(player.Position); - }, _tr.PinkCandyMessage), + }, Translations.PinkCandyMessage), - //11 + //10 new CoinFlipEffect(player => { Firearm revo = (Firearm)Item.Create(ItemType.GunRevolver); revo.AddAttachment(new[] { AttachmentName.CylinderMag8, AttachmentName.ShortBarrel, AttachmentName.ScopeSight }); revo.CreatePickup(player.Position); - }, _tr.BadRevoMessage), + }, Translations.BadRevoMessage), - //12 + //11 new CoinFlipEffect(player => { MicroHIDPickup item = (MicroHIDPickup)Pickup.Create(ItemType.MicroHID); item.Position = player.Position; item.Spawn(); item.Energy = 0; - }, _tr.EmptyHidMessage), + }, Translations.EmptyHidMessage), - //13 + //12 new CoinFlipEffect(player => { if (Respawn.NextKnownTeam == SpawnableTeamType.NineTailedFox) Respawn.ForceWave(SpawnableTeamType.NineTailedFox, true); else Respawn.ForceWave(SpawnableTeamType.ChaosInsurgency, true); - }, _tr.ForceRespawnMessage), + }, Translations.ForceRespawnMessage), - //14 + //13 new CoinFlipEffect(player => { player.Scale = new Vector3(1.3f, 0.5f, 1.3f); - }, _tr.SizeChangeMessage), - - //15 - new CoinFlipEffect(player => - { - player.DropHeldItem(); - player.Role.Set(RoleTypeId.Scp0492); - Firearm gun = (Firearm)Item.Create(ItemType.GunCOM15); - gun.Give(player); - }, _tr.GunZombieMessage), + }, Translations.SizeChangeMessage), }; public static List BadEffects = new() { - //1 + //0 new CoinFlipEffect(player => { if ((int)player.Health == 1) player.Kill(DamageType.CardiacArrest); else player.Health *= 0.7f; - }, _tr.HpReductionMessage), + }, Translations.HpReductionMessage), - //2 + //1 new CoinFlipEffect(player => { player.Teleport(Door.Get(DoorType.PrisonDoor)); - }, _tr.TpToClassDCellsMessage), + }, Translations.TpToClassDCellsMessage), - //3 + //2 new CoinFlipEffect(player => { - var effect = _cfg.BadEffects.ToList().RandomItem(); + var effect = Cfg.BadEffects.ToList().RandomItem(); if (effect == EffectType.PocketCorroding) player.EnableEffect(EffectType.PocketCorroding); else player.EnableEffect(effect, 5, true); Log.Debug($"Chosen random effect: {effect}"); - }, _tr.RandomBadEffectMessage), + }, Translations.RandomBadEffectMessage), - //4 + //3 new CoinFlipEffect(player => { if (Warhead.IsDetonated || !Warhead.IsInProgress) Warhead.Start(); else Warhead.Stop(); - }, Warhead.IsDetonated || !Warhead.IsInProgress ? _tr.WarheadStartMessage : _tr.WarheadStopMessage), + }, Warhead.IsDetonated || !Warhead.IsInProgress ? Translations.WarheadStartMessage : Translations.WarheadStopMessage), - //5 + //4 new CoinFlipEffect(player => { - Map.TurnOffAllLights(_cfg.MapBlackoutTime); - }, _tr.LightsOutMessage), + Map.TurnOffAllLights(Cfg.MapBlackoutTime); + }, Translations.LightsOutMessage), - //6 + //5 new CoinFlipEffect(player => { ExplosiveGrenade grenade = (ExplosiveGrenade)Item.Create(ItemType.GrenadeHE); - grenade.FuseTime = (float)_cfg.LiveGrenadeFuseTime; + grenade.FuseTime = (float)Cfg.LiveGrenadeFuseTime; grenade.SpawnActive(player.Position + Vector3.up, player); - }, _tr.LiveGrenadeMessage), + }, Translations.LiveGrenadeMessage), - //7 + //6 new CoinFlipEffect(player => { Firearm gun = (Firearm)Item.Create(ItemType.ParticleDisruptor); gun.Ammo = 0; gun.CreatePickup(player.Position); - }, _tr.TrollGunMessage), + }, Translations.TrollGunMessage), - //8 + //7 new CoinFlipEffect(player => { FlashGrenade flash = (FlashGrenade)Item.Create(ItemType.GrenadeFlash); flash.FuseTime = 1f; flash.SpawnActive(player.Position); - }, _tr.TrollFlashMessage), + }, Translations.TrollFlashMessage), - //9 + //8 new CoinFlipEffect(player => { if (Player.Get(Side.Scp).Any()) @@ -239,56 +231,56 @@ public CoinFlipEffect(Action execute, string message) if (player.Health < 0) player.Kill(DamageType.Unknown); } - }, Player.Get(Side.Scp).Any() ? _tr.TpToRandomScpMessage : _tr.SmallDamageMessage), + }, Player.Get(Side.Scp).Any() ? Translations.TpToRandomScpMessage : Translations.SmallDamageMessage), - //10 + //9 new CoinFlipEffect(player => { if ((int)player.Health == 1) player.Kill(DamageType.CardiacArrest); else player.Health = 1; - }, _tr.HugeDamageMessage), + }, Translations.HugeDamageMessage), - //11 + //10 new CoinFlipEffect(player => { Scp244 vase = (Scp244)Item.Create(ItemType.SCP244a); vase.Primed = true; vase.CreatePickup(player.Position); - }, _tr.PrimedVaseMessage), + }, Translations.PrimedVaseMessage), - //12 + //11 new CoinFlipEffect(player => { player.PlaceTantrum(); - }, _tr.ShitPantsMessage), + }, Translations.ShitPantsMessage), - //13 + //12 new CoinFlipEffect(player => { var scpName = _scpNames.ToList().RandomItem(); Cassie.MessageTranslated($"scp {scpName.Key} successfully terminated by automatic security system",$"{scpName.Value} successfully terminated by Automatic Security System."); - }, _tr.FakeScpKillMessage), + }, Translations.FakeScpKillMessage), - //14 + //13 new CoinFlipEffect(player => { player.DropItems(); - var randomScp = _cfg.ValidScps.RandomItem(); + var randomScp = Cfg.ValidScps.RandomItem(); player.Role.Set(randomScp, RoleSpawnFlags.AssignInventory); if (player.CurrentRoom.Type == RoomType.Pocket) player.EnableEffect(EffectType.PocketCorroding); - }, _tr.TurnIntoScpMessage), + }, Translations.TurnIntoScpMessage), - //15 + //14 new CoinFlipEffect(player => { player.DropHeldItem(); player.ClearInventory(); - }, _tr.InventoryResetMessage), + }, Translations.InventoryResetMessage), - //16 + //15 new CoinFlipEffect(player => { player.DropItems(); @@ -330,78 +322,140 @@ public CoinFlipEffect(Action execute, string message) { player.EnableEffect(EffectType.PocketCorroding); } - }, _tr.ClassSwapMessage), + }, Translations.ClassSwapMessage), - //17 + //16 new CoinFlipEffect(player => { ExplosiveGrenade instaBoom = (ExplosiveGrenade)Item.Create(ItemType.GrenadeHE); instaBoom.FuseTime = 0.1f; instaBoom.SpawnActive(player.Position, player); - }, _tr.InstantExplosionMessage), + }, Translations.InstantExplosionMessage), - //18 + //17 new CoinFlipEffect(player => { var playerList = Player.List.Where(x => x.Role.Type != RoleTypeId.Spectator).ToList(); playerList.Remove(player); + if (playerList.IsEmpty()) + { + Timing.CallDelayed(0.1f, () => EventHandlers.SendBroadcast(player, Translations.PlayerSwapIfOneAliveMessage)); + return; + } var targetPlayer = playerList.RandomItem(); var pos = targetPlayer.Position; targetPlayer.Teleport(player.Position); player.Teleport(pos); - }, _tr.PlayerSwapMessage), + }, Translations.PlayerSwapMessage), - //19 + //18 new CoinFlipEffect(player => { - Timing.CallDelayed(1f, () => player.Kick(_cfg.KickReason)); - }, _tr.KickMessage), + Timing.CallDelayed(1f, () => player.Kick(Cfg.KickReason)); + }, Translations.KickMessage), - //20 + //19 new CoinFlipEffect(player => { - var spect = Player.Get(RoleTypeId.Spectator).ToList().RandomItem(); - var helper = player; - player.Role.Set(RoleTypeId.Spectator); - spect.Role.Set(helper.Role.Type); - spect.Teleport(helper.Position); - spect.ResetInventory(helper.Items); - foreach (var ammo in helper.Ammo) + var spectList = Player.List.Where(x => x.Role.Type == RoleTypeId.Spectator).ToList(); + if (spectList.IsEmpty()) + { + return; + } + var spect = spectList.RandomItem(); + spect.Role.Set(player.Role.Type, RoleSpawnFlags.None); + spect.Teleport(player); + spect.Health = player.Health; + List playerItems = new List(); + foreach (var item in player.Items) + { + playerItems.Add(item.Type); + } + + foreach (var item in playerItems) { - spect.Ammo[ammo.Key] = ammo.Value; + spect.AddItem(item); } - EventHandlers.SendBroadcast(spect, _tr.SpectSwapSpectMessage); - }, _tr.SpectSwapPlayerMessage), + + for (int i = 0; i < player.Ammo.Count; i++) + { + spect.AddAmmo(player.Ammo.ElementAt(i).Key.GetAmmoType(), player.Ammo.ElementAt(i).Value); + player.SetAmmo(player.Ammo.ElementAt(i).Key.GetAmmoType(), 0); + } + + player.ClearInventory(); + player.Role.Set(RoleTypeId.Spectator); + + EventHandlers.SendBroadcast(spect, Translations.SpectSwapSpectMessage); + }, Player.List.Where(x => x.Role.Type == RoleTypeId.Spectator).IsEmpty() ? Translations.SpectSwapNoSpectsMessage : Translations.SpectSwapPlayerMessage), - //21 + //20 new CoinFlipEffect(player => { player.DropHeldItem(); player.Teleport(Exiled.API.Features.TeslaGate.List.ToList().RandomItem()); - }, _tr.TeslaTpMessage), + }, Translations.TeslaTpMessage), - //22 + //21 new CoinFlipEffect(player => { var target = Player.List.Where(x => x != player).ToList().RandomItem(); - var items = target.Items; - target.ResetInventory(player.Items); - player.ResetInventory(items); - EventHandlers.SendBroadcast(target, _tr.InventorySwapMessage); - }, _tr.InventorySwapMessage), + + //saving items + List items1 = new(); + List items2 = new(); + foreach (var item in player.Items) + { + items1.Add(item.Type); + } + foreach (var item in target.Items) + { + items2.Add(item.Type); + } + + //saving ammo + Dictionary ammo1 = new(); + Dictionary ammo2 = new(); + for (int i = 0; i < player.Ammo.Count; i++) + { + ammo1.Add(player.Ammo.ElementAt(i).Key.GetAmmoType(), player.Ammo.ElementAt(i).Value); + player.SetAmmo(ammo1.ElementAt(i).Key, 0); + } + for (int i = 0; i < target.Ammo.Count; i++) + { + ammo2.Add(target.Ammo.ElementAt(i).Key.GetAmmoType(), target.Ammo.ElementAt(i).Value); + target.SetAmmo(ammo2.ElementAt(i).Key, 0); + } + + //giving items + target.ResetInventory(items1); + player.ResetInventory(items2); + + //giving ammo + foreach (var ammo in ammo2) + { + player.SetAmmo(ammo.Key, ammo.Value); + } + foreach (var ammo in ammo1) + { + target.SetAmmo(ammo.Key, ammo.Value); + } + + EventHandlers.SendBroadcast(target, Translations.InventorySwapMessage); + }, Translations.InventorySwapMessage), - //23 + //22 new CoinFlipEffect(player => { player.RandomTeleport(); - }, _tr.RandomTeleportMessage), + }, Translations.RandomTeleportMessage), - //24 + //23 new CoinFlipEffect(player => { player.Handcuff(); player.DropItems(); - }, _tr.HandcuffMessage), + }, Translations.HandcuffMessage), }; } } \ No newline at end of file From 22999a0d1e8d25fa05d3c25eedb7015b71eb2597 Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:59:43 +0200 Subject: [PATCH 6/7] updated readme --- BetterCoinflips/Types/CoinEffect.cs | 8 +- README.md | 134 ++++++++++++++++------------ 2 files changed, 81 insertions(+), 61 deletions(-) diff --git a/BetterCoinflips/Types/CoinEffect.cs b/BetterCoinflips/Types/CoinEffect.cs index 769dcc0..c496ace 100644 --- a/BetterCoinflips/Types/CoinEffect.cs +++ b/BetterCoinflips/Types/CoinEffect.cs @@ -136,10 +136,7 @@ public CoinFlipEffect(Action execute, string message) //12 new CoinFlipEffect(player => { - if (Respawn.NextKnownTeam == SpawnableTeamType.NineTailedFox) - Respawn.ForceWave(SpawnableTeamType.NineTailedFox, true); - else - Respawn.ForceWave(SpawnableTeamType.ChaosInsurgency, true); + Respawn.ForceWave(Respawn.NextKnownTeam == SpawnableTeamType.NineTailedFox ? SpawnableTeamType.NineTailedFox : SpawnableTeamType.ChaosInsurgency, true); }, Translations.ForceRespawnMessage), //13 @@ -339,14 +336,13 @@ public CoinFlipEffect(Action execute, string message) playerList.Remove(player); if (playerList.IsEmpty()) { - Timing.CallDelayed(0.1f, () => EventHandlers.SendBroadcast(player, Translations.PlayerSwapIfOneAliveMessage)); return; } var targetPlayer = playerList.RandomItem(); var pos = targetPlayer.Position; targetPlayer.Teleport(player.Position); player.Teleport(pos); - }, Translations.PlayerSwapMessage), + }, Player.List.Where(x => x.Role.Type != RoleTypeId.Spectator).IsEmpty() ? Translations.PlayerSwapIfOneAliveMessage : Translations.PlayerSwapMessage), //18 new CoinFlipEffect(player => diff --git a/README.md b/README.md index bfee9f1..08f4b70 100644 --- a/README.md +++ b/README.md @@ -5,38 +5,47 @@ SCP:SL plugin that adds a Risk-Reward mechanic to the in-game coin. Whenever you # Features: -- Whenever someone flips a coin and it lands on heads one of the following will happen: - 1. A Containment Engineer/Facility Manager(85%/15%, configurable) keycard will spawn at their feet. - 2. A 'medical kit' will spawn at their feet consisting of a medkit and painkillers. - 3. They will be teleported to the doors leading straight to the escape zone. - 4. They will be healed by 25 health. - 5. Their current hp will be increased by 10%. - 6. An SCP-268 will spawn at their feet. - 7. They will receive a random good effect (configurable) for 5 seconds. +- Whenever a player flips a coin and it lands on heads one of the following will happen: + 1. They will receive a Containment Engineer/Facility Manager keycard. + 2. They will recevive a 'medical kit' consisting of a medkit and painkillers. + 3. They will be teleported to the escape zone doors. + 4. They will be healed by 25 health. + 5. Their hp will be increased by 10%. + 6. They will get an SCP-268. + 7. They will receive a random good effect for 5 seconds. 8. They will get a Logicer with 1 ammo. - 9. An SCP-2176 will spawn at their feet. - 10. A pink candy will spawn at their feet. - 11. A revolver with the worst attachments possible will spawn at their feet. - 12. An empty micro hid will spawn at their feet. + 9. They will receive an SCP-2176. + 10. They will receive a pink candy. + 11. They will receive a revolver with the worst attachments possible. + 12. They will get an empty micro hid. + 13. MTF/CI will respawn immediatly. + 14. Their scale will be set to 1.3/0.5/1.3. - Whenever someone flips a coin and it lands on tails one of the following will happen: - 1. Their current hp will be set to 70%. - 2. They will be teleported to Class D containment cells. - 3. They will get a random bad effect (configurable) for 5 seconds. - 4. Warhead will be enabled or disabled depending on it's current state. + 1. Their hp will be reduced by 30%. + 2. They will be teleported to Class D cells. + 3. They will get a random bad effect for 5 seconds. + 4. The Alpha Warhead will be enabled or disabled depending on it's current state. 5. Lights all across the map will be turned off for 10 seconds. - 6. A live grenade will be spawned on their head and explode ~3 seconds later. - 7. An empty Particle Disruptor will be spawned at their feet and instantly disappear. - 8. A flash grenade will spawn on their head and explode after 1 second. - 9. They are teleported to an SCP if there are any alive, otherwise they lose 15 hp. - 10. They lose all but 1 hp. - 11. A primed SCP-244 is spawned on their head. - 12. An SCP-173 tantrum is placed at their feet. - 13. A fake CASSIE is send saying that SCP-173 was killed by a Tesla gate. - 14. The player will be forceclassed to SCP-049-2. - 15. The player's inventory will be reset. - 16. The player's role will be changed to the opposite one (class d - scientist, mtf - ci etc.) + 6. A live grenade will appear on their head. + 7. They will get an empty Particle Disruptor. + 8. A live flash grenade will spawn on their head. + 9. They will be teleported to an SCP if there are any alive, otherwise they'll lose 15 hp. + 10. They will lose all but 1 hp. + 11. Thye will receive a primed SCP-244. + 12. They receive an SCP-173 tantrum. + 13. A fake CASSIE is sent saying that SCP-173 was killed by a Tesla gate. + 14. They will be forceclassed to SCP-049-2. + 15. Their inventory will be reset. + 16. Their role will be changed to the opposite one (class d - scientist, mtf - ci etc.) 17. An instantly exploding grenade will spawn on their head. + 18. They will swap places with another player. + 19. They will be kicked. + 20. They will be replaced by a random spectator. + 21. They will be teleported to a random tesla. + 22. Their inventory will be swapped with another player's inventory. + 23. They will be teleported to a random room. + 24. They will be handcuffed and lose their items. - The plugin will prevent the spawns of a specified amount of coins around the map. - The plugin will replace a specified amount of the chosen item (by default SCP-500) with a coin in the SCP pedestals. @@ -69,6 +78,8 @@ better_cf: min_max_default_coins: - 1 - 4 + # Time in seconds between coin toses. + coin_cooldown: 5 # The duration of the broadcast informing you about your 'reward'. Default: 3 broadcast_time: 3 # The duration of the map blackout. Default: 10 @@ -94,10 +105,11 @@ better_cf: - Hypothermia - InsufficientLighting - Poisoned + - PocketCorroding - SeveredHands - SinkHole - Stained - - SoundtrackMute + - Traumatized # List of good effects that can be applied to the players. List available at: https://exiled-team.github.io/EXILED/api/Exiled.API.Enums.EffectType.html good_effects: - BodyshotReduction @@ -109,36 +121,48 @@ better_cf: - Scp1853 - Scp207 - Vitality - # The % chance of receiving a Facility Manager keycard instead of a Containment Engineer keycard when that effect is chosen. Default: 15 + # The % chance of receiving a Facility Manager keycard instead of a Containment Engineer one. red_card_chance: 15 + # The kick reason. + kick_reason: 'The coin kicked your ass.' # The chance of these good effects happening. It's a proportional chance not a % chance. - keycard_effect_chance: 20 - medical_kit_effect_chance: 35 - tp_to_escape_effect_chance: 5 - heal_effect_chance: 10 - more_hp_effect_chance: 10 - hat_effect_chance: 10 + keycard_chance: 20 + medical_kit_chance: 35 + tp_to_escape_chance: 5 + heal_chance: 10 + more_hp_chance: 10 + hat_chance: 10 random_good_effect_chance: 30 - one_ammo_logicer_effect_chance: 1 - lightbulb_effect_chance: 15 - pink_candy_effect_chance: 10 - bad_revo_effect_chance: 5 + one_ammo_logicer_chance: 1 + lightbulb_chance: 15 + pink_candy_chance: 10 + bad_revo_chance: 5 + empty_hid_chance: 5 + force_respawn_chance: 15 + size_change_chance: 20 # The chance of these bad effects happening. It's a proportional chance not a % chance. - hp_reduction_effect_chance: 20 - tp_to_class_d_cells_effect_chance: 5 + hp_reduction_chance: 20 + tp_to_class_d_cells_chance: 5 random_bad_effect_chance: 20 - warhead_effect_chance: 10 - lights_out_effect_chance: 20 - live_he_effect_chance: 30 - troll_gun_effect_chance: 50 - troll_flash_effect_chance: 50 - scp_tp_effect_chance: 20 - one_hp_left_effect_chance: 15 - primed_vase_effect_chance: 20 - shit_pants_effect_chance: 40 - fake_cassie_effect_chance: 50 - zombie_fc_effect_chance: 30 - inventory_reset_effect_chance: 20 - class_swap_effect_chance: 10 - instant_explosion_effect_chance: 10 + warhead_chance: 10 + lights_out_chance: 20 + live_he_chance: 30 + troll_gun_chance: 50 + troll_flash_chance: 50 + scp_tp_chance: 20 + one_hp_left_chance: 15 + primed_vase_chance: 20 + shit_pants_chance: 40 + fake_cassie_chance: 50 + turn_into_scp_chance: 30 + inventory_reset_chance: 20 + class_swap_chance: 10 + instant_explosion_chance: 10 + player_swap_chance: 20 + kick_chance: 5 + spect_swap_chance: 10 + tesla_tp_chance: 15 + inventory_swap_chance: 20 + handcuff_chance: 10 + random_teleport_chance: 15 ``` \ No newline at end of file From 5211a511fc3e6e0df9c92a1084f55c9d3ca073c9 Mon Sep 17 00:00:00 2001 From: Miki_hero <100715076+Mikihero@users.noreply.github.com> Date: Sun, 1 Oct 2023 02:02:52 +0200 Subject: [PATCH 7/7] removed unnecessary using --- BetterCoinflips/EventHandlers.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/BetterCoinflips/EventHandlers.cs b/BetterCoinflips/EventHandlers.cs index b921466..55da3fe 100644 --- a/BetterCoinflips/EventHandlers.cs +++ b/BetterCoinflips/EventHandlers.cs @@ -7,7 +7,6 @@ using Exiled.API.Features.Pickups; using Exiled.Events.EventArgs.Map; using Exiled.Events.EventArgs.Player; -using Unity.Collections.LowLevel.Unsafe; using UnityEngine; namespace BetterCoinflips