stijnwop / hoseSystem

Hose system modification for Farming Simulator 2017
13 stars 4 forks source link

Remove magic grabPoint index logic #44

Open stijnwop opened 6 years ago

stijnwop commented 6 years ago

There are checks all over the place checking if the current index > 1 or the inverted checks.

Fix this by setting the first and last index in the xml. This will also allows it to add more grabPoints.

e.g: https://github.com/stijnwop/hoseSystem/blob/1f90175fcb4f7e5662d0caa5b55475ae6ee0c321/specializations/HoseSystemPlayerInteractiveHandling.lua#L332

https://github.com/stijnwop/hoseSystem/blob/1f90175fcb4f7e5662d0caa5b55475ae6ee0c321/specializations/HoseSystemPlayerInteractiveHandling.lua#L682

Nasty stuff.