Show / Hide Table of Contents

Class FertilizerNutrients

Holds information about the nutrient levels in a fertilizer item (each item has different values).

Inheritance
System.Object
FertilizerNutrients
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public sealed class FertilizerNutrients : ValueType

Constructors

FertilizerNutrients()

Declaration
public FertilizerNutrients()

FertilizerNutrients(Single, Single, Single)

Declaration
public FertilizerNutrients(float nitrogen, float phosphorus, float potassium)
Parameters
Type Name Description
System.Single nitrogen
System.Single phosphorus
System.Single potassium

Methods

ApplyNutrientsDirect(Vector2i, Single)

Applies nutrients directly to the world layers and triggers sync to clients via Modify(). Bypasses the AccumulatingPuller for immediate feedback — safe because game actions and layer ticks run on the same thread sequentially.

Declaration
public void ApplyNutrientsDirect(Vector2i worldPos, float multiplier = 1F)
Parameters
Type Name Description
Vector2i worldPos
System.Single multiplier

Description()

Declaration
public LocString Description()
Returns
Type Description
LocString

ReadLayerValue(String, Vector2i)

Reads the current value of a nutrient layer at a position (0-1 density).

Declaration
public static float ReadLayerValue(string layerName, Vector2i worldPos)
Parameters
Type Name Description
System.String layerName
Vector2i worldPos
Returns
Type Description
System.Single

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