1850 {
1851 int state = ECarOperationalState.OK;
1852
1854
1855 if (IsDamageDestroyed() || GetHealthLevel("Engine") >= GameConstants.STATE_RUINED)
1856 {
1857 state |= ECarOperationalState.RUINED;
1858 }
1859
1860 if (GetFluidFraction(
CarFluid.FUEL) <= 0)
1861 {
1862 state |= ECarOperationalState.NO_FUEL;
1863 }
1864
1866 {
1869 if (!item || (item && (item.IsRuined() || item.GetCompEM().GetEnergy() < batteryConsume)))
1870 state |= ECarOperationalState.NO_BATTERY;
1871 }
1872
1873 if (IsVitalSparkPlug())
1874 {
1875 item = FindAttachmentBySlotName("SparkPlug");
1876 if (!item || (item && item.IsRuined()))
1877 state |= ECarOperationalState.NO_IGNITER;
1878 }
1879
1881 {
1882 item = FindAttachmentBySlotName("GlowPlug");
1883 if (!item || (item && item.IsRuined()))
1884 state |= ECarOperationalState.NO_IGNITER;
1885 }
1886
1887 return state;
1888 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
bool IsVitalTruckBattery()
float GetBatteryConsumption()