1981 {
1982 int state = ECarOperationalState.OK;
1983
1985
1986 if (IsDamageDestroyed() || GetHealthLevel("Engine") >= GameConstants.STATE_RUINED)
1987 {
1988 state |= ECarOperationalState.RUINED;
1989 }
1990
1991 if (GetFluidFraction(
CarFluid.FUEL) <= 0)
1992 {
1993 state |= ECarOperationalState.NO_FUEL;
1994 }
1995
1997 {
2000 if (!item || (item && (item.IsRuined() || item.GetCompEM().GetEnergy() < batteryConsume)))
2001 state |= ECarOperationalState.NO_BATTERY;
2002 }
2003
2004 if (IsVitalSparkPlug())
2005 {
2006 item = FindAttachmentBySlotName("SparkPlug");
2007 if (!item || (item && item.IsRuined()))
2008 state |= ECarOperationalState.NO_IGNITER;
2009 }
2010
2012 {
2013 item = FindAttachmentBySlotName("GlowPlug");
2014 if (!item || (item && item.IsRuined()))
2015 state |= ECarOperationalState.NO_IGNITER;
2016 }
2017
2018 return state;
2019 }
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
bool IsVitalTruckBattery()
float GetBatteryConsumption()