[0.16.51] LuaGameScript.map_settings API documentation
- Muppet9010
- Filter Inserter
- Posts: 278
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
[0.16.51] LuaGameScript.map_settings API documentation
The documentation under LuaGameScript for map_settings states it is read only. However it appears it can be changed in a test of pathing settings. Also under Concepts for MapSettings it states they can be changed.
Re: [0.16.51] LuaGameScript.map_settings API documentation
Thanks for the report however the API documentation is correct.
You can't write directly to map_settings:
Will produce an error.
You can write to things *on* map settings - but you can't write the map_settings value itself.
You can't write directly to map_settings:
Code: Select all
game.map_settings = {}
You can write to things *on* map settings - but you can't write the map_settings value itself.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.16.51] LuaGameScript.map_settings API documentation
Posila explained it to me this way: viewtopic.php?f=23&t=59647&p=356996#p357001
- Muppet9010
- Filter Inserter
- Posts: 278
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
Re: [0.16.51] LuaGameScript.map_settings API documentation
could the documentation be amended to specify this Rseding to make it clearer?
that the game.map_settings references a table of editable values, but the table itself is not editable.
I know it seems minor, but for those of us not intricately familiar with Factorio the API documentation is our best direction on how to approach things. It took me a while to find the references that said the values of the table could be changed after seeing that game.map_settings itslef is read only.
sorry for late reply, missed the notification of reply.
that the game.map_settings references a table of editable values, but the table itself is not editable.
I know it seems minor, but for those of us not intricately familiar with Factorio the API documentation is our best direction on how to approach things. It took me a while to find the references that said the values of the table could be changed after seeing that game.map_settings itslef is read only.
sorry for late reply, missed the notification of reply.
Re: [0.16.51] LuaGameScript.map_settings API documentation
At the moment it's not a simple change to make the documentation script mark things that work that way as working that way. From the scripts perspective something is read, write, read/write, or a method. It doesn't understand that something can be read and then have values on it written. It just documents the immediate property/method as to how the immediate class its on exposes it.
If you want to get ahold of me I'm almost always on Discord.