A small Space Age-dependent mod reproducing the problem is attached to this post. To reproduce, create a new Freeplay game and select Gleba in the remote view.
When a mod script changes the currently controlled vehicle, the result might create a buggy vehicle with no driver but which can not be entered into. Specifically, I found the following steps to reproduce the problem:
1. the player is sitting in a space platform
2. the mod puts the player into a driver seat of a vehicle on one surface by script
3. the player changes to a different planet surface in remote view
4. the mod puts the player into a driver seat of a vehicle on that different planet surface
As a result, I have observed one of the two things happening:
1. the player is unable to see any other surface via remote view until pressing ESC. Afterwards, the vehicle on the first surface has no driver (as in, get_driver() returns nil) but can no longer be driven remotely (via script or otherwise); all attempts end with the "Vehicle already has a driver" error.
2. (rare) pressing ESC switches between two vehicles in a loop; trying to remote view any other surface ends the loop and results in a vehicle that was not driven when the loop was broken to be in the same state as in the previous case.
This vehicle state persists on save; however, if the vehicle is cloned, the clone can be driven normally.
The log from one of the runs is attached as well.
[Lou][2.0.76] Using scripts to change player vehicle can create a vehicle with no driver that cannot be entered
[Lou][2.0.76] Using scripts to change player vehicle can create a vehicle with no driver that cannot be entered
- Attachments
-
- factorio-current.log
- (8.3 KiB) Downloaded 10 times
-
- who-is-driving_1.0.0.zip
- (1.16 KiB) Downloaded 14 times
