-
Notifications
You must be signed in to change notification settings - Fork 4
/
settings.lua
31 lines (26 loc) · 934 Bytes
/
settings.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- See https://wiki.factorio.com/Tutorial:Mod_settings#Reading_settings
require("defines")
--- Adds settings for commands
if mods["BetterCommands"] then
local is_ok, better_commands = pcall(require, "__BetterCommands__/BetterCommands/control")
if is_ok then
better_commands.COMMAND_PREFIX = MOD_SHORT_NAME
better_commands.create_settings(MOD_PATH, MOD_SHORT_NAME) -- Adds switchable commands
end
end
-- Just an example
-- https://wiki.factorio.com/Tutorial:Mod_settings#Creation
-- data:extend({
-- {
-- type = "int-setting",
-- name = "my-unique-setting",
-- setting_type = "startup", -- or runtime-global or runtime-per-user
-- minimum_value = 1,
-- maximum_value = 1000,
-- default_value = 100,
-- localised_name = {"Example"}, -- Optional
-- localised_description = {"Example"}, -- Optional
-- order = "any-order", -- Optional
-- hidden = false -- Optional (false by default)
-- }
-- })