From af038b07887685dafd94bc5e875db53c78c990a6 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 16 Jan 2024 20:00:32 -0500 Subject: [PATCH 01/47] Metempsychosis Returns --- .../Cloning/CloningConsoleSystem.cs | 17 +- Content.Server/Cloning/CloningSystem.cs | 200 ++++++++++++------ .../Components/MedicalScannerComponent.cs | 2 + .../Cloning/MetempsychosisKarmaComponent.cs | 12 ++ .../Cloning/MetempsychoticMachineComponent.cs | 12 ++ .../Cloning/MetempsychoticMachineSystem.cs | 76 +++++++ .../Humanoid/HumanoidAppearanceComponent.cs | 9 + .../SharedHumanoidAppearanceSystem.cs | 4 + .../Devices/CircuitBoards/production.yml | 21 ++ .../Machines/metempsychoticMachine.yml | 27 +++ .../Nyanotrasen/Research/biochemical.yml.yml | 14 ++ .../Nyanotrasen/metempsychoticHumanoids.yml | 15 ++ .../metempsychoticNonHumanoids.yml | 9 + .../Machines/metempsychotic.rsi/meta.json | 27 +++ .../Machines/metempsychotic.rsi/pod_0.png | Bin 0 -> 6842 bytes .../Machines/metempsychotic.rsi/pod_1.png | Bin 0 -> 16026 bytes 16 files changed, 368 insertions(+), 77 deletions(-) create mode 100644 Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs create mode 100644 Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs create mode 100644 Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs create mode 100644 Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml create mode 100644 Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml create mode 100644 Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml create mode 100644 Resources/Prototypes/Nyanotrasen/metempsychoticNonHumanoids.yml create mode 100644 Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json create mode 100644 Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/pod_0.png create mode 100644 Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/pod_1.png diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index 0be9b641345..ff5a3718dc8 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -1,23 +1,23 @@ using System.Linq; +using JetBrains.Annotations; using Content.Server.Administration.Logs; +using Content.Server.Medical.Components; using Content.Server.Cloning.Components; using Content.Server.DeviceLinking.Systems; -using Content.Server.Medical.Components; using Content.Server.Power.Components; -using Content.Server.Power.EntitySystems; using Content.Server.UserInterface; -using Content.Shared.Cloning; +using Content.Server.Power.EntitySystems; +using Robust.Server.GameObjects; +using Robust.Server.Player; using Content.Shared.Cloning.CloningConsole; +using Content.Shared.Cloning; +using Content.Shared.Mind; using Content.Shared.Database; using Content.Shared.DeviceLinking; using Content.Shared.DeviceLinking.Events; using Content.Shared.IdentityManagement; -using Content.Shared.Mind; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; -using JetBrains.Annotations; -using Robust.Server.GameObjects; -using Robust.Server.Player; namespace Content.Server.Cloning { @@ -32,7 +32,6 @@ public sealed class CloningConsoleSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly PowerReceiverSystem _powerReceiverSystem = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; - public override void Initialize() { base.Initialize(); @@ -170,7 +169,7 @@ public void TryClone(EntityUid uid, EntityUid cloningPodUid, EntityUid scannerUi if (mind.UserId.HasValue == false || mind.Session == null) return; - if (_cloningSystem.TryCloning(cloningPodUid, body.Value, (mindId, mind), cloningPod, scannerComp.CloningFailChanceMultiplier)) + if (_cloningSystem.TryCloning(cloningPodUid, body.Value, (mindId, mind), cloningPod, scannerComp.CloningFailChanceMultiplier, scannerComp.MetemKarmaBonus)) _adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(uid)} successfully cloned {ToPrettyString(body.Value)}."); } diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index fcb162d484a..6c30d19be3f 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -1,42 +1,50 @@ +using Content.Shared.GameTicking; +using Content.Shared.Damage; +using Content.Shared.Examine; +using Content.Shared.Cloning; +using Content.Shared.Speech; +using Content.Shared.Atmos; +using Content.Shared.Tag; +using Content.Shared.CCVar; +using Content.Shared.Preferences; +using Content.Shared.Emoting; +using Content.Server.Psionics; +using Content.Server.Cloning.Components; +using Content.Server.Speech.Components; +using Content.Server.Power.EntitySystems; using Content.Server.Atmos.EntitySystems; +using Content.Server.StationEvents.Components; +using Content.Server.EUI; +using Content.Server.Humanoid; +using Content.Server.Ghost.Roles.Components; +using Content.Shared.Chemistry.Components; +using Content.Server.Fluids.EntitySystems; using Content.Server.Chat.Systems; -using Content.Server.Cloning.Components; using Content.Server.Construction; +using Content.Server.DeviceLinking.Events; using Content.Server.DeviceLinking.Systems; -using Content.Server.EUI; -using Content.Server.Fluids.EntitySystems; -using Content.Server.Humanoid; -using Content.Server.Jobs; using Content.Server.Materials; -using Content.Server.Popups; -using Content.Server.Power.EntitySystems; -using Content.Server.Traits.Assorted; -using Content.Shared.Atmos; -using Content.Shared.CCVar; -using Content.Shared.Chemistry.Components; -using Content.Shared.Cloning; -using Content.Shared.Damage; +using Content.Server.Jobs; +using Content.Shared.Mind; +using Content.Shared.Mind.Components; +using Content.Server.Preferences.Managers; using Content.Shared.DeviceLinking.Events; using Content.Shared.Emag.Components; -using Content.Shared.Emag.Systems; -using Content.Shared.Examine; -using Content.Shared.GameTicking; using Content.Shared.Humanoid; -using Content.Shared.Mind; -using Content.Shared.Mind.Components; +using Content.Shared.Humanoid.Prototypes; +using Content.Shared.Zombies; using Content.Shared.Mobs.Systems; using Content.Shared.Roles.Jobs; -using Robust.Server.Containers; using Robust.Server.GameObjects; +using Robust.Server.Containers; using Robust.Server.Player; -using Robust.Shared.Audio; -using Robust.Shared.Audio.Systems; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; using Robust.Shared.Configuration; using Robust.Shared.Containers; using Robust.Shared.Physics.Components; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; -using Content.Server.Psionics; //Nyano - Summary: allows the potential psionic ability to be written to the character. +using Robust.Shared.GameObjects.Components.Localization; +using Content.Server.Traits.Assorted; namespace Content.Server.Cloning { @@ -57,13 +65,15 @@ public sealed class CloningSystem : EntitySystem [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly PuddleSystem _puddleSystem = default!; [Dependency] private readonly ChatSystem _chatSystem = default!; - [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly IConfigurationManager _configManager = default!; [Dependency] private readonly MaterialStorageSystem _material = default!; - [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly MetempsychoticMachineSystem _metem = default!; + [Dependency] private readonly TagSystem _tag = default!; + [Dependency] private readonly IServerPreferencesManager _prefs = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; [Dependency] private readonly MetaDataSystem _metaSystem = default!; [Dependency] private readonly SharedJobSystem _jobs = default!; + [Dependency] private readonly MetaDataSystem _metaData = default!; public readonly Dictionary ClonesWaitingForMind = new(); public const float EasyModeCloningCost = 0.7f; @@ -80,7 +90,6 @@ public override void Initialize() SubscribeLocalEvent(OnPortDisconnected); SubscribeLocalEvent(OnAnchor); SubscribeLocalEvent(OnExamined); - SubscribeLocalEvent(OnEmagged); } private void OnComponentInit(EntityUid uid, CloningPodComponent clonePod, ComponentInit args) @@ -156,7 +165,7 @@ private void OnExamined(EntityUid uid, CloningPodComponent component, ExaminedEv args.PushMarkup(Loc.GetString("cloning-pod-biomass", ("number", _material.GetMaterialAmount(uid, component.RequiredMaterial)))); } - public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity mindEnt, CloningPodComponent? clonePod, float failChanceModifier = 1) + public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity mindEnt, CloningPodComponent? clonePod, float failChanceModifier = 1, float karmaBonus = 0.25f) { if (!Resolve(uid, ref clonePod)) return false; @@ -186,6 +195,13 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(bodyToClone, out var humanoid)) return false; // whatever body was to be cloned, was not a humanoid + // Begin Nyano-code: allow paradox anomalies to be cloned. + var pref = humanoid.LastProfileLoaded; + // End Nyano-code. + + if (pref == null) + return false; + if (!_prototype.TryIndex(humanoid.Species, out var speciesPrototype)) return false; @@ -236,25 +252,15 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(uid); - return true; + if (clonePod.ConnectedConsole != null) + _chatSystem.TrySendInGameICMessage(clonePod.ConnectedConsole.Value, Loc.GetString("cloning-console-chat-no-genetics", ("units", cloningCost)), InGameICChatType.Speak, false); + return false; } + // End Nyano-code. } // end of genetic damage checks - var mob = Spawn(speciesPrototype.Prototype, Transform(uid).MapPosition); - _humanoidSystem.CloneAppearance(bodyToClone, mob); - - ///Nyano - Summary: adds the potential psionic trait to the reanimated mob. - EnsureComp(mob); - - var ev = new CloningEvent(bodyToClone, mob); - RaiseLocalEvent(bodyToClone, ref ev); - - if (!ev.NameHandled) - _metaSystem.SetEntityName(mob, MetaData(bodyToClone).EntityName); + var mob = FetchAndSpawnMob(clonePod, pref, speciesPrototype, humanoid, bodyToClone, karmaBonus); var cloneMindReturn = EntityManager.AddComponent(mob); cloneMindReturn.Mind = mind; @@ -266,7 +272,8 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(uid); - // TODO: Ideally, components like this should be components on the mind entity so this isn't necessary. + // TODO: Ideally, components like this should be on a mind entity so this isn't neccesary. + // Remove this when 'mind entities' are added. // Add on special job components to the mob. if (_jobs.MindTryGetJob(mindEnt, out _, out var prototype)) { @@ -308,19 +315,6 @@ public override void Update(float frameTime) } } - /// - /// On emag, spawns a failed clone when cloning process fails which attacks nearby crew. - /// - private void OnEmagged(EntityUid uid, CloningPodComponent clonePod, ref GotEmaggedEvent args) - { - if (!this.IsPowered(uid, EntityManager)) - return; - - _audio.PlayPvs(clonePod.SparkSound, uid); - _popupSystem.PopupEntity(Loc.GetString("cloning-pod-component-upgrade-emag-requirement"), uid); - args.Handled = true; - } - public void Eject(EntityUid uid, CloningPodComponent? clonePod) { if (!Resolve(uid, ref clonePod)) @@ -343,14 +337,9 @@ private void EndFailedCloning(EntityUid uid, CloningPodComponent clonePod) clonePod.CloningProgress = 0f; UpdateStatus(uid, CloningPodStatus.Idle, clonePod); var transform = Transform(uid); - var indices = _transformSystem.GetGridTilePositionOrDefault((uid, transform)); - var tileMix = _atmosphereSystem.GetTileMixture(transform.GridUid, null, indices, true); + var indices = _transformSystem.GetGridOrMapTilePosition(uid); - if (HasComp(uid)) - { - _audio.PlayPvs(clonePod.ScreamSound, uid); - Spawn(clonePod.MobSpawnId, transform.Coordinates); - } + var tileMix = _atmosphereSystem.GetTileMixture(transform.GridUid, null, indices, true); Solution bloodSolution = new(); @@ -364,15 +353,90 @@ private void EndFailedCloning(EntityUid uid, CloningPodComponent clonePod) } _puddleSystem.TrySpillAt(uid, bloodSolution, out _); - if (!HasComp(uid)) - { - _material.SpawnMultipleFromMaterial(_robustRandom.Next(1, (int) (clonePod.UsedBiomass / 2.5)), clonePod.RequiredMaterial, Transform(uid).Coordinates); - } + _material.SpawnMultipleFromMaterial(_robustRandom.Next(1, (int) (clonePod.UsedBiomass / 2.5)), clonePod.RequiredMaterial, Transform(uid).Coordinates); clonePod.UsedBiomass = 0; RemCompDeferred(uid); } + /// + /// Handles fetching the mob and any appearance stuff... + /// + private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharacterProfile pref, SpeciesPrototype speciesPrototype, HumanoidAppearanceComponent humanoid, EntityUid bodyToClone, float karmaBonus) + { + List sexes = new(); + bool switchingSpecies = false; + bool applyKarma = false; + var name = pref.Name; + var toSpawn = speciesPrototype.Prototype; + TryComp(bodyToClone, out var oldKarma); + + if (TryComp(clonePod.Owner, out var metem)) + { + toSpawn = _metem.GetSpawnEntity(clonePod.Owner, karmaBonus, speciesPrototype, out var newSpecies, oldKarma?.Score, metem); + applyKarma = true; + + if (newSpecies != null) + { + sexes = newSpecies.Sexes; + + if (speciesPrototype.ID != newSpecies.ID) + { + switchingSpecies = true; + } + + speciesPrototype = newSpecies; + } + } + + var mob = Spawn(toSpawn, Transform(clonePod.Owner).MapPosition); + if (TryComp(mob, out var newHumanoid)) + { + if (switchingSpecies || HasComp(bodyToClone)) + { + pref = HumanoidCharacterProfile.RandomWithSpecies(newHumanoid.Species); + if (sexes.Contains(humanoid.Sex)) + pref = pref.WithSex(humanoid.Sex); + + pref = pref.WithGender(humanoid.Gender); + pref = pref.WithAge(humanoid.Age); + + } + _humanoidSystem.LoadProfile(mob, pref); + } + + if (applyKarma) + { + var karma = EnsureComp(mob); + karma.Score++; + if (oldKarma != null) + karma.Score += oldKarma.Score; + } + + var ev = new CloningEvent(bodyToClone, mob); + RaiseLocalEvent(bodyToClone, ref ev); + + if (!ev.NameHandled) + _metaData.SetEntityName(mob, name); + + var grammar = EnsureComp(mob); + grammar.ProperNoun = true; + grammar.Gender = humanoid.Gender; + Dirty(grammar); + + EnsureComp(mob); + EnsureComp(mob); + EnsureComp(mob); + RemComp(mob); + RemComp(mob); + RemComp(mob); + RemComp(mob); + + _tag.AddTag(mob, "DoorBumpOpener"); + + return mob; + } + public void Reset(RoundRestartCleanupEvent ev) { ClonesWaitingForMind.Clear(); diff --git a/Content.Server/Medical/Components/MedicalScannerComponent.cs b/Content.Server/Medical/Components/MedicalScannerComponent.cs index fdfb19cbacd..cde4f6f6093 100644 --- a/Content.Server/Medical/Components/MedicalScannerComponent.cs +++ b/Content.Server/Medical/Components/MedicalScannerComponent.cs @@ -15,6 +15,8 @@ public sealed partial class MedicalScannerComponent : SharedMedicalScannerCompon [ViewVariables(VVAccess.ReadWrite)] public float CloningFailChanceMultiplier = 1f; + //Nyano, needed for Metem Machine. It's not like Wizden will ever touch this again though, since Cloning is no longer maintained upstream + public float MetemKarmaBonus = 0.25f; [DataField("machinePartCloningFailChance", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartCloningFailChance = "Capacitor"; diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs new file mode 100644 index 00000000000..8327603d77c --- /dev/null +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs @@ -0,0 +1,12 @@ +namespace Content.Server.Cloning +{ + /// + /// This tracks how many times you have already been cloned and lowers your chance of getting a humanoid each time. + /// + [RegisterComponent] + public sealed partial class MetempsychosisKarmaComponent : Component + { + [DataField("score")] + public int Score = 0; + } +} diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs new file mode 100644 index 00000000000..5d52ab49147 --- /dev/null +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs @@ -0,0 +1,12 @@ +namespace Content.Server.Cloning +{ + [RegisterComponent] + public sealed partial class MetempsychoticMachineComponent : Component + { + /// + /// Chance you will spawn as a humanoid instead of a non humanoid. + /// + [DataField("humanoidBaseChance")] + public float HumanoidBaseChance = 0.75f; + } +} diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs new file mode 100644 index 00000000000..1217116adca --- /dev/null +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -0,0 +1,76 @@ +using Content.Shared.Humanoid.Prototypes; +using Content.Shared.Random; +using Content.Shared.Random.Helpers; +using Robust.Shared.Random; +using Robust.Shared.Prototypes; + +namespace Content.Server.Cloning +{ + public sealed class MetempsychoticMachineSystem : EntitySystem + { + public const string MetempsychoticHumanoidPool = "MetempsychoticHumanoidPool"; + public const string MetempsychoticNonHumanoidPool = "MetempsychoticNonhumanoidPool"; + + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + + public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype oldSpecies, out SpeciesPrototype? species, int? karma = null, MetempsychoticMachineComponent? component = null) + { + if (!Resolve(uid, ref component)) + { + Logger.Error("Tried to get a spawn target from someone that was not a metempsychotic machine..."); + species = null; + return "MobHuman"; + } + + var chance = component.HumanoidBaseChance + karmaBonus; + + if (karma != null) + { + chance -= ((1 - component.HumanoidBaseChance) * (float) karma); + } + + if (chance > 1) + { + if (_random.Prob(chance - 1)) + { + species = oldSpecies; + return oldSpecies.Prototype; + } + else + { + chance = 1; + } + } + + chance = Math.Clamp(chance, 0, 1); + + if (_random.Prob(chance)) + { + if (_prototypeManager.TryIndex(MetempsychoticHumanoidPool, out var humanoidPool)) + { + if (_prototypeManager.TryIndex(humanoidPool.Pick(), out var speciesPrototype)) + { + species = speciesPrototype; + return speciesPrototype.Prototype; + } else + { + species = null; + Logger.Error("Could not index species for metempsychotic machine..."); + return "MobHuman"; + } + } + } + + species = null; + + if (!_prototypeManager.TryIndex(MetempsychoticNonHumanoidPool, out var nonHumanoidPool)) + { + Logger.Error("Could not index the pool of non humanoids for metempsychotic machine!"); + return "MobHuman"; + } + + return nonHumanoidPool.Pick(); + } + } +} diff --git a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs index 82d6964522c..8618e557b27 100644 --- a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs +++ b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs @@ -1,5 +1,6 @@ using Content.Shared.Humanoid.Markings; using Content.Shared.Humanoid.Prototypes; +using Content.Shared.Preferences; using Robust.Shared.Enums; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; @@ -82,6 +83,14 @@ public sealed partial class HumanoidAppearanceComponent : Component /// [ViewVariables(VVAccess.ReadOnly)] public Color? CachedFacialHairColor; + + // Begin Nyano-code: allow paradox anomalies to be cloned. + /// + /// The last profile loaded onto this entity. + /// + [ViewVariables(VVAccess.ReadOnly)] + public HumanoidCharacterProfile? LastProfileLoaded; + // End Nyano-code. } [DataDefinition] diff --git a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs index 02e29549d48..a76c65f9193 100644 --- a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs +++ b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs @@ -328,6 +328,10 @@ public virtual void LoadProfile(EntityUid uid, HumanoidCharacterProfile profile, humanoid.Age = profile.Age; + // Begin Nyano-code: save the last profile for paradox anomalies. + humanoid.LastProfileLoaded = profile; + // End Nyano-code. + Dirty(humanoid); } diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/CircuitBoards/production.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/CircuitBoards/production.yml index a1a7a859e08..0e4c262b543 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/CircuitBoards/production.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/CircuitBoards/production.yml @@ -1,3 +1,24 @@ +- type: entity + id: MetempsychoticMachineCircuitboard + parent: BaseMachineCircuitboard + name: metempsychotic machine machine board + description: A machine printed circuit board for a cloning pod + components: + - type: Sprite + state: medical + - type: MachineBoard + prototype: MetempsychoticMachine + requirements: + Capacitor: 2 + Manipulator: 2 + materialRequirements: + Glass: 1 + Cable: 1 + - type: ReverseEngineering + difficulty: 3 + recipes: + - MetempsychoticMachineCircuitboard + - type: entity id: ReverseEngineeringMachineCircuitboard parent: BaseMachineCircuitboard diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml new file mode 100644 index 00000000000..beb50dc417d --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml @@ -0,0 +1,27 @@ +- type: entity + parent: CloningPod + id: MetempsychoticMachine + name: metempsychotic machine + description: Speeds along the transmigration of a soul to its next vessel. + components: + - type: MetempsychoticMachine + - type: CloningPod + constantBiomassCost: 35 + checkGeneticDamage: false + - type: Machine + board: MetempsychoticMachineCircuitboard + - type: Sprite + sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi + snapCardinals: true + layers: + - state: pod_0 + - type: Appearance + - type: GenericVisualizer + visuals: + enum.CloningPodVisuals.Status: + base: + Cloning: { state: pod_1 } + NoMind: { state: pod_1 } + Gore: { state: pod_1 } + Idle: { state: pod_0 } + - type: Psionic diff --git a/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml b/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml new file mode 100644 index 00000000000..7bd281aa5db --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml @@ -0,0 +1,14 @@ +- type: technology + id: Metempsychosis + name: research-technology-metempsychosis + icon: + sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi + state: pod_0 + discipline: Biochemical + tier: 2 + cost: 15000 + recipeUnlocks: + - BiomassReclaimerMachineCircuitboard + - CloningConsoleComputerCircuitboard + - MedicalScannerMachineCircuitboard + - MetempsychoticMachineCircuitboard diff --git a/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml b/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml new file mode 100644 index 00000000000..20c52548b77 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml @@ -0,0 +1,15 @@ +- type: weightedRandom + id: MetempsychoticHumanoidPool # Species prototypes + weights: + Human: 1 + Felinid: 1 + Oni: 1 + Arachnid: 1 + Harpy: 1 + Moth: 1 + Reptilian: 0.5 + Dwarf: 0.5 + SlimePerson: 0.5 + Vulpkanin: 0.5 + Vox: 0.1 + Skeleton: 0.05 diff --git a/Resources/Prototypes/Nyanotrasen/metempsychoticNonHumanoids.yml b/Resources/Prototypes/Nyanotrasen/metempsychoticNonHumanoids.yml new file mode 100644 index 00000000000..dcbe23f6082 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/metempsychoticNonHumanoids.yml @@ -0,0 +1,9 @@ +- type: weightedRandom + id: MetempsychoticNonhumanoidPool # Entity prototypes + weights: + MobMonkey: 1 + MobGorilla: 1 + # MobKangaroo: 0.5 # Mobs here need to be either VERY funny or up to standard. + MobXenoQueen: 0.01 + MobCrab: 0.01 + MobPenguin: 1 #ODJ's orders diff --git a/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json b/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json new file mode 100644 index 00000000000..36bd519f6c9 --- /dev/null +++ b/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "license": "CC-BY-4.0", + "copyright": "Created by discord user Four Hydra Heads#2075 (971500282364178512)", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "pod_0" + }, + { + "name": "pod_1", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/pod_0.png b/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/pod_0.png new file mode 100644 index 0000000000000000000000000000000000000000..b7a870e9d2a661c67165cb5472430ee6a5b5a24d GIT binary patch literal 6842 zcmeHKc{r5)*PmpGvb2aSnMQVIGcq&C9@1DRk)>v3Vi+?cgDfdovP4<4Bv~p+QMOdF zM6whqQ&h+n*;^>RH}&-NyzlS2-s`!p_x-O~@B4hu`J8h;=X}4{xub2Y%!Gxcgg_vW zu!Xsa9q?QSo)zpv7WhXT{k-y28bM_TVrUytDZG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u-9ow?EC4{KunAxe z-OHPW<>*0Hak0SliWmj~ud1*;^&pNo8?dntlLAITQBb&sDTj6x3E3?K)@72ZSUZzF zKOulSJ%|UJ&A`H7{{H?@e@&3Z+3skcb*6f~Gdm3P2?(2qY1st&Jv85kE-!h0gM! zvi%86ilIBeBfu5Vo~vAel~)U;^3PcOJt!+x00;w`4It^i69)U4Fl^<__$y;w*#F=} zcU9rHLk6(>Ap;IC;4FmwIt+hu2E_aS`TALl|4$cS@E<4tir+tU{h{k$G4QXH|8&6vZ2ug8YGpCFZQx9PpsUPqZ{M0exS2U#KlS3rGYR=1wdS zX#M7u?;21>rX(N~U|Zl!1xD8JZPtXZ`66}=1mX#>FfqhC)=#G1^R&0!@=*W!xl5O| zaIaevAh&5^7vIQ>Z89v1uoFlX5ve{GPIOhxcOJ80m!1^KwPA0LR9#*pf<-Hf2!#tq zY$9DYcTRq)2)j{)!ljH{2*4R7^{1V@$SDZw_%ho*l9_paX}io#i(64l(kY(USnE;HQFr&mPz;hc4EFhA^VIl^&QM0qX1TM?OQdx;CyQF3qXtE{V<`!5lQTn2dQaeT(>d=$Keo7JJkAiTjE=m8g{B zu`T62klSiPAb*Ju$#Jjm=$*hFJ=2|po``Q+`?y2n@XhiAu^s(FiLDbzX%Vf$wThNH zRgXU$&p5d6^A`M(pnNNo%zbWtH{R*(jbiCHuJiP+4?H`}7`Dj{} z?YwL&aM%4KXOWTTr8N6pvKfk!;>>xiFKdZzJX`W2 z;)-!vn*#iNW^u9SJw3#Zusi);%%nDjQoMzIiYi+7a;Q_n2kV+XWTd}a~G7T;_BC+Ij5|HDqr1*l_QEw|=+kpe>$Sqr1~k98n@ra9X1mGe V%F6?q+CX1|EKIFTN{kMN{}(E?8}k4F literal 0 HcmV?d00001 diff --git a/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/pod_1.png b/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/pod_1.png new file mode 100644 index 0000000000000000000000000000000000000000..750e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ko+@_)1IzjXbN82BG4|2Mn- zkI{wvugfX0)9Wh8>-AzuOVm{C^+F5YLP<^<@bc$f(D5ndRf6OqukQ{3uu=c{KzWyl zdAVd*SWqlKTP@$biU=VxdJrjR$3Lrbz+a0+Fo?p-7Ggv3XR)Xof{qUW zz}_lIOK5v9A7`7|80wIG>ni7PJp4WTbd)+*6Q?t!evlRVz05H3p%!`MN`g_R3PYz@ zbh!I~!E-H9v#BCZkmS3je-a0|LF7=yfI;|EU-Dow=JI%*hr-(tyNpJ^XpHN;wd~UC z)pbAjot-BNm($an>c&azW;lKsn9=MQm+ z>2jShc&GsM1=WZk&V#;*K2iV0>zH0sW3A8jQctG$&&Kos@i!aNFd5y`#4z0v>xfND zWC(z8dcm{j&k~xvfx8HrruNiN_+r9SAyTYG-Y<*q3oo~4K0%4U>5AjU6lhN@;j(o* z7I}(2naS4;Bvd)oU6`eIKf+_Xl9gXtA?MlhWr;kKMi@6~Lj}n9TOy(YQz)E%ep4svih3aY@?NZAGP`e5#@J3%n}gE&*e$p*ki`3I<%ntI zlven%+^t(nWeidFbB*CG_Am~TqybDkd*1zCwQ#C@DFEbSKVXog_&1rg$8o{mb5>e2yu_Z8N`Bupwo zYF{$$$d=Y)iIt=>k>Tc_BR+Xy?}VtWL6O~B61=-R?+(M$24TE;F*+m>K1;SGK#l9W zbtpO^&(ZDFcf{;D&|%32zRBO7A{rPvLnbp`c0d0fiCIB0nq5nY-4m--jiz@Wd*LvTLZF&%jN{_dzQ zbIbp!+)@HNe0~2Cf4i~x*Ur7f>l}<70T!!Gj_8(P*!Z7d06b-=AvZp?Es1pd+otw> zd)%RYPIB<(rB9L%uz;*PN%HPY;2+oiA0514h+wRhVDNkQzSc>Af{dzkjig!V{{lrv Bb3y Date: Tue, 16 Jan 2024 20:15:14 -0500 Subject: [PATCH 02/47] Last updates --- .../Cloning/CloningConsoleSystem.cs | 2 +- Content.Server/Cloning/CloningSystem.cs | 35 ++++++++++++++++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index ff5a3718dc8..54b76547c7e 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -168,7 +168,7 @@ public void TryClone(EntityUid uid, EntityUid cloningPodUid, EntityUid scannerUi if (mind.UserId.HasValue == false || mind.Session == null) return; - + // Nyano: Adds scannerComp.MetemKarmaBonus if (_cloningSystem.TryCloning(cloningPodUid, body.Value, (mindId, mind), cloningPod, scannerComp.CloningFailChanceMultiplier, scannerComp.MetemKarmaBonus)) _adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(uid)} successfully cloned {ToPrettyString(body.Value)}."); } diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 6c30d19be3f..4bf3b618f35 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -25,11 +25,15 @@ using Content.Server.DeviceLinking.Systems; using Content.Server.Materials; using Content.Server.Jobs; +using Content.Server.Popups; +using Robust.Shared.Audio; +using Robust.Shared.Audio.Systems; using Content.Shared.Mind; using Content.Shared.Mind.Components; using Content.Server.Preferences.Managers; using Content.Shared.DeviceLinking.Events; using Content.Shared.Emag.Components; +using Content.Shared.Emag.Systems; using Content.Shared.Humanoid; using Content.Shared.Humanoid.Prototypes; using Content.Shared.Zombies; @@ -65,8 +69,10 @@ public sealed class CloningSystem : EntitySystem [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly PuddleSystem _puddleSystem = default!; [Dependency] private readonly ChatSystem _chatSystem = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly IConfigurationManager _configManager = default!; [Dependency] private readonly MaterialStorageSystem _material = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly MetempsychoticMachineSystem _metem = default!; [Dependency] private readonly TagSystem _tag = default!; [Dependency] private readonly IServerPreferencesManager _prefs = default!; @@ -164,7 +170,7 @@ private void OnExamined(EntityUid uid, CloningPodComponent component, ExaminedEv args.PushMarkup(Loc.GetString("cloning-pod-biomass", ("number", _material.GetMaterialAmount(uid, component.RequiredMaterial)))); } - + // Nyano: Adds float karmaBonus public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity mindEnt, CloningPodComponent? clonePod, float failChanceModifier = 1, float karmaBonus = 0.25f) { if (!Resolve(uid, ref clonePod)) @@ -273,7 +279,6 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(uid); // TODO: Ideally, components like this should be on a mind entity so this isn't neccesary. - // Remove this when 'mind entities' are added. // Add on special job components to the mob. if (_jobs.MindTryGetJob(mindEnt, out _, out var prototype)) { @@ -315,6 +320,19 @@ public override void Update(float frameTime) } } + /// + /// On emag, spawns a failed clone when cloning process fails which attacks nearby crew. + /// + private void OnEmagged(EntityUid uid, CloningPodComponent clonePod, ref GotEmaggedEvent args) + { + if (!this.IsPowered(uid, EntityManager)) + return; + + _audio.PlayPvs(clonePod.SparkSound, uid); + _popupSystem.PopupEntity(Loc.GetString("cloning-pod-component-upgrade-emag-requirement"), uid); + args.Handled = true; + } + public void Eject(EntityUid uid, CloningPodComponent? clonePod) { if (!Resolve(uid, ref clonePod)) @@ -337,9 +355,13 @@ private void EndFailedCloning(EntityUid uid, CloningPodComponent clonePod) clonePod.CloningProgress = 0f; UpdateStatus(uid, CloningPodStatus.Idle, clonePod); var transform = Transform(uid); - var indices = _transformSystem.GetGridOrMapTilePosition(uid); - + var indices = _transformSystem.GetGridTilePositionOrDefault((uid, transform)); var tileMix = _atmosphereSystem.GetTileMixture(transform.GridUid, null, indices, true); + if (HasComp(uid)) + { + _audio.PlayPvs(clonePod.ScreamSound, uid); + Spawn(clonePod.MobSpawnId, transform.Coordinates); + } Solution bloodSolution = new(); @@ -353,7 +375,10 @@ private void EndFailedCloning(EntityUid uid, CloningPodComponent clonePod) } _puddleSystem.TrySpillAt(uid, bloodSolution, out _); - _material.SpawnMultipleFromMaterial(_robustRandom.Next(1, (int) (clonePod.UsedBiomass / 2.5)), clonePod.RequiredMaterial, Transform(uid).Coordinates); + if (!HasComp(uid)) + { + _material.SpawnMultipleFromMaterial(_robustRandom.Next(1, (int) (clonePod.UsedBiomass / 2.5)), clonePod.RequiredMaterial, Transform(uid).Coordinates); + } clonePod.UsedBiomass = 0; RemCompDeferred(uid); From a982402656741f3a003485c5adb9c6c2e49170db Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 16 Jan 2024 20:24:39 -0500 Subject: [PATCH 03/47] Fixin the linter --- .../nyanotrasen/research/technologies.ftl | 1 + .../Machines/metempsychoticMachine.yml | 2 -- .../Nyanotrasen/Recipes/Lathes/electronics.yml | 18 +++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Resources/Locale/en-US/nyanotrasen/research/technologies.ftl b/Resources/Locale/en-US/nyanotrasen/research/technologies.ftl index 6b0debd6fd8..2aa6625c2c4 100644 --- a/Resources/Locale/en-US/nyanotrasen/research/technologies.ftl +++ b/Resources/Locale/en-US/nyanotrasen/research/technologies.ftl @@ -1,2 +1,3 @@ research-technology-psionic-countermeasures = Psionic Countermeasures research-technology-teleportation = Teleportation +research-technology-metempsychosis = Metempsychosis diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml index beb50dc417d..4e67b9daf10 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml @@ -6,8 +6,6 @@ components: - type: MetempsychoticMachine - type: CloningPod - constantBiomassCost: 35 - checkGeneticDamage: false - type: Machine board: MetempsychoticMachineCircuitboard - type: Sprite diff --git a/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/electronics.yml b/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/electronics.yml index 591b8aec081..418864cd408 100644 --- a/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/electronics.yml +++ b/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/electronics.yml @@ -1,11 +1,11 @@ -#- type: latheRecipe -# id: MetempsychoticMachineCircuitboard -# result: MetempsychoticMachineCircuitboard -# completetime: 4 -# materials: -# Steel: 100 -# Glass: 900 -# Gold: 100 +- type: latheRecipe + id: MetempsychoticMachineCircuitboard + result: MetempsychoticMachineCircuitboard + completetime: 4 + materials: + Steel: 100 + Glass: 900 + Gold: 100 - type: latheRecipe id: ReverseEngineeringMachineCircuitboard @@ -50,4 +50,4 @@ completetime: 4 materials: Steel: 100 - Glass: 900 \ No newline at end of file + Glass: 900 From 8f10d6b882d19624969a65df7c2ec321f56b67a8 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 16 Jan 2024 20:34:01 -0500 Subject: [PATCH 04/47] Update lathe.yml --- Resources/Prototypes/Entities/Structures/Machines/lathe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 65492628e38..b3f7a98aff6 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -411,7 +411,7 @@ - MailingUnitElectronics - SalvageMagnetMachineCircuitboard - StationMapElectronics -# - MetempsychoticMachineCircuitboard + - MetempsychoticMachineCircuitboard - DeepFryerMachineCircuitboard # End Nyano additions - SalvageExpeditionsComputerCircuitboard # DeltaV From a9dbde194eaea7ec57db62462066e078af028b57 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Wed, 17 Jan 2024 02:19:13 -0500 Subject: [PATCH 05/47] Update CloningSystem.cs --- Content.Server/Cloning/CloningSystem.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 4bf3b618f35..929b1825a89 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -258,9 +258,10 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(uid); + return true; } // End Nyano-code. } From b88d3c3a6763e3630fa2604871b2dbe4b387384e Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 00:06:28 -0500 Subject: [PATCH 06/47] Fixing the random name bug --- Content.Server/Cloning/CloningSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 929b1825a89..2e7e1322a3a 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -443,7 +443,7 @@ private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharact RaiseLocalEvent(bodyToClone, ref ev); if (!ev.NameHandled) - _metaData.SetEntityName(mob, name); + _metaSystem.SetEntityName(mob, MetaData(bodyToClone).EntityName); var grammar = EnsureComp(mob); grammar.ProperNoun = true; From 47586c3b15595cb72c8e26e980e7f0ae79318d07 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 18:26:59 -0500 Subject: [PATCH 07/47] Fugitive, rough but functional --- .../Nyanotrasen/Fugitive/FugitiveComponent.cs | 14 ++ .../Fugitive/FugitiveCountdownComponent.cs | 11 ++ .../Nyanotrasen/Fugitive/FugitiveSystem.cs | 158 ++++++++++++++++++ .../Components/MidRoundAntagRuleComponent.cs | 6 +- .../en-US/nyanotrasen/job/job-description.ftl | 1 + .../en-US/nyanotrasen/job/job-names.ftl | 1 + .../en-US/nyanotrasen/prototypes/antags.ftl | 2 + .../station-events/events/fugitive.ftl | 30 ++++ .../DeltaV/Roles/play_time_trackers.yml | 3 + .../Entities/Markers/Spawners/ghost_roles.yml | 8 +- .../Entities/Mobs/NPCs/humanoid.yml | 49 ++++++ .../Nyanotrasen/GameRules/events.yml | 22 +-- .../Nyanotrasen/Roles/Jobs/Antag/fugitive.yml | 26 +++ 13 files changed, 314 insertions(+), 17 deletions(-) create mode 100644 Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs create mode 100644 Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs create mode 100644 Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs create mode 100644 Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl create mode 100644 Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl create mode 100644 Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml create mode 100644 Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs new file mode 100644 index 00000000000..8ad0a469056 --- /dev/null +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs @@ -0,0 +1,14 @@ +using Robust.Shared.Audio; + +namespace Content.Server.Fugitive +{ + [RegisterComponent] + public sealed partial class FugitiveComponent : Component + { + [DataField("spawnSound")] + public SoundSpecifier SpawnSoundPath = new SoundPathSpecifier("/Audio/Effects/clang.ogg"); + + [DataField("firstMindAdded")] + public bool FirstMindAdded = false; + } +} diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs new file mode 100644 index 00000000000..8a77be3617f --- /dev/null +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server.Fugitive +{ + [RegisterComponent] + public sealed partial class FugitiveCountdownComponent : Component + { + public TimeSpan? AnnounceTime = null; + + [DataField("AnnounceCD")] + public TimeSpan AnnounceCD = TimeSpan.FromMinutes(5); + } +} diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs new file mode 100644 index 00000000000..26a73173e1f --- /dev/null +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs @@ -0,0 +1,158 @@ +using System.Linq; +using System.Text; +using Content.Shared.Ghost; +using Content.Shared.Mind; +using Content.Shared.Mind.Components; +using Content.Server.Ghost.Roles.Events; +using Content.Server.Traitor; +using Content.Server.Objectives; +using Content.Server.Chat.Systems; +using Content.Server.Communications; +using Content.Server.Paper; +using Content.Server.Humanoid; +using Content.Server.Popups; +using Content.Server.Stunnable; +using Content.Server.Ghost.Components; +using Content.Server.Roles; +using Content.Server.GameTicking; +using Content.Shared.Roles; +using Content.Shared.Movement.Systems; +using Content.Shared.Humanoid.Prototypes; +using Content.Shared.Humanoid; +using Content.Shared.Random.Helpers; +using Content.Shared.Examine; +using Content.Shared.Preferences; +using Robust.Shared.Prototypes; +using Robust.Shared.Timing; +using Robust.Shared.Audio; +using Robust.Shared.Utility; +using Robust.Shared.Physics.Components; +using Robust.Shared.Player; +using Robust.Server.GameObjects; +using Robust.Server.Audio; +using static Content.Shared.Examine.ExamineSystemShared; + +namespace Content.Server.Fugitive +{ + public sealed class FugitiveSystem : EntitySystem + { + private const string FugitiveRole = "Fugitive"; + private const string EscapeObjective = "EscapeShuttleObjectiveFugitive"; + + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!; + [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly PaperSystem _paperSystem = default!; + [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly StunSystem _stun = default!; + [Dependency] private readonly AudioSystem _audioSystem = default!; + [Dependency] private readonly SharedMindSystem _mindSystem = default!; + [Dependency] private readonly MetaDataSystem _metaData = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnSpawned); + } + + public override void Update(float frameTime) + { + base.Update(frameTime); + foreach (var (cd, _) in EntityQuery()) + { + if (cd.AnnounceTime != null && _timing.CurTime > cd.AnnounceTime) + { + _chat.DispatchGlobalAnnouncement(Loc.GetString("station-event-fugitive-hunt-announcement"), sender: Loc.GetString("fugitive-announcement-GALPOL"), colorOverride: Color.Yellow); + + foreach (var console in EntityQuery()) + { + if (HasComp(console.Owner)) + continue; + + var paperEnt = Spawn("Paper", Transform(console.Owner).Coordinates); + var fugireport = Loc.GetString("fugi-report-ent-name", ("name", cd.Owner)); + _metaData.SetEntityName(paperEnt, fugireport); + + if (!TryComp(paperEnt, out var paper)) + continue; + + var report = GenerateFugiReport(cd.Owner); + + _paperSystem.SetContent(paperEnt, report.ToMarkup(), paper); + } + + RemCompDeferred(cd.Owner); + } + } + } + + private void OnSpawned(EntityUid uid, FugitiveComponent component, GhostRoleSpawnerUsedEvent args) + { + if (!TryComp(uid, out var humanoid)) + return; + + var pref = HumanoidCharacterProfile.Random(); + var species = pref.Species; + _humanoidSystem.SetSpecies(uid, species, true, humanoid); + _humanoidSystem.LoadProfile(uid, pref); + + if (TryComp(uid, out var cd)) + cd.AnnounceTime = _timing.CurTime + cd.AnnounceCD; + + _popupSystem.PopupEntity(Loc.GetString("fugitive-spawn", ("name", uid)), uid, + Filter.Pvs(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)), true, Shared.Popups.PopupType.LargeCaution); + + _stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false); + _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); + + var tile = Spawn("FloorTileItemSteel", Transform(uid).Coordinates); + } + + private FormattedMessage GenerateFugiReport(EntityUid uid) + { + FormattedMessage report = new(); + report.AddMarkup(Loc.GetString("fugi-report-title", ("name", uid))); + report.PushNewline(); + report.PushNewline(); + report.AddMarkup(Loc.GetString("fugitive-report-first-line", ("name", uid))); + report.PushNewline(); + report.PushNewline(); + + + if (!TryComp(uid, out var humanoidComponent) || + !_prototypeManager.TryIndex(humanoidComponent.Species, out var species)) + { + report.AddMarkup(Loc.GetString("fugitive-report-inhuman", ("name", uid))); + return report; + } + + report.AddMarkup(Loc.GetString("fugitive-report-morphotype", ("species", Loc.GetString(species.Name)))); + report.PushNewline(); + report.AddMarkup(Loc.GetString("fugitive-report-age", ("age", humanoidComponent.Age))); + report.PushNewline(); + + string sexLine = string.Empty; + sexLine += humanoidComponent.Sex switch + { + Sex.Male => Loc.GetString("fugitive-report-sex-m"), + Sex.Female => Loc.GetString("fugitive-report-sex-f"), + _ => Loc.GetString("fugitive-report-sex-n") + }; + + report.AddMarkup(sexLine); + + if (TryComp(uid, out var physics)) + { + report.PushNewline(); + report.AddMarkup(Loc.GetString("fugitive-report-weight", ("weight", Math.Round(physics.FixturesMass)))); + } + report.PushNewline(); + report.PushNewline(); + report.AddMarkup(Loc.GetString("fugitive-report-last-line")); + + return report; + } + } +} diff --git a/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs b/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs index 429db920dca..c504482f0f3 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs @@ -9,8 +9,8 @@ public sealed partial class MidRoundAntagRuleComponent : Component public IReadOnlyList MidRoundAntags = new[] { "SpawnPointGhostRatKing", - "SpawnPointGhostVampSpider", - "SpawnPointGhostFugitive", - "MobEvilTwinSpawn" + //"SpawnPointGhostVampSpider",//Has Arachne as a prereq + "SpawnPointGhostFugitive", //Yea this is temporarily the Fugitive event until the others are working + //"MobEvilTwinSpawn" }; } diff --git a/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl b/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl index 3b9bc86e6f8..fa7f2046c97 100644 --- a/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl +++ b/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl @@ -4,3 +4,4 @@ job-description-mail-carrier = Deliver mail and other packages from and to logis job-description-martialartist = Be honorable and disciplined, spar in the dojo, challenge security to CQC. Currently available on Shōkō. job-description-prisoner = Sit in prison. Gamble with your cellmates. Talk to the warden. Write your memoirs. job-description-mantis = Solve mysteries from the nature of the universe to the meaning of life. Be the main person to deal with Psionic beings. +job-description-fugitive = Escape the station alive. diff --git a/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl b/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl index bc99a777f1a..0489d256cfb 100644 --- a/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl +++ b/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl @@ -1,4 +1,5 @@ job-name-gladiator = Gladiator +job-name-fugitive = fugitive job-name-guard = Prison Guard job-name-mail-carrier = Courier job-name-martialartist = Martial Artist diff --git a/Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl b/Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl new file mode 100644 index 00000000000..7967f79ca61 --- /dev/null +++ b/Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl @@ -0,0 +1,2 @@ +roles-antag-fugitive-name = Fugitive +roles-antag-fugitive-description = Survive. Escape. diff --git a/Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl b/Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl new file mode 100644 index 00000000000..6cd236689d9 --- /dev/null +++ b/Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl @@ -0,0 +1,30 @@ +station-event-fugitive-hunt-announcement = Please check communications consoles for a sensitive message. + +fugitive-spawn = {CAPITALIZE(THE($name))} falls from the ceiling! + +fugitive-announcement-GALPOL = GALPOL + +fugi-report-ent-name = FUGITIVE REPORT: {$name} +fugi-report-title = WANTED: {$name} +fugitive-report-first-line = Escaped fugitive {$name} has been spotted in the sector. They may be a stowaway on a station somewhere. +fugitive-report-inhuman = {CAPITALIZE(THE($name))} {CONJUGATE-BE($name)} inhuman. We have no further details. +fugitive-report-morphotype = MORPHOTYPE: {$species} +fugitive-report-sex-m = SEX: M +fugitive-report-sex-f = SEX: F +fugitive-report-sex-n = SEX: N/A +fugitive-report-weight = WEIGHT: {$weight} kg +fugitive-report-age = AGE: {$age} +fugitive-report-last-line = The above individual is wanted across the sector; preferably alive. + +fugitive-round-end-result = {$fugitiveCount -> + [one] There was one fugitive. + *[other] There were {$fugitiveCount} fugitives. +} + +fugitive-user-was-a-fugitive = [color=gray]{$user}[/color] was a fugitive. +fugitive-user-was-a-fugitive-named = [color=White]{$name}[/color] ([color=gray]{$user}[/color]) was a fugitive. +fugitive-was-a-fugitive-named = [color=White]{$name}[/color] was a fugitive. + +fugitive-user-was-a-fugitive-with-objectives = [color=gray]{$user}[/color] was a fugitive who had the following objectives: +fugitive-user-was-a-fugitive-with-objectives-named = [color=White]{$name}[/color] ([color=gray]{$user}[/color]) was a fugitive who had the following objectives: +fugitive-was-a-fugitive-with-objectives-named = [color=White]{$name}[/color] was a fugitive who had the following objectives: diff --git a/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml b/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml index c1f40833b1f..caedf335a9b 100644 --- a/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml +++ b/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml @@ -1,2 +1,5 @@ - type: playTimeTracker id: JobBrigmedic + +- type: playTimeTracker + id: JobFugitive diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml index 344eee0a5f3..2641b36354e 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml @@ -24,8 +24,8 @@ parent: MarkerBase noSpawn: true components: - # - type: GhostRoleMobSpawner - # prototype: MobHumanFugitive # Todo + - type: GhostRoleMobSpawner + prototype: MobHumanFugitive - type: GhostRole name: Fugitive description: You're an escaped prisoner. Make it out alive. @@ -38,6 +38,7 @@ - state: green - state: prisoner + - type: entity id: SpawnPointLocationMidRoundAntag name: possible spawn location @@ -49,7 +50,8 @@ layers: - state: green - state: prisoner - # - type: MidRoundAntagSpawnLocation # When MidRoundAntag? + - type: MidRoundAntagSpawnLocation # When MidRoundAntag? Now is MidRoundAntag + # - type: entity # id: SpawnPointGhostVampSpider diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml new file mode 100644 index 00000000000..ddc27621db3 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml @@ -0,0 +1,49 @@ +# Unfortunate, isn't it, that these don't work for ghost roles? + +# - type: entity +# id: RandomHumanoidSpawnerFugitive +# name: fugitive +# components: +# - type: Icon +# sprite: Mobs/Species/Human/parts.rsi +# state: full +# - type: RandomHumanoidSpawner +# settings: Fugitive + +# - type: randomHumanoidSettings +# id: Fugitive +# components: +# - type: Loadout +# prototypes: [FugitiveStartingGear] + +- type: entity + parent: MobHuman + id: MobHumanFugitive + name: Fugitive + noSpawn: true + components: + - type: Loadout + prototypes: [FugitiveStartingGear] + - type: Fugitive + - type: FugitiveCountdown + - type: RandomHumanoidAppearance + +#- type: entity +# parent: MarkerBase +# id: MobEvilTwinSpawn +# name: paradox anomaly +# components: +# - type: EvilTwinSpawner +# - type: Sprite +# sprite: Markers/jobs.rsi +# layers: +# - state: green +# - sprite: Mobs/Ghosts/ghost_human.rsi +# state: icon +# - type: GhostRole +# name: paradox anomaly +# description: Replace your double, or befriend them. +# rules: | +# Try and replace your twin with this funny roleplay antag rather than +# plasma flooding the station or something. You can also just befriend them. +# - type: GhostTakeoverAvailable diff --git a/Resources/Prototypes/Nyanotrasen/GameRules/events.yml b/Resources/Prototypes/Nyanotrasen/GameRules/events.yml index 8f2320170c8..dca6cccccfc 100644 --- a/Resources/Prototypes/Nyanotrasen/GameRules/events.yml +++ b/Resources/Prototypes/Nyanotrasen/GameRules/events.yml @@ -13,17 +13,17 @@ - type: NoosphericStormRule # Rat king, paradox anomaly, fugitive, oneiro, etc. -#- type: entity -# id: MidRoundAntag -# parent: BaseGameRule -# noSpawn: true -# components: -# - type: StationEvent -# weight: 7 -# reoccurrenceDelay: 5 -# minimumPlayers: 15 -# earliestStart: 25 -# - type: MidRoundAntagRule +- type: entity + id: MidRoundAntag + parent: BaseGameRule + noSpawn: true + components: + - type: StationEvent + weight: 7 + reoccurrenceDelay: 5 + minimumPlayers: 15 + earliestStart: 25 + - type: MidRoundAntagRule # Base glimmer event - type: entity diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml new file mode 100644 index 00000000000..7d7061be962 --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml @@ -0,0 +1,26 @@ +- type: job + id: Fugitive + name: job-name-fugitive + description: job-description-fugitive + playTimeTracker: JobFugitive + startingGear: FugitiveStartingGear + setPreference: false + icon: "Prisoner" + +- type: antag + id: Fugitive + name: roles-antag-fugitive-name + antagonist: true + setPreference: false + objective: roles-antag-fugitive-objective + +- type: startingGear + id: FugitiveStartingGear + equipment: + jumpsuit: ClothingUniformJumpsuitPrisoner + gloves: ClothingHandsGlovesColorYellow + back: ClothingBackpack + shoes: ClothingShoesColorBlack + inhand: + - ToolboxElectricalFilled + innerClothingSkirt: ClothingUniformJumpskirtPrisoner From 13124dbc77be3afdea047ac4dc533b3bafc1ed9f Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 19:43:53 -0500 Subject: [PATCH 08/47] Update fugitive.yml --- Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml index 7d7061be962..7003b834f3c 100644 --- a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml +++ b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml @@ -5,7 +5,7 @@ playTimeTracker: JobFugitive startingGear: FugitiveStartingGear setPreference: false - icon: "Prisoner" + icon: "JobIconPrisoner" - type: antag id: Fugitive From 5af8fbdabe576b8bfade1cc23025c525b455aee6 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 19:59:55 -0500 Subject: [PATCH 09/47] Update humanoid.yml --- Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml index ddc27621db3..24d2bbab8da 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml @@ -20,7 +20,6 @@ parent: MobHuman id: MobHumanFugitive name: Fugitive - noSpawn: true components: - type: Loadout prototypes: [FugitiveStartingGear] From 51d3355cc11fffd7333d67235ffbe47665c783eb Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 20:14:08 -0500 Subject: [PATCH 10/47] Checking if its the floortile --- Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs | 2 -- .../Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs index 26a73173e1f..ba0b592cf3a 100644 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs @@ -106,8 +106,6 @@ private void OnSpawned(EntityUid uid, FugitiveComponent component, GhostRoleSpaw _stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false); _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); - - var tile = Spawn("FloorTileItemSteel", Transform(uid).Coordinates); } private FormattedMessage GenerateFugiReport(EntityUid uid) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml index 24d2bbab8da..ddc27621db3 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml @@ -20,6 +20,7 @@ parent: MobHuman id: MobHumanFugitive name: Fugitive + noSpawn: true components: - type: Loadout prototypes: [FugitiveStartingGear] From bc98f0f858e0f78e846f237bad384f7e00c4e3a7 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 20:29:35 -0500 Subject: [PATCH 11/47] Guh --- Content.IntegrationTests/Tests/EntityTest.cs | 1 + Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index 9f8823fd5e8..12331d90c77 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -236,6 +236,7 @@ public async Task SpawnAndDeleteEntityCountTest() "TimedSpawner", // makes an announcement on mapInit. "AnnounceOnSpawn", + "MobHumanFugitive", //DeltaV: MidroundAntagEvent comes with a complimentary floor tile, this sets off the test }; Assert.That(server.CfgMan.GetCVar(CVars.NetPVS), Is.False); diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs index ba0b592cf3a..26a73173e1f 100644 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs @@ -106,6 +106,8 @@ private void OnSpawned(EntityUid uid, FugitiveComponent component, GhostRoleSpaw _stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false); _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); + + var tile = Spawn("FloorTileItemSteel", Transform(uid).Coordinates); } private FormattedMessage GenerateFugiReport(EntityUid uid) From 82375acd67cc44e740ba803a4329b4c2493cd273 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 22 Jan 2024 23:27:38 -0500 Subject: [PATCH 12/47] Update EntityTest.cs --- Content.IntegrationTests/Tests/EntityTest.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index 12331d90c77..dfbddc69232 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -236,7 +236,6 @@ public async Task SpawnAndDeleteEntityCountTest() "TimedSpawner", // makes an announcement on mapInit. "AnnounceOnSpawn", - "MobHumanFugitive", //DeltaV: MidroundAntagEvent comes with a complimentary floor tile, this sets off the test }; Assert.That(server.CfgMan.GetCVar(CVars.NetPVS), Is.False); @@ -268,6 +267,9 @@ await server.WaitPost(() => if (protoId == "MobHumanSpaceNinja") continue; + if (protoId == "MobHumanFugitive") + continue; //DeltaV: MidroundAntagEvent comes with a complimentary floor tile, this sets off the test) + var count = server.EntMan.EntityCount; var clientCount = client.EntMan.EntityCount; EntityUid uid = default; From 924eff47cb702c4045cdeabaab6a6160d7fe78e6 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 18:43:05 -0500 Subject: [PATCH 13/47] Revert "Update EntityTest.cs" This reverts commit 82375acd67cc44e740ba803a4329b4c2493cd273. --- Content.IntegrationTests/Tests/EntityTest.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index dfbddc69232..12331d90c77 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -236,6 +236,7 @@ public async Task SpawnAndDeleteEntityCountTest() "TimedSpawner", // makes an announcement on mapInit. "AnnounceOnSpawn", + "MobHumanFugitive", //DeltaV: MidroundAntagEvent comes with a complimentary floor tile, this sets off the test }; Assert.That(server.CfgMan.GetCVar(CVars.NetPVS), Is.False); @@ -267,9 +268,6 @@ await server.WaitPost(() => if (protoId == "MobHumanSpaceNinja") continue; - if (protoId == "MobHumanFugitive") - continue; //DeltaV: MidroundAntagEvent comes with a complimentary floor tile, this sets off the test) - var count = server.EntMan.EntityCount; var clientCount = client.EntMan.EntityCount; EntityUid uid = default; From 667b8c5129a938b99ecf54095a992af1c88bc8d9 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 18:43:10 -0500 Subject: [PATCH 14/47] Revert "Guh" This reverts commit bc98f0f858e0f78e846f237bad384f7e00c4e3a7. --- Content.IntegrationTests/Tests/EntityTest.cs | 1 - Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs | 2 -- 2 files changed, 3 deletions(-) diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index 12331d90c77..9f8823fd5e8 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -236,7 +236,6 @@ public async Task SpawnAndDeleteEntityCountTest() "TimedSpawner", // makes an announcement on mapInit. "AnnounceOnSpawn", - "MobHumanFugitive", //DeltaV: MidroundAntagEvent comes with a complimentary floor tile, this sets off the test }; Assert.That(server.CfgMan.GetCVar(CVars.NetPVS), Is.False); diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs index 26a73173e1f..ba0b592cf3a 100644 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs @@ -106,8 +106,6 @@ private void OnSpawned(EntityUid uid, FugitiveComponent component, GhostRoleSpaw _stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false); _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); - - var tile = Spawn("FloorTileItemSteel", Transform(uid).Coordinates); } private FormattedMessage GenerateFugiReport(EntityUid uid) From 8630ce07bb9abd5beb4ec5192af9a216189bc1d7 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 18:43:12 -0500 Subject: [PATCH 15/47] Revert "Checking if its the floortile" This reverts commit 51d3355cc11fffd7333d67235ffbe47665c783eb. --- Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs | 2 ++ .../Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs index ba0b592cf3a..26a73173e1f 100644 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs +++ b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs @@ -106,6 +106,8 @@ private void OnSpawned(EntityUid uid, FugitiveComponent component, GhostRoleSpaw _stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false); _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); + + var tile = Spawn("FloorTileItemSteel", Transform(uid).Coordinates); } private FormattedMessage GenerateFugiReport(EntityUid uid) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml index ddc27621db3..24d2bbab8da 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml @@ -20,7 +20,6 @@ parent: MobHuman id: MobHumanFugitive name: Fugitive - noSpawn: true components: - type: Loadout prototypes: [FugitiveStartingGear] From cb27625035203dee902059febfa578b4e6a7feab Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 18:43:15 -0500 Subject: [PATCH 16/47] Revert "Update humanoid.yml" This reverts commit 5af8fbdabe576b8bfade1cc23025c525b455aee6. --- Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml index 24d2bbab8da..ddc27621db3 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml @@ -20,6 +20,7 @@ parent: MobHuman id: MobHumanFugitive name: Fugitive + noSpawn: true components: - type: Loadout prototypes: [FugitiveStartingGear] From cf1293ec119dc78e529c10f0da0c33d22c3030df Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 18:43:18 -0500 Subject: [PATCH 17/47] Revert "Update fugitive.yml" This reverts commit 13124dbc77be3afdea047ac4dc533b3bafc1ed9f. --- Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml index 7003b834f3c..7d7061be962 100644 --- a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml +++ b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml @@ -5,7 +5,7 @@ playTimeTracker: JobFugitive startingGear: FugitiveStartingGear setPreference: false - icon: "JobIconPrisoner" + icon: "Prisoner" - type: antag id: Fugitive From a605aa40f717741cf1e19d55c6b65bfa0f709e50 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 18:43:24 -0500 Subject: [PATCH 18/47] Revert "Fugitive, rough but functional" This reverts commit 47586c3b15595cb72c8e26e980e7f0ae79318d07. --- .../Nyanotrasen/Fugitive/FugitiveComponent.cs | 14 -- .../Fugitive/FugitiveCountdownComponent.cs | 11 -- .../Nyanotrasen/Fugitive/FugitiveSystem.cs | 158 ------------------ .../Components/MidRoundAntagRuleComponent.cs | 6 +- .../en-US/nyanotrasen/job/job-description.ftl | 1 - .../en-US/nyanotrasen/job/job-names.ftl | 1 - .../en-US/nyanotrasen/prototypes/antags.ftl | 2 - .../station-events/events/fugitive.ftl | 30 ---- .../DeltaV/Roles/play_time_trackers.yml | 3 - .../Entities/Markers/Spawners/ghost_roles.yml | 8 +- .../Entities/Mobs/NPCs/humanoid.yml | 49 ------ .../Nyanotrasen/GameRules/events.yml | 22 +-- .../Nyanotrasen/Roles/Jobs/Antag/fugitive.yml | 26 --- 13 files changed, 17 insertions(+), 314 deletions(-) delete mode 100644 Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs delete mode 100644 Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs delete mode 100644 Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs delete mode 100644 Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl delete mode 100644 Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl delete mode 100644 Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml delete mode 100644 Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs deleted file mode 100644 index 8ad0a469056..00000000000 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveComponent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Robust.Shared.Audio; - -namespace Content.Server.Fugitive -{ - [RegisterComponent] - public sealed partial class FugitiveComponent : Component - { - [DataField("spawnSound")] - public SoundSpecifier SpawnSoundPath = new SoundPathSpecifier("/Audio/Effects/clang.ogg"); - - [DataField("firstMindAdded")] - public bool FirstMindAdded = false; - } -} diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs deleted file mode 100644 index 8a77be3617f..00000000000 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveCountdownComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Content.Server.Fugitive -{ - [RegisterComponent] - public sealed partial class FugitiveCountdownComponent : Component - { - public TimeSpan? AnnounceTime = null; - - [DataField("AnnounceCD")] - public TimeSpan AnnounceCD = TimeSpan.FromMinutes(5); - } -} diff --git a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs b/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs deleted file mode 100644 index 26a73173e1f..00000000000 --- a/Content.Server/Nyanotrasen/Fugitive/FugitiveSystem.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System.Linq; -using System.Text; -using Content.Shared.Ghost; -using Content.Shared.Mind; -using Content.Shared.Mind.Components; -using Content.Server.Ghost.Roles.Events; -using Content.Server.Traitor; -using Content.Server.Objectives; -using Content.Server.Chat.Systems; -using Content.Server.Communications; -using Content.Server.Paper; -using Content.Server.Humanoid; -using Content.Server.Popups; -using Content.Server.Stunnable; -using Content.Server.Ghost.Components; -using Content.Server.Roles; -using Content.Server.GameTicking; -using Content.Shared.Roles; -using Content.Shared.Movement.Systems; -using Content.Shared.Humanoid.Prototypes; -using Content.Shared.Humanoid; -using Content.Shared.Random.Helpers; -using Content.Shared.Examine; -using Content.Shared.Preferences; -using Robust.Shared.Prototypes; -using Robust.Shared.Timing; -using Robust.Shared.Audio; -using Robust.Shared.Utility; -using Robust.Shared.Physics.Components; -using Robust.Shared.Player; -using Robust.Server.GameObjects; -using Robust.Server.Audio; -using static Content.Shared.Examine.ExamineSystemShared; - -namespace Content.Server.Fugitive -{ - public sealed class FugitiveSystem : EntitySystem - { - private const string FugitiveRole = "Fugitive"; - private const string EscapeObjective = "EscapeShuttleObjectiveFugitive"; - - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!; - [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; - [Dependency] private readonly IGameTiming _timing = default!; - [Dependency] private readonly ChatSystem _chat = default!; - [Dependency] private readonly PaperSystem _paperSystem = default!; - [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly StunSystem _stun = default!; - [Dependency] private readonly AudioSystem _audioSystem = default!; - [Dependency] private readonly SharedMindSystem _mindSystem = default!; - [Dependency] private readonly MetaDataSystem _metaData = default!; - - public override void Initialize() - { - base.Initialize(); - SubscribeLocalEvent(OnSpawned); - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - foreach (var (cd, _) in EntityQuery()) - { - if (cd.AnnounceTime != null && _timing.CurTime > cd.AnnounceTime) - { - _chat.DispatchGlobalAnnouncement(Loc.GetString("station-event-fugitive-hunt-announcement"), sender: Loc.GetString("fugitive-announcement-GALPOL"), colorOverride: Color.Yellow); - - foreach (var console in EntityQuery()) - { - if (HasComp(console.Owner)) - continue; - - var paperEnt = Spawn("Paper", Transform(console.Owner).Coordinates); - var fugireport = Loc.GetString("fugi-report-ent-name", ("name", cd.Owner)); - _metaData.SetEntityName(paperEnt, fugireport); - - if (!TryComp(paperEnt, out var paper)) - continue; - - var report = GenerateFugiReport(cd.Owner); - - _paperSystem.SetContent(paperEnt, report.ToMarkup(), paper); - } - - RemCompDeferred(cd.Owner); - } - } - } - - private void OnSpawned(EntityUid uid, FugitiveComponent component, GhostRoleSpawnerUsedEvent args) - { - if (!TryComp(uid, out var humanoid)) - return; - - var pref = HumanoidCharacterProfile.Random(); - var species = pref.Species; - _humanoidSystem.SetSpecies(uid, species, true, humanoid); - _humanoidSystem.LoadProfile(uid, pref); - - if (TryComp(uid, out var cd)) - cd.AnnounceTime = _timing.CurTime + cd.AnnounceCD; - - _popupSystem.PopupEntity(Loc.GetString("fugitive-spawn", ("name", uid)), uid, - Filter.Pvs(uid).RemoveWhereAttachedEntity(entity => !ExamineSystemShared.InRangeUnOccluded(uid, entity, ExamineRange, null)), true, Shared.Popups.PopupType.LargeCaution); - - _stun.TryParalyze(uid, TimeSpan.FromSeconds(2), false); - _audioSystem.PlayPvs(component.SpawnSoundPath, uid, AudioParams.Default.WithVolume(-6f)); - - var tile = Spawn("FloorTileItemSteel", Transform(uid).Coordinates); - } - - private FormattedMessage GenerateFugiReport(EntityUid uid) - { - FormattedMessage report = new(); - report.AddMarkup(Loc.GetString("fugi-report-title", ("name", uid))); - report.PushNewline(); - report.PushNewline(); - report.AddMarkup(Loc.GetString("fugitive-report-first-line", ("name", uid))); - report.PushNewline(); - report.PushNewline(); - - - if (!TryComp(uid, out var humanoidComponent) || - !_prototypeManager.TryIndex(humanoidComponent.Species, out var species)) - { - report.AddMarkup(Loc.GetString("fugitive-report-inhuman", ("name", uid))); - return report; - } - - report.AddMarkup(Loc.GetString("fugitive-report-morphotype", ("species", Loc.GetString(species.Name)))); - report.PushNewline(); - report.AddMarkup(Loc.GetString("fugitive-report-age", ("age", humanoidComponent.Age))); - report.PushNewline(); - - string sexLine = string.Empty; - sexLine += humanoidComponent.Sex switch - { - Sex.Male => Loc.GetString("fugitive-report-sex-m"), - Sex.Female => Loc.GetString("fugitive-report-sex-f"), - _ => Loc.GetString("fugitive-report-sex-n") - }; - - report.AddMarkup(sexLine); - - if (TryComp(uid, out var physics)) - { - report.PushNewline(); - report.AddMarkup(Loc.GetString("fugitive-report-weight", ("weight", Math.Round(physics.FixturesMass)))); - } - report.PushNewline(); - report.PushNewline(); - report.AddMarkup(Loc.GetString("fugitive-report-last-line")); - - return report; - } - } -} diff --git a/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs b/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs index c504482f0f3..429db920dca 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs @@ -9,8 +9,8 @@ public sealed partial class MidRoundAntagRuleComponent : Component public IReadOnlyList MidRoundAntags = new[] { "SpawnPointGhostRatKing", - //"SpawnPointGhostVampSpider",//Has Arachne as a prereq - "SpawnPointGhostFugitive", //Yea this is temporarily the Fugitive event until the others are working - //"MobEvilTwinSpawn" + "SpawnPointGhostVampSpider", + "SpawnPointGhostFugitive", + "MobEvilTwinSpawn" }; } diff --git a/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl b/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl index fa7f2046c97..3b9bc86e6f8 100644 --- a/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl +++ b/Resources/Locale/en-US/nyanotrasen/job/job-description.ftl @@ -4,4 +4,3 @@ job-description-mail-carrier = Deliver mail and other packages from and to logis job-description-martialartist = Be honorable and disciplined, spar in the dojo, challenge security to CQC. Currently available on Shōkō. job-description-prisoner = Sit in prison. Gamble with your cellmates. Talk to the warden. Write your memoirs. job-description-mantis = Solve mysteries from the nature of the universe to the meaning of life. Be the main person to deal with Psionic beings. -job-description-fugitive = Escape the station alive. diff --git a/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl b/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl index 0489d256cfb..bc99a777f1a 100644 --- a/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl +++ b/Resources/Locale/en-US/nyanotrasen/job/job-names.ftl @@ -1,5 +1,4 @@ job-name-gladiator = Gladiator -job-name-fugitive = fugitive job-name-guard = Prison Guard job-name-mail-carrier = Courier job-name-martialartist = Martial Artist diff --git a/Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl b/Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl deleted file mode 100644 index 7967f79ca61..00000000000 --- a/Resources/Locale/en-US/nyanotrasen/prototypes/antags.ftl +++ /dev/null @@ -1,2 +0,0 @@ -roles-antag-fugitive-name = Fugitive -roles-antag-fugitive-description = Survive. Escape. diff --git a/Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl b/Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl deleted file mode 100644 index 6cd236689d9..00000000000 --- a/Resources/Locale/en-US/nyanotrasen/station-events/events/fugitive.ftl +++ /dev/null @@ -1,30 +0,0 @@ -station-event-fugitive-hunt-announcement = Please check communications consoles for a sensitive message. - -fugitive-spawn = {CAPITALIZE(THE($name))} falls from the ceiling! - -fugitive-announcement-GALPOL = GALPOL - -fugi-report-ent-name = FUGITIVE REPORT: {$name} -fugi-report-title = WANTED: {$name} -fugitive-report-first-line = Escaped fugitive {$name} has been spotted in the sector. They may be a stowaway on a station somewhere. -fugitive-report-inhuman = {CAPITALIZE(THE($name))} {CONJUGATE-BE($name)} inhuman. We have no further details. -fugitive-report-morphotype = MORPHOTYPE: {$species} -fugitive-report-sex-m = SEX: M -fugitive-report-sex-f = SEX: F -fugitive-report-sex-n = SEX: N/A -fugitive-report-weight = WEIGHT: {$weight} kg -fugitive-report-age = AGE: {$age} -fugitive-report-last-line = The above individual is wanted across the sector; preferably alive. - -fugitive-round-end-result = {$fugitiveCount -> - [one] There was one fugitive. - *[other] There were {$fugitiveCount} fugitives. -} - -fugitive-user-was-a-fugitive = [color=gray]{$user}[/color] was a fugitive. -fugitive-user-was-a-fugitive-named = [color=White]{$name}[/color] ([color=gray]{$user}[/color]) was a fugitive. -fugitive-was-a-fugitive-named = [color=White]{$name}[/color] was a fugitive. - -fugitive-user-was-a-fugitive-with-objectives = [color=gray]{$user}[/color] was a fugitive who had the following objectives: -fugitive-user-was-a-fugitive-with-objectives-named = [color=White]{$name}[/color] ([color=gray]{$user}[/color]) was a fugitive who had the following objectives: -fugitive-was-a-fugitive-with-objectives-named = [color=White]{$name}[/color] was a fugitive who had the following objectives: diff --git a/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml b/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml index caedf335a9b..c1f40833b1f 100644 --- a/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml +++ b/Resources/Prototypes/DeltaV/Roles/play_time_trackers.yml @@ -1,5 +1,2 @@ - type: playTimeTracker id: JobBrigmedic - -- type: playTimeTracker - id: JobFugitive diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml index 2641b36354e..344eee0a5f3 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/ghost_roles.yml @@ -24,8 +24,8 @@ parent: MarkerBase noSpawn: true components: - - type: GhostRoleMobSpawner - prototype: MobHumanFugitive + # - type: GhostRoleMobSpawner + # prototype: MobHumanFugitive # Todo - type: GhostRole name: Fugitive description: You're an escaped prisoner. Make it out alive. @@ -38,7 +38,6 @@ - state: green - state: prisoner - - type: entity id: SpawnPointLocationMidRoundAntag name: possible spawn location @@ -50,8 +49,7 @@ layers: - state: green - state: prisoner - - type: MidRoundAntagSpawnLocation # When MidRoundAntag? Now is MidRoundAntag - + # - type: MidRoundAntagSpawnLocation # When MidRoundAntag? # - type: entity # id: SpawnPointGhostVampSpider diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml b/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml deleted file mode 100644 index ddc27621db3..00000000000 --- a/Resources/Prototypes/Nyanotrasen/Entities/Mobs/NPCs/humanoid.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Unfortunate, isn't it, that these don't work for ghost roles? - -# - type: entity -# id: RandomHumanoidSpawnerFugitive -# name: fugitive -# components: -# - type: Icon -# sprite: Mobs/Species/Human/parts.rsi -# state: full -# - type: RandomHumanoidSpawner -# settings: Fugitive - -# - type: randomHumanoidSettings -# id: Fugitive -# components: -# - type: Loadout -# prototypes: [FugitiveStartingGear] - -- type: entity - parent: MobHuman - id: MobHumanFugitive - name: Fugitive - noSpawn: true - components: - - type: Loadout - prototypes: [FugitiveStartingGear] - - type: Fugitive - - type: FugitiveCountdown - - type: RandomHumanoidAppearance - -#- type: entity -# parent: MarkerBase -# id: MobEvilTwinSpawn -# name: paradox anomaly -# components: -# - type: EvilTwinSpawner -# - type: Sprite -# sprite: Markers/jobs.rsi -# layers: -# - state: green -# - sprite: Mobs/Ghosts/ghost_human.rsi -# state: icon -# - type: GhostRole -# name: paradox anomaly -# description: Replace your double, or befriend them. -# rules: | -# Try and replace your twin with this funny roleplay antag rather than -# plasma flooding the station or something. You can also just befriend them. -# - type: GhostTakeoverAvailable diff --git a/Resources/Prototypes/Nyanotrasen/GameRules/events.yml b/Resources/Prototypes/Nyanotrasen/GameRules/events.yml index dca6cccccfc..8f2320170c8 100644 --- a/Resources/Prototypes/Nyanotrasen/GameRules/events.yml +++ b/Resources/Prototypes/Nyanotrasen/GameRules/events.yml @@ -13,17 +13,17 @@ - type: NoosphericStormRule # Rat king, paradox anomaly, fugitive, oneiro, etc. -- type: entity - id: MidRoundAntag - parent: BaseGameRule - noSpawn: true - components: - - type: StationEvent - weight: 7 - reoccurrenceDelay: 5 - minimumPlayers: 15 - earliestStart: 25 - - type: MidRoundAntagRule +#- type: entity +# id: MidRoundAntag +# parent: BaseGameRule +# noSpawn: true +# components: +# - type: StationEvent +# weight: 7 +# reoccurrenceDelay: 5 +# minimumPlayers: 15 +# earliestStart: 25 +# - type: MidRoundAntagRule # Base glimmer event - type: entity diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml deleted file mode 100644 index 7d7061be962..00000000000 --- a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Antag/fugitive.yml +++ /dev/null @@ -1,26 +0,0 @@ -- type: job - id: Fugitive - name: job-name-fugitive - description: job-description-fugitive - playTimeTracker: JobFugitive - startingGear: FugitiveStartingGear - setPreference: false - icon: "Prisoner" - -- type: antag - id: Fugitive - name: roles-antag-fugitive-name - antagonist: true - setPreference: false - objective: roles-antag-fugitive-objective - -- type: startingGear - id: FugitiveStartingGear - equipment: - jumpsuit: ClothingUniformJumpsuitPrisoner - gloves: ClothingHandsGlovesColorYellow - back: ClothingBackpack - shoes: ClothingShoesColorBlack - inhand: - - ToolboxElectricalFilled - innerClothingSkirt: ClothingUniformJumpskirtPrisoner From 49e704eb389319a58a3af106aeb25536893dd6a2 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:52:48 -0500 Subject: [PATCH 19/47] Update Content.Server/Medical/Components/MedicalScannerComponent.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- Content.Server/Medical/Components/MedicalScannerComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Medical/Components/MedicalScannerComponent.cs b/Content.Server/Medical/Components/MedicalScannerComponent.cs index cde4f6f6093..c2dea93550c 100644 --- a/Content.Server/Medical/Components/MedicalScannerComponent.cs +++ b/Content.Server/Medical/Components/MedicalScannerComponent.cs @@ -15,7 +15,8 @@ public sealed partial class MedicalScannerComponent : SharedMedicalScannerCompon [ViewVariables(VVAccess.ReadWrite)] public float CloningFailChanceMultiplier = 1f; - //Nyano, needed for Metem Machine. It's not like Wizden will ever touch this again though, since Cloning is no longer maintained upstream + + // Nyano, needed for Metem Machine. public float MetemKarmaBonus = 0.25f; [DataField("machinePartCloningFailChance", customTypeSerializer: typeof(PrototypeIdSerializer))] From 6eb6fbc880bbdcddc6cb290083ffbc7e4451d1b3 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:52:57 -0500 Subject: [PATCH 20/47] Update Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs index 8327603d77c..246495cee00 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychosisKarmaComponent.cs @@ -1,4 +1,4 @@ -namespace Content.Server.Cloning +namespace Content.Server.Nyanotrasen.Cloning { /// /// This tracks how many times you have already been cloned and lowers your chance of getting a humanoid each time. From 8dd1b9110921aebf1585a1297d334081c1e6c0bd Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:53:11 -0500 Subject: [PATCH 21/47] Update Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs index 5d52ab49147..ccd0ae46d23 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs @@ -1,4 +1,4 @@ -namespace Content.Server.Cloning +namespace Content.Server.Nyanotrasen.Cloning { [RegisterComponent] public sealed partial class MetempsychoticMachineComponent : Component From 62bf453214de640517447aa28013037adc43b17e Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:53:20 -0500 Subject: [PATCH 22/47] Update Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index 1217116adca..c9199c34972 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -4,7 +4,7 @@ using Robust.Shared.Random; using Robust.Shared.Prototypes; -namespace Content.Server.Cloning +namespace Content.Server.Nyanotrasen.Cloning { public sealed class MetempsychoticMachineSystem : EntitySystem { From 6c99f2e156eb0c51d71a557d4936f9793dece235 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:53:35 -0500 Subject: [PATCH 23/47] Update Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Cloning/MetempsychoticMachineSystem.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index c9199c34972..ce85b2e5f48 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -30,18 +30,13 @@ public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype o chance -= ((1 - component.HumanoidBaseChance) * (float) karma); } - if (chance > 1) + if (chance > 1 && _random.Prob(chance - 1)) { - if (_random.Prob(chance - 1)) - { - species = oldSpecies; - return oldSpecies.Prototype; - } - else - { - chance = 1; - } + species = oldSpecies; + return oldSpecies.Prototype; } + else + chance = 1; chance = Math.Clamp(chance, 0, 1); From 692eeda4e1acdc5035bed7028fcc5d9425387378 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:53:45 -0500 Subject: [PATCH 24/47] Update Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Cloning/MetempsychoticMachineSystem.cs | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index ce85b2e5f48..b12750de387 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -40,21 +40,18 @@ public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype o chance = Math.Clamp(chance, 0, 1); - if (_random.Prob(chance)) + if (_random.Prob(chance) && + _prototypeManager.TryIndex(MetempsychoticHumanoidPool, out var humanoidPool) && + _prototypeManager.TryIndex(humanoidPool.Pick(), out var speciesPrototype)) { - if (_prototypeManager.TryIndex(MetempsychoticHumanoidPool, out var humanoidPool)) - { - if (_prototypeManager.TryIndex(humanoidPool.Pick(), out var speciesPrototype)) - { - species = speciesPrototype; - return speciesPrototype.Prototype; - } else - { - species = null; - Logger.Error("Could not index species for metempsychotic machine..."); - return "MobHuman"; - } - } + species = speciesPrototype; + return speciesPrototype.Prototype; + } + else + { + species = null; + Logger.Error("Could not index species for metempsychotic machine..."); + return "MobHuman"; } species = null; From b9c61abcc1705b6ebceaabc06cd8f9af92e1a3de Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:54:00 -0500 Subject: [PATCH 25/47] Update Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Machines/metempsychoticMachine.yml | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml index 4e67b9daf10..d8e791af1ed 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Machines/metempsychoticMachine.yml @@ -4,22 +4,22 @@ name: metempsychotic machine description: Speeds along the transmigration of a soul to its next vessel. components: - - type: MetempsychoticMachine - - type: CloningPod - - type: Machine - board: MetempsychoticMachineCircuitboard - - type: Sprite - sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi - snapCardinals: true - layers: - - state: pod_0 - - type: Appearance - - type: GenericVisualizer - visuals: - enum.CloningPodVisuals.Status: - base: - Cloning: { state: pod_1 } - NoMind: { state: pod_1 } - Gore: { state: pod_1 } - Idle: { state: pod_0 } - - type: Psionic + - type: MetempsychoticMachine + - type: CloningPod + - type: Machine + board: MetempsychoticMachineCircuitboard + - type: Sprite + sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi + snapCardinals: true + layers: + - state: pod_0 + - type: Appearance + - type: GenericVisualizer + visuals: + enum.CloningPodVisuals.Status: + base: + Cloning: { state: pod_1 } + NoMind: { state: pod_1 } + Gore: { state: pod_1 } + Idle: { state: pod_0 } + - type: Psionic From 4974308f86dbef347cb759175e0b804fe2f39422 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:54:10 -0500 Subject: [PATCH 26/47] Update Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Prototypes/Nyanotrasen/Research/biochemical.yml.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml b/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml index 7bd281aa5db..b9c4e77b776 100644 --- a/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml +++ b/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml @@ -8,7 +8,7 @@ tier: 2 cost: 15000 recipeUnlocks: - - BiomassReclaimerMachineCircuitboard - - CloningConsoleComputerCircuitboard - - MedicalScannerMachineCircuitboard - - MetempsychoticMachineCircuitboard + - BiomassReclaimerMachineCircuitboard + - CloningConsoleComputerCircuitboard + - MedicalScannerMachineCircuitboard + - MetempsychoticMachineCircuitboard From f98a4f838d2a19d928482c3557bbb4d82f1f8cba Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:54:23 -0500 Subject: [PATCH 27/47] Update Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Structures/Machines/metempsychotic.rsi/meta.json | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json b/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json index 36bd519f6c9..7276fde67e5 100644 --- a/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json +++ b/Resources/Textures/Nyanotrasen/Structures/Machines/metempsychotic.rsi/meta.json @@ -12,16 +12,7 @@ }, { "name": "pod_1", - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] + "delays": [ [ 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 ] ] } ] } From 7d9b75ef6455e7861fc0379dea97987d092a489d Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 21:55:50 -0500 Subject: [PATCH 28/47] Update CloningSystem.cs Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 2e7e1322a3a..be019e6c142 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -386,7 +386,7 @@ private void EndFailedCloning(EntityUid uid, CloningPodComponent clonePod) } /// - /// Handles fetching the mob and any appearance stuff... + /// Start Nyano Code: Handles fetching the mob and any appearance stuff... /// private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharacterProfile pref, SpeciesPrototype speciesPrototype, HumanoidAppearanceComponent humanoid, EntityUid bodyToClone, float karmaBonus) { @@ -462,7 +462,7 @@ private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharact return mob; } - + //End Nyano Code public void Reset(RoundRestartCleanupEvent ev) { ClonesWaitingForMind.Clear(); From 26a52170a5e37daa21157a12545a7e313f63bb50 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 23 Jan 2024 22:24:36 -0500 Subject: [PATCH 29/47] Update CloningSystem.cs --- Content.Server/Cloning/CloningSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index be019e6c142..656bf2bda6a 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -26,6 +26,7 @@ using Content.Server.Materials; using Content.Server.Jobs; using Content.Server.Popups; +using Content.Server.Nyanotrasen.Cloning; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Content.Shared.Mind; From dae42fcbc6ec8be07025160566cc6bd60ef82ccb Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sat, 27 Jan 2024 20:41:21 -0500 Subject: [PATCH 30/47] Update Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- .../Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index b12750de387..e2c42faf749 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -26,9 +26,7 @@ public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype o var chance = component.HumanoidBaseChance + karmaBonus; if (karma != null) - { chance -= ((1 - component.HumanoidBaseChance) * (float) karma); - } if (chance > 1 && _random.Prob(chance - 1)) { From 2d75497d9d81963ae4b1d7e96e7d6947b870cd6c Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sat, 27 Jan 2024 20:53:01 -0500 Subject: [PATCH 31/47] Update MetempsychoticMachineSystem.cs --- .../Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index b12750de387..d70f859149b 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -8,7 +8,10 @@ namespace Content.Server.Nyanotrasen.Cloning { public sealed class MetempsychoticMachineSystem : EntitySystem { + [ValidatePrototypeId] public const string MetempsychoticHumanoidPool = "MetempsychoticHumanoidPool"; + + [ValidatePrototypeId] public const string MetempsychoticNonHumanoidPool = "MetempsychoticNonhumanoidPool"; [Dependency] private readonly IRobustRandom _random = default!; From a793dbef1a8130528452ec420e661ea87bf9858b Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sun, 28 Jan 2024 11:47:21 -0500 Subject: [PATCH 32/47] Cleaning up some of the Metem code --- Content.Server/Cloning/CloningSystem.cs | 23 ------------------- .../Cloning/MetempsychoticMachineSystem.cs | 14 +++-------- 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index f1a05237c24..ca2595980d8 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -20,31 +20,19 @@ using Content.Shared.Chemistry.Components; using Content.Server.Fluids.EntitySystems; using Content.Server.Chat.Systems; -using Content.Server.Construction; -using Content.Server.DeviceLinking.Events; -using Content.Server.Cloning.Components; using Content.Server.DeviceLinking.Systems; using Content.Server.Materials; using Content.Server.Jobs; using Content.Server.Popups; using Content.Server.Nyanotrasen.Cloning; -using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Content.Shared.Mind; using Content.Shared.Mind.Components; -using Content.Server.Preferences.Managers; -using Content.Server.Power.EntitySystems; -using Content.Shared.Atmos; -using Content.Shared.CCVar; -using Content.Shared.Chemistry.Components; -using Content.Shared.Cloning; -using Content.Shared.Damage; using Content.Shared.DeviceLinking.Events; using Content.Shared.Emag.Components; using Content.Shared.Emag.Systems; using Content.Shared.Humanoid; using Content.Shared.Humanoid.Prototypes; -using Content.Shared.Zombies; using Content.Shared.Mobs.Systems; using Content.Shared.Roles.Jobs; using Robust.Server.GameObjects; @@ -57,14 +45,6 @@ using Robust.Shared.Physics.Components; using Robust.Shared.GameObjects.Components.Localization; using Content.Server.Traits.Assorted; -using Robust.Shared.Audio.Systems; -using Robust.Shared.Configuration; -using Robust.Shared.Containers; -using Robust.Shared.Physics.Components; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; -using Content.Server.Psionics; -using Content.Server.Traits.Assorted; //Nyano - Summary: allows the potential psionic ability to be written to the character. namespace Content.Server.Cloning { @@ -91,11 +71,9 @@ public sealed class CloningSystem : EntitySystem [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly MetempsychoticMachineSystem _metem = default!; [Dependency] private readonly TagSystem _tag = default!; - [Dependency] private readonly IServerPreferencesManager _prefs = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; [Dependency] private readonly MetaDataSystem _metaSystem = default!; [Dependency] private readonly SharedJobSystem _jobs = default!; - [Dependency] private readonly MetaDataSystem _metaData = default!; public readonly Dictionary ClonesWaitingForMind = new(); public const float EasyModeCloningCost = 0.7f; @@ -401,7 +379,6 @@ private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharact List sexes = new(); bool switchingSpecies = false; bool applyKarma = false; - var name = pref.Name; var toSpawn = speciesPrototype.Prototype; TryComp(bodyToClone, out var oldKarma); diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index 1e2a411ec5b..efbfa189d10 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -17,6 +17,8 @@ public sealed class MetempsychoticMachineSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + private ISawmill _sawmill = default!; + public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype oldSpecies, out SpeciesPrototype? species, int? karma = null, MetempsychoticMachineComponent? component = null) { if (!Resolve(uid, ref component)) @@ -51,19 +53,9 @@ public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype o else { species = null; - Logger.Error("Could not index species for metempsychotic machine..."); + _sawmill.Error("Could not index species for metempsychotic machine..."); return "MobHuman"; } - - species = null; - - if (!_prototypeManager.TryIndex(MetempsychoticNonHumanoidPool, out var nonHumanoidPool)) - { - Logger.Error("Could not index the pool of non humanoids for metempsychotic machine!"); - return "MobHuman"; - } - - return nonHumanoidPool.Pick(); } } } From 1d3664192bc53501a081a035a2af8dfaf26beac9 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sun, 28 Jan 2024 11:54:03 -0500 Subject: [PATCH 33/47] Update CloningConsoleSystem.cs reordering for less merge conflict Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningConsoleSystem.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index 54b76547c7e..80491e4bd12 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -1,23 +1,23 @@ using System.Linq; -using JetBrains.Annotations; using Content.Server.Administration.Logs; -using Content.Server.Medical.Components; using Content.Server.Cloning.Components; using Content.Server.DeviceLinking.Systems; +using Content.Server.Medical.Components; using Content.Server.Power.Components; -using Content.Server.UserInterface; using Content.Server.Power.EntitySystems; -using Robust.Server.GameObjects; -using Robust.Server.Player; -using Content.Shared.Cloning.CloningConsole; +using Content.Server.UserInterface; using Content.Shared.Cloning; -using Content.Shared.Mind; +using Content.Shared.Cloning.CloningConsole; using Content.Shared.Database; using Content.Shared.DeviceLinking; using Content.Shared.DeviceLinking.Events; using Content.Shared.IdentityManagement; +using Content.Shared.Mind; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; +using JetBrains.Annotations; +using Robust.Server.GameObjects; +using Robust.Server.Player; namespace Content.Server.Cloning { @@ -32,6 +32,7 @@ public sealed class CloningConsoleSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly PowerReceiverSystem _powerReceiverSystem = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; + public override void Initialize() { base.Initialize(); From a5a2df7616547e9f2c79f4b3b6b67974af510683 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sun, 28 Jan 2024 12:05:06 -0500 Subject: [PATCH 34/47] Reordering usings for less merge conflicts Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningSystem.cs | 68 ++++++++++++------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index ca2595980d8..1ddd3668d5b 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -1,50 +1,50 @@ -using Content.Shared.GameTicking; -using Content.Shared.Damage; -using Content.Shared.Examine; -using Content.Shared.Cloning; -using Content.Shared.Speech; -using Content.Shared.Atmos; -using Content.Shared.Tag; -using Content.Shared.CCVar; -using Content.Shared.Preferences; -using Content.Shared.Emoting; -using Content.Server.Psionics; -using Content.Server.Cloning.Components; -using Content.Server.Speech.Components; -using Content.Server.Power.EntitySystems; using Content.Server.Atmos.EntitySystems; -using Content.Server.StationEvents.Components; -using Content.Server.EUI; -using Content.Server.Humanoid; -using Content.Server.Ghost.Roles.Components; -using Content.Shared.Chemistry.Components; -using Content.Server.Fluids.EntitySystems; using Content.Server.Chat.Systems; +using Content.Server.Cloning.Components; using Content.Server.DeviceLinking.Systems; -using Content.Server.Materials; +using Content.Server.EUI; +using Content.Server.Fluids.EntitySystems; +using Content.Server.Humanoid; using Content.Server.Jobs; +using Content.Server.Materials; using Content.Server.Popups; -using Content.Server.Nyanotrasen.Cloning; -using Robust.Shared.Audio.Systems; -using Content.Shared.Mind; -using Content.Shared.Mind.Components; +using Content.Server.Power.EntitySystems; +using Content.Shared.Atmos; +using Content.Shared.CCVar; +using Content.Shared.Chemistry.Components; +using Content.Shared.Cloning; +using Content.Shared.Damage; using Content.Shared.DeviceLinking.Events; using Content.Shared.Emag.Components; using Content.Shared.Emag.Systems; +using Content.Shared.Examine; +using Content.Shared.GameTicking; using Content.Shared.Humanoid; -using Content.Shared.Humanoid.Prototypes; +using Content.Shared.Mind; +using Content.Shared.Mind.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Roles.Jobs; -using Robust.Server.GameObjects; using Robust.Server.Containers; +using Robust.Server.GameObjects; using Robust.Server.Player; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; +using Robust.Shared.Audio.Systems; using Robust.Shared.Configuration; using Robust.Shared.Containers; using Robust.Shared.Physics.Components; -using Robust.Shared.GameObjects.Components.Localization; -using Content.Server.Traits.Assorted; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; +using Content.Server.Psionics; //DeltaV needed for Psionic Systems +using Content.Server.Traits.Assorted; //Nyano - Summary: allows the potential psionic ability to be written to the character. +using Content.Shared.Speech; //DeltaV Start Metem Usings +using Content.Shared.Tag; +using Content.Shared.Preferences; +using Content.Shared.Emoting; +using Content.Server.Speech.Components; +using Content.Server.StationEvents.Components; +using Content.Server.Ghost.Roles.Components; +using Content.Server.Nyanotrasen.Cloning; +using Content.Shared.Humanoid.Prototypes; +using Robust.Shared.GameObjects.Components.Localization; //DeltaV End Metem Usings namespace Content.Server.Cloning { @@ -69,11 +69,11 @@ public sealed class CloningSystem : EntitySystem [Dependency] private readonly IConfigurationManager _configManager = default!; [Dependency] private readonly MaterialStorageSystem _material = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; - [Dependency] private readonly MetempsychoticMachineSystem _metem = default!; - [Dependency] private readonly TagSystem _tag = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; [Dependency] private readonly MetaDataSystem _metaSystem = default!; [Dependency] private readonly SharedJobSystem _jobs = default!; + [Dependency] private readonly MetempsychoticMachineSystem _metem = default!; //DeltaV + [Dependency] private readonly TagSystem _tag = default!; //DeltaV public readonly Dictionary ClonesWaitingForMind = new(); public const float EasyModeCloningCost = 0.7f; @@ -244,7 +244,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(mob); From 384fb60adaad679dcd7cbd9ae143e4bb307af6c8 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sun, 28 Jan 2024 12:06:17 -0500 Subject: [PATCH 35/47] Update HumanoidAppearanceComponent.cs Signed-off-by: VMSolidus --- Content.Shared/Humanoid/HumanoidAppearanceComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs index 8618e557b27..d57c23210cd 100644 --- a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs +++ b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs @@ -1,11 +1,11 @@ using Content.Shared.Humanoid.Markings; using Content.Shared.Humanoid.Prototypes; -using Content.Shared.Preferences; using Robust.Shared.Enums; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Utility; +using Content.Shared.Preferences; //DeltaV, used for Metempsychosis, Fugitive, and Paradox Anomaly namespace Content.Shared.Humanoid; From ed2abacb5f056f0f505d04c028fbbb6bc654af5e Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sun, 28 Jan 2024 12:07:18 -0500 Subject: [PATCH 36/47] Update CloningSystem.cs Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 1ddd3668d5b..cbd003565c1 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -33,8 +33,8 @@ using Robust.Shared.Physics.Components; using Robust.Shared.Prototypes; using Robust.Shared.Random; -using Content.Server.Psionics; //DeltaV needed for Psionic Systems using Content.Server.Traits.Assorted; //Nyano - Summary: allows the potential psionic ability to be written to the character. +using Content.Server.Psionics; //DeltaV needed for Psionic Systems using Content.Shared.Speech; //DeltaV Start Metem Usings using Content.Shared.Tag; using Content.Shared.Preferences; From c5fd6130056e309e415dc607bd76eda6d07fc266 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 1 Feb 2024 23:16:04 -0500 Subject: [PATCH 37/47] Apply suggestions from code review Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningConsoleSystem.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index 80491e4bd12..b3b331b52bb 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -32,7 +32,6 @@ public sealed class CloningConsoleSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly PowerReceiverSystem _powerReceiverSystem = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; - public override void Initialize() { base.Initialize(); @@ -169,8 +168,8 @@ public void TryClone(EntityUid uid, EntityUid cloningPodUid, EntityUid scannerUi if (mind.UserId.HasValue == false || mind.Session == null) return; - // Nyano: Adds scannerComp.MetemKarmaBonus - if (_cloningSystem.TryCloning(cloningPodUid, body.Value, (mindId, mind), cloningPod, scannerComp.CloningFailChanceMultiplier, scannerComp.MetemKarmaBonus)) + // Nyano: Adds scannerComp.MetemKarmaBonus + if (_cloningSystem.TryCloning(cloningPodUid, body.Value, (mindId, mind), cloningPod, scannerComp.CloningFailChanceMultiplier, scannerComp.MetemKarmaBonus)) _adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(uid)} successfully cloned {ToPrettyString(body.Value)}."); } From 688ab0b40d4d1db893e5fc557b4fa7b9107e94bf Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 1 Feb 2024 23:17:48 -0500 Subject: [PATCH 38/47] Update CloningConsoleSystem.cs Somehow this got removed during cleanup Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningConsoleSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index b3b331b52bb..00babd44fea 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -43,6 +43,7 @@ public override void Initialize() SubscribeLocalEvent(OnNewLink); SubscribeLocalEvent(OnPortDisconnected); SubscribeLocalEvent(OnAnchorChanged); + SubscribeLocalEvent(OnEmagged); } private void OnInit(EntityUid uid, CloningConsoleComponent component, ComponentInit args) From 32b72457bb675e7394ab28923a9d61477221cdb7 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 1 Feb 2024 23:26:19 -0500 Subject: [PATCH 39/47] Update CloningConsoleSystem.cs Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningConsoleSystem.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index 00babd44fea..b3b331b52bb 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -43,7 +43,6 @@ public override void Initialize() SubscribeLocalEvent(OnNewLink); SubscribeLocalEvent(OnPortDisconnected); SubscribeLocalEvent(OnAnchorChanged); - SubscribeLocalEvent(OnEmagged); } private void OnInit(EntityUid uid, CloningConsoleComponent component, ComponentInit args) From 2596e7056aab68d6e1f1182e1eacc1f64b3201a5 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 1 Feb 2024 23:27:10 -0500 Subject: [PATCH 40/47] Update CloningSystem.cs I put it back in the wrong file... Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index cbd003565c1..393cd5dc89e 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -88,6 +88,7 @@ public override void Initialize() SubscribeLocalEvent(OnPortDisconnected); SubscribeLocalEvent(OnAnchor); SubscribeLocalEvent(OnExamined); + SubscribeLocalEvent(OnEmagged); } private void OnComponentInit(EntityUid uid, CloningPodComponent clonePod, ComponentInit args) From 0b4aa6151050ea65bdd38c28c825760f8ffb8c1a Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Thu, 1 Feb 2024 23:29:18 -0500 Subject: [PATCH 41/47] Update CloningConsoleSystem.cs Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningConsoleSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index b3b331b52bb..5d68432a119 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -32,6 +32,7 @@ public sealed class CloningConsoleSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly PowerReceiverSystem _powerReceiverSystem = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; + public override void Initialize() { base.Initialize(); From 177bd5c8d893bf589cb5e429c0013d1f26015032 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Wed, 7 Feb 2024 19:40:51 -0500 Subject: [PATCH 42/47] Apply suggestions from code review Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> Signed-off-by: VMSolidus --- Content.Server/Cloning/CloningSystem.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 393cd5dc89e..d6b99184193 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -181,11 +181,10 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity Date: Fri, 9 Feb 2024 17:34:22 -0500 Subject: [PATCH 43/47] Requested changes but need assistance with test fail --- .../Metempsychosis/MetempsychosisTest.cs | 68 +++++++++++++++++++ Content.Server/Cloning/CloningSystem.cs | 5 +- .../Components/MedicalScannerComponent.cs | 8 +-- .../Cloning/MetempsychoticMachineComponent.cs | 10 +++ .../Cloning/MetempsychoticMachineSystem.cs | 18 +---- .../Nyanotrasen/metempsychoticHumanoids.yml | 4 +- 6 files changed, 85 insertions(+), 28 deletions(-) create mode 100644 Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs diff --git a/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs b/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs new file mode 100644 index 00000000000..d2091a4404b --- /dev/null +++ b/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs @@ -0,0 +1,68 @@ +using System.Linq; +using Content.Server.Nyanotrasen.Cloning; +using Content.Shared.Random; +using Robust.Shared.GameObjects; +using Robust.Shared.Map; +using Robust.Shared.Prototypes; + +namespace Content.IntegrationTests.Tests.DeltaV; + +[TestFixture] +[TestOf(typeof(MetempsychoticMachineSystem))] +public sealed class MetempsychosisTest +{ + private readonly IPrototypeManager _prototypeManager = default!; + + [Test] + public async Task AllHumanoidPoolSpeciesExist() + { + await using var pair = await PoolManager.GetServerClient(); + var server = pair.Server; + // Per RobustIntegrationTest.cs, wait until state is settled to access it. + await server.WaitIdleAsync(); + + var mapManager = server.ResolveDependency(); + var prototypeManager = server.ResolveDependency(); + var entityManager = server.ResolveDependency(); + var entitySystemManager = server.ResolveDependency(); + + var metemSystem = entitySystemManager.GetEntitySystem(); + var metemComponent = new MetempsychoticMachineComponent(); + + var testMap = await pair.CreateTestMap(); + + await server.WaitAssertion(() => + { + _prototypeManager.TryIndex(metemComponent.MetempsychoticHumanoidPool, out var humanoidPool); + _prototypeManager.TryIndex(metemComponent.MetempsychoticNonHumanoidPool, out var nonHumanoidPool); + + var coordinates = testMap.GridCoords; + + Assert.That(humanoidPool.Weights.Any(), "MetempsychoticHumanoidPool has no valid prototypes!"); + Assert.That(nonHumanoidPool.Weights.Any(), "MetempsychoticNonHumanoidPool has no valid prototypes!"); + + foreach (var (key, weight) in humanoidPool.Weights) + { + Assert.That(prototypeManager.TryIndex(key, out var _), + $"MetempsychoticHumanoidPool has invalid prototype {key}!"); + + var spawned = entityManager.SpawnEntity(key, coordinates); + } + + foreach (var (key, weight) in nonHumanoidPool.Weights) + { + Assert.That(prototypeManager.TryIndex(key, out var _), + $"MetempsychoticNonHumanoidPool has invalid prototype {key}!"); + + var spawned = entityManager.SpawnEntity(key, coordinates); + } + + // Because Server/Client pairs can be re-used between Tests, we + // need to clean up anything that might affect other tests, + // otherwise this pair cannot be considered clean, and the + // CleanReturnAsync call would need to be removed. + mapManager.DeleteMap(testMap.MapId); + }); + await pair.CleanReturnAsync(); + } +} diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index d6b99184193..f9025fa3354 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -45,6 +45,7 @@ using Content.Server.Nyanotrasen.Cloning; using Content.Shared.Humanoid.Prototypes; using Robust.Shared.GameObjects.Components.Localization; //DeltaV End Metem Usings +using Content.Server.EntityList; namespace Content.Server.Cloning { @@ -265,7 +266,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(uid); - // TODO: Ideally, components like this should be on a mind entity so this isn't neccesary. + // TODO: Ideally, components like this should be components on the mind entity so this isn't necessary. // Add on special job components to the mob. if (_jobs.MindTryGetJob(mindEnt, out _, out var prototype)) { @@ -384,7 +385,7 @@ private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharact if (TryComp(clonePod.Owner, out var metem)) { - toSpawn = _metem.GetSpawnEntity(clonePod.Owner, karmaBonus, speciesPrototype, out var newSpecies, oldKarma?.Score, metem); + toSpawn = _metem.GetSpawnEntity(clonePod.Owner, karmaBonus, metem, speciesPrototype, out var newSpecies, oldKarma?.Score); applyKarma = true; if (newSpecies != null) diff --git a/Content.Server/Medical/Components/MedicalScannerComponent.cs b/Content.Server/Medical/Components/MedicalScannerComponent.cs index c03a6ae7234..96de6499875 100644 --- a/Content.Server/Medical/Components/MedicalScannerComponent.cs +++ b/Content.Server/Medical/Components/MedicalScannerComponent.cs @@ -17,12 +17,6 @@ public sealed partial class MedicalScannerComponent : SharedMedicalScannerCompon public float CloningFailChanceMultiplier = 1f; // Nyano, needed for Metem Machine. - public float MetemKarmaBonus = 0.25f; - - [DataField("machinePartCloningFailChance", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string MachinePartCloningFailChance = "Capacitor"; - - [DataField("partRatingCloningFailChanceMultiplier")] - public float PartRatingFailMultiplier = 0.75f; + public float MetemKarmaBonus = 0.25f; } } diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs index ccd0ae46d23..0adcc9b5b25 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineComponent.cs @@ -1,3 +1,5 @@ +using Content.Shared.Random; + namespace Content.Server.Nyanotrasen.Cloning { [RegisterComponent] @@ -8,5 +10,13 @@ public sealed partial class MetempsychoticMachineComponent : Component /// [DataField("humanoidBaseChance")] public float HumanoidBaseChance = 0.75f; + + [ValidatePrototypeId] + [DataField("metempsychoticHumanoidPool")] + public string MetempsychoticHumanoidPool = "MetempsychoticHumanoidPool"; + + [ValidatePrototypeId] + [DataField("metempsychoticNonHumanoidPool")] + public string MetempsychoticNonHumanoidPool = "MetempsychoticNonhumanoidPool"; } } diff --git a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs index efbfa189d10..62dc1b078e0 100644 --- a/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs +++ b/Content.Server/Nyanotrasen/Cloning/MetempsychoticMachineSystem.cs @@ -8,26 +8,13 @@ namespace Content.Server.Nyanotrasen.Cloning { public sealed class MetempsychoticMachineSystem : EntitySystem { - [ValidatePrototypeId] - public const string MetempsychoticHumanoidPool = "MetempsychoticHumanoidPool"; - - [ValidatePrototypeId] - public const string MetempsychoticNonHumanoidPool = "MetempsychoticNonhumanoidPool"; - [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; private ISawmill _sawmill = default!; - public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype oldSpecies, out SpeciesPrototype? species, int? karma = null, MetempsychoticMachineComponent? component = null) + public string GetSpawnEntity(EntityUid uid, float karmaBonus, MetempsychoticMachineComponent component, SpeciesPrototype oldSpecies, out SpeciesPrototype? species, int? karma = null) { - if (!Resolve(uid, ref component)) - { - Logger.Error("Tried to get a spawn target from someone that was not a metempsychotic machine..."); - species = null; - return "MobHuman"; - } - var chance = component.HumanoidBaseChance + karmaBonus; if (karma != null) @@ -42,9 +29,8 @@ public string GetSpawnEntity(EntityUid uid, float karmaBonus, SpeciesPrototype o chance = 1; chance = Math.Clamp(chance, 0, 1); - if (_random.Prob(chance) && - _prototypeManager.TryIndex(MetempsychoticHumanoidPool, out var humanoidPool) && + _prototypeManager.TryIndex(component.MetempsychoticHumanoidPool, out var humanoidPool) && _prototypeManager.TryIndex(humanoidPool.Pick(), out var speciesPrototype)) { species = speciesPrototype; diff --git a/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml b/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml index 20c52548b77..891067b1c1f 100644 --- a/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml +++ b/Resources/Prototypes/Nyanotrasen/metempsychoticHumanoids.yml @@ -7,9 +7,7 @@ Arachnid: 1 Harpy: 1 Moth: 1 + Diona: 0.5 Reptilian: 0.5 - Dwarf: 0.5 SlimePerson: 0.5 Vulpkanin: 0.5 - Vox: 0.1 - Skeleton: 0.05 From 27b8ac81873d68414d4733f7d98ab3fe67228722 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Fri, 9 Feb 2024 17:47:54 -0500 Subject: [PATCH 44/47] biochem is gone apparently --- .../Nyanotrasen/Research/biochemical.yml.yml | 14 -------------- .../Nyanotrasen/Research/experimental.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) delete mode 100644 Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml diff --git a/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml b/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml deleted file mode 100644 index b9c4e77b776..00000000000 --- a/Resources/Prototypes/Nyanotrasen/Research/biochemical.yml.yml +++ /dev/null @@ -1,14 +0,0 @@ -- type: technology - id: Metempsychosis - name: research-technology-metempsychosis - icon: - sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi - state: pod_0 - discipline: Biochemical - tier: 2 - cost: 15000 - recipeUnlocks: - - BiomassReclaimerMachineCircuitboard - - CloningConsoleComputerCircuitboard - - MedicalScannerMachineCircuitboard - - MetempsychoticMachineCircuitboard diff --git a/Resources/Prototypes/Nyanotrasen/Research/experimental.yml b/Resources/Prototypes/Nyanotrasen/Research/experimental.yml index 78599728c05..450fe9c5483 100644 --- a/Resources/Prototypes/Nyanotrasen/Research/experimental.yml +++ b/Resources/Prototypes/Nyanotrasen/Research/experimental.yml @@ -14,6 +14,22 @@ - ClothingHeadCage # - ShellSoulbreaker # DeltaV - Placing it under Exotic Ammunition because that's what it is. +- type: technology + id: Metempsychosis + name: research-technology-metempsychosis + icon: + sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi + state: pod_0 + discipline: Biochemical + tier: 2 + cost: 15000 + recipeUnlocks: + - BiomassReclaimerMachineCircuitboard + - CloningConsoleComputerCircuitboard + - MedicalScannerMachineCircuitboard + - MetempsychoticMachineCircuitboard + + # Tier 3 # - type: technology From eaa031e169fcf312839260a501f1ae455f9e9763 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Fri, 9 Feb 2024 18:00:13 -0500 Subject: [PATCH 45/47] Update experimental.yml Signed-off-by: VMSolidus --- Resources/Prototypes/Nyanotrasen/Research/experimental.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Nyanotrasen/Research/experimental.yml b/Resources/Prototypes/Nyanotrasen/Research/experimental.yml index 450fe9c5483..7c89c0f7d04 100644 --- a/Resources/Prototypes/Nyanotrasen/Research/experimental.yml +++ b/Resources/Prototypes/Nyanotrasen/Research/experimental.yml @@ -20,7 +20,7 @@ icon: sprite: Nyanotrasen/Structures/Machines/metempsychotic.rsi state: pod_0 - discipline: Biochemical + discipline: Experimental tier: 2 cost: 15000 recipeUnlocks: From f8a306bb9b13c30e5107fd45a97d4c3a79dbf272 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Fri, 9 Feb 2024 18:33:29 -0500 Subject: [PATCH 46/47] Update MetempsychosisTest.cs --- .../Metempsychosis/MetempsychosisTest.cs | 45 +++++++------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs b/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs index d2091a4404b..cd6a4b4c2b9 100644 --- a/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs +++ b/Content.IntegrationTests/Tests/Nyanotrasen/Metempsychosis/MetempsychosisTest.cs @@ -1,8 +1,6 @@ -using System.Linq; using Content.Server.Nyanotrasen.Cloning; +using Content.Shared.Humanoid.Prototypes; using Content.Shared.Random; -using Robust.Shared.GameObjects; -using Robust.Shared.Map; using Robust.Shared.Prototypes; namespace Content.IntegrationTests.Tests.DeltaV; @@ -11,8 +9,6 @@ namespace Content.IntegrationTests.Tests.DeltaV; [TestOf(typeof(MetempsychoticMachineSystem))] public sealed class MetempsychosisTest { - private readonly IPrototypeManager _prototypeManager = default!; - [Test] public async Task AllHumanoidPoolSpeciesExist() { @@ -21,47 +17,36 @@ public async Task AllHumanoidPoolSpeciesExist() // Per RobustIntegrationTest.cs, wait until state is settled to access it. await server.WaitIdleAsync(); - var mapManager = server.ResolveDependency(); var prototypeManager = server.ResolveDependency(); - var entityManager = server.ResolveDependency(); - var entitySystemManager = server.ResolveDependency(); - var metemSystem = entitySystemManager.GetEntitySystem(); var metemComponent = new MetempsychoticMachineComponent(); - var testMap = await pair.CreateTestMap(); - await server.WaitAssertion(() => { - _prototypeManager.TryIndex(metemComponent.MetempsychoticHumanoidPool, out var humanoidPool); - _prototypeManager.TryIndex(metemComponent.MetempsychoticNonHumanoidPool, out var nonHumanoidPool); + prototypeManager.TryIndex(metemComponent.MetempsychoticHumanoidPool, + out var humanoidPool); + prototypeManager.TryIndex(metemComponent.MetempsychoticNonHumanoidPool, + out var nonHumanoidPool); - var coordinates = testMap.GridCoords; + Assert.That(humanoidPool, Is.Not.Null, "MetempsychoticHumanoidPool is null!"); + Assert.That(nonHumanoidPool, Is.Not.Null, "MetempsychoticNonHumanoidPool is null!"); - Assert.That(humanoidPool.Weights.Any(), "MetempsychoticHumanoidPool has no valid prototypes!"); - Assert.That(nonHumanoidPool.Weights.Any(), "MetempsychoticNonHumanoidPool has no valid prototypes!"); + Assert.That(humanoidPool.Weights, Is.Not.Empty, + "MetempsychoticHumanoidPool has no valid prototypes!"); + Assert.That(nonHumanoidPool.Weights, Is.Not.Empty, + "MetempsychoticNonHumanoidPool has no valid prototypes!"); - foreach (var (key, weight) in humanoidPool.Weights) + foreach (var key in humanoidPool.Weights.Keys) { - Assert.That(prototypeManager.TryIndex(key, out var _), + Assert.That(prototypeManager.TryIndex(key, out _), $"MetempsychoticHumanoidPool has invalid prototype {key}!"); - - var spawned = entityManager.SpawnEntity(key, coordinates); } - foreach (var (key, weight) in nonHumanoidPool.Weights) + foreach (var key in nonHumanoidPool.Weights.Keys) { - Assert.That(prototypeManager.TryIndex(key, out var _), + Assert.That(prototypeManager.TryIndex(key, out _), $"MetempsychoticNonHumanoidPool has invalid prototype {key}!"); - - var spawned = entityManager.SpawnEntity(key, coordinates); } - - // Because Server/Client pairs can be re-used between Tests, we - // need to clean up anything that might affect other tests, - // otherwise this pair cannot be considered clean, and the - // CleanReturnAsync call would need to be removed. - mapManager.DeleteMap(testMap.MapId); }); await pair.CleanReturnAsync(); } From 448e4dc1042ebe6ef20dc1e4e1b55240efea5314 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Fri, 9 Feb 2024 18:59:52 -0500 Subject: [PATCH 47/47] Update CloningSystem.cs --- Content.Server/Cloning/CloningSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index f9025fa3354..00612833676 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -46,6 +46,9 @@ using Content.Shared.Humanoid.Prototypes; using Robust.Shared.GameObjects.Components.Localization; //DeltaV End Metem Usings using Content.Server.EntityList; +using Content.Shared.SSDIndicator; +using Content.Shared.Damage.ForceSay; +using Content.Server.Polymorph.Components; namespace Content.Server.Cloning { @@ -436,7 +439,10 @@ private EntityUid FetchAndSpawnMob(CloningPodComponent clonePod, HumanoidCharact EnsureComp(mob); EnsureComp(mob); + EnsureComp(mob); EnsureComp(mob); + EnsureComp(mob); + EnsureComp(mob); RemComp(mob); RemComp(mob); RemComp(mob);