DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ EmptySeedPack()

void Inventory_Base::EmptySeedPack ( PlayerBase player)
inlineprivate

См. определение в файле SeedPackBase.c строка 9

10 {
11 string pack_type = GetType();
12 string seeds_type = "";
13
14 GetGame().ConfigGetText("cfgVehicles " + pack_type + " Horticulture ContainsSeedsType", seeds_type);
15
16 int seeds_quantity_max = GetGame().ConfigGetInt("cfgVehicles " + pack_type + " Horticulture ContainsSeedsQuantity");
17 int seeds_quantity = seeds_quantity_max;
18
19 seeds_quantity = Math.Round(seeds_quantity_max * GetHealth01("",""));
20
21 if (seeds_quantity < 1)
22 {
23 seeds_quantity = 1;
24 }
25
26 if (player)
27 {
28 EmptySeedsPackLambda lambda = new EmptySeedsPackLambda(this, seeds_type, player, seeds_quantity);
29 player.ServerReplaceItemInHandsWithNew(lambda);
30 }
31 else
32 {
33 vector pos = GetPosition();
35 GetGame().ObjectDelete(this);
36 }
37 }
eBleedingSourceType GetType()
Определения BleedingSource.c:63
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
void EmptySeedsPackLambda(EntityAI old_item, string new_item_type, PlayerBase player, int count)
Определения SeedPackBase.c:52
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)
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки CGame::ConfigGetInt(), CGame::ConfigGetText(), CGame::CreateObjectEx(), ECE_PLACE_ON_SURFACE, EmptySeedsPackLambda(), GetGame(), GetPosition, GetType(), CGame::ObjectDelete() и Math::Round().