52 lines
1.9 KiB
Plaintext
52 lines
1.9 KiB
Plaintext
URL: https://wiki.studiominus.nl/internalReference/Liquid.html
|
|
Title: People Playground Modding - Liquid
|
|
==================================================
|
|
|
|
public abstract class Liquid
|
|
The liquid base class. All liquids derive from this class.
|
|
Liquids are stateless. Do not store mutable values in a liquid.
|
|
Fields
|
|
public Color Color
|
|
The global colour of this liquid.
|
|
|
|
public const float LiquidUnitToLiter
|
|
Multiply liquid units by this value to convert to liters
|
|
Constant value: 0.3571428571428571f
|
|
|
|
public const float LiterToLiquidUnit
|
|
Multiply liter values by this value to convert to liquid units
|
|
Constant value: 2.8f
|
|
|
|
Methods
|
|
public abstract void OnEnterLimb(LimbBehaviour limb)
|
|
Called when this liquid enters a limb. Note that this may be called quite often for the same container as liquid quickly moves in and out of it.
|
|
|
|
public abstract void OnEnterContainer(BloodContainer container)
|
|
Called when this liquid enters a container. Limbs are also containers. Note that this may be called quite often for the same container as liquid quickly moves in and out of it.
|
|
|
|
public abstract void OnExitContainer(BloodContainer container)
|
|
Called when this liquid exits a container. Note that this may be called quite often for the same container as liquid quickly moves in and out of it.
|
|
|
|
public virtual void OnUpdate(BloodContainer container)
|
|
Called every second by every container for every liquid it contains.
|
|
|
|
public virtual string GetDisplayName()
|
|
No description provided
|
|
|
|
public static bool HasID(string id)
|
|
Has the given ID been registered
|
|
|
|
public static bool HasLiquid(Liquid liq)
|
|
Has the given liquid instance been registered
|
|
|
|
public static Liquid GetLiquid(string identity)
|
|
Get the liquid associated with a key
|
|
|
|
public static string GetIdentity(Liquid instance)
|
|
Get the key associated with a liquid instance
|
|
|
|
public static void Register(string identity, Liquid liquid)
|
|
Register a liquid
|
|
|
|
public IEnumerable<Liquid> GetAll()
|
|
Read-only collection of every registered liquid |