23 {
25
28
30 {
32 }
33 else
34 {
36 }
37
38 Transport vehicle = Transport.Cast(action_data.m_Target.GetObject());
39 m_QuantityUsedPerSecond *= Math.Min(action_data.m_MainItem.GetLiquidThroughputCoef(),vehicle.GetLiquidThroughputCoef());
40
41 Car car = Car.Cast(vehicle);
42 Boat boat = Boat.Cast(vehicle);
43
44 float fuelCapacity, currentFuel;
45 if (car)
46 {
47 fuelCapacity = car.GetFluidCapacity(
CarFluid.FUEL );
48 currentFuel = car.GetFluidFraction(
CarFluid.FUEL );
49 }
50 else if (boat)
51 {
52 fuelCapacity = boat.GetFluidCapacity(
BoatFluid.FUEL );
53 currentFuel = boat.GetFluidFraction(
BoatFluid.FUEL );
54 }
55
56
57 currentFuel = currentFuel * fuelCapacity;
60
63
64 }
BoatFluid
Type of vehicle's fluid. (native, do not change or extend)
CarFluid
Type of vehicle's fluid. (native, do not change or extend)
ref Param1< float > m_SpentUnits
float m_QuantityUsedPerSecond