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

◆ OpenAndSwitch()

static void OpenItem::OpenAndSwitch ( ItemBase item_tool,
ItemBase item_target,
PlayerBase player,
float specialty_weight = 0 )
inlinestaticprivate

WIll open the 'item_target' by spawning a new entity and transferring item variables to the new one.

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

5 {
6 array<int> spill_range = new array<int>;
7
8 if( item_tool.ConfigIsExisting("OpenItemSpillRange") )
9 {
10 item_tool.ConfigGetIntArray("OpenItemSpillRange", spill_range );
11 }
12 else
13 {
14 Debug.LogError("OpenItemSpillRange config parameter missing, default values used ! ");
15 Error("OpenItemSpillRange config parameter missing, default values used !");
16 spill_range.Insert(0);
17 spill_range.Insert(100);
18 }
19 float spill_modificator = Math.RandomIntInclusive( spill_range.Get(0),spill_range.Get(1) ) / 100;
20
21 OpenItem.SwitchItems(item_target, player, spill_modificator, specialty_weight);
22 }
void Debug()
Определения UniversalTemperatureSource.c:349
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), Debug::LogError(), Math::RandomIntInclusive() и SwitchItems().

Используется в RecipeBase::Do().