7690 {
7691 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7692 WorldData worldData =
g_Game.GetMission().GetWorldData();
7694 float temperature = 0;
7695
7697 {
7699 {
7700 if (pollution & EPollution.HEAVYMETAL)
7702
7705 }
7706
7709
7710 return true;
7711 }
7712
7714 if (!edibleItem || !edibleItem.CanBeConsumed())
7715 return false;
7716
7718 {
7720 temperature = edibleItem.GetTemperature();
7721
7724
7725 if (edibleItem.IsLiquidContainer())
7726 {
7727 int liquidType = edibleItem.GetLiquidType();
7728 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7729 if (liquidClassName.
Length() == 0)
7730 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7731
7733 }
7734 else
7735 {
7736 int foodStageType;
7738 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7739
7741 }
7742
7744
7745 return true;
7746
7747 }
7748
7749 return false;
7750 }
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.