Skip to main content

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.

Constructors​

MemberWhat it is
LiquidContent()Creates a LiquidContent with default values.

Properties​

MemberWhat 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​

MemberWhat 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: