PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
PlayerStomach.c File Reference

Data Structures

class  StomachItem
 

Functions

void PlayerStomach (PlayerBase player)
 
float GetStomachVolume ()
 
float GetStomachTemperature ()
 
void ClearContents ()
 
void ReduceContents (float percent)
 
void SetAgentTransferFilter (int filter_agents)
 
int GetAgentTransferFilter ()
 
static void RegisterItem (string classname, int id)
 
static string GetClassnameFromID (int id)
 
static int GetIDFromClassname (string name)
 
static bool InitData ()
 
int GetStorageVersion ()
 
bool IsDigesting ()
 
int GetDigestingType ()
 
protected void UpdateStomachTemperature ()
 
void Update (float delta_time)
 
void ProcessNutrients (float delta_time)
 
void DigestAgents (int agents, float quantity)
 
float GetVolumeContainingAgent (eAgents agent)
 
float GetVolumeContainingAgent01 (eAgents agent)
 
void PrintUpdate ()
 
void AddToStomach (string class_name, float amount, int food_stage=0, int agents=0, float temperature=0)
 
void OnStoreSave (ParamsWriteContext ctx)
 
bool OnStoreLoad (ParamsReadContext ctx, int version)
 
int GetDebugObject (array< ref Param > object_out)
 

Variables

class StomachItem DIGESTING_WATER = 1
 
const int DIGESTING_ENERGY = 2
 
const int quantity_bit_offset = 16
 
const int id_bit_offset = 4
 
static int CHECKSUM
 
const float DIGESTION_POINTS = PlayerConstants.DIGESTION_SPEED
 
const int ACCEPTABLE_QUANTITY_MAX = 32768
 
const int ACCEPTABLE_FOODSTAGE_MAX = FoodStageType.COUNT - 1
 
static ref map< string, intm_NamesToIDs = new map<string, int>
 
static ref map< int, stringm_IDsToNames = new map<int, string>
 
static const bool m_InitData = PlayerStomach.InitData()
 
ref array< ref StomachItemm_StomachContents = new array<ref StomachItem>
 
int m_AgentTransferFilter
 
bool m_Digesting
 
int m_DigestingType
 
PlayerBase m_Player
 
float m_StomachVolume
 
protected float m_StomachTemperature
 
const int STORAGE_VERSION = 106
 

Function Documentation

◆ AddToStomach()

◆ ClearContents()

void ClearContents ( )

◆ DigestAgents()

◆ GetAgentTransferFilter()

int GetAgentTransferFilter ( )

References m_AgentTransferFilter.

◆ GetClassnameFromID()

static string GetClassnameFromID ( int  id)
static

References m_IDsToNames.

Referenced by OnStoreLoad().

◆ GetDebugObject()

int GetDebugObject ( array< ref Param object_out)

◆ GetDigestingType()

int GetDigestingType ( )

References m_DigestingType.

◆ GetIDFromClassname()

static int GetIDFromClassname ( string  name)
static

References m_NamesToIDs, and name.

Referenced by AddToStomach().

◆ GetStomachTemperature()

float GetStomachTemperature ( )

References m_StomachTemperature.

◆ GetStomachVolume()

float GetStomachVolume ( )

References m_StomachVolume.

Referenced by GetVolumeContainingAgent01().

◆ GetStorageVersion()

int GetStorageVersion ( )

References STORAGE_VERSION.

◆ GetVolumeContainingAgent()

float GetVolumeContainingAgent ( eAgents  agent)

References m_StomachContents.

Referenced by GetVolumeContainingAgent01().

◆ GetVolumeContainingAgent01()

float GetVolumeContainingAgent01 ( eAgents  agent)

◆ InitData()

◆ IsDigesting()

bool IsDigesting ( )

References m_DigestingType.

◆ OnStoreLoad()

◆ OnStoreSave()

◆ PlayerStomach()

◆ PrintUpdate()

void PrintUpdate ( )

◆ ProcessNutrients()

◆ ReduceContents()

void ReduceContents ( float  percent)

◆ RegisterItem()

static void RegisterItem ( string  classname,
int  id 
)
static

References CHECKSUM, string::Hash(), m_IDsToNames, and m_NamesToIDs.

Referenced by InitData().

◆ SetAgentTransferFilter()

void SetAgentTransferFilter ( int  filter_agents)

References m_AgentTransferFilter.

◆ Update()

void Update ( float  delta_time)

References ProcessNutrients().

◆ UpdateStomachTemperature()

protected void UpdateStomachTemperature ( )

Variable Documentation

◆ ACCEPTABLE_FOODSTAGE_MAX

const int ACCEPTABLE_FOODSTAGE_MAX = FoodStageType.COUNT - 1

Referenced by AddToStomach().

◆ ACCEPTABLE_QUANTITY_MAX

const int ACCEPTABLE_QUANTITY_MAX = 32768

Referenced by AddToStomach().

◆ CHECKSUM

int CHECKSUM
static

Referenced by OnStoreLoad(), and RegisterItem().

◆ DIGESTING_ENERGY

const int DIGESTING_ENERGY = 2

Referenced by ProcessNutrients().

◆ DIGESTING_WATER

class StomachItem DIGESTING_WATER = 1

Referenced by ProcessNutrients().

◆ DIGESTION_POINTS

const float DIGESTION_POINTS = PlayerConstants.DIGESTION_SPEED

Referenced by ProcessNutrients().

◆ id_bit_offset

const int id_bit_offset = 4

Referenced by OnStoreLoad(), and OnStoreSave().

◆ m_AgentTransferFilter

int m_AgentTransferFilter

◆ m_Digesting

bool m_Digesting

◆ m_DigestingType

int m_DigestingType

◆ m_IDsToNames

ref map<int, string> m_IDsToNames = new map<int, string>
static

Referenced by GetClassnameFromID(), and RegisterItem().

◆ m_InitData

const bool m_InitData = PlayerStomach.InitData()
static

◆ m_NamesToIDs

ref map<string, int> m_NamesToIDs = new map<string, int>
static

Referenced by GetIDFromClassname(), and RegisterItem().

◆ m_Player

PlayerBase m_Player

◆ m_StomachContents

◆ m_StomachTemperature

protected float m_StomachTemperature

◆ m_StomachVolume

◆ quantity_bit_offset

const int quantity_bit_offset = 16

Referenced by OnStoreLoad(), and OnStoreSave().

◆ STORAGE_VERSION

const int STORAGE_VERSION = 106