trying to call game.gettile().name inside of onchunkgenerated leads to a crash to desktop, though you can call game.gettile() without it crashing. Not sure if it's only when starting a new game or if it is because of how events are handled though.
Also, not a bug but is there a way to toggle the minimap? tried to use game.disableminimap() but obviously that didn't work lol
[0.7.5] Script bug - gettile inside of onchunkgenerated
[0.7.5] Script bug - gettile inside of onchunkgenerated
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: [0.7.5] Script bug - gettile inside of onchunkgenerated
Thanks for the report. At the moment manipulation with luatile will crash if the corresponding tile hasn't been generated yet. It shouldn't matter whether this is in onchunkgenerated callback (called after the tiles and entities are generated) or elsewhere. Obviously the game shouldn't crash:) I will put a "valid" attribute to the lua tile that will basically say whether the tile has been generated. And manipulating invalid tile will cause a script to stop (not crash). This will be done for 0.8.
As for the minimap. No it cannot be toggled from the script at the moment. The game.disableminimap() is used for the scenarios where minimap doesn't have sense, then even if the minimap is enabled in the options it will not be shown (but it doesn't change the settings).
As for the minimap. No it cannot be toggled from the script at the moment. The game.disableminimap() is used for the scenarios where minimap doesn't have sense, then even if the minimap is enabled in the options it will not be shown (but it doesn't change the settings).
Re: [0.7.5] Script bug - gettile inside of onchunkgenerated
Anyway you can add a toggle to next version? Want to add toggle minimap off when no radar or not enough energy in radar.As for the minimap. No it cannot be toggled from the script at the moment. The game.disableminimap() is used for the scenarios where minimap doesn't have sense, then even if the minimap is enabled in the options it will not be shown (but it doesn't change the settings).
Part of the code is already in place, hate to see it go to waste!
Creator of:
- DyTech
- DyWorld
- DyWorld-Dynamics
- DyWorld-Dynamics 2
Active since Factorio 0.6
- DyTech
- DyWorld
- DyWorld-Dynamics
- DyWorld-Dynamics 2
Active since Factorio 0.6