DayZ 1.24
Loading...
Searching...
No Matches
Barrel_ColorBase Class Reference
Inheritance diagram for Barrel_ColorBase:
[legend]
Collaboration diagram for Barrel_ColorBase:
[legend]

Protected Member Functions

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 ()
 

Protected Attributes

ref RainProcurementComponentBarrel m_RainProcComponent
 
ref OpenableBehaviour m_Openable
 
ref RainProcurementManager m_RainProcurement
 

Private Attributes

bool m_IsLocked = false
 
ref Timer m_BarrelOpener
 

Detailed Description

Definition at line 1 of file Barrel_ColorBase.c.

Constructor & Destructor Documentation

◆ Barrel_ColorBase()

void Barrel_ColorBase::Barrel_ColorBase ( )
inlineprotected

Definition at line 9 of file Barrel_ColorBase.c.

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
ref Timer m_BarrelOpener
ref OpenableBehaviour m_Openable
ref RainProcurementComponentBarrel m_RainProcComponent
DEPRECATED, done through the RainProcurementHandler / component instead.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References m_BarrelOpener, m_HalfExtents, m_Openable, m_RainProcComponent, m_RainProcurement, and Vector().

Member Function Documentation

◆ BleachClothes()

void Barrel_ColorBase::BleachClothes ( ItemBase bleach,
PlayerBase player )
inlineprotected

Definition at line 323 of file Barrel_ColorBase.c.

324 {
326 int bleach_amount = bleach.GetQuantity();
327 int item_count = GetInventory().GetCargo().GetItemCount();
328 string item_name = "";
329
330 for (int i = 0; i < item_count; i++)
331 {
332 item = GetInventory().GetCargo().GetItem(i);
333 if (item.IsClothing())
334 {
336 {
337 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...?
338 {
339 int index = item.GetType().IndexOf("_");
340 string itemtype = item.GetType().Substring(0, index + 1);
342 MiscGameplayFunctions.TurnItemIntoItem(itemIB, itemtype + "White", player);
343
345 }
346 if (GetGame().IsKindOf(item.GetDisplayName(), "LeatherSack_ColorBase"))
347 item_name = "LeatherSack_Natural";
348 else if (GetGame().IsKindOf(item.GetDisplayName(), "LeatherStorageVest_ColorBase"))
349 item_name = "LeatherStorageVest_Natural";
350 else if (GetGame().IsKindOf(item.GetDisplayName(), "LeatherJacket_ColorBase"))
351 item_name = "LeatherJacket_Natural";
352 else if (GetGame().IsKindOf(item.GetDisplayName(), "LeatherPants_ColorBase"))
353 item_name = "LeatherPants_Natural";
354 else if (GetGame().IsKindOf(item.GetDisplayName(), "LeatherMoccasinsShoes_ColorBase"))
355 item_name = "LeatherMoccasinsShoes_Natural";
356 else if (GetGame().IsKindOf(item.GetDisplayName(), "LeatherHat_ColorBase"))
357 item_name = "LeatherHat_Natural";
358 if (item_name != "")
359 {
361 lambda.SetTransferParams(true, true, true);
362 player.ServerReplaceItemWithNew(lambda);
364 }
365 }
366 else
367 {
368 bleach.Delete();
369 break;
370 }
371 }
372 }
373 if (bleach)
374 bleach.SetQuantity(bleach_amount);
375 if (item_name != "")
376 Lock(10);
377 }
void Lock(float actiontime)
proto native CGame GetGame()
const int BAREL_BLEACH_PER_CLOTH
Definition constants.c:824

References GameConstants::BAREL_BLEACH_PER_CLOTH, GetGame(), and Lock().

Referenced by DetermineAction().

◆ CanDetachAttachment()

override bool Barrel_ColorBase::CanDetachAttachment ( EntityAI parent)
inlineprotected

Definition at line 478 of file Barrel_ColorBase.c.

479 {
480 if (GetNumberOfItems() == 0)
481 return true;
482 return false;
483 }
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition ItemBase.c:8059

