From bf7475f2a39e6198fecac7c781d8ea3af89b3fd7 Mon Sep 17 00:00:00 2001 From: Kandiyaki <106633914+Kandiyaki@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:49:23 -0400 Subject: [PATCH 01/14] created Syndizine, a syndicate alteration of Cognizine. this is my first ever commit so if i accidentially push to the main branch then oops :) --- .../EntityEffects/Effects/MakeSyndient.cs | 50 +++++++++++++++++++ .../ghost/roles/ghost-role-component.ftl | 2 + .../Locale/en-US/reagents/meta/medicine.ftl | 3 ++ Resources/Prototypes/Reagents/medicine.yml | 16 ++++++ 4 files changed, 71 insertions(+) create mode 100644 Content.Server/EntityEffects/Effects/MakeSyndient.cs diff --git a/Content.Server/EntityEffects/Effects/MakeSyndient.cs b/Content.Server/EntityEffects/Effects/MakeSyndient.cs new file mode 100644 index 00000000000000..f7fb15f1712791 --- /dev/null +++ b/Content.Server/EntityEffects/Effects/MakeSyndient.cs @@ -0,0 +1,50 @@ +using Content.Server.Ghost.Roles.Components; +using Content.Server.Speech.Components; +using Content.Shared.EntityEffects; +using Content.Shared.Mind.Components; +using Robust.Shared.Prototypes; + +namespace Content.Server.EntityEffects.Effects; + +public sealed partial class MakeSyndient : EntityEffect +{ + //this is basically completely copied from MakeSentient, but with a bit of changes to how the ghost roles are listed + protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) + => Loc.GetString("reagent-effect-guidebook-make-sentient", ("chance", Probability)); + + public override void Effect(EntityEffectBaseArgs args) + { + var entityManager = args.EntityManager; + var uid = args.TargetEntity; + + // Let affected entities speak normally to make this effect different from, say, the "random sentience" event + // This also works on entities that already have a mind + // We call this before the mind check to allow things like player-controlled mice to be able to benefit from the effect + entityManager.RemoveComponent(uid); + entityManager.RemoveComponent(uid); + + // Stops from adding a ghost role to things like people who already have a mind + if (entityManager.TryGetComponent(uid, out var mindContainer) && mindContainer.HasMind) + { + return; + } + + // Don't add a ghost role to things that already have ghost roles + if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) + { + //change the role description and rules to make it clear it's been injected with syndizine + ghostRole = entityManager.GetComponent(uid); + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-syndizine-description"); + ghostRole.RoleRules = Loc.GetString("ghost-role-information-familiar-rules"); + return; + } + + ghostRole = entityManager.AddComponent(uid); + entityManager.EnsureComponent(uid); + + var entityData = entityManager.GetComponent(uid); + ghostRole.RoleName = entityData.EntityName; + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-syndizine-description"); + ghostRole.RoleRules = Loc.GetString("ghost-role-information-familiar-rules"); + } +} diff --git a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl index 79b98691b87976..5feca660945ab3 100644 --- a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl @@ -36,6 +36,8 @@ ghost-role-information-giant-spider-rules = You are a [color=red][bold]Team Anta ghost-role-information-cognizine-description = Made conscious with the magic of cognizine. +ghost-role-information-syndizine-description = Made obedient with the magic of syndizine. + ghost-role-information-hamster-name = Hamster ghost-role-information-hamster-description = A grumpy little ball of fluff. diff --git a/Resources/Locale/en-US/reagents/meta/medicine.ftl b/Resources/Locale/en-US/reagents/meta/medicine.ftl index a0c27d52912caf..5d6968633296e8 100644 --- a/Resources/Locale/en-US/reagents/meta/medicine.ftl +++ b/Resources/Locale/en-US/reagents/meta/medicine.ftl @@ -97,6 +97,9 @@ reagent-desc-ethylredoxrazine = Neutralises the effects of alcohol in the blood reagent-name-cognizine = cognizine reagent-desc-cognizine = A mysterious chemical which is able to make any non-sentient creature sentient. +reagent-name-syndizine = syndizine +reagent-desc-syndizine = A devious alteration of cognizine that bends the creature's will to that of whoever injected them. + reagent-name-ethyloxyephedrine = ethyloxyephedrine reagent-desc-ethyloxyephedrine = A mildly unstable medicine derived from desoxyephedrine, primarily used to combat narcolepsy. diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 4dcef67f77dd89..b40573ed92e4c6 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -876,6 +876,22 @@ - !type:ReagentThreshold min: 5 +- type: reagent + id: Syndizine + name: reagent-name-syndizine + desc: reagent-desc-syndizine + group: Medicine + physicalDesc: reagent-physical-desc-enigmatic + flavor: magical + color: "#911d06" + metabolisms: + Medicine: + effects: + - !type:MakeSyndient + conditions: + - !type:ReagentThreshold + min: 5 + - type: reagent id: Ethyloxyephedrine name: reagent-name-ethyloxyephedrine From ed96d75aab22643c70e7a502550eb6a9cbf1a2a0 Mon Sep 17 00:00:00 2001 From: Kandiyaki <106633914+Kandiyaki@users.noreply.github.com> Date: Tue, 27 Aug 2024 22:15:45 -0400 Subject: [PATCH 02/14] added the box, changed syndizine look, made humanoids not applicable --- .../EntityEffects/Effects/MakeSyndient.cs | 8 ++++++++ .../Locale/en-US/store/uplink-catalog.ftl | 6 +++++- .../Catalog/Fills/Boxes/syndicate.yml | 19 ++++++++++++++++++- .../Prototypes/Catalog/uplink_catalog.yml | 14 +++++++++++++- .../Objects/Specific/chemistry-vials.yml | 15 +++++++++++++++ .../Prototypes/Recipes/Reactions/medicine.yml | 10 ++++++++++ 6 files changed, 69 insertions(+), 3 deletions(-) diff --git a/Content.Server/EntityEffects/Effects/MakeSyndient.cs b/Content.Server/EntityEffects/Effects/MakeSyndient.cs index f7fb15f1712791..58702e621477a4 100644 --- a/Content.Server/EntityEffects/Effects/MakeSyndient.cs +++ b/Content.Server/EntityEffects/Effects/MakeSyndient.cs @@ -1,6 +1,7 @@ using Content.Server.Ghost.Roles.Components; using Content.Server.Speech.Components; using Content.Shared.EntityEffects; +using Content.Shared.Humanoid; using Content.Shared.Mind.Components; using Robust.Shared.Prototypes; @@ -29,9 +30,16 @@ public override void Effect(EntityEffectBaseArgs args) return; } + //slightly hacky way to make sure it doesn't work on humanoid ghost roles that haven't been claimed yet + if (entityManager.TryGetComponent(uid, out HumanoidAppearanceComponent? component)) + { + return; + } + // Don't add a ghost role to things that already have ghost roles if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) { + //change the role description and rules to make it clear it's been injected with syndizine ghostRole = entityManager.GetComponent(uid); ghostRole.RoleDescription = Loc.GetString("ghost-role-information-syndizine-description"); diff --git a/Resources/Locale/en-US/store/uplink-catalog.ftl b/Resources/Locale/en-US/store/uplink-catalog.ftl index 27ecdc98f03da3..aeb272f5b348e5 100644 --- a/Resources/Locale/en-US/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/store/uplink-catalog.ftl @@ -109,6 +109,10 @@ uplink-holoclown-kit-desc = A joint venture between Cybersun and Honk.co. Contai uplink-holster-name = Shoulder Holster uplink-holster-desc = A deep shoulder holster capable of holding many types of ballistics. +uplink-animal-friends-kit-name = Animal Friends Kit +uplink-animal-friends-kit-desc = A box containing 4 doses of syndizine, an alteration of cognizine that forces the injected creature to your will. Also contains an empty syringe and two mice to use it on. + + uplink-chest-rig-name = Chest Rig uplink-chest-rig-desc = Explosion-resistant tactical webbing used for holding traitor goods. @@ -441,4 +445,4 @@ uplink-backpack-syndicate-name = Syndicate backpack uplink-backpack-syndicate-desc = Lightweight explosion-proof а backpack for holding various traitor goods uplink-combat-bakery-name = Combat Bakery Kit -uplink-combat-bakery-desc = A kit of clandestine baked weapons. Contains a baguette which a skilled mime could use as a sword and a pair of throwing croissants. Once the job is done, eat the evidence. \ No newline at end of file +uplink-combat-bakery-desc = A kit of clandestine baked weapons. Contains a baguette which a skilled mime could use as a sword and a pair of throwing croissants. Once the job is done, eat the evidence. diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml index 27df984f25d747..34020414fd3225 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml @@ -68,6 +68,23 @@ - id: DeathRattleImplanter amount: 6 +- type: entity + parent: [BoxCardboard, BaseSyndicateContraband] + id: AnimalFriendsKit + name: animal friends kit + description: Contains 4 doses of Syndizine to convert animals into your henchmen, as well as two mice to inject. + components: + - type: Sprite + layers: + - state: box_of_doom + - state: syringe + - type: StorageFill + contents: + - id: MobMouse + amount: 2 + - id: Syringe + - id: SyndizineChemistryVial + - type: entity parent: [BoxCardboard, BaseSyndicateContraband] id: CombatBakeryKit @@ -82,4 +99,4 @@ contents: - id: WeaponCroissant amount: 2 - - id: WeaponBaguette \ No newline at end of file + - id: WeaponBaguette diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 613b7bcdedb99e..1c62e5c3c86c64 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -899,6 +899,18 @@ tags: - NukeOpsUplink +- type: listing + id: UplinkAnimalFriendsKit + name: uplink-animal-friends-kit-name + description: uplink-animal-friends-kit-desc + icon: { sprite: /Textures/Mobs/Animals/mouse.rsi, state: icon-2 } + productEntity: AnimalFriendsKit + cost: + Telecrystal: 4 + categories: + - UplinkAllies + + - type: listing id: UplinkReinforcementRadioSyndicate name: uplink-reinforcement-radio-name @@ -1758,4 +1770,4 @@ - !type:BuyerJobCondition whitelist: - Chef - - Mime \ No newline at end of file + - Mime diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml index eca666ca4f4ac4..d0f849d949f25a 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml @@ -117,3 +117,18 @@ Quantity: 30 - type: Tag tags: [] + +- type: entity + id: SyndizineChemistryVial + name: syndizine vial + parent: BaseChemistryEmptyVial + components: + - type: SolutionContainerManager + solutions: + beaker: + maxVol: 30 + reagents: + - ReagentId: Syndizine + Quantity: 20 + - type: Tag + tags: [] diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index a99015fe90be40..e837f56f52deb8 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -380,6 +380,16 @@ products: Cognizine: 1 +- type: reaction + id: Syndizine + reactants: + Cognizine: + amount: 1 + Vestine: + amount: 1 + products: + Syndizine: 2 + - type: reaction id: Sigynate impact: Medium From c39777d0adc96603cb15a12c795b26d889decd4c Mon Sep 17 00:00:00 2001 From: Kandiyaki <106633914+Kandiyaki@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:06:13 -0400 Subject: [PATCH 03/14] changed the name of syndizine to subjuzine --- Content.Server/EntityEffects/Effects/MakeSyndient.cs | 6 +++--- Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl | 2 +- Resources/Locale/en-US/reagents/meta/medicine.ftl | 4 ++-- Resources/Locale/en-US/store/uplink-catalog.ftl | 2 +- Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml | 4 ++-- .../Entities/Objects/Specific/chemistry-vials.yml | 6 +++--- Resources/Prototypes/Reagents/medicine.yml | 6 +++--- Resources/Prototypes/Recipes/Reactions/medicine.yml | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Content.Server/EntityEffects/Effects/MakeSyndient.cs b/Content.Server/EntityEffects/Effects/MakeSyndient.cs index 58702e621477a4..a2d46a3d8a9c7d 100644 --- a/Content.Server/EntityEffects/Effects/MakeSyndient.cs +++ b/Content.Server/EntityEffects/Effects/MakeSyndient.cs @@ -40,9 +40,9 @@ public override void Effect(EntityEffectBaseArgs args) if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) { - //change the role description and rules to make it clear it's been injected with syndizine + //change the role description and rules to make it clear it's been injected with subjuzine ghostRole = entityManager.GetComponent(uid); - ghostRole.RoleDescription = Loc.GetString("ghost-role-information-syndizine-description"); + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); ghostRole.RoleRules = Loc.GetString("ghost-role-information-familiar-rules"); return; } @@ -52,7 +52,7 @@ public override void Effect(EntityEffectBaseArgs args) var entityData = entityManager.GetComponent(uid); ghostRole.RoleName = entityData.EntityName; - ghostRole.RoleDescription = Loc.GetString("ghost-role-information-syndizine-description"); + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); ghostRole.RoleRules = Loc.GetString("ghost-role-information-familiar-rules"); } } diff --git a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl index 5feca660945ab3..12204a61dbbf5b 100644 --- a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl @@ -36,7 +36,7 @@ ghost-role-information-giant-spider-rules = You are a [color=red][bold]Team Anta ghost-role-information-cognizine-description = Made conscious with the magic of cognizine. -ghost-role-information-syndizine-description = Made obedient with the magic of syndizine. +ghost-role-information-subjuzine-description = Made obedient with the magic of subjuzine. ghost-role-information-hamster-name = Hamster ghost-role-information-hamster-description = A grumpy little ball of fluff. diff --git a/Resources/Locale/en-US/reagents/meta/medicine.ftl b/Resources/Locale/en-US/reagents/meta/medicine.ftl index 5d6968633296e8..8b748298e42f6b 100644 --- a/Resources/Locale/en-US/reagents/meta/medicine.ftl +++ b/Resources/Locale/en-US/reagents/meta/medicine.ftl @@ -97,8 +97,8 @@ reagent-desc-ethylredoxrazine = Neutralises the effects of alcohol in the blood reagent-name-cognizine = cognizine reagent-desc-cognizine = A mysterious chemical which is able to make any non-sentient creature sentient. -reagent-name-syndizine = syndizine -reagent-desc-syndizine = A devious alteration of cognizine that bends the creature's will to that of whoever injected them. +reagent-name-subjuzine = subjuzine +reagent-desc-subjuzine = A devious alteration of cognizine that bends the creature's will to that of whoever injected them. reagent-name-ethyloxyephedrine = ethyloxyephedrine reagent-desc-ethyloxyephedrine = A mildly unstable medicine derived from desoxyephedrine, primarily used to combat narcolepsy. diff --git a/Resources/Locale/en-US/store/uplink-catalog.ftl b/Resources/Locale/en-US/store/uplink-catalog.ftl index 2972ab67f5c172..cd793349d08b67 100644 --- a/Resources/Locale/en-US/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/store/uplink-catalog.ftl @@ -110,7 +110,7 @@ uplink-holster-name = Shoulder Holster uplink-holster-desc = A deep shoulder holster capable of holding many types of ballistics. uplink-animal-friends-kit-name = Animal Friends Kit -uplink-animal-friends-kit-desc = A box containing 4 doses of syndizine, an alteration of cognizine that forces the injected creature to your will. Also contains an empty syringe and two mice to use it on. +uplink-animal-friends-kit-desc = A box containing 4 doses of subjuzine, an alteration of cognizine that forces the injected creature to your will. Also contains an empty syringe and two mice to use it on. uplink-chest-rig-name = Chest Rig diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml index 34020414fd3225..a0c67cc003a3ea 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml @@ -72,7 +72,7 @@ parent: [BoxCardboard, BaseSyndicateContraband] id: AnimalFriendsKit name: animal friends kit - description: Contains 4 doses of Syndizine to convert animals into your henchmen, as well as two mice to inject. + description: Contains 4 doses of Subjuzine to convert animals into your henchmen, as well as two mice to inject. components: - type: Sprite layers: @@ -83,7 +83,7 @@ - id: MobMouse amount: 2 - id: Syringe - - id: SyndizineChemistryVial + - id: SubjuzineChemistryVial - type: entity parent: [BoxCardboard, BaseSyndicateContraband] diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml index d0f849d949f25a..ca2e61b61f1668 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml @@ -119,8 +119,8 @@ tags: [] - type: entity - id: SyndizineChemistryVial - name: syndizine vial + id: SubjuzineChemistryVial + name: subjuzine vial parent: BaseChemistryEmptyVial components: - type: SolutionContainerManager @@ -128,7 +128,7 @@ beaker: maxVol: 30 reagents: - - ReagentId: Syndizine + - ReagentId: Subjuzine Quantity: 20 - type: Tag tags: [] diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index b40573ed92e4c6..1e7f5cdbcc785a 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -877,9 +877,9 @@ min: 5 - type: reagent - id: Syndizine - name: reagent-name-syndizine - desc: reagent-desc-syndizine + id: Subjuzine + name: reagent-name-subjuzine + desc: reagent-desc-subjuzine group: Medicine physicalDesc: reagent-physical-desc-enigmatic flavor: magical diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index e837f56f52deb8..182b4290a36f14 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -381,14 +381,14 @@ Cognizine: 1 - type: reaction - id: Syndizine + id: Subjuzine reactants: Cognizine: amount: 1 Vestine: amount: 1 products: - Syndizine: 2 + Subjuzine: 2 - type: reaction id: Sigynate From ea8a0ac68519656791f79e1d21d4eedbb18ae398 Mon Sep 17 00:00:00 2001 From: Kandiyaki <106633914+Kandiyaki@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:59:25 -0400 Subject: [PATCH 04/14] changed mice into mouse cubes & bumped up kit price from 4 to 6 tc --- Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml | 4 ++-- Resources/Prototypes/Catalog/uplink_catalog.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml index a0c67cc003a3ea..cd25bacb51a421 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml @@ -72,7 +72,7 @@ parent: [BoxCardboard, BaseSyndicateContraband] id: AnimalFriendsKit name: animal friends kit - description: Contains 4 doses of Subjuzine to convert animals into your henchmen, as well as two mice to inject. + description: Contains 4 doses of Subjuzine to convert animals into your henchmen, as well as two mouse cubes to rehydrate & inject. components: - type: Sprite layers: @@ -80,7 +80,7 @@ - state: syringe - type: StorageFill contents: - - id: MobMouse + - id: MouseCube amount: 2 - id: Syringe - id: SubjuzineChemistryVial diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 1c62e5c3c86c64..f8701e722c2b27 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -906,7 +906,7 @@ icon: { sprite: /Textures/Mobs/Animals/mouse.rsi, state: icon-2 } productEntity: AnimalFriendsKit cost: - Telecrystal: 4 + Telecrystal: 6 categories: - UplinkAllies From 0636e1b2ef1083c8cd490ca82b9e17f8996e9542 Mon Sep 17 00:00:00 2001 From: Kandiyaki <106633914+Kandiyaki@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:30:00 -0400 Subject: [PATCH 05/14] attempt to fix the integration test failure --- Content.Server/EntityEffects/Effects/MakeSyndient.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Server/EntityEffects/Effects/MakeSyndient.cs b/Content.Server/EntityEffects/Effects/MakeSyndient.cs index a2d46a3d8a9c7d..89512a732ed13b 100644 --- a/Content.Server/EntityEffects/Effects/MakeSyndient.cs +++ b/Content.Server/EntityEffects/Effects/MakeSyndient.cs @@ -39,7 +39,6 @@ public override void Effect(EntityEffectBaseArgs args) // Don't add a ghost role to things that already have ghost roles if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) { - //change the role description and rules to make it clear it's been injected with subjuzine ghostRole = entityManager.GetComponent(uid); ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); From 3d15ea0ef838173e8d057edd19625591f18a43e0 Mon Sep 17 00:00:00 2001 From: Evelyn Gordon Date: Tue, 17 Sep 2024 15:53:29 -0400 Subject: [PATCH 06/14] Remove erroneous newline --- Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml | 2 +- Resources/Prototypes/Catalog/uplink_catalog.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml index cd25bacb51a421..9cee9adda9f1a6 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml @@ -99,4 +99,4 @@ contents: - id: WeaponCroissant amount: 2 - - id: WeaponBaguette + - id: WeaponBaguette \ No newline at end of file diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index f8701e722c2b27..5152319ad23a6f 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -1770,4 +1770,4 @@ - !type:BuyerJobCondition whitelist: - Chef - - Mime + - Mime \ No newline at end of file From 5e3b60e4347dcfe460314df5aeb4dc90138f814b Mon Sep 17 00:00:00 2001 From: Evelyn Gordon Date: Tue, 17 Sep 2024 15:56:28 -0400 Subject: [PATCH 07/14] Remove chemistry vial addition --- .../Entities/Objects/Specific/chemistry-vials.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml index ca2e61b61f1668..eca666ca4f4ac4 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml @@ -117,18 +117,3 @@ Quantity: 30 - type: Tag tags: [] - -- type: entity - id: SubjuzineChemistryVial - name: subjuzine vial - parent: BaseChemistryEmptyVial - components: - - type: SolutionContainerManager - solutions: - beaker: - maxVol: 30 - reagents: - - ReagentId: Subjuzine - Quantity: 20 - - type: Tag - tags: [] From a176f8e7594f872d0ca8c01ba1334758e426f8ea Mon Sep 17 00:00:00 2001 From: Evelyn Gordon Date: Tue, 17 Sep 2024 15:57:23 -0400 Subject: [PATCH 08/14] Re-add chemistry vial --- .../Entities/Objects/Specific/chemistry-vials.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml index ec910150eec05f..56a3bea4818f98 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-vials.yml @@ -149,3 +149,18 @@ reagents: - ReagentId: Chlorine Quantity: 5 + +- type: entity + id: SubjuzineChemistryVial + name: subjuzine vial + parent: BaseChemistryEmptyVial + components: + - type: SolutionContainerManager + solutions: + beaker: + maxVol: 30 + reagents: + - ReagentId: Subjuzine + Quantity: 20 + - type: Tag + tags: [] From 4b6f42d7dd54d1bcae64548b87511a1b2089792b Mon Sep 17 00:00:00 2001 From: Andrew Epperson Date: Fri, 20 Sep 2024 11:39:54 -0400 Subject: [PATCH 09/14] started DNA transfer system --- Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs | 6 ++++++ Content.Shared/Chemistry/Reaction/ReactionPrototype.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs b/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs index 534b6ba9f6b31b..47dcb3f4534d7d 100644 --- a/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs +++ b/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Database; using Content.Shared.EntityEffects; using Content.Shared.FixedPoint; +using Content.Shared.Implants.Components; using Robust.Shared.Audio.Systems; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -191,6 +192,11 @@ private List PerformReaction(Entity soln, ReactionPro solution.Temperature = energy / newCap; } + if(reaction.preserveDNA) + { + + } + OnReaction(soln, reaction, null, unitReactions); return products; diff --git a/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs b/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs index 351aa50b0f3fe8..bc22abb30cf696 100644 --- a/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs +++ b/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs @@ -62,6 +62,12 @@ public sealed partial class ReactionPrototype : IPrototype, IComparable [DataField("effects", serverOnly: true)] public List Effects = new(); + /// + /// If true, this reaction will attempt to transfer any DNA from the input chemicals to the output chemical. + /// + [DataField("preserveDNA")] + public bool preserveDNA = false; + /// /// How dangerous is this effect? Stuff like bicaridine should be low, while things like methamphetamine /// or potas/water should be high. From b6867a3ddd0110611d059cfbfca9ccd8e26261ef Mon Sep 17 00:00:00 2001 From: Andrew Epperson Date: Fri, 20 Sep 2024 20:01:41 -0400 Subject: [PATCH 10/14] changed up reactions to allow DNA transfers, added preserveDNA tag to reaction recipes, changed recipes accordingly --- .../Reaction/ChemicalReactionSystem.cs | 28 ++++++++++++++----- .../Chemistry/Reaction/ReactionPrototype.cs | 2 +- .../Prototypes/Recipes/Reactions/drinks.yml | 3 ++ .../Prototypes/Recipes/Reactions/fun.yml | 1 + .../Prototypes/Recipes/Reactions/medicine.yml | 1 + .../Recipes/Reactions/single_reagent.yml | 1 + 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs b/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs index 47dcb3f4534d7d..f8a1fa7c91b6ae 100644 --- a/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs +++ b/Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs @@ -4,7 +4,6 @@ using Content.Shared.Database; using Content.Shared.EntityEffects; using Content.Shared.FixedPoint; -using Content.Shared.Implants.Components; using Robust.Shared.Audio.Systems; using Robust.Shared.Prototypes; using Robust.Shared.Utility; @@ -167,8 +166,27 @@ private List PerformReaction(Entity soln, ReactionPro var energy = reaction.ConserveEnergy ? solution.GetThermalEnergy(_prototypeManager) : 0; + List dnaDataList = new List(); + + //save reactant DNA to DNAlist + if (reaction.PreserveDNA) + { + + foreach (var reagent in solution.Contents) + { + + foreach (var data in reagent.Reagent.EnsureReagentData()) + { + if (data is DnaData) + { + dnaDataList.Add((data)); + } + } + } + } + //Remove reactants - foreach (var reactant in reaction.Reactants) + foreach (KeyValuePair reactant in reaction.Reactants) { if (!reactant.Value.Catalyst) { @@ -182,7 +200,7 @@ private List PerformReaction(Entity soln, ReactionPro foreach (var product in reaction.Products) { products.Add(product.Key); - solution.AddReagent(product.Key, product.Value * unitReactions); + solution.AddReagent(new ReagentId(product.Key, dnaDataList), product.Value * unitReactions); } if (reaction.ConserveEnergy) @@ -192,10 +210,6 @@ private List PerformReaction(Entity soln, ReactionPro solution.Temperature = energy / newCap; } - if(reaction.preserveDNA) - { - - } OnReaction(soln, reaction, null, unitReactions); diff --git a/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs b/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs index bc22abb30cf696..0d19fa56adb1dc 100644 --- a/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs +++ b/Content.Shared/Chemistry/Reaction/ReactionPrototype.cs @@ -66,7 +66,7 @@ public sealed partial class ReactionPrototype : IPrototype, IComparable [DataField("preserveDNA")] - public bool preserveDNA = false; + public bool PreserveDNA = false; /// /// How dangerous is this effect? Stuff like bicaridine should be low, while things like methamphetamine diff --git a/Resources/Prototypes/Recipes/Reactions/drinks.yml b/Resources/Prototypes/Recipes/Reactions/drinks.yml index 67a5b54f81aac0..f20ef7bc73943b 100644 --- a/Resources/Prototypes/Recipes/Reactions/drinks.yml +++ b/Resources/Prototypes/Recipes/Reactions/drinks.yml @@ -294,6 +294,7 @@ - type: reaction id: DemonsBlood + preserveDNA: true requiredMixerCategories: - Stir reactants: @@ -310,6 +311,7 @@ - type: reaction id: DevilsKiss + preserveDNA: true requiredMixerCategories: - Stir reactants: @@ -824,6 +826,7 @@ - type: reaction id: RedMead + preserveDNA: true reactants: Mead: amount: 1 diff --git a/Resources/Prototypes/Recipes/Reactions/fun.yml b/Resources/Prototypes/Recipes/Reactions/fun.yml index 5ae173c0ee5b9b..00a37972e130c4 100644 --- a/Resources/Prototypes/Recipes/Reactions/fun.yml +++ b/Resources/Prototypes/Recipes/Reactions/fun.yml @@ -73,6 +73,7 @@ - type: reaction id: SpaceGlue + preserveDNA: true minTemp: 370 reactants: SpaceLube: diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index a99015fe90be40..09b4d070dfc6ac 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -208,6 +208,7 @@ - type: reaction id: Ambuzol + preserveDNA: true reactants: Dylovene: amount: 1 diff --git a/Resources/Prototypes/Recipes/Reactions/single_reagent.yml b/Resources/Prototypes/Recipes/Reactions/single_reagent.yml index 46fe35415f0b62..ad4b67d9a53b3a 100644 --- a/Resources/Prototypes/Recipes/Reactions/single_reagent.yml +++ b/Resources/Prototypes/Recipes/Reactions/single_reagent.yml @@ -37,6 +37,7 @@ - type: reaction id: BloodToWine + preserveDNA: true impact: Low requiredMixerCategories: - Holy From e4846ecf38d770a5d4eb4ca5d39cd42e650866c8 Mon Sep 17 00:00:00 2001 From: Kandiyaki Date: Mon, 30 Sep 2024 17:16:44 -0400 Subject: [PATCH 11/14] its not workin right but im close --- .../EntityEffects/Effects/MakeSyndient.cs | 98 ++++++++++++++++--- .../ghost/roles/ghost-role-component.ftl | 5 + Resources/Prototypes/Reagents/medicine.yml | 18 ++++ .../Prototypes/Recipes/Reactions/medicine.yml | 68 ++++++++++++- 4 files changed, 174 insertions(+), 15 deletions(-) diff --git a/Content.Server/EntityEffects/Effects/MakeSyndient.cs b/Content.Server/EntityEffects/Effects/MakeSyndient.cs index 89512a732ed13b..d253cdf0304492 100644 --- a/Content.Server/EntityEffects/Effects/MakeSyndient.cs +++ b/Content.Server/EntityEffects/Effects/MakeSyndient.cs @@ -1,9 +1,14 @@ +using Content.Server.Forensics; +using Content.Server.Chat.Managers; using Content.Server.Ghost.Roles.Components; using Content.Server.Speech.Components; +using Content.Shared.Chemistry.Reagent; using Content.Shared.EntityEffects; using Content.Shared.Humanoid; using Content.Shared.Mind.Components; using Robust.Shared.Prototypes; +using YamlDotNet.Core.Tokens; +using System.Linq; namespace Content.Server.EntityEffects.Effects; @@ -17,6 +22,7 @@ public override void Effect(EntityEffectBaseArgs args) { var entityManager = args.EntityManager; var uid = args.TargetEntity; + var EntityQueryEnumerator query = EntityQueryEnumerator(); // Let affected entities speak normally to make this effect different from, say, the "random sentience" event // This also works on entities that already have a mind @@ -36,22 +42,86 @@ public override void Effect(EntityEffectBaseArgs args) return; } - // Don't add a ghost role to things that already have ghost roles - if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) + //hide your children, it's time to figure out whose blood is in this shit + if (args is EntityEffectReagentArgs reagentArgs) { - //change the role description and rules to make it clear it's been injected with subjuzine - ghostRole = entityManager.GetComponent(uid); - ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); - ghostRole.RoleRules = Loc.GetString("ghost-role-information-familiar-rules"); - return; - } + //get all DNAs stored in the injected solution + List dnaDataList = new List(); + if (reagentArgs.Source != null) + { + foreach (var reagent in reagentArgs.Source.Contents) + { + foreach (var data in reagent.Reagent.EnsureReagentData()) + { + if (data is DnaData) + { + dnaDataList.Add(((DnaData)data)); + } + } + } + //we have all the DNA in the activated subjuzine. get a random one and find the DNA's source. + if (dnaDataList.Count > 0) + { + Random r = new Random(); + DnaData chosenOne = dnaDataList[r.Next(0, dnaDataList.Count)]; + + //store the chosen one's name for later use in the welcome message. + String chosenName = "OH GOD OH FUCK IT'S BROKEN"; + //iterate over every DNAcomponent in the server until you find one that matches the given DNA + while (query.MoveNext(out var sourceUID, out var sourceComp)) + { + if (sourceComp.DNA.Equals(chosenOne.DNA)){ + + if(entityManager.TryGetComponent(sourceUID, out MetaDataComponent? metaData)) + { + chosenName = metaData.EntityName; + } + } + } + //we FINALLY have the name of the injector. jesus fuck. + //now, we build the role name, description, etc. + + //Don't add a ghost role to things that already have ghost roles + + String rules = (Loc.GetString("ghost-role-information-subjuzine-rules-1")); + rules = rules + chosenName; + rules = rules + (Loc.GetString("ghost-role-information-subjuzine-rules-2")); - ghostRole = entityManager.AddComponent(uid); - entityManager.EnsureComponent(uid); + if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) + { + //if there already was a ghost role, change the role description and rules to make it clear it's been injected with subjuzine + ghostRole = entityManager.GetComponent(uid); + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); + ghostRole.RoleRules = rules; + return; + } - var entityData = entityManager.GetComponent(uid); - ghostRole.RoleName = entityData.EntityName; - ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); - ghostRole.RoleRules = Loc.GetString("ghost-role-information-familiar-rules"); + ghostRole = entityManager.AddComponent(uid); + entityManager.EnsureComponent(uid); + + var entityData = entityManager.GetComponent(uid); + ghostRole.RoleName = entityData.EntityName; + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); + ghostRole.RoleRules = rules; + + + } + else //if there's no DNA in the DNA list, just act as if it was normal cognizine. + { + //Don't add a ghost role to things that already have ghost roles + if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole)) + { + return; + } + + ghostRole = entityManager.AddComponent(uid); + entityManager.EnsureComponent(uid); + + var entityData = entityManager.GetComponent(uid); + ghostRole.RoleName = entityData.EntityName; + ghostRole.RoleDescription = Loc.GetString("ghost-role-information-cognizine-description"); + } + } + } } } diff --git a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl index 8fa5bf42a79236..e47431f768de6e 100644 --- a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl @@ -51,6 +51,11 @@ ghost-role-information-giant-spider-rules = You are a [color=red][bold]Team Anta ghost-role-information-cognizine-description = Made conscious with the magic of cognizine. ghost-role-information-subjuzine-description = Made obedient with the magic of subjuzine. +ghost-role-information-subjuzine-rules-1 = You are a [color=#6495ed][bold]Familiar[/bold][/color] under the control of [color=red][bold] +ghost-role-information-subjuzine-rules-2 = [/bold][/color]. Serve the interests of your master, whatever those may be. + You don't remember any of your previous life, and you don't remember anything you learned as a ghost. + You are allowed to remember knowledge about the game in general, such as how to cook, how to use objects, etc. + You are absolutely [color=red]NOT[/color] allowed to remember, say, the name, appearance, etc. of your previous character. ghost-role-information-hamster-name = Hamster ghost-role-information-hamster-description = A grumpy little ball of fluff. diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index f2418a34574853..8f29887c1eb22a 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -887,6 +887,23 @@ group: Medicine physicalDesc: reagent-physical-desc-enigmatic flavor: magical + color: "#a50ed8" + metabolisms: + Medicine: + effects: + - !type:MakeSentient + conditions: + - !type:ReagentThreshold + min: 5 + + +- type: reagent + id: ActivatedSubjuzine + name: reagent-name-subjuzine + desc: reagent-desc-subjuzine + group: Medicine + physicalDesc: reagent-physical-desc-enigmatic + flavor: magical color: "#911d06" metabolisms: Medicine: @@ -896,6 +913,7 @@ - !type:ReagentThreshold min: 5 + - type: reagent id: Ethyloxyephedrine name: reagent-name-ethyloxyephedrine diff --git a/Resources/Prototypes/Recipes/Reactions/medicine.yml b/Resources/Prototypes/Recipes/Reactions/medicine.yml index 0635414e268689..127edf2c14b498 100644 --- a/Resources/Prototypes/Recipes/Reactions/medicine.yml +++ b/Resources/Prototypes/Recipes/Reactions/medicine.yml @@ -390,7 +390,73 @@ amount: 1 products: Subjuzine: 2 - + +- type: reaction + id: Subjuzine-Activation-Blood + preserveDNA: true + reactants: + Subjuzine: + amount: 4 + Blood: + amount: 1 + products: + ActivatedSubjuzine: 5 + +- type: reaction + id: Subjuzine-Activation-Slime + preserveDNA: true + reactants: + Subjuzine: + amount: 4 + Slime: + amount: 1 + products: + ActivatedSubjuzine: 5 + +- type: reaction + id: Subjuzine-Activation-Insect + preserveDNA: true + reactants: + Subjuzine: + amount: 4 + InsectBlood: + amount: 1 + products: + ActivatedSubjuzine: 5 + +- type: reaction + id: Subjuzine-Activation-Sap + preserveDNA: true + reactants: + Subjuzine: + amount: 4 + Sap: + amount: 1 + products: + ActivatedSubjuzine: 5 + +- type: reaction + id: Subjuzine-Activation-BlueBlood + preserveDNA: true + reactants: + Subjuzine: + amount: 4 + CopperBlood: + amount: 1 + products: + ActivatedSubjuzine: 5 + +- type: reaction + id: Subjuzine-Activation-Anaerobic + preserveDNA: true + reactants: + Subjuzine: + amount: 4 + AmmoniaBlood: + amount: 1 + products: + ActivatedSubjuzine: 5 + - type: reaction id: Sigynate impact: Medium From a05ce1633f5299046e4106db8c9e3e640c25f793 Mon Sep 17 00:00:00 2001 From: Kandiyaki Date: Mon, 30 Sep 2024 20:47:02 -0400 Subject: [PATCH 12/14] finished the subjuzine name display system! fuck yeah! --- .../EntityEffects/Effects/MakeSyndient.cs | 28 ++++++++----------- .../Forensics/Systems/ForensicsSystem.cs | 21 ++++++++++++++ .../ghost/roles/ghost-role-component.ftl | 2 +- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Content.Server/EntityEffects/Effects/MakeSyndient.cs b/Content.Server/EntityEffects/Effects/MakeSyndient.cs index d253cdf0304492..1f7745cb2314ea 100644 --- a/Content.Server/EntityEffects/Effects/MakeSyndient.cs +++ b/Content.Server/EntityEffects/Effects/MakeSyndient.cs @@ -6,9 +6,12 @@ using Content.Shared.EntityEffects; using Content.Shared.Humanoid; using Content.Shared.Mind.Components; +using Robust.Server.GameObjects; +using Robust.Shared.Random; using Robust.Shared.Prototypes; using YamlDotNet.Core.Tokens; using System.Linq; +using Content.Server.Atmos.EntitySystems; namespace Content.Server.EntityEffects.Effects; @@ -18,11 +21,14 @@ public sealed partial class MakeSyndient : EntityEffect protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => Loc.GetString("reagent-effect-guidebook-make-sentient", ("chance", Probability)); + [Dependency] private readonly ForensicsSystem _forensicsSystem = default!; + public override void Effect(EntityEffectBaseArgs args) { + var entityManager = args.EntityManager; var uid = args.TargetEntity; - var EntityQueryEnumerator query = EntityQueryEnumerator(); + // Let affected entities speak normally to make this effect different from, say, the "random sentience" event // This also works on entities that already have a mind @@ -41,6 +47,7 @@ public override void Effect(EntityEffectBaseArgs args) { return; } + var forensicSys = args.EntityManager.System(); //hide your children, it's time to figure out whose blood is in this shit if (args is EntityEffectReagentArgs reagentArgs) @@ -62,22 +69,9 @@ public override void Effect(EntityEffectBaseArgs args) //we have all the DNA in the activated subjuzine. get a random one and find the DNA's source. if (dnaDataList.Count > 0) { - Random r = new Random(); - DnaData chosenOne = dnaDataList[r.Next(0, dnaDataList.Count)]; - - //store the chosen one's name for later use in the welcome message. - String chosenName = "OH GOD OH FUCK IT'S BROKEN"; - //iterate over every DNAcomponent in the server until you find one that matches the given DNA - while (query.MoveNext(out var sourceUID, out var sourceComp)) - { - if (sourceComp.DNA.Equals(chosenOne.DNA)){ + DnaData chosenOne = dnaDataList[0]; - if(entityManager.TryGetComponent(sourceUID, out MetaDataComponent? metaData)) - { - chosenName = metaData.EntityName; - } - } - } + String chosenName = forensicSys.GetNameFromDNA(chosenOne.DNA); //we FINALLY have the name of the injector. jesus fuck. //now, we build the role name, description, etc. @@ -93,7 +87,7 @@ public override void Effect(EntityEffectBaseArgs args) ghostRole = entityManager.GetComponent(uid); ghostRole.RoleDescription = Loc.GetString("ghost-role-information-subjuzine-description"); ghostRole.RoleRules = rules; - return; + return; } ghostRole = entityManager.AddComponent(uid); diff --git a/Content.Server/Forensics/Systems/ForensicsSystem.cs b/Content.Server/Forensics/Systems/ForensicsSystem.cs index 34529aba4a2f7d..2ce83e7584d7e1 100644 --- a/Content.Server/Forensics/Systems/ForensicsSystem.cs +++ b/Content.Server/Forensics/Systems/ForensicsSystem.cs @@ -17,6 +17,7 @@ using Robust.Shared.Random; using Content.Shared.Verbs; using Robust.Shared.Utility; +using Robust.Shared.GameObjects; namespace Content.Server.Forensics { @@ -134,6 +135,26 @@ public void CopyForensicsFrom(ForensicsComponent src, EntityUid target) dest.Fingerprints.Add(print); } } + public string GetNameFromDNA(string DNA) + { + var query = EntityQueryEnumerator(); + + String outputName = "OH GOD OH FUCK IT'S BROKEN"; + //iterate over every DNAcomponent in the server until you find one that matches the given DNA + while (query.MoveNext(out var sourceUID, out var sourceComp)) + { + if (sourceComp.DNA.Equals(DNA)) + { + + if (EntityManager.TryGetComponent(sourceUID, out MetaDataComponent? metaData)) + { + //output the name of the entity with the given DNA + outputName = metaData.EntityName; + } + } + } + return outputName; + } public List GetSolutionsDNA(EntityUid uid) { diff --git a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl index e47431f768de6e..1472d1bfe8e990 100644 --- a/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl @@ -52,7 +52,7 @@ ghost-role-information-cognizine-description = Made conscious with the magic of ghost-role-information-subjuzine-description = Made obedient with the magic of subjuzine. ghost-role-information-subjuzine-rules-1 = You are a [color=#6495ed][bold]Familiar[/bold][/color] under the control of [color=red][bold] -ghost-role-information-subjuzine-rules-2 = [/bold][/color]. Serve the interests of your master, whatever those may be. +ghost-role-information-subjuzine-rules-2 = [/bold][/color]. Follow your master's orders and keep their identity secret. You don't remember any of your previous life, and you don't remember anything you learned as a ghost. You are allowed to remember knowledge about the game in general, such as how to cook, how to use objects, etc. You are absolutely [color=red]NOT[/color] allowed to remember, say, the name, appearance, etc. of your previous character. From 6c66dd08e11cfcd95de5580f911ba4e695c41ae7 Mon Sep 17 00:00:00 2001 From: Kandiyaki Date: Mon, 30 Sep 2024 22:08:41 -0400 Subject: [PATCH 13/14] added instructions to the animal friends kit --- Resources/Locale/en-US/paper/paper-misc.ftl | 6 ++++++ .../Prototypes/Catalog/Fills/Boxes/syndicate.yml | 5 +++-- Resources/Prototypes/Catalog/Fills/Paper/manuals.yml | 11 ++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Resources/Locale/en-US/paper/paper-misc.ftl b/Resources/Locale/en-US/paper/paper-misc.ftl index 8d552d099eee0d..5a71c4d843eb37 100644 --- a/Resources/Locale/en-US/paper/paper-misc.ftl +++ b/Resources/Locale/en-US/paper/paper-misc.ftl @@ -53,6 +53,12 @@ book-text-agrichemkit-manual = Thank you for choosing the safe-for-all-ages Nano Unstable mutagen is entirely safe when used as a fertilizer, and NanoTrasen takes no responsibility for dead crops, excessive water bills, newly sentient plants asking existential questions, or flora-strangled farmhands that may coincidentally occur while using it. Do not drink unstable mutagen. Wash your hands thoroughly after handing. Wash your eyes if you have looked at unstable mutagen for over 30 minutes in a 24 hour period. Store in a dark room between 293–295K. Do not use on corporate holidays. If you begin hearing voices telling you to drink unstable mutagen, please contact your doctor, head of personnel, or exorcist. + +book-text-animal-friends-kit = Thank you for choosing the Animal Friends Kit! + Enclosed is a vial of dormant Subjuzine. Use the included syringe to draw 5 units of your blood, and put it into the vial to activate! + Injecting any non-sentient creature with Subjuzine will not only force them to follow your commands, but give them the gift of speech! + Good luck, Agent. Go make some animal friends! + book-text-combat-bakery-kit = Thank you for choosing our combat bakery kit! Enclosed are two (2) CyberSun patented Throwing Croissants, and one (1) patent-pending Baguette Sword. The included Donk Co. microwave board can construct a microwave capable of baking more weapons. diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml index 4912cd63bfbd96..701d2d430ebb93 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml @@ -72,7 +72,7 @@ parent: [BoxCardboard, BaseSyndicateContraband] id: AnimalFriendsKit name: animal friends kit - description: Contains 4 doses of Subjuzine to convert animals into your henchmen, as well as two mouse cubes to rehydrate & inject. + description: Contains 5 doses of Subjuzine to convert animals into your henchmen. Just add blood! components: - type: Sprite layers: @@ -84,6 +84,7 @@ amount: 2 - id: Syringe - id: SubjuzineChemistryVial + - id: PaperWrittenAnimalFriendsKit - type: entity parent: [BoxCardboard, BaseSyndicateContraband] @@ -101,4 +102,4 @@ amount: 2 - id: WeaponBaguette - id: SyndicateMicrowaveMachineCircuitboard - - id: PaperWrittenCombatBakeryKit \ No newline at end of file + - id: PaperWrittenCombatBakeryKit diff --git a/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml b/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml index 4da9ec51878cd2..3e77ece6922839 100644 --- a/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml +++ b/Resources/Prototypes/Catalog/Fills/Paper/manuals.yml @@ -33,6 +33,15 @@ - type: Paper content: book-text-agrichemkit-manual +- type: entity + id: PaperWrittenAnimalFriendsKit + name: "animal friends kit instructions" + description: A small, handwritten note detailing how to use the animal friends kit. + parent: Paper + components: + - type: Paper + content: book-text-animal-friends-kit + - type: entity id: PaperWrittenCombatBakeryKit name: "combat bakery kit instructions" @@ -40,4 +49,4 @@ parent: Paper components: - type: Paper - content: book-text-combat-bakery-kit \ No newline at end of file + content: book-text-combat-bakery-kit From 703a2eb76b1783a94a459c44bce0f29cadfaff89 Mon Sep 17 00:00:00 2001 From: Kandiyaki Date: Tue, 1 Oct 2024 07:51:54 -0400 Subject: [PATCH 14/14] attempt to fix the integration test AGAIN :/ --- Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml | 2 +- Resources/Prototypes/Catalog/uplink_catalog.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml index 701d2d430ebb93..ab926305c89989 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/syndicate.yml @@ -102,4 +102,4 @@ amount: 2 - id: WeaponBaguette - id: SyndicateMicrowaveMachineCircuitboard - - id: PaperWrittenCombatBakeryKit + - id: PaperWrittenCombatBakeryKit \ No newline at end of file diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index f4b0916e13c126..6dff026a0a1e8f 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -1117,7 +1117,6 @@ categories: - UplinkAllies - - type: listing id: UplinkReinforcementRadioSyndicate name: uplink-reinforcement-radio-name