7111 {
7112 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7114 float temperature = 0;
7115
7117 {
7119 {
7120 if (pollution & EPollution.HEAVYMETAL)
7122
7125 }
7126
7129
7130 return true;
7131 }
7132
7134 if (!edibleItem || !edibleItem.CanBeConsumed())
7135 return false;
7136
7138 {
7140 temperature = edibleItem.GetTemperature();
7141
7144
7145 if (edibleItem.IsLiquidContainer())
7146 {
7147 int liquidType = edibleItem.GetLiquidType();
7148 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7149 if (liquidClassName.
Length() == 0)
7150 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7151
7153 }
7154 else
7155 {
7156 int foodStageType;
7158 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7159
7161 }
7162
7164
7165 return true;
7166
7167 }
7168
7169 return false;
7170 }
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.