* give some love to farming * Queryptimization * Fuck soil!!! * fuck soil in prototypes! * seeds improve * partial merge wild and farm * some strange fix * plant kills refactor, add compost * fix compost * Update migration.yml * rain can watering plants * sage update * Update seeds.yml * sage smoking update * Update seeds.yml
25 lines
805 B
C#
25 lines
805 B
C#
using Content.Shared._CP14.Farming.Components;
|
|
using Content.Shared._CP14.Farming.Prototypes;
|
|
using Content.Shared.FixedPoint;
|
|
|
|
namespace Content.Shared._CP14.Farming.Metabolizer;
|
|
|
|
public sealed partial class AffectPlantValues : CP14MetabolizerEffect
|
|
{
|
|
[DataField]
|
|
public float Energy = 0f;
|
|
[DataField]
|
|
public float Resource = 0f;
|
|
[DataField]
|
|
public float Growth = 0f;
|
|
|
|
public override void Effect(Entity<CP14PlantComponent> plant, FixedPoint2 amount, EntityManager entityManager)
|
|
{
|
|
var farmingSystem = entityManager.System<CP14SharedFarmingSystem>();
|
|
|
|
farmingSystem.AffectEnergy(plant, Energy * (float)amount);
|
|
farmingSystem.AffectResource(plant,Resource * (float)amount);
|
|
farmingSystem.AffectGrowth(plant, Growth * (float)amount);
|
|
}
|
|
}
|