From 89ca105e7c3a7986a1333feb3e36f8730251fdef Mon Sep 17 00:00:00 2001 From: LankLTE <135308300+LankLTE@users.noreply.github.com> Date: Thu, 6 Jul 2023 19:55:00 -0700 Subject: [PATCH] Fixes Romerol & Corpium, Small Zombie Tweaks (#17784) * Fixed romerol and corpium. * Tweaked zombie values. * Change guidebook descriptions. * Fixed corpium, added reagent requirements. * Readded zombie bundle to uplink. * Edited description --- .../ReagentEffects/CauseZombieInfection.cs | 23 +++++++++++ .../ReagentEffects/CureZombieInfection.cs | 23 +++++++++++ Content.Shared/Zombies/ZombieComponent.cs | 4 +- .../en-US/guidebook/chemistry/effects.ftl | 12 ++++++ .../Locale/en-US/reagents/meta/medicine.ftl | 2 +- .../Prototypes/Catalog/uplink_catalog.yml | 38 +++++++++---------- Resources/Prototypes/Reagents/medicine.yml | 4 ++ Resources/Prototypes/Reagents/toxins.yml | 4 ++ 8 files changed, 88 insertions(+), 22 deletions(-) create mode 100644 Content.Server/Chemistry/ReagentEffects/CauseZombieInfection.cs create mode 100644 Content.Server/Chemistry/ReagentEffects/CureZombieInfection.cs diff --git a/Content.Server/Chemistry/ReagentEffects/CauseZombieInfection.cs b/Content.Server/Chemistry/ReagentEffects/CauseZombieInfection.cs new file mode 100644 index 0000000000..011ef6be4d --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/CauseZombieInfection.cs @@ -0,0 +1,23 @@ +using Content.Shared.Chemistry.Reagent; +using Robust.Shared.Prototypes; + +using Robust.Shared.Configuration; +using Content.Server.Zombies; + + +namespace Content.Server.Chemistry.ReagentEffects; + +public sealed class CauseZombieInfection : ReagentEffect +{ + protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) + => Loc.GetString("reagent-effect-guidebook-cause-zombie-infection", ("chance", Probability)); + + // Adds the Zombie Infection Components + public override void Effect(ReagentEffectArgs args) + { + var entityManager = args.EntityManager; + entityManager.EnsureComponent(args.SolutionEntity); + entityManager.EnsureComponent(args.SolutionEntity); + } +} + diff --git a/Content.Server/Chemistry/ReagentEffects/CureZombieInfection.cs b/Content.Server/Chemistry/ReagentEffects/CureZombieInfection.cs new file mode 100644 index 0000000000..31a598b778 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/CureZombieInfection.cs @@ -0,0 +1,23 @@ +using Content.Shared.Chemistry.Reagent; +using Robust.Shared.Prototypes; + +using Robust.Shared.Configuration; +using Content.Server.Zombies; + + +namespace Content.Server.Chemistry.ReagentEffects; + +public sealed class CureZombieInfection : ReagentEffect +{ + protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) + => Loc.GetString("reagent-effect-guidebook-cure-zombie-infection", ("chance", Probability)); + + // Removes the Zombie Infection Components + public override void Effect(ReagentEffectArgs args) + { + var entityManager = args.EntityManager; + entityManager.RemoveComponent(args.SolutionEntity); + entityManager.RemoveComponent(args.SolutionEntity); + } +} + diff --git a/Content.Shared/Zombies/ZombieComponent.cs b/Content.Shared/Zombies/ZombieComponent.cs index 28ab989ae1..9feb4c7a13 100644 --- a/Content.Shared/Zombies/ZombieComponent.cs +++ b/Content.Shared/Zombies/ZombieComponent.cs @@ -44,14 +44,14 @@ namespace Content.Shared.Zombies /// The baseline infection chance you have if you are completely nude /// [ViewVariables(VVAccess.ReadWrite)] - public float MaxZombieInfectionChance = 0.30f; + public float MaxZombieInfectionChance = 0.50f; /// /// The minimum infection chance possible. This is simply to prevent /// being invincible by bundling up. /// [ViewVariables(VVAccess.ReadWrite)] - public float MinZombieInfectionChance = 0.05f; + public float MinZombieInfectionChance = 0.20f; [ViewVariables(VVAccess.ReadWrite)] public float ZombieMovementSpeedDebuff = 0.70f; diff --git a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl index e004cc1590..78d0cc25ec 100644 --- a/Resources/Locale/en-US/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/en-US/guidebook/chemistry/effects.ftl @@ -309,6 +309,18 @@ reagent-effect-guidebook-wash-cream-pie-reaction = *[other] wash } off cream pie from one's face +reagent-effect-guidebook-cure-zombie-infection = + { $chance -> + [1] Cures + *[other] cure + } an ongoing zombie infection + +reagent-effect-guidebook-cause-zombie-infection = + { $chance -> + [1] Gives + *[other] give + } an individual the zombie infection + reagent-effect-guidebook-missing = { $chance -> [1] Causes diff --git a/Resources/Locale/en-US/reagents/meta/medicine.ftl b/Resources/Locale/en-US/reagents/meta/medicine.ftl index 44d5a8d9f4..cedd4e76a9 100644 --- a/Resources/Locale/en-US/reagents/meta/medicine.ftl +++ b/Resources/Locale/en-US/reagents/meta/medicine.ftl @@ -53,7 +53,7 @@ reagent-name-phalanximine = phalanximine reagent-desc-phalanximine = Used in the treatment of cancer. Causes moderate radiation poisoning. reagent-name-romerol = romerol -reagent-desc-romerol = A difficult to procure chemical used in the reversal of the zombification process. Tastes like death. +reagent-desc-romerol = A difficult to procure chemical that can remove a zombie infection in living organisms. Cannot save anyone who has already turned. Tastes like death. reagent-name-pulped-banana-peel = pulped banana peel reagent-desc-pulped-banana-peel = Pulped banana peels have some effectiveness against bleeding. diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 0dc464422f..0ee970785d 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -480,25 +480,25 @@ categories: - UplinkBundles -#- type: listing -# id: UplinkZombieBundle -# name: uplink-zombie-bundle-name -# description: uplink-zombie-bundle-desc -# icon: { sprite: /Textures/Structures/Wallmounts/signs.rsi, state: bio } -# productEntity: ClothingBackpackDuffelZombieBundle -# cost: -# Telecrystal: 40 -# categories: -# - UplinkBundles -# conditions: -# - !type:StoreWhitelistCondition -# whitelist: -# tags: -# - NukeOpsUplink -# - !type:BuyerWhitelistCondition -# blacklist: -# components: -# - SurplusBundle +- type: listing + id: UplinkZombieBundle + name: uplink-zombie-bundle-name + description: uplink-zombie-bundle-desc + icon: { sprite: /Textures/Structures/Wallmounts/signs.rsi, state: bio } + productEntity: ClothingBackpackDuffelZombieBundle + cost: + Telecrystal: 40 + categories: + - UplinkBundles + conditions: + - !type:StoreWhitelistCondition + whitelist: + tags: + - NukeOpsUplink + - !type:BuyerWhitelistCondition + blacklist: + components: + - SurplusBundle - type: listing id: UplinkSurplusBundle diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 9a9cecb6c3..4abbfab7be 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -573,6 +573,10 @@ damage: types: Poison: 0.5 + - !type:CureZombieInfection + conditions: + - !type:ReagentThreshold + min: 10 - type: reagent id: PulpedBananaPeel diff --git a/Resources/Prototypes/Reagents/toxins.yml b/Resources/Prototypes/Reagents/toxins.yml index 98eb6d2f42..f26db16d98 100644 --- a/Resources/Prototypes/Reagents/toxins.yml +++ b/Resources/Prototypes/Reagents/toxins.yml @@ -398,6 +398,10 @@ damage: types: Cellular: 1 + - !type:CauseZombieInfection + conditions: + - !type:ReagentThreshold + min: 5 - type: reagent id: UncookedAnimalProteins