References GetNumberOfItems().

◆ CanPutInCargo()

override bool Barrel_ColorBase::CanPutInCargo ( EntityAI parent)
inlineprotected

Definition at line 443 of file Barrel_ColorBase.c.

444 {
445 if (!super.CanPutInCargo(parent))
446 return false;
447
448 if (GetNumberOfItems() == 0 && !IsOpen())
449 return true;
450
451 return false;
452 }
override bool IsOpen()

References GetNumberOfItems(), and IsOpen().

◆ CanPutIntoHands()

override bool Barrel_ColorBase::CanPutIntoHands ( EntityAI parent)
inlineprotected

Definition at line 454 of file Barrel_ColorBase.c.

455 {
456 if (!super.CanPutIntoHands(parent))
457 return false;
458
459 if (GetNumberOfItems() == 0 && (GetInventory().IsAttachment() || !IsOpen()))
460 return true;
461
462 return false;
463 }

References GetNumberOfItems(), and IsOpen().

◆ CanReceiveItemIntoCargo()

override bool Barrel_ColorBase::CanReceiveItemIntoCargo ( EntityAI item)
inlineprotected

Definition at line 465 of file Barrel_ColorBase.c.

466 {
467 if (IsOpen())
468 return super.CanReceiveItemIntoCargo(item);
469
470 return false;
471 }

References IsOpen().

◆ CanReleaseCargo()

override bool Barrel_ColorBase::CanReleaseCargo ( EntityAI attachment)
inlineprotected

Definition at line 473 of file Barrel_ColorBase.c.

474 {
475 return IsOpen();
476 }

References IsOpen().

◆ Close()

override void Barrel_ColorBase::Close ( )
inlineprotected

Definition at line 85 of file Barrel_ColorBase.c.

86 {
87 m_Openable.Close();
88 m_RainProcComponent.StopRainProcurement();
90 SetTakeable(true);
91
93 }
override void SetTakeable(bool pState)
Definition ItemBase.c:8905
void SoundSynchRemote()
Definition ItemBase.c:8945

References m_Openable, m_RainProcComponent, SetTakeable(), SoundSynchRemote(), and UpdateVisualState().

Referenced by DetermineAction(), and OnWasDetached().

◆ CloseLoad()

void Barrel_ColorBase::CloseLoad ( )
inlineprotected

Definition at line 95 of file Barrel_ColorBase.c.

96 {
97 m_Openable.Close();
98 m_RainProcComponent.StopRainProcurement();
99 SetSynchDirty();
100 SetTakeable(true);
101
103 }

References m_Openable, m_RainProcComponent, SetTakeable(), and UpdateVisualState().

Referenced by OnStoreLoad().

◆ ColourClothes()

void Barrel_ColorBase::ColourClothes ( ItemBase rci,
ItemBase gci,
ItemBase bci,
PlayerBase player )
inlineprotected

Definition at line 379 of file Barrel_ColorBase.c.

380 {
382 float r = 0;
383 float g = 0;
384 float b = 0;
385 float a = 1; //alpha
386 int item_count = GetInventory().GetCargo().GetItemCount();
387 bool was_colored = false;
388 if (rci)
389 {
390 r = rci.GetQuantity() / 10;
391 r = Math.Clamp(r, 0, 0.78); //TODO adjust clamp as needed, full RGB would result in a white item
392 }
393 if (gci)
394 {
395 g = gci.GetQuantity() / 10;
396 g = Math.Clamp(g, 0, 0.78);
397 }
398 if (bci)
399 {
400 b = bci.GetQuantity() / 10;
401 b = Math.Clamp(b, 0, 0.78);
402 }
403 for (int i = 0; i < item_count; i++)
404 {
405 item = GetInventory().GetCargo().GetItem(i);
406 if (item.IsClothing())
407 {
408 if (GetGame().ObjectIsKindOf(item, "TShirt_White") || GetGame().ObjectIsKindOf(item, "Armband_White"))
409 {
411 int index = itemIB.GetType().IndexOf("_");
412 string itemtype = itemIB.GetType().Substring(0, index + 1);
413
415 clambda.SetTransferParams(true, true, true);
416 MiscGameplayFunctions.TurnItemIntoItemEx(player, clambda);
417 was_colored = true;
418 }
419 }
420 }
421
422 if (was_colored)
423 {
424 if (rci)
425 {
426 //rci.AddQuantity(-r*10,true,false);
427 rci.Delete();
428 }
429 if (gci)
430 {
431 //gci.AddQuantity(-g*10,true,false);
432 gci.Delete();
433 }
434 if (bci)
435 {
436 //bci.AddQuantity(-b*10,true,false);
437 bci.Delete();
438 }
439 Lock(30);
440 }
441 }
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'.

