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

Private Member Functions

override bool CanPutAsAttachment (EntityAI parent)
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 

Detailed Description

Definition at line 277 of file InventoryItem.c.

Member Function Documentation

◆ CanPutAsAttachment()

override bool CarWheel_Ruined::CanPutAsAttachment ( EntityAI parent)
inlineprivate

Definition at line 279 of file InventoryItem.c.

280 {
281 // So that the lambda can always put it to the Transport
282 if (parent.IsInherited(Transport) && parent.IsRuined())
283 {
285 if (GetInventory().GetCurrentInventoryLocation(loc))
286 return loc.GetType() == InventoryLocationType.UNKNOWN;
287
288 return false;
289 }
290
291 if (!super.CanPutAsAttachment(parent))
292 return false;
293
294 return true;
295 }
InventoryLocationType
types of Inventory Location
InventoryLocation.
Base native class for all motorized wheeled vehicles.
Definition Car.c:75

◆ EEHealthLevelChanged()

override void CarWheel_Ruined::EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprivate

Definition at line 297 of file InventoryItem.c.

298 {
299 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
300#ifdef DEVELOPER
301 // used when fixing the whole car through debug
303 {
304 string newWheel = "";
305 switch (GetType())
306 {
307 case "HatchbackWheel_Ruined":
308 newWheel = "HatchbackWheel";
309 break;
310
311 case "CivSedanWheel_Ruined":
312 newWheel = "CivSedanWheel";
313 break;
314
315 case "Hatchback_02_Wheel_Ruined":
316 newWheel = "Hatchback_02_Wheel";
317 break;
318
319 case "Sedan_02_Wheel_Ruined":
320 newWheel = "Sedan_02_Wheel";
321 break;
322
323 case "Truck_01_Wheel_Ruined":
324 newWheel = "Truck_01_Wheel";
325 break;
326
327 case "Truck_01_WheelDouble_Ruined":
328 newWheel = "Truck_01_WheelDouble";
329 break;
330
331 case "Offroad_02_Wheel_Ruined":
332 newWheel = "Offroad_02_Wheel";
333 break;
334 }
335
336 if (newWheel != "")
337 {
338 //Unlock to allow creating a new item
339 if (IsLockedInSlot())
341
343 lambda.SetTransferParams(true, true, true);
344 GetInventory().ReplaceItemWithNew(InventoryMode.SERVER, lambda);
345 }
346 }
347#endif
348 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Definition Inventory.c:22
eBleedingSourceType GetType()
void ReplaceWheelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
void UnlockFromParent()
Unlocks this item from its attachment slot of its parent.
Definition ItemBase.c:5516
const int STATE_PRISTINE
Definition constants.c:761

References GetType(), ReplaceWheelLambda(), GameConstants::STATE_PRISTINE, and UnlockFromParent().


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