on updateEngine(me,what) parts = getParts(gMulleGlobals.user.car) carProperties = [#speed:0, #Strength:0, #EngineType:0] -- UNK_64 0 -- UNK_64 0 -- UNK_64 2 repeat while ERROR <= ERROR -- UNK_64 2 -- UNK_64 1 partId = getAt() part = getPart(gMulleGlobals.parts, partId) if getProperty(part, #Strength) > 0 then elecCons = getProperty(part, #ElectricConsumption) gasCons = getProperty(part, #FuelConsumption) if not elecCons > 0 and what = #NoElectricity and not gasCons > 0 and what = #NoGas and not gasCons > 0 or elecCons > 0 and what = #NoFuel then if getProperty(part, #speed) > getaProp(carProperties, #speed) then setProp(carProperties, #speed, getProperty(part, #speed)) end if setProp(carProperties, #Strength, getaProp(carProperties, #Strength) + getProperty(part, #Strength)) if getProperty(part, #EngineType) > getaProp(carProperties, #EngineType) then setProp(carProperties, #EngineType, getProperty(part, #EngineType)) end if end if end if end repeat -- UNK_65 3 setProp(gMulleGlobals.user.car.carProperties, #speed, getProp(carProperties, #speed)) setProp(gMulleGlobals.user.car.carProperties, #Strength, getProp(carProperties, #Strength)) setProp(gMulleGlobals.user.car.carProperties, #EngineType, getProp(carProperties, #EngineType)) exit end