References Math::Clamp(), GetGame(), and Lock().

Referenced by DetermineAction().

◆ ColourLeatherClothes()

void Barrel_ColorBase::ColourLeatherClothes ( ItemBase color_source,
PlayerBase player,
string color )
inlineprotected

Definition at line 286 of file Barrel_ColorBase.c.

287 {
289 int item_count = GetInventory().GetCargo().GetItemCount();
290 string item_name = "";
291
292
293 for (int i = 0; i < item_count; i++)
294 {
295 item = GetInventory().GetCargo().GetItem(i);
296 if (item.IsClothing())
297 {
298 if (GetGame().ObjectIsKindOf(item, "LeatherSack_Natural"))
299 item_name = "Bag_LeatherSack_" + color;
300 else if (GetGame().ObjectIsKindOf(item, "LeatherStorageVest_Natural"))
301 item_name = "Vest_LeatherStorage_" + color;
302 else if (GetGame().ObjectIsKindOf(item, "LeatherJacket_Natural"))
303 item_name = "Top_LeatherJacket_" + color;
304 else if (GetGame().ObjectIsKindOf(item, "LeatherPants_Natural"))
305 item_name = "Pants_LeatherPants_" + color;
306 else if (GetGame().ObjectIsKindOf(item, "LeatherMoccasinsShoes_Natural"))
307 item_name = "Shoes_LeatherMoccasins_" + color;
308 else if (GetGame().ObjectIsKindOf(item, "LeatherHat_Natural"))
309 item_name = "Hat_Leather_" + color;
310 if (item_name != "")
311 {
313 lambda.SetTransferParams(true, true, true);
314 player.ServerReplaceItemWithNew(lambda);
315 }
316 }
317 }
318 if (item_name != "")
319 Lock(20);
320 }

References GetGame(), and Lock().

Referenced by DetermineAction().

◆ DetermineAction()

void Barrel_ColorBase::DetermineAction ( PlayerBase player)
inlineprotected

Definition at line 178 of file Barrel_ColorBase.c.

179 {
180 int slot_id;
183 ingredient = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
184 if (ingredient && GetQuantity() > 10000)
186 else
187 {
188 slot_id = InventorySlots.GetSlotIdFromString("Material_Nails");
189 ingredient = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
190 if (ingredient && GetQuantity() > 10000)
192 else
193 {
195 ingredient = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
196 if (ingredient && GetQuantity() > 10000)
198 else
199 {
201 ingredient = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
202 if (ingredient && GetQuantity() > 10000)
204 else
205 {
206
208 ingredient = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
209 if (ingredient && GetQuantity() > 10000)
211 else
212 {
214 ingredient = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
216 ItemBase reactant = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
217 if (ingredient && reactant && GetQuantity() > 5000)
219 else
220 {
222 ItemBase ingredientR = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
224 ItemBase ingredientG = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
226 ItemBase ingredientB = ItemBase.Cast(GetInventory().FindAttachment(slot_id));
227 if ((ingredientR || ingredientG || ingredientB) && GetQuantity() > 10000)
229 }
230 }
231 }
232 }
233 }
234 }
235 Close();
236 }
override float GetQuantity()
Definition ItemBase.c:7995
override void Close()
void ColourLeatherClothes(ItemBase color_source, PlayerBase player, string color)
void BleachClothes(ItemBase bleach, PlayerBase player)
void ProduceFertilizer(ItemBase guts, ItemBase plant, PlayerBase player)
void ColourClothes(ItemBase rci, ItemBase gci, ItemBase bci, PlayerBase player)
void TanPelts(ItemBase lime, PlayerBase player)
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id

