Closed Chewybanana closed 11 months ago
Thank you very much for the rigorous and detailed report. Turns out I had omitted a category of setting, color
, which seems like it was added in a recent version. Seems like even the wiki is a bit slow to this change:
Now settings.lua
searches and converts all 5 settings types:
set_settings("bool-setting")
set_settings("int-setting")
set_settings("double-setting")
set_settings("string-setting")
set_settings("color-setting")
This fix will be in 1.1
.
Describe the bug I am trying to use draftsman with mods. The mod I am having an issue with when calling update() is ArmouredBiters_1.1.9.zip.
Current Behavior
Expected behavior A successful import!
Additional context I noticed that in the docs, the example had ArmouredBiters_1.1.5! I actually have both .zips so I snooped around and I've attached a comparison of the relevant section. In 1.1.5, the values were hard-coded in the data file, whilst in 1.1.9, they are inferred from the settings.startup field.
(1.1.9 on the left, 1.1.5 on the right)![Screenshot from 2023-09-18 17-36-12](https://github.com/redruin1/factorio-draftsman/assets/16856043/3f91ce53-3f99-4838-81d1-371315685265)
I tinkered a bit with env.py to try and see what was going on and my guess is that despite a default value being given in settings.lua, it's not loaded into
lua.globals().settings['startup']
, but it is loaded intouser_settings['startup']["ab-small-armoured-biter-color-primary"]
. For example:gives (with some output truncated):
However, the user setting isn't applied because the default is somehow not present. But I'm not very knowledgeable about factorio modding or lua, so just I hope any of this is helpful.
Please also include the following: Draftsman version:
1.0.6
Python version:3.8.5