7119 {
7120 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7122 float temperature = 0;
7123
7125 {
7127 {
7128 if (pollution & EPollution.HEAVYMETAL)
7130
7133 }
7134
7137
7138 return true;
7139 }
7140
7142 if (!edibleItem || !edibleItem.CanBeConsumed())
7143 return false;
7144
7146 {
7148 temperature = edibleItem.GetTemperature();
7149
7152
7153 if (edibleItem.IsLiquidContainer())
7154 {
7155 int liquidType = edibleItem.GetLiquidType();
7156 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7157 if (liquidClassName.
Length() == 0)
7158 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7159
7161 }
7162 else
7163 {
7164 int foodStageType;
7166 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7167
7169 }
7170
7172
7173 return true;
7174
7175 }
7176
7177 return false;
7178 }
PluginBase GetPlugin(typename plugin_type)
proto native Mission GetMission()
int FilterAgents(int agentsIn)
Filter agents from the item (override on higher implementations)
bool Consume(float amount, PlayerBase consumer)
override FoodStage GetFoodStage()
ref PlayerStomach m_PlayerStomach
float GetLiquidTypeEnviroTemperature(int liquidType)
proto native CGame GetGame()
const int AGT_UACTION_CONSUME
void Error(string err)
Messagebox with error message.
proto native int Length()
Returns length of string.