8 m_Name =
"#STR_CraftTannedLeather0";
53 ItemBase ingredient2 = ingredients[1];
56 float yieldQuantity = ingredient1.ConfigGetFloat(
"leatherYield");
57 float qtyModifier = (4 - ingredient1.GetHealthLevel(
""))/4;
58 yieldQuantity =
Math.
Clamp(yieldQuantity * qtyModifier,1,
float.
MAX);
60 float m_NeededQuantity = (ingredient2.GetQuantityMax() *
m_PercentageUsed) * yieldQuantity;
61 if( ingredient1.ConfigGetFloat(
"leatherYield") >= 0 && ingredient2.GetQuantity() >= m_NeededQuantity)
73 ItemBase ingredient1 = ingredients[0];
76 int yieldQuantity = ingredient1.ConfigGetFloat(
"leatherYield");
77 float qtyModifier = ingredient1.GetHealth01(
"",
"Health");
78 yieldQuantity =
Math.
Clamp(yieldQuantity * qtyModifier,1,
float.
MAX);
81 ItemBase gardenLime = ingredients[1];
82 float usedLime = (gardenLime.GetQuantityMax() *
m_PercentageUsed) * yieldQuantity;
83 gardenLime.
SetQuantity(gardenLime.GetQuantity() - usedLime);
87 MiscGameplayFunctions.GetHeadBonePos(player,posHead);
89 MiscGameplayFunctions.CreateItemBasePilesDispersed(
"TannedLeather",posHead,posTarget,
UAItemsSpreadRadius.
NARROW,yieldQuantity,
float.MAX,player);
class Pelt_Base extends ItemBase Pelt_Base
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
const float DEFAULT_SPAWN_DISTANCE
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
bool m_AnywhereInInventory
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]
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
override bool CanDo(ItemBase ingredients[], PlayerBase player)
override void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.