DayZ 1.24
|
Go to the source code of this file.
Classes | |
class | StomachItem |
Functions | |
void | PlayerStomach (PlayerBase player) |
void | ~PlayerStomach () |
float | GetStomachVolume () |
void | ClearContents () |
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 () |
void | Update (float delta_time) |
void | ProcessNutrients (float delta_time) |
void | DigestAgents (int agents, float quantity) |
void | PrintUpdate () |
void | AddToStomach (string class_name, float amount, int food_stage=0, int agents=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, int > | m_NamesToIDs = new map<string, int> |
static ref map< int, string > | m_IDsToNames = new map<int, string> |
static const bool | m_InitData = PlayerStomach.InitData() |
ref array< ref StomachItem > | m_StomachContents = new array<ref StomachItem> |
int | m_AgentTransferFilter |
bool | m_Digesting |
int | m_DigestingType |
PlayerBase | m_Player |
float | m_StomachVolume |
const int | STORAGE_VERSION = 106 |
Definition at line 310 of file PlayerStomach.c.
References ACCEPTABLE_FOODSTAGE_MAX, ACCEPTABLE_QUANTITY_MAX, class_name, GetIDFromClassname(), Edible_Base::GetNutritionalProfile(), Liquid::GetNutritionalProfileByName(), and m_StomachContents.
Referenced by OnStoreLoad().
void ClearContents | ( | ) |
Definition at line 138 of file PlayerStomach.c.
References m_StomachContents, and m_StomachVolume.
Definition at line 276 of file PlayerStomach.c.
References Math::Log2(), and m_Player.
Referenced by ProcessNutrients().
int GetAgentTransferFilter | ( | ) |
Definition at line 164 of file PlayerStomach.c.
References m_IDsToNames.
Referenced by OnStoreLoad().
Definition at line 409 of file PlayerStomach.c.
References m_StomachContents, m_StomachVolume, and PlayerStomach().
int GetDigestingType | ( | ) |
Definition at line 169 of file PlayerStomach.c.
References m_NamesToIDs, and name.
Referenced by AddToStomach().
float GetStomachVolume | ( | ) |
Definition at line 133 of file PlayerStomach.c.
References m_StomachVolume.
int GetStorageVersion | ( | ) |
Definition at line 176 of file PlayerStomach.c.
References GetGame(), path, RegisterItem(), and x.
bool IsDigesting | ( | ) |
Definition at line 225 of file PlayerStomach.c.
References m_DigestingType.
bool OnStoreLoad | ( | ParamsReadContext | ctx, |
int | version ) |
Definition at line 373 of file PlayerStomach.c.
References AddToStomach(), CHECKSUM, GetClassnameFromID(), id_bit_offset, Math::Pow(), Print(), and quantity_bit_offset.
void OnStoreSave | ( | ParamsWriteContext | ctx | ) |
Definition at line 352 of file PlayerStomach.c.
References id_bit_offset, m_StomachContents, PlayerStomach(), and quantity_bit_offset.
void PlayerStomach | ( | PlayerBase | player | ) |
Definition at line 122 of file PlayerStomach.c.
References m_Player.
Referenced by GetDebugObject(), ManBase::Init(), OnStoreSave(), HungerMdfr::OnTick(), ThirstMdfr::OnTick(), and HudDebugWinBase::SetContentValues().
void PrintUpdate | ( | ) |
Definition at line 290 of file PlayerStomach.c.
References m_StomachContents, m_StomachVolume, and Print().
Definition at line 241 of file PlayerStomach.c.
References DigestAgents(), DIGESTING_ENERGY, DIGESTING_WATER, DIGESTION_POINTS, m_DigestingType, m_Player, m_StomachContents, and m_StomachVolume.
Referenced by Update().
Definition at line 154 of file PlayerStomach.c.
References CHECKSUM, m_IDsToNames, and m_NamesToIDs.
Referenced by InitData().
Definition at line 144 of file PlayerStomach.c.
References m_AgentTransferFilter.
void ~PlayerStomach | ( | ) |
Definition at line 127 of file PlayerStomach.c.
const int ACCEPTABLE_FOODSTAGE_MAX = FoodStageType.COUNT - 1 |
Definition at line 109 of file PlayerStomach.c.
Referenced by AddToStomach().
Definition at line 108 of file PlayerStomach.c.
Referenced by AddToStomach().
|
static |
Definition at line 106 of file PlayerStomach.c.
Referenced by OnStoreLoad(), and RegisterItem().
Definition at line 102 of file PlayerStomach.c.
Referenced by ProcessNutrients().
class StomachItem DIGESTING_WATER = 1 |
Referenced by ProcessNutrients().
const float DIGESTION_POINTS = PlayerConstants.DIGESTION_SPEED |
Definition at line 107 of file PlayerStomach.c.
Referenced by ProcessNutrients().
Definition at line 105 of file PlayerStomach.c.
Referenced by OnStoreLoad(), and OnStoreSave().
int m_AgentTransferFilter |
Definition at line 114 of file PlayerStomach.c.
Referenced by GetAgentTransferFilter(), and SetAgentTransferFilter().
bool m_Digesting |
Definition at line 115 of file PlayerStomach.c.
int m_DigestingType |
Definition at line 116 of file PlayerStomach.c.
Referenced by GetDigestingType(), IsDigesting(), and ProcessNutrients().
Definition at line 111 of file PlayerStomach.c.
Referenced by GetClassnameFromID(), and RegisterItem().
|
static |
Definition at line 112 of file PlayerStomach.c.
Definition at line 110 of file PlayerStomach.c.
Referenced by GetIDFromClassname(), and RegisterItem().
PlayerBase m_Player |
Definition at line 117 of file PlayerStomach.c.
ref array<ref StomachItem> m_StomachContents = new array<ref StomachItem> |
Definition at line 113 of file PlayerStomach.c.
Referenced by AddToStomach(), ClearContents(), GetDebugObject(), OnStoreSave(), PrintUpdate(), and ProcessNutrients().
float m_StomachVolume |
Definition at line 118 of file PlayerStomach.c.
Referenced by ClearContents(), GetDebugObject(), GetStomachVolume(), PrintUpdate(), and ProcessNutrients().
Definition at line 104 of file PlayerStomach.c.
Referenced by OnStoreLoad(), and OnStoreSave().
Definition at line 119 of file PlayerStomach.c.