References BleachClothes(), Close(), ColourClothes(), ColourLeatherClothes(), GetQuantity(), InventorySlots::GetSlotIdFromString(), ProduceFertilizer(), and TanPelts().

◆ EECargoIn()

override void Barrel_ColorBase::EECargoIn ( EntityAI item)
inlineprotected

Definition at line 29 of file Barrel_ColorBase.c.

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

◆ GetDamageSystemVersionChange()

override int Barrel_ColorBase::GetDamageSystemVersionChange ( )
inlineprotected

Definition at line 24 of file Barrel_ColorBase.c.

25 {
26 return 110;
27 }

◆ GetLiquidThroughputCoef()

override float Barrel_ColorBase::GetLiquidThroughputCoef ( )
inlineprotected

Definition at line 501 of file Barrel_ColorBase.c.

502 {
504 }
const float LIQUID_THROUGHPUT_BARREL
Definition constants.c:530

References LIQUID_THROUGHPUT_BARREL.

◆ GetPlaceSoundset()

override string Barrel_ColorBase::GetPlaceSoundset ( )
inlineprotected

Definition at line 495 of file Barrel_ColorBase.c.

496 {
497 return "placeBarrel_SoundSet";
498 }

◆ IsLocked()

bool Barrel_ColorBase::IsLocked ( )
inlineprotected

Definition at line 60 of file Barrel_ColorBase.c.

61 {
62 return m_IsLocked;
63 }

References m_IsLocked.

◆ IsOpen()

override bool Barrel_ColorBase::IsOpen ( )
inlineprotected

Definition at line 105 of file Barrel_ColorBase.c.

106 {
107 return m_Openable.IsOpened();
108 }

References m_Openable.

Referenced by CanPutInCargo(), CanPutIntoHands(), CanReceiveItemIntoCargo(), CanReleaseCargo(), OnVariablesSynchronized(), and UpdateVisualState().

◆ Lock()

void Barrel_ColorBase::Lock ( float actiontime)
inlineprotected

Definition at line 166 of file Barrel_ColorBase.c.

167 {
168 m_IsLocked = true;
169 m_BarrelOpener.Run(actiontime, this, "Unlock", NULL, false);
170 }

References m_BarrelOpener, and m_IsLocked.

Referenced by BleachClothes(), ColourClothes(), ColourLeatherClothes(), ProduceFertilizer(), and TanPelts().

◆ OnDebugSpawn()

override void Barrel_ColorBase::OnDebugSpawn ( )
inlineprotected

Definition at line 516 of file Barrel_ColorBase.c.

517 {
519 }
void SetQuantityMax()
Definition ItemBase.c:7905

References SetQuantityMax().

◆ OnPlacementComplete()

override void Barrel_ColorBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprotected

Definition at line 488 of file Barrel_ColorBase.c.

489 {
490 super.OnPlacementComplete(player, position, orientation);
491
492 SetIsPlaceSound(true);
493 }
void SetIsPlaceSound(bool is_place_sound)
Definition ItemBase.c:8962

References SetIsPlaceSound().

◆ OnStoreLoad()

override bool Barrel_ColorBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 43 of file Barrel_ColorBase.c.

44 {
45 if (!super.OnStoreLoad(ctx, version))
46 return false;
47
48 bool opened;
49 if (version >= 110 && !ctx.Read(opened))
50 return false;
51
52 if (opened)
53 OpenLoad();
54 else
55 CloseLoad();
56
57 return true;
58 }

References CloseLoad(), and OpenLoad().

◆ OnStoreSave()

