Vehicle Wagon 2


Take with you a fully charged and battle-ready vehicle and take it on a rail trip. --------------------------------------------------------------------------------- Возьмите с собой полностью заряженный и готовый к бою транспорт и отправьте его в путешествие по железной дороге.

Content
4 days ago
0.17 - 2.0
21.2K
Transportation Trains Combat

b Crash when mining with cheat mode on

5 years ago

Steps to reproduce:
1. Place Vehicle Wagon.
2. Use winch to put Tank on Vehicle Wagon.
3. Turn on cheat mode.
4. Use pipette tool (Q) on loaded Vehicle Wagon. Cursor is given another Vehicle Wagon with tank already loaded.
5. Place new Vehicle Wagon with Tank loaded.
6. Mine new Vehicle Wagon. Instead of producing a new tank, game crashes with message:

Error while running event VehicleWagon2::on_pre_player_mined_item (ID 11)
VehicleWagon2/control.lua:429: attempt to index field '?' (a nil value)
stack traceback:
VehicleWagon2/control.lua:429: in function <VehicleWagon2/control.lua:425>

I believe the correct fix is to detect when pipette is used on loaded Vehicle Wagons and substitute an unloaded wagon (in both cheat mode and normal). I just figured this out for Multiple Unit Train Control, so I'm happy to help you with it if you want.

5 years ago

Hey. Thanks for letting me know about it.
Unfortunately, I am not at home now and I can’t quickly release an update to solve this problem. I would be very grateful if you could help me with this.
Thank you in advance!

5 years ago

I already tested and submitted a pull request to the original Vehicle-Wagon GitHub, so that SuprCheese can use it when he officially updates. The file is identical, so you can use it too: https://raw.githubusercontent.com/robot256/Vehicle-Wagon/master/control.lua

5 years ago

Thanks again for reporting the above problem.
I opened the repository on Github, I have no experience with it, but I believe that it will simplify the procedure for making changes from the community in the code.

5 years ago

Hey, someone found a bug in my code, the code that I copied in for the blueprints. I just made a pull request to your Github with the fix. You should be able to merge the pull request and immediately release it.

New response