55 Class.CastTo(rags, ingredients[0]);
57 Class.CastTo(container, ingredients[1]);
59 if ((container.GetLiquidType() &
LIQUID_WATER) && container.GetQuantity() > 0 && !container.GetIsFrozen() && rags.GetHealthLevel() > 1)
74 float rags_health = rags.GetHealth(
"",
"");
75 int rags_quantity = rags.GetQuantity();
77 float rags_combined_damage = (100 - rags_health) * rags_quantity;
79 int liquid_quantity = container.GetQuantity();
80 int liquid_required = rags_combined_damage * 2;
85 if( liquid_quantity > liquid_required )
87 container.AddQuantity(-liquid_required);
88 heal = rags_combined_damage / rags_quantity;
92 container.SetQuantity(0);
93 used_ratio = liquid_quantity / liquid_required;
94 heal = (rags_combined_damage / rags_quantity) * used_ratio;
97 heal =
Math.Clamp(heal, 0, (70 - rags_health));
98 rags.AddHealth(
"",
"",heal);
Super root of all classes in Enforce script.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
bool CanDo(PlayerBase player, TStringVectorMap surfaceTypes)
void Do(PlayerBase player)