Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс OpenItem

Закрытые статические члены

static void OpenAndSwitch (ItemBase item_tool, ItemBase item_target, PlayerBase player, float specialty_weight=0)
 WIll open the 'item_target' by spawning a new entity and transferring item variables to the new one.
 
static void SwitchItems (EntityAI old_item, PlayerBase player, float spill_modificator, float specialty_weight)
 Will switch the 'item' for a new game entity, the new entity's classname will be formed by adding the 'suffix' to the classname of the old 'item'.
 

Подробное описание

Методы

◆ OpenAndSwitch()

static void 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.

5 {
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 }
20
22 }
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:378
Definition EnMath.c:7
Definition OpenItem.c:2
static void SwitchItems(EntityAI old_item, PlayerBase player, float spill_modificator, float specialty_weight)
Will switch the 'item' for a new game entity, the new entity's classname will be formed by adding the...
Definition OpenItem.c:25
Definition EntityAI.c:95
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

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

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

◆ SwitchItems()

static void SwitchItems ( EntityAI old_item,
PlayerBase player,
float spill_modificator,
float specialty_weight )
inlinestaticprivate

Will switch the 'item' for a new game entity, the new entity's classname will be formed by adding the 'suffix' to the classname of the old 'item'.

26 {
27 string old_name = old_item.GetType();
28 string new_name = old_name + "_Opened";
30 l.SetTransferParams(true, true, true, true);
31 MiscGameplayFunctions.TurnItemIntoItemEx(player, l);
32 }
Definition OpenItem.c:37

Используется в OpenAndSwitch().


Объявления и описания членов класса находятся в файле: