Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс Barrel_ColorBase
+ Граф наследования:Barrel_ColorBase:

Защищенные члены

void Barrel_ColorBase ()
 
override int GetDamageSystemVersionChange ()
 
override void EECargoIn (EntityAI item)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
bool IsLocked ()
 
override void Open ()
 
void OpenLoad ()
 
override void Close ()
 
void CloseLoad ()
 
override bool IsOpen ()
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
void UpdateVisualState ()
 
override void OnVariablesSynchronized ()
 
void SoundBarrelOpenPlay ()
 
void SoundBarrelClosePlay ()
 
void Lock (float actiontime)
 
void Unlock ()
 
void DetermineAction (PlayerBase player)
 
void ProduceFertilizer (ItemBase guts, ItemBase plant, PlayerBase player)
 
void TanPelts (ItemBase lime, PlayerBase player)
 
void ColourLeatherClothes (ItemBase color_source, PlayerBase player, string color)
 
void BleachClothes (ItemBase bleach, PlayerBase player)
 
void ColourClothes (ItemBase rci, ItemBase gci, ItemBase bci, PlayerBase player)
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
override bool CanReleaseCargo (EntityAI attachment)
 
override bool CanDetachAttachment (EntityAI parent)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override string GetPlaceSoundset ()
 
override float GetLiquidThroughputCoef ()
 
override void SetActions ()
 
override void OnDebugSpawn ()
 

Защищенные данные

ref RainProcurementComponentBarrel m_RainProcComponent
 
ref OpenableBehaviour m_Openable
 
ref RainProcurementManager m_RainProcurement
 

Закрытые данные

bool m_IsLocked = false
 
ref Timer m_BarrelOpener
 

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

Конструктор(ы)

◆ Barrel_ColorBase()

void Barrel_ColorBase ( )
inlineprotected
10 {
11 m_BarrelOpener = new Timer();
12
13 m_Openable = new OpenableBehaviour(false);
14 m_RainProcurement = new RainProcurementManager(this); //legacy reasons
16
17 m_HalfExtents = Vector(0.30,0.85,0.30);
18
19 RegisterNetSyncVariableBool("m_Openable.m_IsOpened");
20 RegisterNetSyncVariableBool("m_IsSoundSynchRemote");
21 RegisterNetSyncVariableBool("m_IsPlaceSound");
22 }
Container_Base m_HalfExtents
ref RainProcurementManager m_RainProcurement
Definition Barrel_ColorBase.c:584
ref OpenableBehaviour m_Openable
Definition Barrel_ColorBase.c:7
ref RainProcurementComponentBarrel m_RainProcComponent
Definition Barrel_ColorBase.c:6
ref Timer m_BarrelOpener
Definition Barrel_ColorBase.c:4
Definition OpenableBehaviour.c:2
Definition RainProcurementComponent.c:89
DEPRECATED, done through the RainProcurementHandler / component instead.
Definition RainProcurementManager.c:3
Definition DayZPlayerImplement.c:63
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки m_BarrelOpener, m_HalfExtents, m_Openable, m_RainProcComponent, m_RainProcurement и Vector().

Методы

◆ BleachClothes()

void BleachClothes ( ItemBase bleach,
PlayerBase player )
inlineprotected
368 {
369 EntityAI item;
370 int bleach_amount = bleach.GetQuantity();
371 int item_count = GetInventory().GetCargo().GetItemCount();
372 string item_name = "";
373
374 for (int i = 0; i < item_count; i++)
375 {
376 item = GetInventory().GetCargo().GetItem(i);
377 if ( item.IsClothing() )
378 {
380 {
381 if ( ( GetGame().ObjectIsKindOf (item, "TShirt_ColorBase") && !GetGame().ObjectIsKindOf (item, "TShirt_White") ) || ( GetGame().ObjectIsKindOf (item, "Armband_ColorBase") && !GetGame().ObjectIsKindOf (item, "Armband_White") ) ) //cannot bleach white items...?
382 {
383 int index = item.GetType().IndexOf("_");
384 string itemtype = item.GetType().Substring( 0, index + 1 );
386 MiscGameplayFunctions.TurnItemIntoItem(itemIB,itemtype+"White",player);
387
389 }
390 if ( GetGame().IsKindOf (item.GetDisplayName(), "LeatherSack_ColorBase") )
391 {
392 item_name = "LeatherSack_Natural";
393 }
394 else if ( GetGame().IsKindOf (item.GetDisplayName(), "LeatherStorageVest_ColorBase") )
395 {
396 item_name = "LeatherStorageVest_Natural";
397 }
398 else if ( GetGame().IsKindOf (item.GetDisplayName(), "LeatherJacket_ColorBase") )
399 {
400 item_name = "LeatherJacket_Natural";
401 }
402 else if ( GetGame().IsKindOf (item.GetDisplayName(), "LeatherPants_ColorBase") )
403 {
404 item_name = "LeatherPants_Natural";
405 }
406 else if ( GetGame().IsKindOf (item.GetDisplayName(), "LeatherMoccasinsShoes_ColorBase") )
407 {
408 item_name = "LeatherMoccasinsShoes_Natural";
409 }
410 else if ( GetGame().IsKindOf (item.GetDisplayName(), "LeatherHat_ColorBase") )
411 {
412 item_name = "LeatherHat_Natural";
413 }
414 if ( item_name != "" )
415 {
417 lambda.SetTransferParams(true, true, true);
418 player.ServerReplaceItemWithNew(lambda);
420 }
421 }
422 else
423 {
424 bleach.Delete();
425 break;
426 }
427 }
428 }
429 if ( bleach )
430 {
431 bleach.SetQuantity(bleach_amount);
432 }
433 if ( item_name != "" )
434 {
435 Lock(10);
436 }
437 }
void Lock(float actiontime)
Definition Barrel_ColorBase.c:178
Definition Building.c:6
Definition constants.c:615
Definition InventoryItem.c:731
Definition EntityAI.c:95
Definition MiscGameplayFunctions.c:92
proto native CGame GetGame()
const int BAREL_BLEACH_PER_CLOTH
Definition constants.c:827

Перекрестные ссылки GameConstants::BAREL_BLEACH_PER_CLOTH, GetGame() и Lock().

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

◆ CanDetachAttachment()

override bool CanDetachAttachment ( EntityAI parent)
inlineprotected
539 {
540 if ( GetNumberOfItems() == 0)
541 return true;
542 return false;
543 }
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition ItemBase.c:8106

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

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI parent)
inlineprotected
504 {
505 if ( !super.CanPutInCargo( parent ))
506 return false;
507
508 if ( GetNumberOfItems() == 0 && !IsOpen() )
509 return true;
510
511 return false;
512 }
override bool IsOpen()
Definition Barrel_ColorBase.c:111

Перекрестные ссылки GetNumberOfItems() и IsOpen().

◆ CanPutIntoHands()

override bool CanPutIntoHands ( EntityAI parent)
inlineprotected
515 {
516 if ( !super.CanPutIntoHands( parent ))
517 return false;
518
519 if ( GetNumberOfItems() == 0 && (GetInventory().IsAttachment() || !IsOpen()) )
520 return true;
521
522 return false;
523 }

Перекрестные ссылки GetNumberOfItems() и IsOpen().

◆ CanReceiveItemIntoCargo()

override bool CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected
526 {
527 if ( IsOpen() )
528 return super.CanReceiveItemIntoCargo( item );
529
530 return false;
531 }

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

◆ CanReleaseCargo()

override bool CanReleaseCargo ( EntityAI attachment)
inlineprotected
534 {
535 return IsOpen();
536 }

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

◆ Close()

override void Close ( )
inlineprotected
92 {
93 m_Openable.Close();
94 m_RainProcComponent.StopRainProcurement();
96 SetTakeable(true);
97
99 }
void SoundSynchRemote()
Definition ItemBase.c:9011
override void SetTakeable(bool pState)
Definition ItemBase.c:8971
void UpdateVisualState()
Definition Barrel_ColorBase.c:130

Перекрестные ссылки m_Openable, m_RainProcComponent, SetTakeable(), SoundSynchRemote() и UpdateVisualState().

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

◆ CloseLoad()

void CloseLoad ( )
inlineprotected
102 {
103 m_Openable.Close();
104 m_RainProcComponent.StopRainProcurement();
105 SetSynchDirty();
106 SetTakeable(true);
107
109 }

Перекрестные ссылки m_Openable, m_RainProcComponent, SetTakeable() и UpdateVisualState().

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

◆ ColourClothes()

void ColourClothes ( ItemBase rci,
ItemBase gci,
ItemBase bci,
PlayerBase player )
inlineprotected
440 {
441 EntityAI item;
442 float r = 0;
443 float g = 0;
444 float b = 0;
445 float a = 1; //alpha
446 int item_count = GetInventory().GetCargo().GetItemCount();
447 bool was_colored = false;
448 if ( rci )
449 {
450 r = rci.GetQuantity()/10;
451 r = Math.Clamp(r, 0, 0.78); //TODO adjust clamp as needed, full RGB would result in a white item
452 }
453 if ( gci )
454 {
455 g = gci.GetQuantity()/10;
456 g = Math.Clamp(g, 0, 0.78);
457 }
458 if ( bci )
459 {
460 b = bci.GetQuantity()/10;
461 b = Math.Clamp(b, 0, 0.78);
462 }
463 for (int i = 0; i < item_count; i++)
464 {
465 item = GetInventory().GetCargo().GetItem(i);
466 if ( item.IsClothing() )
467 {
468 if ( GetGame().ObjectIsKindOf (item, "TShirt_White") || GetGame().ObjectIsKindOf (item, "Armband_White") )
469 {
471 int index = itemIB.GetType().IndexOf("_");
472 string itemtype = itemIB.GetType().Substring( 0, index + 1 );
473
475 clambda.SetTransferParams(true, true, true);
476 MiscGameplayFunctions.TurnItemIntoItemEx(player, clambda);
477 was_colored = true;
478 }
479 }
480 }
481
482 if ( was_colored )
483 {
484 if ( rci )
485 {
486 //rci.AddQuantity(-r*10,true,false);
487 rci.Delete();
488 }
489 if ( gci )
490 {
491 //gci.AddQuantity(-g*10,true,false);
492 gci.Delete();
493 }
494 if ( bci )
495 {
496 //bci.AddQuantity(-b*10,true,false);
497 bci.Delete();
498 }
499 Lock(30);
500 }
501 }
Definition Barrel_ColorBase.c:593
Definition EnMath.c:7
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), GetGame() и Lock().

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

◆ ColourLeatherClothes()

void ColourLeatherClothes ( ItemBase color_source,
PlayerBase player,
string color )
inlineprotected
317 {
318 EntityAI item;
319 int item_count = GetInventory().GetCargo().GetItemCount();
320 string item_name = "";
321
322
323 for (int i = 0; i < item_count; i++)
324 {
325 item = GetInventory().GetCargo().GetItem(i);
326 if ( item.IsClothing() )
327 {
328 if ( GetGame().ObjectIsKindOf (item, "LeatherSack_Natural") )
329 {
330 item_name = "Bag_LeatherSack_"+color;
331 }
332 else if ( GetGame().ObjectIsKindOf (item, "LeatherStorageVest_Natural") )
333 {
334 item_name = "Vest_LeatherStorage_"+color;
335 }
336 else if ( GetGame().ObjectIsKindOf (item, "LeatherJacket_Natural") )
337 {
338 item_name = "Top_LeatherJacket_"+color;
339 }
340 else if ( GetGame().ObjectIsKindOf (item, "LeatherPants_Natural") )
341 {
342 item_name = "Pants_LeatherPants_"+color;
343 }
344 else if ( GetGame().ObjectIsKindOf (item, "LeatherMoccasinsShoes_Natural") )
345 {
346 item_name = "Shoes_LeatherMoccasins_"+color;
347 }
348 else if ( GetGame().ObjectIsKindOf (item, "LeatherHat_Natural") )
349 {
350 item_name = "Hat_Leather_"+color;
351 }
352 if ( item_name != "" )
353 {
355 lambda.SetTransferParams(true, true, true);
356 player.ServerReplaceItemWithNew(lambda);
357 }
358 }
359 }
360 if ( item_name != "" )
361 {
362 Lock(20);
363 }
364 }

