diff --git a/Commands/supplycassie.cs b/Commands/supplycassie.cs new file mode 100644 index 0000000..a27dab6 --- /dev/null +++ b/Commands/supplycassie.cs @@ -0,0 +1,26 @@ +using System; +using CommandSystem; +using Exiled.API.Features; + +namespace VeryUsualDay.Commands +{ + [CommandHandler(typeof(RemoteAdminCommandHandler))] + public class supplycassie : ICommand + { + public string Command => "supplycassie"; + public string[] Aliases => new string[] { }; + public string Description => "Вызывает CASSIE о доставке SCP. Только для СОД."; + + public bool Execute(ArraySegment arguments, ICommandSender sender, out string response) + { + if (!VeryUsualDay.Instance.IsEnabledInRound) + { + response = "Режим СОД не включён"; + return false; + } + Cassie.Message("[Заказ прибыл]: аномальные объекты pitch_0.4 .G1 . . .G1 .G1 pitch_1.00 . . . . . . . . . . . . . .", isNoisy: false, isSubtitles: true); + response = "CASSIE успешно вызвано."; + return true; + } + } +} \ No newline at end of file diff --git a/Commands/vudsupply.cs b/Commands/vudsupply.cs new file mode 100644 index 0000000..5e6411c --- /dev/null +++ b/Commands/vudsupply.cs @@ -0,0 +1,153 @@ +using System; +using System.Linq; +using CommandSystem; +using Exiled.API.Enums; +using Exiled.API.Features; +using Exiled.API.Features.Pickups; +using UnityEngine; + +namespace VeryUsualDay.Commands +{ + [CommandHandler(typeof(RemoteAdminCommandHandler))] + public class vudsupply : ICommand + { + public string Command => "vudsupply"; + public string[] Aliases => new string[] { }; + public string Description => "Поставка припасов на СОДе."; + private Vector3 _coords; + + public bool Execute(ArraySegment arguments, ICommandSender sender, out string response) + { + if (!VeryUsualDay.Instance.IsEnabledInRound) + { + response = "Режим СОД не включён"; + return false; + } + + if (arguments.Count < 1) + { + response = + "Формат команды - vudsupply "; + return false; + } + var args = arguments.ToArray(); + + switch (args[0]) + { + case "med": + for (var i = 0; i < 15; i++) + { + Pickup.CreateAndSpawn(ItemType.Adrenaline, VeryUsualDay.Instance.SupplyTruckCoords, + new Quaternion()); + } + for (var i = 0; i < 20; i++) + { + Pickup.CreateAndSpawn(ItemType.Painkillers, VeryUsualDay.Instance.SupplyTruckCoords, + new Quaternion()); + } + Cassie.Message( + "[Заказ прибыл]: медикаменты pitch_0.4 .G1 . . .G1 .G1 pitch_1.00 . . . . . . . . . . . . . .", + isNoisy: false, isSubtitles: true); + break; + case "emf": + _coords = VeryUsualDay.Instance.EmfSupplyCoords.RandomItem(); + for (var i = 0; i < 5; i++) + { + Pickup.CreateAndSpawn(ItemType.Radio, _coords, new Quaternion()); + } + for (var i = 0; i < 10; i++) + { + Pickup.CreateAndSpawn(ItemType.Medkit, _coords, new Quaternion()); + } + for (var i = 0; i < 3; i++) + { + Pickup.CreateAndSpawn(ItemType.GrenadeFlash, _coords, new Quaternion()); + } + for (var i = 0; i < 20; i++) + { + Pickup.CreateAndSpawn(ItemType.Ammo9x19, _coords, new Quaternion()); + Pickup.CreateAndSpawn(ItemType.Ammo556x45, _coords, new Quaternion()); + Pickup.CreateAndSpawn(ItemType.Ammo762x39, _coords, new Quaternion()); + } + Cassie.Message( + "[ЭВС]: запасы были пополнены. pitch_0.4 .G1 . . .G3", + isNoisy: false, isSubtitles: true); + break; + case "scp": + if (arguments.Count < 3) + { + response = "Формат команды - vudsupply scp "; + return false; + } + switch (args[1]) + { + case "500": + for (var i = 0; i < int.Parse(args[2]); i++) + { + Pickup.CreateAndSpawn(ItemType.SCP500, VeryUsualDay.Instance.SupplyTruckCoords, new Quaternion()); + } + break; + case "1853": + for (var i = 0; i < int.Parse(args[2]); i++) + { + Pickup.CreateAndSpawn(ItemType.SCP1853, VeryUsualDay.Instance.SupplyTruckCoords, new Quaternion()); + } + break; + case "207": + for (var i = 0; i < int.Parse(args[2]); i++) + { + Pickup.CreateAndSpawn(ItemType.SCP207, VeryUsualDay.Instance.SupplyTruckCoords, new Quaternion()); + } + break; + default: + response = "Формат команды - vudsupply scp "; + return false; + } + break; + case "food": + if (arguments.Count < 2) + { + response = "Формат команды - vudsupply food "; + return false; + } + for (var i = 0; i < int.Parse(args[1]); i++) + { + Pickup.CreateAndSpawn(ItemType.Medkit, VeryUsualDay.Instance.SupplyTruckCoords, new Quaternion()); + } + Cassie.Message( + "[Заказ прибыл]: питание pitch_0.4 .G1 . . .G1 .G1 pitch_1.00 . . . . . . . . . . . . . .", + isNoisy: false, isSubtitles: true); + break; + case "security": + _coords = Room.Get(RoomType.LczArmory).Position; + _coords.y += 2f; + for (var i = 0; i < 3; i++) + { + Pickup.CreateAndSpawn(ItemType.Radio, _coords, new Quaternion()); + } + for (var i = 0; i < 2; i++) + { + Pickup.CreateAndSpawn(ItemType.GunCOM15, _coords, new Quaternion()); + } + for (var i = 0; i < 2; i++) + { + Pickup.CreateAndSpawn(ItemType.ArmorLight, _coords, new Quaternion()); + } + for (var i = 0; i < 10; i++) + { + Pickup.CreateAndSpawn(ItemType.Ammo9x19, _coords, new Quaternion()); + } + Cassie.Message( + "[СБ]: запасы были пополнены. pitch_0.4 .G1", + isNoisy: false, isSubtitles: true); + break; + default: + response = "Формат команды - vudsupply "; + return false; + } + + response = "Поставка произведена успешно."; + return true; + } + } +} \ No newline at end of file diff --git a/VeryUsualDay.cs b/VeryUsualDay.cs index f488bd9..52d2fe5 100644 --- a/VeryUsualDay.cs +++ b/VeryUsualDay.cs @@ -39,8 +39,16 @@ public class VeryUsualDay : Plugin public int SpawnedWorkersCounter { get; set; } = 1; public int SpawnedScientistCounter { get; set; } = 1; public int SpawnedSecurityCounter { get; set; } = 1; + private readonly Vector3 _armedPersonnelTowerCoords = new Vector3(-16f, 1014.5f, -32f); private readonly Vector3 _civilianPersonnelTowerCoords = new Vector3(44.4f, 1014.5f, -51.6f); + public readonly Vector3 SupplyTruckCoords = new Vector3(96.85f, 995f, -41.215f); + + public readonly List EmfSupplyCoords = new List + { + new Vector3(-10.682f, 1003f, -32.115f), + new Vector3(-6.873f, 1003f, -32f) + }; public enum Codes { diff --git a/VeryUsualDay.csproj b/VeryUsualDay.csproj index c96ce71..dad4e41 100644 --- a/VeryUsualDay.csproj +++ b/VeryUsualDay.csproj @@ -95,9 +95,11 @@ + +