* setup planting doafter * spawn plants after use seed * some work * move comps to separate folder * public check daylight * daylight plant energy regeneration * some fixes * bruh, im thinking * added ingame soil * added hoe * attaching plants * hoe system * block plant dublicating * some planting refactor * shovel as pant + soil remover * plant growing visualizer * soil resprite * split farming system to second partial class * update throught event refactor * tring sync update plant with update visuals * finish visual sync * plants growing * more partial splitting, naming work, clean up * Update FARMINGTEST.yml * Update FARMINGTEST.yml * fix typo * prototype value validating * Оно бухает воду! * solution visualizer in soil * forgot some fix * part of Tornado review fix * destroy RemovePlantComponent * more fixes * simple harvesting * refactor plant component values changing * harvest redo * gather on destroyByTool * sickle resprite * plant fading * fading per minute! * wheat sprites * YML restruct * fixes * auto root plants * add comments * move sprites * split structures from object textures * wheat farming! * Update CP14FarmingSystem.Interactions.cs * seedbed (#297) seedbed :^) * a * Update soil.yml --------- Co-authored-by: Jaraten <116667537+Jaraten@users.noreply.github.com>
24 lines
758 B
C#
24 lines
758 B
C#
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);
|
|
}
|
|
}
|