12 string seeds_type =
"";
14 GetGame().
ConfigGetText(
"cfgVehicles " + pack_type +
" Horticulture ContainsSeedsType", seeds_type);
16 int seeds_quantity_max =
GetGame().
ConfigGetInt(
"cfgVehicles " + pack_type +
" Horticulture ContainsSeedsQuantity");
17 int seeds_quantity = seeds_quantity_max;
19 seeds_quantity =
Math.
Round(seeds_quantity_max * GetHealth01(
"",
""));
21 if (seeds_quantity < 1)
29 player.ServerReplaceItemInHandsWithNew(lambda);
60 super.CopyOldPropertiesToNew(old_item, new_item);
69 super.OnSuccess(new_item);
eBleedingSourceType GetType()
void AddAction(typename actionName)
const int ECE_PLACE_ON_SURFACE
const float DEFAULT_SPAWN_DISTANCE
class SeedPackBase extends Inventory_Base m_ItemCount
void EmptySeedsPackLambda(EntityAI old_item, string new_item_type, PlayerBase player, int count)
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto native void ObjectDelete(Object obj)
Super root of all classes in Enforce script.
void EmptySeedPack(PlayerBase player)
static const float PACK_DAMAGE_TOLERANCE
override void SetActions()
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
void OnSuccess(EntityAI new_item)
Step H. - notification on finish.
void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
Step E. copy properties from old object to the created one.
base class for transformation operations (creating one item from another)
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Round(float f)
Returns mathematical round of value.
class JsonUndergroundAreaTriggerData GetPosition