Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
foodstage.c
Go to the documentation of this file.
2 {
3  NONE = 0, //food stage not define
4  RAW = 1, //default
5  BAKED = 2,
6  BOILED = 3,
7  DRIED = 4,
8  BURNED = 5,
9  ROTTEN = 6,
10 
11  COUNT //for net sync purposes
12 }
13 
14 // Used to make getting data more readable
15 enum eCookingPropertyIndices
16 {
17  MIN_TEMP = 0,
18  COOK_TIME = 1,
19  MAX_TEMP = 2
20 }
21 
22 class FoodStage
23 {
24  protected FoodStageType m_FoodStageTypeClientLast;
25  protected FoodStageType m_FoodStageType;
26  protected Edible_Base m_FoodItem;
27 
28  protected int m_SelectionIndex; //visual properties
29  protected int m_TextureIndex;
30  protected int m_MaterialIndex;
31 
32  protected float m_CookingTime;
33 
34  // Lookup and search values
35  // STRINGs are mostly used for CONFIG searches
36  // INTs are mostly used for MAP searches
37  static const string VISUAL_PROPERTIES = "visual_properties";
38  static const string NUTRITION_PROPERTIES = "nutrition_properties";
39  static const string COOKING_PROPERTIES = "cooking_properties";
40  static const int VISUAL_PROPERTIES_HASH = VISUAL_PROPERTIES.Hash();
41  static const int NUTRITION_PROPERTIES_HASH = NUTRITION_PROPERTIES.Hash();
42  static const int COOKING_PROPERTIES_HASH = COOKING_PROPERTIES.Hash();
43 
44  // The following will be filled in constructor
45  private static int m_StageRawHash = 0;
46  private static int m_StageBakedHash = 0;
47  private static int m_StageBoiledHash = 0;
48  private static int m_StageDriedHash = 0;
49  private static int m_StageBurnedHash = 0;
50  private static int m_StageRottenHash = 0;
51 
52  // Cache food stage data for each Edible_Base
53  // Used to get information for specific Edible_Base
54  static ref map<int, ref map<int, ref map<int, ref array<float>>>> m_EdibleBasePropertiesMap;
55  // Used to store food stage transitions for every Edible_Base
56  static ref map<int, ref map<int, ref map<int, ref array<int>>>> m_EdibleBaseTransitionsMap;
57  // Used to store the Hashed key of all possible food transitions ( including modded ones )
58  static ref array<int> m_FoodStageTransitionKeys;
59 
60  //constructor
61  void FoodStage( Edible_Base food_item )
62  {
63  //default
64  m_FoodStageType = FoodStageType.RAW;
65  m_FoodItem = food_item;
66 
67  //reset cooking time
68  m_CookingTime = 0;
69 
70  m_FoodStageTypeClientLast = m_FoodStageType;
71 
72  // We fill all FoodStageHash values
73  if ( m_StageRawHash == 0 )
74  m_StageRawHash = "Raw".Hash();
75  if ( m_StageBakedHash == 0 )
76  m_StageBakedHash = "Baked".Hash();
77  if ( m_StageBoiledHash == 0 )
78  m_StageBoiledHash = "Boiled".Hash();
79  if ( m_StageDriedHash == 0 )
80  m_StageDriedHash = "Dried".Hash();
81  if ( m_StageBurnedHash == 0 )
82  m_StageBurnedHash = "Burned".Hash();
83  if ( m_StageRottenHash == 0 )
84  m_StageRottenHash = "Rotten".Hash();
85 
86  //get config data for all food stages
87  SetupFoodStageMapping();
88 
89  // Get all config data relative to food stage transitions
90  SetupFoodStageTransitionMapping();
91 
92  ChangeFoodStage( m_FoodStageType );
93  }
94 
95  void SetupFoodStageMapping()
96  {
97  // We ensure we have the map is setup before trying to fill it
98  if ( !m_EdibleBasePropertiesMap )
99  m_EdibleBasePropertiesMap = new map<int, ref map<int, ref map< int, ref array<float>>>>;
100 
101  string foodType = m_FoodItem.GetType();
102  int hashedFood = foodType.Hash();
103 
104  // We start to fill the map, we don't want duplicates of the same food type
105  if ( !m_EdibleBasePropertiesMap.Contains( hashedFood ) )
106  {
108 
109  for ( int i = 1; i < FoodStageType.COUNT; ++i )
110  {
111  map<int, ref array<float>> stagePropertiesMap = new map<int, ref array<float>>;
112 
113  // Insert visual properties
114  array<float> visual_properties = new array<float>;
115  string path = string.Format("CfgVehicles %1 Food FoodStages %2 visual_properties", foodType, GetFoodStageName(i));
116  GetGame().ConfigGetFloatArray( path, visual_properties);
117 
118  stagePropertiesMap.Insert( VISUAL_PROPERTIES_HASH , visual_properties );
119 
120  // Insert nutrition properties
121  array<float> nutrition_properties = new array<float>;
122  path = string.Format("CfgVehicles %1 Food FoodStages %2 nutrition_properties", foodType, GetFoodStageName(i));
123  GetGame().ConfigGetFloatArray( path, nutrition_properties);
124 
125  stagePropertiesMap.Insert( NUTRITION_PROPERTIES_HASH, nutrition_properties );
126 
127  // Insert cooking properties
128  array<float> cooking_properties = new array<float>;
129  path = string.Format("CfgVehicles %1 Food FoodStages %2 cooking_properties", foodType, GetFoodStageName(i));
130  GetGame().ConfigGetFloatArray( path, cooking_properties);
131 
132  stagePropertiesMap.Insert( COOKING_PROPERTIES_HASH , cooking_properties );
133 
134  // Insert all properties for relevant food stage
135  foodStagesMap.Insert( GetFoodStageNameHash( i ), stagePropertiesMap );
136  }
137 
138  m_EdibleBasePropertiesMap.Insert( hashedFood, foodStagesMap );
139  }
140  }
141 
142  void SetupFoodStageTransitionMapping()
143  {
144  // We ensure we have only one map and that it does exist
145  if ( !m_EdibleBaseTransitionsMap )
146  m_EdibleBaseTransitionsMap = new map<int, ref map<int, ref map< int, ref array<int>>>>;
147 
148  // We ensure we have our key array setup
149  if ( !m_FoodStageTransitionKeys )
150  m_FoodStageTransitionKeys = new array<int>;
151 
152  string foodType = m_FoodItem.GetType();
153  int hashedFood = foodType.Hash();
154 
155  // We start to fill the map, we don't want duplicates of the same food type
156  if ( !m_EdibleBaseTransitionsMap.Contains( hashedFood ) )
157  {
159 
160  for ( int i = 1; i < FoodStageType.COUNT; ++i )
161  {
162  map<int, ref array<int>> stageTransitionsMap = new map<int, ref array<int>>;
163  string config_path = string.Format("CfgVehicles %1 Food FoodStageTransitions %2", foodType, GetFoodStageName( i ) );
164 
165  for ( int j = 0; j < GetGame().ConfigGetChildrenCount( config_path ); ++j )
166  {
167  array<int> stageTransition = new array<int>;
168  string classCheck; // Used to get any existing transition class
169  GetGame().ConfigGetChildName( config_path, j, classCheck );
170 
171  string transition_path = string.Format("%1 %2", config_path, classCheck );
172  if ( GetGame().ConfigIsExisting( transition_path ) )
173  {
174  int transitionClassHash = classCheck.Hash();
175  stageTransition.Insert( GetGame().ConfigGetInt( string.Format("%1 transition_to", transition_path) ) );
176  stageTransition.Insert( GetGame().ConfigGetInt( string.Format("%1 cooking_method", transition_path) ) );
177  stageTransitionsMap.Insert( transitionClassHash, stageTransition);
178 
179  // We only want one entry per key
180  if ( m_FoodStageTransitionKeys.Find( transitionClassHash ) == -1 )
181  {
182  m_FoodStageTransitionKeys.Insert( transitionClassHash );
183  }
184  }
185  }
186 
187  foodStagesMap.Insert( GetFoodStageNameHash(i), stageTransitionsMap );
188  }
189 
190  m_EdibleBaseTransitionsMap.Insert( hashedFood, foodStagesMap );
191  }
192  }
193 
194  //Food Stage Type
196  {
197  return m_FoodStageType;
198  }
199 
200  void SetFoodStageType( FoodStageType food_stage_type )
201  {
202  m_FoodStageType = food_stage_type;
203  }
204 
205  //Selection index
206  int GetSelectionIndex()
207  {
208  return m_SelectionIndex;
209  }
210  void SetSelectionIndex( int index )
211  {
212  m_SelectionIndex = index;
213  }
214 
215  //Texture index
216  int GetTextureIndex()
217  {
218  return m_TextureIndex;
219  }
220  void SetTextureIndex( int index )
221  {
222  m_TextureIndex = index;
223  }
224 
225  //Material index
226  int GetMaterialIndex()
227  {
228  return m_MaterialIndex;
229  }
230  void SetMaterialIndex( int index )
231  {
232  m_MaterialIndex = index;
233  }
234 
235  //Food properties
236  protected static float GetNutritionPropertyFromIndex( int index, FoodStageType stage_type, FoodStage stage, string classname )
237  {
238  if ( stage )
239  {
240  stage_type = stage.m_FoodStageType;
241  classname = stage.GetFoodItem().GetType();
242  }
243 
244  string food_stage_name = GetFoodStageName( stage_type );
245  int hashedStageName = GetFoodStageNameHash( stage_type );
246 
247  array<float> nutrition_properties;
248 
250  map<int, ref array<float>> stagePropertiesMap;
251 
252  if( !m_EdibleBasePropertiesMap.Find(classname.Hash(), foodStagesMap))
253  return 0;
254  if( !foodStagesMap.Find(hashedStageName, stagePropertiesMap))
255  return 0;
256  if( !stagePropertiesMap.Find(NUTRITION_PROPERTIES_HASH, nutrition_properties))
257  return 0;
258 
259  if ( nutrition_properties.Count() > 0 )
260  {
261  if ( index > (nutrition_properties.Count() - 1) )
262  {
263  return 0;
264  }
265  else
266  {
267  return nutrition_properties.Get( index );
268  }
269  }
270  //calculate nutrition properties from base stage and nutrition modifiers
271  else
272  {
273  // Will not attempt to optimize this as it is for a setup we do not support internally
274  //get modifiers class for nutrition values
275  string config_path = string.Format("CfgVehicles %1 Food nutrition_modifiers_class", classname);
276 
277  if ( GetGame().ConfigIsExisting( config_path ) )
278  {
279  string nutr_mod_class;
280  GetGame().ConfigGetText( config_path, nutr_mod_class );
281 
282  config_path = string.Format("CfgVehicles NutritionModifiers %1 base_stage", nutr_mod_class);
283  string nutr_base_stage;
284  GetGame().ConfigGetText( config_path, nutr_base_stage );
285 
286  //get nutrition values for food stage and modifiers
287  config_path = string.Format("CfgVehicles %1 Food FoodStages %2 nutrition_properties", classname, nutr_base_stage);
288  array<float> base_nutr_properties = new array<float>;
289  GetGame().ConfigGetFloatArray( config_path, base_nutr_properties );
290 
291  config_path = string.Format("CfgVehicles NutritionModifiers %1 %2 nutrition_properties", nutr_mod_class, food_stage_name);
292  array<float> nutr_mod_properties = new array<float>;
293  GetGame().ConfigGetFloatArray( config_path, nutr_mod_properties );
294 
295  //base nutrition * food stage nutrition modifier
296  if ( base_nutr_properties.Count() > 0 && nutr_mod_properties.Count() > 0 )
297  {
298  return ( base_nutr_properties.Get( index ) * nutr_mod_properties.Get( index ) );
299  }
300  }
301  }
302 
303  return 0;
304  }
305 
306  static float GetFullnessIndex(FoodStage stage, int stage_type = -1, string classname = "")
307  {
308  return GetNutritionPropertyFromIndex( 0 , stage_type, stage, classname );
309  }
310 
311  static float GetEnergy(FoodStage stage, int stage_type = -1, string classname = "")
312  {
313  return GetNutritionPropertyFromIndex( 1 , stage_type, stage, classname );
314  }
315 
316  static float GetWater(FoodStage stage, int stage_type = -1, string classname = "")
317  {
318  return GetNutritionPropertyFromIndex( 2 , stage_type, stage, classname );
319  }
320 
321  static float GetNutritionalIndex(FoodStage stage, int stage_type = -1, string classname = "")
322  {
323  return GetNutritionPropertyFromIndex( 3 , stage_type , stage, classname);
324  }
325 
326  static float GetToxicity(FoodStage stage, int stage_type = -1, string classname = "")
327  {
328  return GetNutritionPropertyFromIndex( 4 , stage_type, stage, classname );
329  }
330 
331  static int GetAgents(FoodStage stage, int stage_type = -1, string classname = "")
332  {
333  return GetNutritionPropertyFromIndex( 5 , stage_type, stage, classname );
334  }
335 
336  static float GetDigestibility(FoodStage stage, int stage_type = -1, string classname = "")
337  {
338  return GetNutritionPropertyFromIndex( 6 , stage_type, stage, classname );
339  }
340 
341  //Food item
342  protected Edible_Base GetFoodItem()
343  {
344  return m_FoodItem;
345  }
346 
347  //Cooking time
348  float GetCookingTime()
349  {
350  return m_CookingTime;
351  }
352  void SetCookingTime( float time )
353  {
354  m_CookingTime = time;
355  }
356 
357  static float GetCookingPropertyFromIndex( int index, FoodStageType stage_type, FoodStage stage, string classname )
358  {
359  if ( stage )
360  {
361  stage_type = stage.m_FoodStageType;
362  classname = stage.GetFoodItem().GetType();
363  }
364 
365  string food_stage_name = GetFoodStageName( stage_type );
366  int hashedStageName = GetFoodStageNameHash( stage_type );
367 
368  array<float> cooking_properties = new array<float>;
369 
371  map<int, ref array<float>> stagePropertiesMap = new map<int, ref array<float>>;
372 
373  m_EdibleBasePropertiesMap.Find(classname.Hash(), foodStagesMap);
374  foodStagesMap.Find(hashedStageName, stagePropertiesMap);
375 
376  stagePropertiesMap.Find(COOKING_PROPERTIES_HASH, cooking_properties);
377 
378  if ( cooking_properties.Count() > 0 )
379  {
380  if ( index > (cooking_properties.Count() - 1) )
381  {
382  return -1;
383  }
384  else
385  {
386  return cooking_properties.Get( index );
387  }
388  }
389  return 0;
390  }
391 
392  static array<float> GetAllCookingPropertiesForStage( FoodStageType stage_type, FoodStage stage, string classname )
393  {
394  if ( stage )
395  {
396  stage_type = stage.m_FoodStageType;
397  classname = stage.GetFoodItem().GetType();
398  }
399 
400  string food_stage_name = GetFoodStageName( stage_type );
401  int hashedStageName = GetFoodStageNameHash( stage_type );
402 
403  array<float> cooking_properties = new array<float>;
404 
406  map<int, ref array<float>> stagePropertiesMap = new map<int, ref array<float>>;
407 
408  m_EdibleBasePropertiesMap.Find(classname.Hash(), foodStagesMap);
409  foodStagesMap.Find(hashedStageName, stagePropertiesMap);
410 
411  stagePropertiesMap.Find(COOKING_PROPERTIES_HASH, cooking_properties);
412 
413  if ( cooking_properties.Count() > 0 )
414  {
415  return cooking_properties;
416  }
417  return null;
418  }
419 
420  //********************************************/
421  // FOOD STAGE CHANGE
422  //********************************************/
423  //Checks if food stage can be changed to another stage
424  bool CanChangeToNewStage( CookingMethodType cooking_method )
425  {
426  if ( GetNextFoodStageType( cooking_method ) == FoodStageType.NONE )
427  {
428  return false;
429  }
430 
431  return true;
432  }
433 
434  //returns possible food stage type according to given cooking method
436  {
437  array<int> food_transition = new array<int>;
438 
440  map<int, ref array<int>> foodTransitionsMap = new map<int, ref array<int>>;
441 
442  m_EdibleBaseTransitionsMap.Find(GetFoodItem().GetType().Hash(), foodStagesMap);
443  foodStagesMap.Find( GetFoodStageNameHash( GetFoodStageType() ), foodTransitionsMap );
444 
445  // We go through the key array, checking every possible transition
446  for ( int i = 0; i < m_FoodStageTransitionKeys.Count(); ++i )
447  {
448  // We test if a given transition is setup on this item
449  foodTransitionsMap.Find(m_FoodStageTransitionKeys.Get( i ), food_transition);
450  if ( food_transition )
451  {
452  // We now check if the given transition class is relevant
453  if ( food_transition.Get( 1 ) == cooking_method )
454  {
455  return food_transition.Get( 0 );
456  }
457  }
458  }
459 
460  return FoodStageType.BURNED; //If the item cannot transition out of current state, burn it
461  }
462 
463  void ChangeFoodStage( FoodStageType new_stage_type )
464  {
466  map<int, ref array<float>> stagePropertiesMap = new map<int, ref array<float>>;
467 
468  //merge stages
469  //food stage type
470  SetFoodStageType( new_stage_type );
471 
472  array<float> visual_properties = new array<float>;
473 
474  m_EdibleBasePropertiesMap.Find( GetFoodItem().GetType().Hash(), foodStagesMap );
475  foodStagesMap.Find( GetFoodStageNameHash( GetFoodStageType() ), stagePropertiesMap );
476  stagePropertiesMap.Find( VISUAL_PROPERTIES_HASH, visual_properties );
477 
478  if ( visual_properties.Count() > 0 )
479  {
480  //selection index
481  int index = visual_properties.Get( 0 );
482  if ( index >= 0 )
483  {
484  SetSelectionIndex( index );
485  }
486  //texture index
487  index = visual_properties.Get( 1 );
488  if ( index >= 0 )
489  {
490  SetTextureIndex( index );
491  }
492  //material index
493  index = visual_properties.Get( 2 );
494  if ( index >= 0 )
495  {
496  SetMaterialIndex( index );
497  }
498  }
499 
500  //refresh visual
501  GetFoodItem().Synchronize();
502  }
503 
504  void UpdateVisuals()
505  {
506  //if item has food stages
507  if ( GetFoodItem().HasFoodStage() )
508  {
509  Edible_Base food_item = GetFoodItem();
510 
511  array<string> config_selections = food_item.GetHiddenSelections();
512  array<string> config_textures = food_item.GetHiddenSelectionsTextures();
513  array<string> config_materials = food_item.GetHiddenSelectionsMaterials();
514 
515  //selection index
516  int selection_index;
517  if ( GetSelectionIndex() >= 0 && config_selections.Count() > GetSelectionIndex() )
518  {
519  selection_index = GetSelectionIndex();
520  }
521 
522  //texture index
523  int texture_index;
524  if ( GetTextureIndex() >= 0 && config_textures.Count() > GetTextureIndex() )
525  {
526  texture_index = GetTextureIndex();
527  }
528 
529  //material index
530  int material_index;
531  if ( GetMaterialIndex() >= 0 && config_materials.Count() > GetMaterialIndex() )
532  {
533  material_index = GetMaterialIndex();
534  }
535 
536  //hide all selection except the configured one
537  for ( int i = 0; i < config_selections.Count(); i++ )
538  {
539  if ( config_selections.Get( i ) != config_selections.Get( selection_index ) )
540  {
541  food_item.SetAnimationPhase( config_selections.Get( i ), 1 );
542  }
543  }
544 
545  //Debug
546  //Print( "item = " + food_item.GetType() + " selection index = " + GetSelectionIndex().ToString() + " texture index = " + GetTextureIndex().ToString() );
547 
548  //show selection
549  food_item.SetAnimationPhase( config_selections.Get( selection_index ), 0 );
550  //set texture
551  food_item.SetObjectTexture( selection_index, config_textures.Get( texture_index ) );
552  //set materials
553  food_item.SetObjectMaterial( selection_index, config_materials.Get( material_index ) );
554  }
555 
556  m_FoodStageTypeClientLast = m_FoodStageType;
557  }
558 
559  //Food States
560  //check food stages
561  bool IsFoodInStage( FoodStageType food_stage_type )
562  {
563  if ( GetFoodStageType() == food_stage_type )
564  {
565  return true;
566  }
567 
568  return false;
569  }
570 
571  bool IsFoodRaw()
572  {
573  return IsFoodInStage( FoodStageType.RAW );
574  }
575 
576  bool IsFoodBaked()
577  {
578  return IsFoodInStage( FoodStageType.BAKED );
579  }
580 
581  bool IsFoodBoiled()
582  {
583  return IsFoodInStage( FoodStageType.BOILED );
584  }
585 
586  bool IsFoodDried()
587  {
588  return IsFoodInStage( FoodStageType.DRIED );
589  }
590 
591  bool IsFoodBurned()
592  {
593  return IsFoodInStage( FoodStageType.BURNED );
594  }
595 
596  bool IsFoodRotten()
597  {
598  return IsFoodInStage( FoodStageType.ROTTEN );
599  }
600 
601  //get name of food stage type
602  static string GetFoodStageName( FoodStageType food_stage_type )
603  {
604  switch ( food_stage_type )
605  {
606  case FoodStageType.RAW: return "Raw";
607  case FoodStageType.BAKED: return "Baked";
608  case FoodStageType.BOILED: return "Boiled";
609  case FoodStageType.DRIED: return "Dried";
610  case FoodStageType.BURNED: return "Burned";
611  case FoodStageType.ROTTEN: return "Rotten";
612  }
613 
614  return "Raw";
615  }
616 
617  // Get hashed name of food stage type for quicker access
618  static int GetFoodStageNameHash( FoodStageType food_stage_type )
619  {
620  switch ( food_stage_type )
621  {
622  case FoodStageType.RAW: return m_StageRawHash;
623  case FoodStageType.BAKED: return m_StageBakedHash;
624  case FoodStageType.BOILED: return m_StageBoiledHash;
625  case FoodStageType.DRIED: return m_StageDriedHash;
626  case FoodStageType.BURNED: return m_StageBurnedHash;
627  case FoodStageType.ROTTEN: return m_StageRottenHash;
628  }
629 
630  return m_StageRawHash;
631  }
632 
633  //================================================================
634  // SERIALIZATION
635  //================================================================
636  void OnStoreSave( ParamsWriteContext ctx )
637  {
638  //Food stage type
639  ctx.Write( m_FoodStageType );
640 
641  //Selection index
642  ctx.Write( m_SelectionIndex );
643 
644  //Texture index
645  ctx.Write( m_TextureIndex );
646 
647  //Material index
648  ctx.Write( m_MaterialIndex );
649  }
650 
651  bool OnStoreLoad( ParamsReadContext ctx, int version )
652  {
653  //Food stage type
654  if ( !ctx.Read( m_FoodStageType ) )
655  {
656  m_FoodStageType = FoodStageType.RAW; //set default
657  return false;
658  }
659 
660  //Selection index
661  if ( !ctx.Read( m_SelectionIndex ) )
662  {
663  m_SelectionIndex = 0; //set default
664  return false;
665  }
666 
667  //Texture index
668  if ( !ctx.Read( m_TextureIndex ) )
669  {
670  m_TextureIndex = 0; //set default
671  return false;
672  }
673 
674  //Material index
675  if ( !ctx.Read( m_MaterialIndex ) )
676  {
677  m_MaterialIndex = 0; //set default
678  return false;
679  }
680 
681  return true;
682  }
683 }
GetGame
proto native CGame GetGame()
COUNT
@ COUNT
Definition: foodstage.c:11
BOILED
@ BOILED
Definition: foodstage.c:6
NONE
@ NONE
Definition: foodstage.c:3
GetCookingTime
float GetCookingTime()
Definition: edible_base.c:480
COOK_TIME
enum FoodStageType COOK_TIME
IsFoodRotten
bool IsFoodRotten()
Definition: edible_base.c:434
IsFoodRaw
bool IsFoodRaw()
Definition: edible_base.c:384
GetNextFoodStageType
FoodStageType GetNextFoodStageType(CookingMethodType cooking_method)
Definition: edible_base.c:450
HasFoodStage
bool HasFoodStage()
Definition: itembase.c:2359
IsFoodDried
bool IsFoodDried()
Definition: edible_base.c:414
ROTTEN
@ ROTTEN
Definition: foodstage.c:9
SetCookingTime
void SetCookingTime(float time)
Definition: edible_base.c:485
BAKED
@ BAKED
Definition: foodstage.c:5
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
map
map
Definition: controlsxboxnew.c:3
IsFoodBaked
bool IsFoodBaked()
Definition: edible_base.c:394
BURNED
@ BURNED
Definition: foodstage.c:8
FoodStageType
FoodStageType
Definition: foodstage.c:1
IsFoodBurned
bool IsFoodBurned()
Definition: edible_base.c:424
RAW
@ RAW
Definition: foodstage.c:4
UpdateVisuals
void UpdateVisuals()
Definition: construction.c:188
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition: isboxcollidinggeometryproxyclasses.c:27
GetFoodStageName
string GetFoodStageName(FoodStageType food_stage_type)
Definition: edible_base.c:455
OnStoreSave
void OnStoreSave(ParamsWriteContext ctx)
Definition: modifierbase.c:229
GetFoodStageType
FoodStageType GetFoodStageType()
Definition: edible_base.c:378
CanChangeToNewStage
bool CanChangeToNewStage(CookingMethodType cooking_method)
Definition: edible_base.c:460
GetEnergy
float GetEnergy()
Definition: itembase.c:3461
ChangeFoodStage
void ChangeFoodStage(FoodStageType new_food_stage_type)
Definition: edible_base.c:445
IsFoodBoiled
bool IsFoodBoiled()
Definition: edible_base.c:404
CookingMethodType
CookingMethodType
Definition: cooking.c:1
MIN_TEMP
enum FoodStageType MIN_TEMP
OnStoreLoad
bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition: modifiersmanager.c:270
DRIED
@ DRIED
Definition: foodstage.c:7
GetAgents
override int GetAgents()
Definition: itembase.c:3875
GetType
override int GetType()
Definition: huddebugwincharagents.c:49
Edible_Base
Definition: bearsteakmeat.c:1
path
string path
Definition: optionselectormultistate.c:135