DocFX + Singulink = ♥

Class Diet

Represents the nourishment and edibility of foods for a SlugBaseCharacter.

Inheritance
object
Diet
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SlugBase.DataTypes
Assembly: SlugBase.dll
Syntax
public class Diet

Constructors

View Source

Diet(JsonAny)

Creates a new Diet from JSON.

Declaration
public Diet(JsonAny json)
Parameters
Type Name Description
JsonAny json

The JSON to load.

Properties

View Source

Corpses

The food value multiplier of dead creatures.

If the creature is consumed in its entirety, such as CreatureTemplate.Type.Fly, Meat is used instead.

Declaration
public float Corpses { get; set; }
Property Value
Type Description
float
View Source

CreatureOverrides

The food value multipliers of individual creature types.

Declaration
public Dictionary<CreatureTemplate.Type, float> CreatureOverrides { get; }
Property Value
Type Description
Dictionary<CreatureTemplate.Type, float>
View Source

Meat

The food value multiplier of small creatures or living objects like AbstractPhysicalObject.AbstractObjectType.JellyFish.

Declaration
public float Meat { get; set; }
Property Value
Type Description
float
View Source

ObjectOverrides

The food value multipliers of individual object types.

Declaration
public Dictionary<AbstractPhysicalObject.AbstractObjectType, float> ObjectOverrides { get; }
Property Value
Type Description
Dictionary<AbstractPhysicalObject.AbstractObjectType, float>
View Source

Plants

The food value multiplier of non-living foods.

Declaration
public float Plants { get; set; }
Property Value
Type Description
float

Methods

View Source

GetFoodMultiplier(PhysicalObject)

Gets the food value multiplier for an object that was consumed in its entirety.

Declaration
public float GetFoodMultiplier(PhysicalObject obj)
Parameters
Type Name Description
PhysicalObject obj

The object that was eaten.

Returns
Type Description
float

A multiplier for the nourishment of this object.

View Source

GetMeatMultiplier(Player, Creature)

Gets the food value multiplier for a creature

Declaration
public float GetMeatMultiplier(Player player, Creature crit)
Parameters
Type Name Description
Player player

The player to pass to Player.EatMeatOmnivoreGreenList(Creature).

Creature crit

The creature that is being eaten.

Returns
Type Description
float

A multiplier for the nourishment of this creature.