Metabolism 3.0 (#5157)
* basic system + convert all plantmetabolism * stragglers * convert all old metabolisms over * fix YAML errors + dumb serialization issue * remove unused thingy * reimplement * add organ type condition * organtype condition but real * cleanups + test fix * metabolismtype -> metabolizertype * solution resilience * fixes * serializer + use entityuid + hashset * this is apparently an entirely different thing * turns out it just works * oops
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Chemistry.ReagentEffects.PlantMetabolism
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class PlantAdjustWeeds : PlantAdjustAttribute
|
||||
{
|
||||
public override void Metabolize(EntityUid plantHolder, EntityUid organEntity, Solution.ReagentQuantity reagent, IEntityManager entityManager)
|
||||
{
|
||||
if (!CanMetabolize(plantHolder, out var plantHolderComp, entityManager))
|
||||
return;
|
||||
|
||||
plantHolderComp.WeedLevel += Amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user