|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.ComponentModel; |
| 4 | +using Neuron.Core.Meta; |
| 5 | +using PlayerRoles; |
| 6 | +using Syml; |
| 7 | +using Synapse3.SynapseModule.Config; |
| 8 | +using Synapse3.SynapseModule.Map.Rooms; |
| 9 | +using Synapse3.SynapseModule.Role; |
| 10 | +using UnityEngine; |
| 11 | +using YamlDotNet.Serialization; |
| 12 | + |
| 13 | +namespace SerpentsHand; |
| 14 | + |
| 15 | +[Automatic] |
| 16 | +[Serializable] |
| 17 | +[DocumentSection("SerpentsHand")] |
| 18 | +public class Config : IDocumentSection |
| 19 | +{ |
| 20 | + [Description("If friendlyfire for serpentshand is active")] |
| 21 | + public bool FriendlyFire { get; set; } = false; |
| 22 | + |
| 23 | + [Description("The chance that a SerpentsHand Squad spawns instead of a Chaos")] |
| 24 | + public float SpawnChance { get; set; } = 50f; |
| 25 | + |
| 26 | + [Description("The Cassie announcement that plays when SerpentsHand Spawn")] |
| 27 | + public string Cassie { get; set; } = "serpents hand hasentered allremaining"; |
| 28 | + |
| 29 | + [Description("The maximal amount of players that can spawn as SerpentsHand in one squad")] |
| 30 | + public int SpawnSize { get; set; } = 7; |
| 31 | + |
| 32 | + public SHConfig CadetConfig { get; set; } = new(); |
| 33 | + |
| 34 | + public SHConfig PrivateConfig { get; set; } = new(); |
| 35 | + |
| 36 | + public SHConfig SergeantConfig { get; set; } = new(); |
| 37 | + |
| 38 | + public List<string> UnitNames { get; set; } = new() |
| 39 | + { |
| 40 | + "Serpent", |
| 41 | + "Anomaly", |
| 42 | + "Occult", |
| 43 | + "ScarletKing", |
| 44 | + "Hand", |
| 45 | + "Library" |
| 46 | + }; |
| 47 | + |
| 48 | + [Serializable] |
| 49 | + public class SHConfig : IAbstractRoleConfig |
| 50 | + { |
| 51 | + public RoleTypeId Role { get; set; } = RoleTypeId.Tutorial; |
| 52 | + public RoleTypeId VisibleRole { get; set; } = RoleTypeId.None; |
| 53 | + public RoleTypeId OwnRole { get; set; } = RoleTypeId.None; |
| 54 | + public uint EscapeRole { get; set; } = uint.MaxValue; |
| 55 | + public float Health { get; set; } = 120; |
| 56 | + public float MaxHealth { get; set; } = 120; |
| 57 | + public float ArtificialHealth { get; set; } = 0; |
| 58 | + public float MaxArtificialHealth { get; set; } = 75; |
| 59 | + |
| 60 | + public RoomPoint[] PossibleSpawns { get; set; } = new[] |
| 61 | + { |
| 62 | + new RoomPoint("Surface", new Vector3(0f,1.5f,5f), Vector3.zero) |
| 63 | + }; |
| 64 | + |
| 65 | + public SerializedPlayerInventory[] PossibleInventories { get; set; } = new[] |
| 66 | + { |
| 67 | + new SerializedPlayerInventory() |
| 68 | + { |
| 69 | + Ammo = new SerializedAmmo |
| 70 | + { |
| 71 | + Ammo5 = 0, |
| 72 | + Ammo7 = 120, |
| 73 | + Ammo9 = 0, |
| 74 | + Ammo12 = 0, |
| 75 | + Ammo44 = 0 |
| 76 | + }, |
| 77 | + Items = new List<SerializedPlayerItem> |
| 78 | + { |
| 79 | + new((uint)ItemType.KeycardChaosInsurgency, 0f, 0u, Vector3.one, 100, false), |
| 80 | + new((uint)ItemType.Medkit, 0f, 0u, Vector3.one, 100, false), |
| 81 | + new((uint)ItemType.GunLogicer, 100f, 0u, Vector3.one, 100, false), |
| 82 | + new((uint)ItemType.Painkillers, 0f, 0u, Vector3.one, 100, false), |
| 83 | + new((uint)ItemType.ArmorCombat, 0f, 0u, Vector3.one, 100, false) |
| 84 | + } |
| 85 | + } |
| 86 | + }; |
| 87 | + |
| 88 | + [YamlIgnore] |
| 89 | + public bool CustomDisplay { get; set; } = true; |
| 90 | + [YamlIgnore] |
| 91 | + public bool Hierarchy { get; set; } = true; |
| 92 | + [YamlIgnore] |
| 93 | + public bool UseCustomUnitName { get; set; } = true; |
| 94 | + [YamlIgnore] |
| 95 | + public string CustomUnitName { get; set; } |
| 96 | + |
| 97 | + public SerializedVector3 Scale { get; set; } = Vector3.one; |
| 98 | + |
| 99 | + public SHConfig Copy() => new SHConfig() |
| 100 | + { |
| 101 | + Role = Role, |
| 102 | + VisibleRole = VisibleRole, |
| 103 | + EscapeRole = EscapeRole, |
| 104 | + Health = Health, |
| 105 | + MaxHealth = MaxHealth, |
| 106 | + ArtificialHealth = ArtificialHealth, |
| 107 | + MaxArtificialHealth = MaxArtificialHealth, |
| 108 | + PossibleInventories = PossibleInventories, |
| 109 | + PossibleSpawns = PossibleSpawns, |
| 110 | + }; |
| 111 | + } |
| 112 | +} |
0 commit comments