Перекрестные ссылки GetGame() и Lock().

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

◆ DetermineAction()

void DetermineAction ( PlayerBase player)
inlineprotected
191 {
192 int slot_id;
195 ingredient = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
196 if ( ingredient && GetQuantity() > 10000 )
197 {
199 }
200 else
201 {
202 slot_id = InventorySlots.GetSlotIdFromString("Material_Nails");
203 ingredient = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
204 if ( ingredient && GetQuantity() > 10000 )
205 {
207 }
208 else
209 {
211 ingredient = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
212 if ( ingredient && GetQuantity() > 10000 )
213 {
215 }
216 else
217 {
219 ingredient = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
220 if ( ingredient && GetQuantity() > 10000 )
221 {
223 }
224 else
225 {
226
228 ingredient = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
229 if ( ingredient && GetQuantity() > 10000 )
230 {
232 }
233 else
234 {
236 ingredient = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
238 ItemBase reactant = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
239 if ( ingredient && reactant && GetQuantity() > 5000 )
240 {
242 }
243 else
244 {
246 ItemBase ingredientR = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
248 ItemBase ingredientG = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
250 ItemBase ingredientB = ItemBase.Cast( GetInventory().FindAttachment(slot_id) );
251 if ( (ingredientR || ingredientG || ingredientB) && GetQuantity() > 10000)
252 {
254 }
255 }
256 }
257 }
258 }
259 }
260 }
261 Close();
262 }
override float GetQuantity()
Definition ItemBase.c:8042
void TanPelts(ItemBase lime, PlayerBase player)
Definition Barrel_ColorBase.c:277
void ColourLeatherClothes(ItemBase color_source, PlayerBase player, string color)
Definition Barrel_ColorBase.c:316
void ColourClothes(ItemBase rci, ItemBase gci, ItemBase bci, PlayerBase player)
Definition Barrel_ColorBase.c:439
override void Close()
Definition Barrel_ColorBase.c:91
void ProduceFertilizer(ItemBase guts, ItemBase plant, PlayerBase player)
Definition Barrel_ColorBase.c:264
void BleachClothes(ItemBase bleach, PlayerBase player)
Definition Barrel_ColorBase.c:367
provides access to slot configuration
Definition InventorySlots.c:6
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id

Перекрестные ссылки BleachClothes(), Close(), ColourClothes(), ColourLeatherClothes(), GetQuantity(), InventorySlots::GetSlotIdFromString(), ProduceFertilizer() и TanPelts().

◆ EECargoIn()

override void EECargoIn ( EntityAI item)
inlineprotected
30 {
31 super.EECargoIn(item);
32
33 MiscGameplayFunctions.SoakItemInsideParentContainingLiquidAboveThreshold(ItemBase.Cast(item), this);
34 }

◆ GetDamageSystemVersionChange()

override int GetDamageSystemVersionChange ( )
inlineprotected
25 {
26 return 110;
27 }

◆ GetLiquidThroughputCoef()

override float GetLiquidThroughputCoef ( )
inlineprotected
562 {
564 }
const float LIQUID_THROUGHPUT_BARREL
Definition constants.c:531

Перекрестные ссылки LIQUID_THROUGHPUT_BARREL.

◆ GetPlaceSoundset()

override string GetPlaceSoundset ( )
inlineprotected
556 {
557 return "placeBarrel_SoundSet";
558 }

◆ IsLocked()

bool IsLocked ( )
inlineprotected
67 {
68 return m_IsLocked;
69 }
bool m_IsLocked
Definition Barrel_ColorBase.c:3

Перекрестные ссылки m_IsLocked.

◆ IsOpen()

override bool IsOpen ( )
inlineprotected
112 {
113 return m_Openable.IsOpened();
114 }

