Fix soil refilling (#442)

* fix soil

* Revert "fix soil"

This reverts commit 8176355286.

* Reapply "fix soil"

This reverts commit 0c958f4c9c.
This commit is contained in:
Ed
2024-09-18 15:56:50 +03:00
committed by GitHub
parent 2eb120d529
commit 22171de45a
16 changed files with 31 additions and 36 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared._CP14.Farming;
using Content.Shared._CP14.Skills;
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components;
@@ -88,6 +89,13 @@ public sealed class InjectorSystem : SharedInjectorSystem
if (args.Target is not { Valid: true } target || !HasComp<SolutionContainerManagerComponent>(entity))
return;
//CP14 - Shitcode retarget plant -> soil
//TODO: fix it
if (TryComp<CP14PlantComponent>(args.Target, out var plant) && plant.SoilUid is not null)
target = plant.SoilUid.Value;
//CP14 - end shitcode
// Is the target a mob? If yes, use a do-after to give them time to respond.
if (HasComp<MobStateComponent>(target) || HasComp<BloodstreamComponent>(target))
{