[0.16.XX] console commands not saved

Bugs that are actually features.
Post Reply
User avatar
Nexarius
Filter Inserter
Filter Inserter
Posts: 271
Joined: Sat May 09, 2015 7:34 pm
Contact:

[0.16.XX] console commands not saved

Post by Nexarius »

I've written a command and it works but sadly it stops working if I save and then load the map.
Could those commands be saved as well in the savefile?

script.on_event(defines.events.on_chunk_generated, function(event)
--[[stuff]]
end)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.16.XX] console commands not saved

Post by Klonan »

Thanks for the report,

Unfortunately due to the way script registrations work, we are not currently able (or willing) to make them persist through save and load

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.16.XX] console commands not saved

Post by TruePikachu »

If you need it to keep working, add it to the `control.lua` file in the savegame itself, with proper guards so it only gets invoked during init.

Post Reply

Return to “Not a bug”