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

◆ GardenBase()

void ItemBase::GardenBase ( )
inlineprivate

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

47 {
48 RegisterNetSyncVariableInt("m_SlotState");
49 RegisterNetSyncVariableInt("m_SlotFertilityState");
50 RegisterNetSyncVariableInt("m_SlotWateredState");
51
52 RegisterNetSyncVariableInt("m_SlotWaterBitmap0");
53 RegisterNetSyncVariableInt("m_SlotWaterBitmap1");
54 RegisterNetSyncVariableInt("m_SlotWaterBitmap2");
55
56 RegisterNetSyncVariableInt("m_SlotFertilizerBitmap0");
57 RegisterNetSyncVariableInt("m_SlotFertilizerBitmap1");
58 RegisterNetSyncVariableInt("m_SlotFertilizerBitmap2");
59
61
62 SetEventMask(EntityEvent.INIT); // Enable EOnInit event
63
64 // Prepare m_map_slots
65 for (int i = 1; i <= GetGardenSlotsCount(); ++i)
66 {
67 // m_map_slots is supposed to be: <input, output>
68 string input = SLOT_SEEDBASE_PREFIX + i.ToString();
69 string output = SLOT_MEMORY_POINT_PREFIX;
70
71 if (i < 10)
72 output = output + "0"; // Example: '1' changes to '01'
73
74 output = output + i.ToString();
75
76 m_map_slots.Set(input, output);
77 }
78
81
82 if (GetGame().IsServer())
83 {
85 }
86 }
map
Определения ControlsXboxNew.c:4
void InitializeSlots()
Определения GardenBase.c:158
void CheckRainStart()
Определения GardenBase.c:816
int GetGardenSlotsCount()
Определения GardenBase.c:351
static const string SLOT_SEEDBASE_PREFIX
Определения GardenBase.c:20
void SetMaxWaterStateVal()
Определения GardenBase.c:182
static ref map< string, string > m_map_slots
Определения GardenBase.c:44
static const string SLOT_MEMORY_POINT_PREFIX
Определения GardenBase.c:19
proto native CGame GetGame()
EntityEvent
Entity events for event-mask, or throwing event from code.
Определения EnEntity.c:45
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.

Перекрестные ссылки CheckRainStart(), GetGame(), GardenBase::GetGardenSlotsCount(), InitializeSlots(), m_map_slots, SetMaxWaterStateVal(), SLOT_MEMORY_POINT_PREFIX, SLOT_SEEDBASE_PREFIX и string::ToString().