[Rseding91] [0.15.34] Comands don't persist through save-load

Bugs that are actually features.
Bilka
Factorio Staff
Factorio Staff
Posts: 3677
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[Rseding91] [0.15.34] Comands don't persist through save-load

Post by Bilka »

Commands added through commands.add_command in script.on_init are not available after save + load. This suggests that added commands do not persist between save + load. Since I can't find any documentation on it, this might be intended behaviour, and not a bug. If it is intended, please note that in the api doc. (Looking at that doc, I think either game_commands or commands should have a different description than the other. Their difference is currently not clear.)

Edit: I was informed that this is intended behaviour. So please see this bug report as a request to mention this in the api documentation.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [Rseding91] [0.15.34] Comands don't persist through save-load

Post by kovarex »

I have no idea how this should work, so I'm leaving it on Rseding91.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16423
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.15.34] Comands don't persist through save-load

Post by Rseding91 »

That's intended behavior. Commands work identically to events in that you have to re-register them every time the game starts.

The docs are already changed in 0.16 to say so.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”