override void Barrel_ColorBase::OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 36 of file Barrel_ColorBase.c.

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

References m_Openable.

◆ OnVariablesSynchronized()

override void Barrel_ColorBase::OnVariablesSynchronized ( )
inlineprotected

Definition at line 138 of file Barrel_ColorBase.c.

139 {
140 super.OnVariablesSynchronized();
141
142 if (IsPlaceSound())
145 {
146 if (IsOpen())
148 else if (!IsOpen())
150 }
152 }
void PlayPlaceSound()
Definition ItemBase.c:9027
bool IsPlaceSound()
Definition ItemBase.c:8967
override bool IsBeingPlaced()
Definition ItemBase.c:5625
bool IsSoundSynchRemote()
Definition ItemBase.c:8952
bool m_Initialized

References IsBeingPlaced(), IsOpen(), IsPlaceSound(), IsSoundSynchRemote(), m_Initialized, PlayPlaceSound(), SoundBarrelClosePlay(), SoundBarrelOpenPlay(), and UpdateVisualState().

◆ OnWasAttached()

override void Barrel_ColorBase::OnWasAttached ( EntityAI parent,
int slot_id )
inlineprotected

Definition at line 110 of file Barrel_ColorBase.c.

111 {
112 super.OnWasAttached(parent, slot_id);
113
114 Open();
115 }
override void Open()

References Open().

◆ OnWasDetached()

override void Barrel_ColorBase::OnWasDetached ( EntityAI parent,
int slot_id )
inlineprotected

Definition at line 117 of file Barrel_ColorBase.c.

118 {
119 super.OnWasDetached(parent, slot_id);
120
121 Close();
122 }

References Close().

◆ Open()

override void Barrel_ColorBase::Open ( )
inlineprotected

Definition at line 65 of file Barrel_ColorBase.c.

66 {
67 m_Openable.Open();
68 m_RainProcComponent.StartRainProcurement();
70 SetTakeable(false);
71
73 }

References m_Openable, m_RainProcComponent, SetTakeable(), SoundSynchRemote(), and UpdateVisualState().

Referenced by OnWasAttached(), and Unlock().

◆ OpenLoad()

void Barrel_ColorBase::OpenLoad ( )
inlineprotected

Definition at line 75 of file Barrel_ColorBase.c.

76 {
77 m_Openable.Open();
78 m_RainProcComponent.StartRainProcurement();
79 SetSynchDirty();
80 SetTakeable(false);
81
83 }

References m_Openable, m_RainProcComponent, SetTakeable(), and UpdateVisualState().

Referenced by OnStoreLoad().

◆ ProduceFertilizer()

void Barrel_ColorBase::ProduceFertilizer ( ItemBase guts,
ItemBase plant,
PlayerBase player )
inlineprotected

Definition at line 238 of file Barrel_ColorBase.c.

239 {
241
242 guts.Delete();
243 plant.Delete();
244
245 ItemBase lime = ItemBase.Cast(GetInventory().CreateInInventory("GardenLime"));
246
247 lime.SetQuantity(lime_quantity);
248 Lock(50);
249 }
const float BAREL_LIME_PER_PLANT
Definition constants.c:825

References GameConstants::BAREL_LIME_PER_PLANT, and Lock().

Referenced by DetermineAction().

◆ SetActions()

override void Barrel_ColorBase::SetActions ( )
inlineprotected

Definition at line 506 of file Barrel_ColorBase.c.

References AddAction().

◆ SoundBarrelClosePlay()

void Barrel_ColorBase::SoundBarrelClosePlay ( )
inlineprotected

Definition at line 160 of file Barrel_ColorBase.c.

161 {
162 EffectSound sound = SEffectManager.PlaySound("barrel_close_SoundSet", GetPosition());
163 sound.SetAutodestroy(true);
164 }
class JsonUndergroundAreaTriggerData GetPosition
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
Manager class for managing Effect (EffectParticle, EffectSound)
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.

References GetPosition, and SEffectManager::PlaySound().

