* Sedin
* almost forgot this.
* what
* Did a few fixes, tried to readd popup
* Fix popup, ready for merge
* minor change
* Generalize seed removal/destruction system, add popups in general.
* fix
* fix (again)
* deadcode is no more
* Sedin buff (nerfing the recipe soon)
* godont
* webedit moment
ok listen I had to nuke my setup because my computer was being Dumb As Shit so let me do this ONE webedit
* CRIKEY
* Revert "CRIKEY"
This reverts commit
1c6959ffd9ba8bb1e97ccf2eb0b37b3ff4ec82ee.
I was not supposed to commit that >:/
* Alright, it should be good now but I havent tested it
* ready for merge/review
* prob -> probability
* Requested changes nodoc
* Review nodoc
* documento
* thumb up emoji
--- /dev/null
+using Content.Server.Botany.Systems;
+using Content.Shared.EntityEffects;
+
+namespace Content.Server.EntityEffects.Effects.PlantMetabolism;
+
+/// <summary>
+/// Handles increase or decrease of plant potency.
+/// </summary>
+
+public sealed partial class PlantAdjustPotency : PlantAdjustAttribute
+{
+ public override string GuidebookAttributeName { get; set; } = "plant-attribute-potency";
+
+ public override void Effect(EntityEffectBaseArgs args)
+ {
+ if (!CanMetabolize(args.TargetEntity, out var plantHolderComp, args.EntityManager))
+ return;
+
+ if (plantHolderComp.Seed == null)
+ return;
+
+ var plantHolder = args.EntityManager.System<PlantHolderSystem>();
+
+ plantHolder.EnsureUniqueSeed(args.TargetEntity, plantHolderComp);
+
+ plantHolderComp.Seed.Potency = Math.Max(plantHolderComp.Seed.Potency + Amount, 1);
+ }
+}
--- /dev/null
+using Content.Server.Botany.Components;
+using Content.Server.Botany.Systems;
+using Content.Shared.EntityEffects;
+using Content.Shared.Popups;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.EntityEffects.Effects.PlantMetabolism;
+
+/// <summary>
+/// Handles removal of seeds on a plant.
+/// </summary>
+
+public sealed partial class PlantDestroySeeds : EntityEffect
+{
+ public override void Effect(EntityEffectBaseArgs args)
+ {
+ if (
+ !args.EntityManager.TryGetComponent(args.TargetEntity, out PlantHolderComponent? plantHolderComp)
+ || plantHolderComp.Seed == null
+ || plantHolderComp.Dead
+ || plantHolderComp.Seed.Immutable
+ )
+ return;
+
+ var plantHolder = args.EntityManager.System<PlantHolderSystem>();
+ var popupSystem = args.EntityManager.System<SharedPopupSystem>();
+
+ if (plantHolderComp.Seed.Seedless == false)
+ {
+ plantHolder.EnsureUniqueSeed(args.TargetEntity, plantHolderComp);
+ popupSystem.PopupEntity(
+ Loc.GetString("botany-plant-seedsdestroyed"),
+ args.TargetEntity,
+ PopupType.SmallCaution
+ );
+ plantHolderComp.Seed.Seedless = true;
+ }
+ }
+
+ protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
+ Loc.GetString("reagent-effect-guidebook-plant-seeds-remove", ("chance", Probability));
+}
--- /dev/null
+using Content.Server.Botany.Components;
+using Content.Server.Botany.Systems;
+using Content.Shared.EntityEffects;
+using Content.Shared.Popups;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.EntityEffects.Effects.PlantMetabolism;
+
+/// <summary>
+/// Handles restoral of seeds on a plant.
+/// </summary>
+
+public sealed partial class PlantRestoreSeeds : EntityEffect
+{
+ public override void Effect(EntityEffectBaseArgs args)
+ {
+ if (
+ !args.EntityManager.TryGetComponent(args.TargetEntity, out PlantHolderComponent? plantHolderComp)
+ || plantHolderComp.Seed == null
+ || plantHolderComp.Dead
+ || plantHolderComp.Seed.Immutable
+ )
+ return;
+
+ var plantHolder = args.EntityManager.System<PlantHolderSystem>();
+ var popupSystem = args.EntityManager.System<SharedPopupSystem>();
+
+ if (plantHolderComp.Seed.Seedless)
+ {
+ plantHolder.EnsureUniqueSeed(args.TargetEntity, plantHolderComp);
+ popupSystem.PopupEntity(Loc.GetString("botany-plant-seedsrestored"), args.TargetEntity);
+ plantHolderComp.Seed.Seedless = false;
+ }
+ }
+
+ protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) =>
+ Loc.GetString("reagent-effect-guidebook-plant-seeds-add", ("chance", Probability));
+}
--- /dev/null
+botany-plant-seedsrestored = You can hear the faint sound of shuffling leaves.
+botany-plant-seedsdestroyed = The seeds on the plant start cracking and fall off!
[1] Increases
*[other] increase
} the plant's potency by {$increase} up to a maximum of {$limit}. Causes the plant to lose its seeds once the potency reaches {$seedlesstreshold}. Trying to add potency over {$limit} may cause decrease in yield at a 10% chance
+
+reagent-effect-guidebook-plant-seeds-add =
+ { $chance ->
+ [1] Restores the
+ *[other] restore the
+ } seeds of the plant
+
+reagent-effect-guidebook-plant-seeds-remove =
+ { $chance ->
+ [1] Removes the
+ *[other] remove the
+ } seeds of the plant
plant-attribute-growth = age
plant-attribute-water = water level
+plant-attribute-potency = potency
plant-attribute-weeds = weeds level
plant-attribute-toxins = toxins level
plant-attribute-nutrition = nutrition level
reagent-name-diethylamine = diethylamine
reagent-desc-diethylamine = A very potent fertilizer, treats plants with nutrients, eliminates pests, and sometimes it can even speed up growth.
+
+reagent-name-sedin = sedin
+reagent-desc-sedin = A modified version of diethylamine that can restore seeds on plants at the cost of potency.
- !type:ReagentThreshold
min: 80
+- type: reagent
+ id: Sedin
+ name: reagent-name-sedin
+ group: Botanical
+ desc: reagent-desc-sedin
+ flavor: bitter
+ color: "#3CB371"
+ physicalDesc: reagent-physical-desc-sickly
+ plantMetabolism:
+ - !type:PlantAdjustHealth
+ amount: -2
+ - !type:PlantRestoreSeeds
+ probability: 0.20
+ - !type:PlantAdjustPotency
+ amount: -3 # Match this with current rate of Robust Harvest potency increase
- type: reagent
id: WeedKiller
products:
RobustHarvest: 1
+- type: reaction
+ id: Sedin
+ reactants:
+ Cryoxadone:
+ amount: 1
+ RobustHarvest:
+ amount: 3
+ Diethylamine:
+ amount: 3
+ products:
+ Sedin: 1
+
- type: reaction
id: Left4Zed
reactants: