diff --git a/Content.Server/Botany/Systems/BotanySystem.Seed.cs b/Content.Server/Botany/Systems/BotanySystem.Seed.cs index c878c3ab68..a1291b85d2 100644 --- a/Content.Server/Botany/Systems/BotanySystem.Seed.cs +++ b/Content.Server/Botany/Systems/BotanySystem.Seed.cs @@ -7,12 +7,16 @@ using Content.Server.Popups; using Content.Shared.Botany; using Content.Shared.Examine; using Content.Shared.Hands.EntitySystems; +using Content.Shared.Physics; using Content.Shared.Popups; using Content.Shared.Random.Helpers; using Content.Shared.Slippery; using Content.Shared.StepTrigger.Components; using Robust.Server.GameObjects; using Robust.Shared.Map; +using Robust.Shared.Physics; +using Robust.Shared.Physics.Components; +using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -29,6 +33,8 @@ public sealed partial class BotanySystem : EntitySystem [Dependency] private readonly IRobustRandom _robustRandom = default!; [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!; [Dependency] private readonly MetaDataSystem _metaData = default!; + [Dependency] private readonly FixtureSystem _fixtureSystem = default!; + [Dependency] private readonly CollisionWakeSystem _colWakeSystem = default!; public override void Initialize() { @@ -187,6 +193,14 @@ public sealed partial class BotanySystem : EntitySystem var slippery = EnsureComp(entity); EntityManager.Dirty(slippery); EnsureComp(entity); + // Need a fixture with a slip layer in order to actually do the slipping + var fixtures = EnsureComp(entity); + var body = EnsureComp(entity); + var shape = fixtures.Fixtures["fix1"].Shape; + _fixtureSystem.TryCreateFixture(entity, shape, "slips", 1, false, (int) CollisionGroup.SlipLayer, manager: fixtures, body: body); + // Need to disable collision wake so that mobs can collide with and slip on it + var collisionWake = EnsureComp(entity); + _colWakeSystem.SetEnabled(entity, false, collisionWake); } } diff --git a/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantPhalanximine.cs b/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantPhalanximine.cs new file mode 100644 index 0000000000..c0640d7fc0 --- /dev/null +++ b/Content.Server/Chemistry/ReagentEffects/PlantMetabolism/PlantPhalanximine.cs @@ -0,0 +1,24 @@ +using Content.Server.Botany.Components; +using Content.Shared.Chemistry.Reagent; +using JetBrains.Annotations; +using Robust.Shared.Prototypes; + +namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism +{ + [UsedImplicitly] + [DataDefinition] + public sealed partial class PlantPhalanximine : ReagentEffect + { + public override void Effect(ReagentEffectArgs args) + { + if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out PlantHolderComponent? plantHolderComp) + || plantHolderComp.Seed == null || plantHolderComp.Dead || + plantHolderComp.Seed.Immutable) + return; + + plantHolderComp.Seed.Viable = true; + } + + protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => Loc.GetString("reagent-effect-guidebook-missing", ("chance", Probability)); + } +} diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index 3141cdf590..3342444759 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -547,6 +547,13 @@ physicalDesc: reagent-physical-desc-acrid flavor: medicine color: "#c8ff75" + plantMetabolism: + - !type:PlantAdjustToxins + amount: 6 + - !type:PlantPhalanximine + conditions: + - !type:ReagentThreshold + min: 4 metabolisms: Medicine: effects: