stijnwop / manureSystem

Manure System modification for Farming Simulator 2022
GNU General Public License v3.0
96 stars 58 forks source link

limitedFillDirection not working properly #154

Closed SgtRoyal closed 3 years ago

SgtRoyal commented 3 years ago

I tried to limit the fill direction of a fillarm with imitedFillDirection="OUT" but that will cause an error.

2021-04-17 21:26 Error: Running LUA method 'loadSharedI3DFileFinished'.
2021-04-17 21:26 F:/Programme/FarmingSim/mods/FS19_manureSystem/src/vehicles/ManureSystemFillArm.lua:179: attempt to index global 'HoseSystemPumpMotor' (a nil value)

Line 179 ind the ManureSystemFillArm.lua reads as following:

fillArm.limitedFillDirection = limit:upper() == ManureSystemPumpMotor.PUMP_DIRECTION_IN_STR and ManureSystemPumpMotor.PUMP_DIRECTION_IN or HoseSystemPumpMotor.PUMP_DIRECTION_OUT

changing HoseSystemPumpMotor to ManureSystemPumpMotor will resolve this problem.

Limiting the fill direction now works somewhat properly however the default direction is "IN" so as you start the game you can still use the fillarm to fill your trailer. After switching to "OUT" everything works fine, as you can't switch back to "IN".

stijnwop commented 3 years ago

Pushed a fix for both addressed isses