mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-06-09 15:06:34 +02:00
d9e523370a
* Yay * Do a LOT changes in yml * and again * Finale changes * yml and locale * locale tweak * yml and charp cleanup * fix carpets * and some-some * And some * I want to believe that its last🙏🙏 * 😭 * 😭😭 * clean * fix * AAHHAHAHAHAHAH * fix * FINAL * thisguyusa... * LAST_ONE * wawa * merge2 * sdobfjibwdsjaqaksmzxsowaw2edqw84 * aoaoaooaoaao * this hardcode took 30 minutes of my life * fix aaaa * fix test * FIX BUILD * oops * oops * aaooaoaoa * fuck * oops * refactor: cleanup after merge + use protoId in KitchenSpikeComponent * refactor: fix butcherable stuff again!~ * fix: now actively checks for EdibleComponent on slicing, predicted items splitting * fix: changed knife.yaml to use Slicing tool * fix: no more sounds spam on chop-chop * refactor: cleanups * refactor: default time value for slicable * refactor: whitespaces and extract variables * fix: slicable no longer prevents InteractUsingEvent by marking handled w/o actually handling * feat: chopping trees now requires sawing tool, same for slicing logs * refactor: cleanup after merge * refactor: fix non-related PR changes * refactor: rename locid * refactor: remove unneeded red 'slice' verb name when slicing entities with mob-state. * refactor: simplify test code changes * refactor: better readability for test * refactor: linebreak for unary op * refactor: xml-doc for SliceableComponent corrected to be more fitting. * refactor: cleanup SliceableSystem some more * refactor: use HasComp instead of TryComp in AddSliceVerb * refactor: extracted methods to improve readability * refactor: remove unchecked operator - not needed when casting from uint * refactor: SliceableSystem cleanups, fix logs not being chopped due to solution splitting * fix: slice verb is now showing up even if disabled, slicing is done even if there is no solution to split, replaced direct dependency for sliceable component to food component with default solution-name * refactor: comment about RandomPredicted + toy knife now fits into clown shoes * refactor: remove EdibleComponent dependency from SliceableSystem * refactor: moved SliceableSystem into ToolRefinableSystem * refactor: basic renaming for comps * refactor: cleanup after merge * refactor: reorder methods, renaming, simplify polymorph related conditions on slicing * refactor: xml-doc + reorder yaml fields * refactor: fixing yaml + method renaming, unused usings removed * refactor: removed unused usings * refactor: fix typo * refactor: remove reference for deleted meat proto * refactor: clean up yaml after merge * refactor: fix multiple typos from mass replace * refactor: fix missed field renaming * refactor: ensure all entities that had ToolRefinable got BaseSlicingRefinable (aftermerge cleanup) * refactor: undo solution-related changes for animals.yml * refactor: fix invalid parent set for corgi + fix amount of slices for the rest of pies * refactor: revert Solution to SolutionContainerManager changes after merge * refactor: revert Solution to SolutionContainerManager changes after merge * refactor: fix invalid property name for toolMissingQualityTooltip in yml, fixed missing entity on which AttemptToolRefineEvent is raised * refactor: remove over-indent for components of BaseSlicingRefinable and for Slicing tool quality * refactor: remove over-indentation on MobCarpHolo * empty collection --------- Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru> Co-authored-by: Fildrance <fildrance@gmail.com> Co-authored-by: iaada <iaada@users.noreply.github.com>
150 lines
3.7 KiB
C#
150 lines
3.7 KiB
C#
using Content.Shared.Chemistry.Components;
|
|
using Content.Shared.Tools;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Botany.Components;
|
|
|
|
[RegisterComponent]
|
|
public sealed partial class PlantHolderComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Game time for the next plant reagent update.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
public TimeSpan NextUpdate = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// Time between plant reagent consumption updates.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan UpdateDelay = TimeSpan.FromSeconds(3);
|
|
|
|
[DataField]
|
|
public int LastProduce;
|
|
|
|
[DataField]
|
|
public int MissingGas;
|
|
|
|
/// <summary>
|
|
/// Time between plant growth updates.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan CycleDelay = TimeSpan.FromSeconds(15f);
|
|
|
|
/// <summary>
|
|
/// Game time when the plant last did a growth update.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
public TimeSpan LastCycle = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// Sound played when any reagent is transferred into the plant holder.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier? WateringSound;
|
|
|
|
[DataField]
|
|
public bool UpdateSpriteAfterUpdate;
|
|
|
|
/// <summary>
|
|
/// Set to true if the plant holder displays plant warnings (e.g. water low) in the sprite and
|
|
/// examine text. Used to differentiate hydroponic trays from simple soil plots.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool DrawWarnings = false;
|
|
|
|
[DataField]
|
|
public float WaterLevel = 100f;
|
|
|
|
[DataField]
|
|
public float NutritionLevel = 100f;
|
|
|
|
[DataField]
|
|
public float PestLevel;
|
|
|
|
[DataField]
|
|
public float WeedLevel;
|
|
|
|
[DataField]
|
|
public float Toxins;
|
|
|
|
[DataField]
|
|
public int Age;
|
|
|
|
[DataField]
|
|
public int SkipAging;
|
|
|
|
[DataField]
|
|
public bool Dead;
|
|
|
|
[DataField]
|
|
public bool Harvest;
|
|
|
|
/// <summary>
|
|
/// Set to true if this plant has been clipped by seed clippers. Used to prevent a single plant
|
|
/// from repeatedly being clipped.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool Sampled;
|
|
|
|
/// <summary>
|
|
/// Multiplier for the number of entities produced at harvest.
|
|
/// </summary>
|
|
[DataField]
|
|
public int YieldMod = 1;
|
|
|
|
[DataField]
|
|
public float MutationMod = 1f;
|
|
|
|
[DataField]
|
|
public float MutationLevel;
|
|
|
|
[DataField]
|
|
public float Health;
|
|
|
|
[DataField]
|
|
public float WeedCoefficient = 1f;
|
|
|
|
[DataField]
|
|
public SeedData? Seed;
|
|
|
|
/// <summary>
|
|
/// True if the plant is losing health due to too high/low temperature.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool ImproperHeat;
|
|
|
|
/// <summary>
|
|
/// True if the plant is losing health due to too high/low pressure.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool ImproperPressure;
|
|
|
|
/// <summary>
|
|
/// Not currently used.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool ImproperLight;
|
|
|
|
/// <summary>
|
|
/// Set to true to force a plant update (visuals, component, etc.) regardless of the current
|
|
/// update cycle time. Typically used when some interaction affects this plant.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool ForceUpdate;
|
|
|
|
[DataField]
|
|
public string SoilSolutionName = "soil";
|
|
|
|
[ViewVariables]
|
|
public Entity<SolutionComponent>? SoilSolution = null;
|
|
|
|
/// <summary>
|
|
/// Tool quality that required if plant should be harvested with specified tool.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<ToolQualityPrototype>? HarvestToolQuality = "Sawing";
|
|
}
|