mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-02 08:10:36 +02:00
Reformat code with IntelliJ auto-reformat function.
This commit is contained in:
@ -16,8 +16,8 @@ local LATEST_SERIALIZATION_VERSION = 1
|
||||
wrench = {}
|
||||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
dofile(modpath.."/support.lua")
|
||||
dofile(modpath.."/technic.lua")
|
||||
dofile(modpath .. "/support.lua")
|
||||
dofile(modpath .. "/technic.lua")
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
|
||||
@ -31,7 +31,7 @@ local function get_meta_type(name, metaname)
|
||||
end
|
||||
|
||||
local function get_pickup_name(name)
|
||||
return "wrench:picked_up_"..(name:gsub(":", "_"))
|
||||
return "wrench:picked_up_" .. (name:gsub(":", "_"))
|
||||
end
|
||||
|
||||
local function restore(pos, placer, itemstack)
|
||||
@ -40,7 +40,7 @@ local function restore(pos, placer, itemstack)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local data = minetest.deserialize(itemstack:get_metadata())
|
||||
minetest.set_node(pos, {name = data.name, param2 = node.param2})
|
||||
minetest.set_node(pos, { name = data.name, param2 = node.param2 })
|
||||
local lists = data.lists
|
||||
for name, value in pairs(data.metas) do
|
||||
local meta_type = get_meta_type(data.name, name)
|
||||
@ -73,7 +73,7 @@ for name, info in pairs(wrench.registered_nodes) do
|
||||
newdef.on_construct = nil
|
||||
newdef.on_destruct = nil
|
||||
newdef.after_place_node = restore
|
||||
minetest.register_node(":"..get_pickup_name(name), newdef)
|
||||
minetest.register_node(":" .. get_pickup_name(name), newdef)
|
||||
end
|
||||
end
|
||||
|
||||
@ -84,12 +84,15 @@ minetest.register_tool("wrench:wrench", {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level = 0,
|
||||
groupcaps = {
|
||||
crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1},
|
||||
snappy = {times={[3]=0.40}, uses=0, maxlevel=1},
|
||||
oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40},
|
||||
uses=0, maxlevel=3}
|
||||
crumbly = { times = { [2] = 3.00, [3] = 0.70 }, uses = 0, maxlevel = 1 },
|
||||
snappy = { times = { [3] = 0.40 }, uses = 0, maxlevel = 1 },
|
||||
oddly_breakable_by_hand = {
|
||||
times = { [1] = 7.00, [2] = 4.00, [3] = 1.40 },
|
||||
uses = 0,
|
||||
maxlevel = 3
|
||||
}
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
damage_groups = { fleshy = 1 },
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.under
|
||||
@ -115,10 +118,10 @@ minetest.register_tool("wrench:wrench", {
|
||||
if def.owned then
|
||||
local owner = meta:get_string("owner")
|
||||
if owner and owner ~= placer:get_player_name() then
|
||||
minetest.log("action", placer:get_player_name()..
|
||||
" tried to pick up a owned node belonging to "..
|
||||
owner.." at "..
|
||||
minetest.pos_to_string(pos))
|
||||
minetest.log("action", placer:get_player_name() ..
|
||||
" tried to pick up a owned node belonging to " ..
|
||||
owner .. " at " ..
|
||||
minetest.pos_to_string(pos))
|
||||
return
|
||||
end
|
||||
end
|
||||
@ -140,7 +143,7 @@ minetest.register_tool("wrench:wrench", {
|
||||
lists[listname] = list
|
||||
end
|
||||
metadata.lists = lists
|
||||
|
||||
|
||||
local metas = {}
|
||||
for name, meta_type in pairs(def.metas or {}) do
|
||||
if meta_type == wrench.META_TYPE_INT then
|
||||
@ -152,7 +155,7 @@ minetest.register_tool("wrench:wrench", {
|
||||
end
|
||||
end
|
||||
metadata.metas = metas
|
||||
|
||||
|
||||
stack:set_metadata(minetest.serialize(metadata))
|
||||
minetest.remove_node(pos)
|
||||
itemstack:add_wear(65535 / 20)
|
||||
|
@ -19,41 +19,49 @@ wrench.META_TYPE_INT = 0
|
||||
wrench.META_TYPE_FLOAT = 1
|
||||
wrench.META_TYPE_STRING = 2
|
||||
|
||||
local INT, STRING, FLOAT =
|
||||
wrench.META_TYPE_INT,
|
||||
wrench.META_TYPE_STRING,
|
||||
wrench.META_TYPE_FLOAT
|
||||
local INT, STRING, FLOAT =
|
||||
wrench.META_TYPE_INT,
|
||||
wrench.META_TYPE_STRING,
|
||||
wrench.META_TYPE_FLOAT
|
||||
|
||||
wrench.registered_nodes = {
|
||||
["default:chest"] = {
|
||||
lists = {"main"},
|
||||
lists = { "main" },
|
||||
},
|
||||
["default:chest_locked"] = {
|
||||
lists = {"main"},
|
||||
metas = {owner = STRING,
|
||||
infotext = STRING},
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
owner = STRING,
|
||||
infotext = STRING
|
||||
},
|
||||
owned = true,
|
||||
},
|
||||
["default:furnace"] = {
|
||||
lists = {"fuel", "src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "fuel", "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
fuel_totaltime = FLOAT,
|
||||
fuel_time = FLOAT,
|
||||
src_totaltime = FLOAT,
|
||||
src_time = FLOAT},
|
||||
src_time = FLOAT
|
||||
},
|
||||
},
|
||||
["default:furnace_active"] = {
|
||||
lists = {"fuel", "src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "fuel", "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
fuel_totaltime = FLOAT,
|
||||
fuel_time = FLOAT,
|
||||
src_totaltime = FLOAT,
|
||||
src_time = FLOAT},
|
||||
src_time = FLOAT
|
||||
},
|
||||
store_meta_always = true,
|
||||
},
|
||||
["default:sign_wall"] = {
|
||||
metas = {infotext = STRING,
|
||||
text = STRING},
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
text = STRING
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -67,7 +75,7 @@ end
|
||||
|
||||
function wrench:register_node(name, def)
|
||||
if minetest.registered_nodes[name] then
|
||||
self.registered_nodes[name] = def
|
||||
self.registered_nodes[name] = def
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,300 +1,369 @@
|
||||
|
||||
local INT, STRING, FLOAT =
|
||||
wrench.META_TYPE_INT,
|
||||
wrench.META_TYPE_STRING,
|
||||
wrench.META_TYPE_FLOAT
|
||||
local INT, STRING, FLOAT =
|
||||
wrench.META_TYPE_INT,
|
||||
wrench.META_TYPE_STRING,
|
||||
wrench.META_TYPE_FLOAT
|
||||
|
||||
wrench:register_node("technic:iron_chest", {
|
||||
lists = {"main"},
|
||||
lists = { "main" },
|
||||
})
|
||||
wrench:register_node("technic:iron_locked_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
owner = STRING},
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
owner = STRING
|
||||
},
|
||||
owned = true,
|
||||
})
|
||||
wrench:register_node("technic:copper_chest", {
|
||||
lists = {"main"},
|
||||
lists = { "main" },
|
||||
})
|
||||
wrench:register_node("technic:copper_locked_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
owner = STRING},
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
owner = STRING
|
||||
},
|
||||
owned = true,
|
||||
})
|
||||
wrench:register_node("technic:silver_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
formspec = STRING},
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:silver_locked_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
owner = STRING,
|
||||
formspec = STRING},
|
||||
formspec = STRING
|
||||
},
|
||||
owned = true,
|
||||
})
|
||||
wrench:register_node("technic:gold_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
formspec = STRING},
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:gold_locked_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
owner = STRING,
|
||||
formspec = STRING},
|
||||
formspec = STRING
|
||||
},
|
||||
owned = true,
|
||||
})
|
||||
wrench:register_node("technic:mithril_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
formspec = STRING},
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mithril_locked_chest", {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "main" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
owner = STRING,
|
||||
formspec = STRING},
|
||||
formspec = STRING
|
||||
},
|
||||
owned = true,
|
||||
})
|
||||
wrench:register_node("technic:lv_electric_furnace", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:lv_electric_furnace_active", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_electric_furnace", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_electric_furnace_active", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:coal_alloy_furnace", {
|
||||
lists = {"fuel", "src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "fuel", "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
fuel_totaltime = FLOAT,
|
||||
fuel_time = FLOAT,
|
||||
src_totaltime = FLOAT,
|
||||
src_time = FLOAT},
|
||||
src_time = FLOAT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:coal_alloy_furnace_active", {
|
||||
lists = {"fuel", "src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "fuel", "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
fuel_totaltime = FLOAT,
|
||||
fuel_time = FLOAT,
|
||||
src_totaltime = FLOAT,
|
||||
src_time = FLOAT},
|
||||
src_time = FLOAT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:alloy_furnace", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:alloy_furnace_active", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_alloy_furnace", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_alloy_furnace_active", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:tool_workshop", {
|
||||
lists = {"src", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT},
|
||||
tube_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:grinder", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:grinder_active", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_grinder", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_grinder_active", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:extractor", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:extractor_active", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_extractor", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_extractor_active", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:compressor", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:compressor_active", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_compressor", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_compressor_active", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:cnc", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT,
|
||||
cnc_product = STRING},
|
||||
cnc_product = STRING
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:cnc_active", {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
LV_EU_demand = INT,
|
||||
LV_EU_input = INT,
|
||||
src_time = INT,
|
||||
cnc_product = STRING},
|
||||
cnc_product = STRING
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_centrifuge", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
wrench:register_node("technic:mv_centrifuge_active", {
|
||||
lists = {"src", "dst", "upgrade1", "upgrade2"},
|
||||
metas = {infotext = STRING,
|
||||
lists = { "src", "dst", "upgrade1", "upgrade2" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
MV_EU_demand = INT,
|
||||
MV_EU_input = INT,
|
||||
tube_time = INT,
|
||||
src_time = INT},
|
||||
src_time = INT
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
local chest_mark_colors = {
|
||||
'_black',
|
||||
'_blue',
|
||||
'_blue',
|
||||
'_brown',
|
||||
'_cyan',
|
||||
'_dark_green',
|
||||
@ -312,30 +381,32 @@ local chest_mark_colors = {
|
||||
}
|
||||
|
||||
for i = 1, 15 do
|
||||
wrench:register_node("technic:gold_chest"..chest_mark_colors[i], {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,formspec = STRING},
|
||||
wrench:register_node("technic:gold_chest" .. chest_mark_colors[i], {
|
||||
lists = { "main" },
|
||||
metas = { infotext = STRING, formspec = STRING },
|
||||
})
|
||||
wrench:register_node("technic:gold_locked_chest"..chest_mark_colors[i], {
|
||||
lists = {"main"},
|
||||
metas = {infotext = STRING,owner = STRING,formspec = STRING},
|
||||
wrench:register_node("technic:gold_locked_chest" .. chest_mark_colors[i], {
|
||||
lists = { "main" },
|
||||
metas = { infotext = STRING, owner = STRING, formspec = STRING },
|
||||
owned = true,
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("technic") then
|
||||
for tier, _ in pairs(technic.machines) do
|
||||
for tier, _ in pairs(technic.machines) do
|
||||
local ltier = tier:lower()
|
||||
for i = 0, 8 do
|
||||
wrench:register_node("technic:"..ltier.."_battery_box"..i, {
|
||||
lists = {"src", "dst"},
|
||||
metas = {infotext = STRING,
|
||||
wrench:register_node("technic:" .. ltier .. "_battery_box" .. i, {
|
||||
lists = { "src", "dst" },
|
||||
metas = {
|
||||
infotext = STRING,
|
||||
formspec = STRING,
|
||||
[tier.."_EU_demand"] = INT,
|
||||
[tier.."_EU_supply"] = INT,
|
||||
[tier.."_EU_input"] = INT,
|
||||
[tier .. "_EU_demand"] = INT,
|
||||
[tier .. "_EU_supply"] = INT,
|
||||
[tier .. "_EU_input"] = INT,
|
||||
internal_EU_charge = INT,
|
||||
last_side_shown = INT},
|
||||
last_side_shown = INT
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user