Перекрестные ссылки m_Openable.

Используется в CanPutInCargo(), CanPutIntoHands(), CanReceiveItemIntoCargo(), CanReleaseCargo(), OnVariablesSynchronized() и UpdateVisualState().

◆ Lock()

void Lock ( float actiontime)
inlineprotected
179 {
180 m_IsLocked = true;
181 m_BarrelOpener.Run(actiontime, this, "Unlock", NULL,false);
182 }

Перекрестные ссылки m_BarrelOpener и m_IsLocked.

Используется в BleachClothes(), ColourClothes(), ColourLeatherClothes(), ProduceFertilizer() и TanPelts().

◆ OnDebugSpawn()

override void OnDebugSpawn ( )
inlineprotected
577 {
579 }
void SetQuantityMax()
Definition ItemBase.c:7952

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

◆ OnPlacementComplete()

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected
549 {
550 super.OnPlacementComplete( player, position, orientation );
551
552 SetIsPlaceSound( true );
553 }
void SetIsPlaceSound(bool is_place_sound)
Definition ItemBase.c:9028

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

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected
44 {
45 if ( !super.OnStoreLoad( ctx, version ) )
46 return false;
47
48 bool opened;
49 if ( version >= 110 && !ctx.Read( opened ) )
50 {
51 return false;
52 }
53
54 if ( opened )
55 {
56 OpenLoad();
57 }
58 else
59 {
60 CloseLoad();
61 }
62
63 return true;
64 }
void CloseLoad()
Definition Barrel_ColorBase.c:101
void OpenLoad()
Definition Barrel_ColorBase.c:81

Перекрестные ссылки CloseLoad() и OpenLoad().

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
37 {
38 super.OnStoreSave( ctx );
39
40 ctx.Write( m_Openable.IsOpened() );
41 }

Перекрестные ссылки m_Openable.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
inlineprotected
145 {
146 super.OnVariablesSynchronized();
147
148 if ( IsPlaceSound() )
149 {
151 }
152 else if ( IsSoundSynchRemote() && !IsBeingPlaced() && m_Initialized )
153 {
154 if ( IsOpen() )
155 {
157 }
158 else if ( !IsOpen() )
159 {
161 }
162 }
164 }
override bool IsBeingPlaced()
Definition ItemBase.c:5658
void PlayPlaceSound()
Definition ItemBase.c:9093
bool IsPlaceSound()
Definition ItemBase.c:9033
bool IsSoundSynchRemote()
Definition ItemBase.c:9018
bool m_Initialized
Definition UiHintPanel.c:317
void SoundBarrelOpenPlay()
Definition Barrel_ColorBase.c:166
void SoundBarrelClosePlay()
Definition Barrel_ColorBase.c:172

Перекрестные ссылки IsBeingPlaced(), IsOpen(), IsPlaceSound(), IsSoundSynchRemote(), m_Initialized, PlayPlaceSound(), SoundBarrelClosePlay(), SoundBarrelOpenPlay() и UpdateVisualState().

◆ OnWasAttached()

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprotected
117 {
118 super.OnWasAttached(parent, slot_id);
119
120 Open();
121 }
override void Open()
Definition Barrel_ColorBase.c:71

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

◆ OnWasDetached()

override void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected
124 {
125 super.OnWasDetached(parent, slot_id);
126
127 Close();
128 }

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

◆ Open()

override void Open ( )
inlineprotected
72 {
73 m_Openable.Open();
74 m_RainProcComponent.StartRainProcurement();
76 SetTakeable(false);
77
79 }

Перекрестные ссылки m_Openable, m_RainProcComponent, SetTakeable(), SoundSynchRemote() и UpdateVisualState().

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

◆ OpenLoad()

void OpenLoad ( )
inlineprotected
82 {
83 m_Openable.Open();
84 m_RainProcComponent.StartRainProcurement();
85 SetSynchDirty();
86 SetTakeable(false);
87
89 }

Перекрестные ссылки m_Openable, m_RainProcComponent, SetTakeable() и UpdateVisualState().

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

◆ ProduceFertilizer()