Referenced by OnVariablesSynchronized().

◆ SoundBarrelOpenPlay()

void Barrel_ColorBase::SoundBarrelOpenPlay ( )
inlineprotected

Definition at line 154 of file Barrel_ColorBase.c.

155 {
156 EffectSound sound = SEffectManager.PlaySound("barrel_open_SoundSet", GetPosition());
157 sound.SetAutodestroy(true);
158 }

References GetPosition, and SEffectManager::PlaySound().

Referenced by OnVariablesSynchronized().

◆ TanPelts()

void Barrel_ColorBase::TanPelts ( ItemBase lime,
PlayerBase player )
inlineprotected

Definition at line 251 of file Barrel_ColorBase.c.

252 {
254 int item_count = GetInventory().GetCargo().GetItemCount();
255 int pelt_count = 0;
257
258
259 for (int i = 0; i < item_count; i++)
260 {
261 item = GetInventory().GetCargo().GetItem(i);
262 if (item.IsPeltBase())
263 {
264 pelt_count = g_Game.ConfigGetInt("cfgVehicles " + item.GetType() + " peltGain");
265 if (pelt_count <= lime_amount)
266 {
268 lambda.SetTransferParams(true, true, true);
269 player.ServerReplaceItemWithNew(lambda);
270
272 if (lime_amount <= 0)
273 {
274 lime.Delete();
275 break;
276 }
277 }
278 }
279 }
280 if (lime)
282 if (pelt_count > 0)
283 Lock(30);
284 }
DayZGame g_Game
Definition DayZGame.c:3528
const int BAREL_LIME_PER_PELT
Definition constants.c:823
static proto float Floor(float f)
Returns floor of value.

References GameConstants::BAREL_LIME_PER_PELT, Math::Floor(), g_Game, and Lock().

Referenced by DetermineAction().

◆ Unlock()

void Barrel_ColorBase::Unlock ( )
inlineprotected

Definition at line 172 of file Barrel_ColorBase.c.

173 {
174 m_IsLocked = false;
175 Open();
176 }

References m_IsLocked, and Open().

◆ UpdateVisualState()

void Barrel_ColorBase::UpdateVisualState ( )
inlineprotected

Definition at line 124 of file Barrel_ColorBase.c.

125 {
126 if (IsOpen())
127 {
128 SetAnimationPhase("Lid", 1);
129 SetAnimationPhase("Lid2", 0);
130 }
131 else
132 {
133 SetAnimationPhase("Lid", 0);
134 SetAnimationPhase("Lid2", 1);
135 }
136 }

References IsOpen().

Referenced by Close(), CloseLoad(), OnVariablesSynchronized(), Open(), and OpenLoad().

Member Data Documentation

◆ m_BarrelOpener

ref Timer Barrel_ColorBase::m_BarrelOpener
private

Definition at line 4 of file Barrel_ColorBase.c.

Referenced by Barrel_ColorBase(), and Lock().

◆ m_IsLocked

bool Barrel_ColorBase::m_IsLocked = false
private

Definition at line 3 of file Barrel_ColorBase.c.

Referenced by IsLocked(), Lock(), and Unlock().

◆ m_Openable

ref OpenableBehaviour Barrel_ColorBase::m_Openable
protected

Definition at line 7 of file Barrel_ColorBase.c.

Referenced by Barrel_ColorBase(), Close(), CloseLoad(), IsOpen(), OnStoreSave(), Open(), and OpenLoad().

◆ m_RainProcComponent

ref RainProcurementComponentBarrel Barrel_ColorBase::m_RainProcComponent
protected

Definition at line 6 of file Barrel_ColorBase.c.

Referenced by Barrel_ColorBase(), Close(), CloseLoad(), Open(), and OpenLoad().

◆ m_RainProcurement

ref RainProcurementManager Barrel_ColorBase::m_RainProcurement
protected

Definition at line 524 of file Barrel_ColorBase.c.

Referenced by Barrel_ColorBase().


The documentation for this class was generated from the following file: