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

◆ UpdateSelections()

void ItemBase::UpdateSelections ( )
inlineprivate

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

13 {
14 RemoveProxyPhysics( "stage_1" );
15 RemoveProxyPhysics( "stage_2" );
16 RemoveProxyPhysics( "stage_3" );
17
18 // Show/Hide selections according to the current quantity
19 if ( this )
20 {
21 float quantity = GetQuantity();
22 float quantity_max = GetQuantityMax();
23
24 if ( quantity > GetQuantityMax() *0.66 )
25 {
26 // Show 3/3 amount of planks
27 ShowSelection ( "stage_3" );
28 HideSelection ( "stage_2" );
29 HideSelection ( "stage_1" );
30
31 AddProxyPhysics( "stage_3" );
32 }
33
34 if ( quantity > quantity_max *0.33 && quantity <= quantity_max *0.66 )
35 {
36 // Show 2/3 amount of planks
37 HideSelection ( "stage_3" );
38 ShowSelection ( "stage_2" );
39 HideSelection ( "stage_1" );
40
41 AddProxyPhysics( "stage_2" );
42 }
43
44 if ( quantity > 0 && quantity <= quantity_max *0.33 )
45 {
46 // Show 1/3 amount of planks
47 HideSelection ( "stage_3" );
48 HideSelection ( "stage_2" );
49 ShowSelection ( "stage_1" );
50
51 AddProxyPhysics( "stage_1" );
52 }
53
54 if ( quantity == 0 )
55 {
56 // Show 0 planks. Object should be deleted now.
57 HideSelection ( "stage_3" );
58 HideSelection ( "stage_2" );
59 HideSelection ( "stage_1" );
60 }
61 }
62 }
override float GetQuantity()
Определения ItemBase.c:8154
override int GetQuantityMax()
Определения ItemBase.c:8106

Перекрестные ссылки GetQuantity() и GetQuantityMax().

Используется в EEItemLocationChanged() и SetQuantity().