void ProduceFertilizer ( ItemBase guts,
ItemBase plant,
PlayerBase player )
inlineprotected
265 {
267
268 guts.Delete();
269 plant.Delete();
270
271 ItemBase lime = ItemBase.Cast( GetInventory().CreateInInventory("GardenLime") );
272
273 lime.SetQuantity(lime_quantity);
274 Lock(50);
275 }
const float BAREL_LIME_PER_PLANT
Definition constants.c:828

Перекрестные ссылки GameConstants::BAREL_LIME_PER_PLANT и Lock().

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

◆ SetActions()

override void SetActions ( )
inlineprotected
567 {
569 super.SetActions();
570
573
574 }
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
Definition ActionAttachOnSelection.c:2
Definition ActionCloseBarrel.c:2
Definition ActionOpenBarrel.c:2

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

◆ SoundBarrelClosePlay()

void SoundBarrelClosePlay ( )
inlineprotected
173 {
174 EffectSound sound = SEffectManager.PlaySound( "barrel_close_SoundSet", GetPosition() );
175 sound.SetAutodestroy( true );
176 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:165

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

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

◆ SoundBarrelOpenPlay()

void SoundBarrelOpenPlay ( )
inlineprotected
167 {
168 EffectSound sound = SEffectManager.PlaySound( "barrel_open_SoundSet", GetPosition() );
169 sound.SetAutodestroy( true );
170 }

Перекрестные ссылки GetPosition и SEffectManager::PlaySound().

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

◆ TanPelts()

void TanPelts ( ItemBase lime,
PlayerBase player )
inlineprotected
278 {
279 EntityAI item;
280 int item_count = GetInventory().GetCargo().GetItemCount();
281 int pelt_count = 0;
283
284
285 for (int i = 0; i < item_count; i++)
286 {
287 item = GetInventory().GetCargo().GetItem(i);
288 if ( item.IsPeltBase() )
289 {
290 pelt_count = g_Game.ConfigGetInt("cfgVehicles " + item.GetType() + " peltGain");
291 if ( pelt_count <= lime_amount )
292 {
294 lambda.SetTransferParams(true, true, true);
295 player.ServerReplaceItemWithNew(lambda);
296
298 if ( lime_amount <= 0 )
299 {
300 lime.Delete();
301 break;
302 }
303 }
304 }
305 }
306 if ( lime )
307 {
309 }
310 if ( pelt_count > 0 )
311 {
312 Lock(30);
313 }
314 }
DayZGame g_Game
Definition DayZGame.c:3746
Definition Barrel_ColorBase.c:615
const int BAREL_LIME_PER_PELT
Definition constants.c:826
static proto float Floor(float f)
Returns floor of value.

Перекрестные ссылки GameConstants::BAREL_LIME_PER_PELT, Math::Floor(), g_Game и Lock().

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

◆ Unlock()

void Unlock ( )
inlineprotected
185 {
186 m_IsLocked = false;
187 Open();
188 }

Перекрестные ссылки m_IsLocked и Open().

◆ UpdateVisualState()

void UpdateVisualState ( )
inlineprotected
131 {
132 if ( IsOpen() )
133 {
134 SetAnimationPhase("Lid",1);
135 SetAnimationPhase("Lid2",0);
136 }
137 else
138 {
139 SetAnimationPhase("Lid",0);
140 SetAnimationPhase("Lid2",1);
141 }
142 }

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

Используется в Close(), CloseLoad(), OnVariablesSynchronized(), Open() и OpenLoad().

Поля

◆ m_BarrelOpener

ref Timer m_BarrelOpener
private

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

◆ m_IsLocked

bool m_IsLocked = false
private

Используется в IsLocked(), Lock() и Unlock().

◆ m_Openable

ref OpenableBehaviour m_Openable
protected

◆ m_RainProcComponent

ref RainProcurementComponentBarrel m_RainProcComponent
protected

Используется в Barrel_ColorBase(), Close(), CloseLoad(), Open() и OpenLoad().

◆ m_RainProcurement

ref RainProcurementManager m_RainProcurement
protected

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


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