LiquidContent
A class in Root.Township, Alta.Liquid.
What a liquid container holds: either a preset LiquidDefinition or a custom mix described only by its LiquidData.
- Listed in Stats, effects, heat and liquid
- Documented in Liquids
Constructors
| Member | What it is |
|---|---|
LiquidContent() | Creates a LiquidContent with default values. |
Properties
| Member | What it is |
|---|---|
LiquidData Data { get; set; } | The liquid's data (colour, visuals, effects). For a preset this is the preset's own data. |
bool IsCustom { get; set; } | True for a custom mix (such as a stew or potion) with no preset; Liquid is then null. |
LiquidDefinition Liquid { get; set; } | The preset liquid definition, or null for a custom mix. |
Methods
| Member | What it is |
|---|---|
override bool Equals(object obj) | True when both are custom or both preset and their LiquidData match by value. The Liquid reference itself is not compared. |
override int GetHashCode() | Hash from IsCustom, Liquid and Data. |
static bool op_Equality(LiquidContent a, LiquidContent b) | Uses Equals; two nulls are equal. |
static bool op_Inequality(LiquidContent a, LiquidContent b) | Opposite of ==. |
override string ToString() | The preset's name, or "Custom". |
Used in
Members of other types that take, return or hold a LiquidContent:
CookingLiquid.ConvertContainerLiquidToStewLiquid, LiquidChunkVisuals.AddVisualsForNewChunks, LiquidChunkVisuals.CreateVisualBaseOnContent, StewManager.CreateContentWithTint, GlobalLiquidContainer.FillLiquidIntoContainer, ILiquidContainer.CanAddTo, ILiquidContainer.ContainedLiquid, ILiquidContainerInternal.AddLiquid, ILiquidContainerInternal.SetContent, LiquidContainer.AddLiquid, LiquidContainer.CanAddTo, LiquidContainer.ContainedLiquid, LiquidContainer.content, LiquidContainer.OnContainedLiquidChanged, LiquidContainer.SetContent, LiquidDefinition.content, LiquidDefinition.GetAsLiquidContent, LiquidTransition.CheckIfTransitionIsStillValid, LiquidTypeChangedHandler.BeginInvoke, LiquidTypeChangedHandler.Invoke, PourableContainer.ContainerContainedLiquidChanged, PouringParticles.ContainerLiquidTypeChanged, StaticLiquidContainer.AddLiquid, StaticLiquidContainer.CanAddTo, StaticLiquidContainer.ContainedLiquid, StaticLiquidContainer.SetContent, PotionVisuals.LiquidChanged.