1753 {
1754 int state = ECarOperationalState.OK;
1755
1757
1758 if (
IsDamageDestroyed() || GetHealthLevel(
"Engine") >= GameConstants.STATE_RUINED)
1759 {
1760 state |= ECarOperationalState.RUINED;
1761 }
1762
1764 {
1765 state |= ECarOperationalState.NO_FUEL;
1766 }
1767
1769 {
1772 if (!item || (item && (item.IsRuined() || item.GetCompEM().GetEnergy() < batteryConsume)))
1773 state |= ECarOperationalState.NO_BATTERY;
1774 }
1775
1777 {
1778 item = FindAttachmentBySlotName("SparkPlug");
1779 if (!item || (item && item.IsRuined()))
1780 state |= ECarOperationalState.NO_IGNITER;
1781 }
1782
1784 {
1785 item = FindAttachmentBySlotName("GlowPlug");
1786 if (!item || (item && item.IsRuined()))
1787 state |= ECarOperationalState.NO_IGNITER;
1788 }
1789
1790 return state;
1791 }
bool IsDamageDestroyed(ActionTarget target)
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
proto native float GetFluidFraction(MotorbikeFluid fluid)
override bool IsVitalGlowPlug()
override bool NeedElectricitySourceDevice()
override bool IsVitalSparkPlug()
float GetBatteryConsumption()