Request a syntax
Posted: Fri Jan 28, 2022 12:23 pm
I just started to learn how to make modules. Please help me. Thank you.
I want to get the value of one of the items in "settings. Lua". My English level is not high and I may not express clearly. The following example explains:
Otherwise, setting 2 will be hidden. I don't know how to get the value of setting 1
It is unrecognizable to use "settings. Startup [" setting1 "]. Value". How can I express this variable
I want to get the value of one of the items in "settings. Lua". My English level is not high and I may not express clearly. The following example explains:
I mean, if setting 1 is true, then setting 2 is displayedif 。。。。。== true then hidden_1 = false
else hidden_1 = true
end
data:extend({
{
type = "bool-setting",
name = "setting1",
setting_type = "startup",
default_value = false,
},
{
type = "bool-setting",
name = "setting2",
setting_type = "startup",
default_value = false,
hidden = hidden_1
},
})
Otherwise, setting 2 will be hidden. I don't know how to get the value of setting 1
It is unrecognizable to use "settings. Startup [" setting1 "]. Value". How can I express this variable