i'm not sure if this is a bug or just the outcome of an undocumented change in the lua api, but in version 0.15.10 i suddenly experienced problems with my mod that sets LuaControl.riding_state to achieve automated acceleration of the player's vehicle.
Until 0.15.9 it was necessary to set the riding_state property each tick using
Code: Select all
riding_state(acceleration = defines.riding.acceleration.accelerating; direction = player.vehicle.direction)
Apparently this has changed: It seems that there is no longer a reset of the acceleration state to "defines.riding.acceleration.nothing" per tick, resulting in ongoing acceleration until i press one of the WASD keys (this seems to reset the riding_state). Is this behaviour intended?
How to reproduce:
- Start a sandbox world with the attached mod and give all techs
- Set "Mod-Settings/Per Player/Alternative toggle mode for cruise control" to true (this makes it easier to show the differences)
- Place a car and get in, make sure there is enough space for the car to accelerate
- Press [CTRL+O] to set the cruise control speed to 200
- Press [W] one time, the car will accelerate now
- Press [O] to disable cruise control:
-> In 0.15.9, the car will now slowly decelerate
-> in 0.15.10, the car will continue to accelerate until one of the WASD keys is pressed