DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PaintItem.c
См. документацию.
2{
4 static void Paint(ItemBase item_tool, ItemBase item_target, string base_name, PlayerBase player, float specialty_weight = 0)
5 {
6 string spray_color = item_tool.ConfigGetString("color");
7 string item_color = item_target.ConfigGetString("color");
8
9 string new_class_name = base_name + "_" + spray_color;
10 PaintItem.SwitchItems(item_target, new_class_name, player);
11 }
12
13 static bool CanPaintItem(ItemBase item_tool, ItemBase item_target)
14 {
15 string spray_color = item_tool.ConfigGetString("color");
16 string item_color = item_target.ConfigGetString("color");
17
18 if( spray_color != item_color )
19 {
20 return true;
21 }
22 else
23 {
24 return false;
25 }
26 }
27
29 static void SwitchItems (EntityAI old_item, string new_item, PlayerBase player)
30 {
31 MiscGameplayFunctions.TurnItemIntoItemEx(player, new PaintItemLambda(old_item, new_item, player));
32 }
33};
34
35
37{
38 void PaintItemLambda (EntityAI old_item, string new_item_type, PlayerBase player) { }
39};
Определения Building.c:6
Определения InventoryItem.c:731
static void Paint(ItemBase item_tool, ItemBase item_target, string base_name, PlayerBase player, float specialty_weight=0)
WIll open the 'item_target' by spawning a new entity and transferring item variables to the new one.
Определения PaintItem.c:4
static bool CanPaintItem(ItemBase item_tool, ItemBase item_target)
Определения PaintItem.c:13
static void SwitchItems(EntityAI old_item, string new_item, PlayerBase player)
Will switch the 'item' for a new game entity, the new entity's classname will be formed by adding the...
Определения PaintItem.c:29
Определения PaintItem.c:2
void PaintItemLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Определения PaintItem.c:38
Определения PaintItem.c:37
Определения PlayerBaseClient.c:2