25 SetEnginePos(
"0 0.7 1.2");
49 super.OnEngineStart();
119 if (!super.CanReleaseAttachment(attachment))
126 string attType = attachment.GetType();
127 if (attType ==
"CarRadiator" || attType ==
"CarBattery" || attType ==
"SparkPlug")
143 if (!super.CanDisplayAttachmentCategory(category_name))
148 category_name.ToLower();
149 if (category_name.Contains(
"engine"))
162 if (!super.CanDisplayCargo())
179 Class.CastTo(carDoor, FindAttachmentBySlotName(slotType));
187 case "NivaDriverDoors":
190 case "NivaCoDriverDoors":
211 else if (GetAnimationPhase(
"SeatDriver") > 0.5)
219 else if (GetAnimationPhase(
"SeatCoDriver") > 0.5)
227 else if (GetAnimationPhase(
"SeatDriver") <= 0.5)
235 else if (GetAnimationPhase(
"SeatCoDriver") <= 0.5)
250 return "doors_driver";
253 return "doors_codriver";
256 return super.GetDoorSelectionNameFromSeatPos(posIdx);
265 return "NivaDriverDoors";
268 return "NivaCoDriverDoors";
271 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
299 if (GetHealthLevel(
"WindowFront") ==
GameConstants.STATE_RUINED)
304 if (GetHealthLevel(
"WindowLR") ==
GameConstants.STATE_RUINED)
309 if (GetHealthLevel(
"WindowRR") ==
GameConstants.STATE_RUINED)
314 return Math.Clamp(newValue, 0, 1);
318 return super.OnSound(ctrl, oldValue);
326 return "DoorsDriver";
327 case "doors_codriver":
328 return "DoorsCoDriver";
333 case "seatback_driver":
335 case "seatback_codriver":
336 return "SeatCoDriver";
347 case "seatback_driver":
349 return "seat_con_1_1";
350 case "seat_codriver":
351 case "seatback_codriver":
353 return "seat_con_2_1";
363 case "seatback_driver":
365 case "seatback_codriver":
384 if (nextSeat == 0 && GetAnimationPhase(
"SeatDriver") > 0.5)
387 if (nextSeat == 1 && GetAnimationPhase(
"SeatCoDriver") > 0.5)
393 return nextSeat == 1;
396 return nextSeat == 0;
399 return nextSeat == 3;
402 return nextSeat == 2;
410 switch (pCurrentSeat)
413 return pDoorsSelection ==
"DoorsDriver";
416 return pDoorsSelection ==
"DoorsCoDriver";
419 return pDoorsSelection ==
"DoorsDriver";
422 return pDoorsSelection ==
"DoorsCoDriver";
430 switch (pDoorSelection)
434 case "DoorsCoDriver":
448 override void OnDebugSpawn()
454 GetInventory().CreateInInventory(
"HatchbackWheel");
455 GetInventory().CreateInInventory(
"HatchbackWheel");
456 GetInventory().CreateInInventory(
"HatchbackWheel" );
457 GetInventory().CreateInInventory(
"HatchbackWheel");
459 GetInventory().CreateInInventory(
"HatchbackDoors_Driver");
460 GetInventory().CreateInInventory(
"HatchbackDoors_CoDriver");
461 GetInventory().CreateInInventory(
"HatchbackHood");
462 GetInventory().CreateInInventory(
"HatchbackTrunk");
465 GetInventory().CreateInInventory(
"HatchbackWheel");
466 GetInventory().CreateInInventory(
"HatchbackWheel");
478 GetInventory().CreateInInventory(
"HatchbackWheel");
479 GetInventory().CreateInInventory(
"HatchbackWheel");
480 GetInventory().CreateInInventory(
"HatchbackWheel");
481 GetInventory().CreateInInventory(
"HatchbackWheel");
483 GetInventory().CreateInInventory(
"HatchbackDoors_Driver_White");
484 GetInventory().CreateInInventory(
"HatchbackDoors_CoDriver_White");
485 GetInventory().CreateInInventory(
"HatchbackHood_White");
486 GetInventory().CreateInInventory(
"HatchbackTrunk_White");
489 GetInventory().CreateInInventory(
"HatchbackWheel");
490 GetInventory().CreateInInventory(
"HatchbackWheel");
502 GetInventory().CreateInInventory(
"HatchbackWheel");
503 GetInventory().CreateInInventory(
"HatchbackWheel");
504 GetInventory().CreateInInventory(
"HatchbackWheel");
505 GetInventory().CreateInInventory(
"HatchbackWheel");
507 GetInventory().CreateInInventory(
"HatchbackDoors_Driver_Blue");
508 GetInventory().CreateInInventory(
"HatchbackDoors_CoDriver_Blue");
509 GetInventory().CreateInInventory(
"HatchbackHood_Blue");
510 GetInventory().CreateInInventory(
"HatchbackTrunk_Blue");
513 GetInventory().CreateInInventory(
"HatchbackWheel");
514 GetInventory().CreateInInventory(
"HatchbackWheel");