7345 {
7346 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7347 WorldData worldData =
g_Game.GetMission().GetWorldData();
7349 float temperature = 0;
7350
7352 {
7354 {
7355 if (pollution & EPollution.HEAVYMETAL)
7357
7360 }
7361
7364
7365 return true;
7366 }
7367
7369 if (!edibleItem || !edibleItem.CanBeConsumed())
7370 return false;
7371
7373 {
7375 temperature = edibleItem.GetTemperature();
7376
7379
7380 if (edibleItem.IsLiquidContainer())
7381 {
7382 int liquidType = edibleItem.GetLiquidType();
7383 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7384 if (liquidClassName.
Length() == 0)
7385 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7386
7388 }
7389 else
7390 {
7391 int foodStageType;
7393 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7394
7396 }
7397
7399
7400 return true;
7401
7402 }
7403
7404 return false;
7405 }
PluginBase GetPlugin(typename plugin_type)
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)
const int AGT_UACTION_CONSUME
void Error(string err)
Messagebox with error message.
proto native int Length()
Returns length of string.