mirror of
https://github.com/Mestima/wanda.git
synced 2025-05-03 13:40:15 +00:00
new config options
This commit is contained in:
parent
68501c93ce
commit
524441569b
@ -34,5 +34,25 @@ configuration_options = {
|
||||
{ description = "中文", data = "chi" },
|
||||
},
|
||||
default = "eng"
|
||||
},
|
||||
{
|
||||
name = "clock_tools",
|
||||
label = "Clockmaker's Tools storable",
|
||||
hover = "Can store Clockmaker's Tools or not",
|
||||
options = {
|
||||
{ description = "you can", data = true },
|
||||
{ description = "you can't", data = false }
|
||||
},
|
||||
default = true
|
||||
},
|
||||
{
|
||||
name = "time_pieces",
|
||||
label = "Time Pieces storable",
|
||||
hover = "Can store Time Pieces or not",
|
||||
options = {
|
||||
{ description = "you can", data = true },
|
||||
{ description = "you can't", data = false }
|
||||
},
|
||||
default = true
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
local containers = require("containers")
|
||||
|
||||
local storable = {
|
||||
["pocketwatch_dismantler"] = GetModConfigData("clock_tools"),
|
||||
["pocketwatch_parts"] = GetModConfigData("time_pieces")
|
||||
}
|
||||
|
||||
local params = {
|
||||
pocketwatchpack = {
|
||||
widget = {
|
||||
@ -21,7 +26,8 @@ end
|
||||
|
||||
|
||||
function params.pocketwatchpack.itemtestfn(container, item, slot)
|
||||
return (item:HasTag("pocketwatch") or (item.prefab == "pocketwatch_parts" or item.prefab == "pocketwatch_dismantler"))
|
||||
if (item:HasTag("pocketwatch")) then return true end
|
||||
return storable[item.prefab] == true
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user