Return value for LuaEntity.set_driver() and LuaEntity.set_passenger()

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Return value for LuaEntity.set_driver() and LuaEntity.set_passenger()

Post by Pi-C »

LuaEntity.set_driver() and LuaEntity.set_passenger() will silently fail if allow_passengers has been set to false in the vehicle prototype. I think it might be useful to get some feedback when running these commands. Returning true if driver or passenger have been successfully set or removed, and false if the prototype doesn't allow for driver/passenger, would seem like a good idea.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Modding interface requests”