DayZ 1.29
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 g_Game.ConfigGetText("cfgVehicles " + pack_type + " Horticulture ContainsSeedsType", seeds_type);
15
16 int seeds_quantity_max = g_Game.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();
34 g_Game.CreateObjectEx(seeds_type, pos, ECE_PLACE_ON_SURFACE);
35 g_Game.ObjectDelete(this);
36 }
37 }
eBleedingSourceType GetType()
const int ECE_PLACE_ON_SURFACE
Определения CentralEconomy.c:37
DayZGame g_Game
Определения DayZGame.c:3942
void EmptySeedsPackLambda(EntityAI old_item, string new_item_type, PlayerBase player, int count)
Определения SeedPackBase.c:52
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки ECE_PLACE_ON_SURFACE, EmptySeedsPackLambda(), g_Game, GetPosition(), GetType() и Math::Round().