More code cleaning
|
@ -54,52 +54,6 @@ local ls_on_def = {
|
|||
}
|
||||
minetest.register_node(ls_on_name, ls_on_def)
|
||||
|
||||
local colored_lamps = {
|
||||
{"white", S("White Redstone Lamp"), "white"},
|
||||
{"grey", S("Grey Redstone Lamp"), "dark_grey"},
|
||||
{"silver", S("Light Grey Redstone Lamp"), "grey"},
|
||||
{"black", S("Black Redstone Lamp"), "black"},
|
||||
{"red", S("Red Redstone Lamp"), "red"},
|
||||
{"yellow", S("Yellow Redstone Lamp"), "yellow"},
|
||||
{"green", S("Green Redstone Lamp"), "dark_green"},
|
||||
{"cyan", S("Cyan Redstone Lamp"), "cyan"},
|
||||
{"blue", S("Blue Redstone Lamp"), "blue"},
|
||||
{"magenta", S("Magenta Redstone Lamp"), "magenta"},
|
||||
{"orange", S("Orange Redstone Lamp"), "orange"},
|
||||
{"purple", S("Purple Redstone Lamp"), "violet"},
|
||||
{"brown", S("Brown Redstone Lamp"), "brown"},
|
||||
{"pink", S("Pink Redstone Lamp"), "pink"},
|
||||
{"lime", S("Lime Redstone Lamp"), "green"},
|
||||
{"lightblue", S("Light Blue Redstone Lamp"), "lightblue"},
|
||||
}
|
||||
for _, row in ipairs(colored_lamps) do
|
||||
local name = row[1]
|
||||
local desc = row[2]
|
||||
local dye = row[3]
|
||||
local mask = "^[hsl:0:-100^(mcl_lightstone_mask.png^[multiply:" .. name .. "^[opacity:100)"
|
||||
if name == "lightblue" then
|
||||
mask = "^[hsl:0:-100^(mcl_lightstone_mask.png^[multiply:" .. name .. "^[hsl:0:200^[opacity:100)"
|
||||
end
|
||||
local name_off = ls_off_name .. "_" .. name
|
||||
local def_off = table.copy(ls_off_def)
|
||||
def_off.description = desc
|
||||
def_off._doc_items_longdesc = nil
|
||||
def_off._doc_items_create_entry = false
|
||||
def_off.mesecons.effector.action_on = generate_action_on(name)
|
||||
def_off.tiles[1] = def_off.tiles[1] .. mask
|
||||
local def_on = table.copy(ls_on_def)
|
||||
def_on.drop = name_off
|
||||
def_on.tiles[1] = def_on.tiles[1] .. mask
|
||||
def_on.mesecons.effector.action_off = generate_action_off(name)
|
||||
minetest.register_node(name_off, def_off)
|
||||
minetest.register_node(ls_on_name.."_"..name, def_on)
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = name_off,
|
||||
recipe = {ls_off_name, "mcl_dye:" .. dye}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mesecons_lightstone:lightstone_off",
|
||||
recipe = {
|
||||
|
|
|
@ -12,4 +12,4 @@ dofile(path .. "/items.lua")
|
|||
dofile(path .. "/crafting.lua")
|
||||
-- Loading the file that handles oxidized, waxed and stripped variants for blocks that are registered
|
||||
-- in other mods and normally do not have these variants.
|
||||
dofile(path .. "/functions.lua")
|
||||
--dofile(path .. "/functions.lua")
|
||||
|
|
|
@ -282,13 +282,6 @@ end
|
|||
-- Using the function above to register the copper blocks.
|
||||
register_copper_variants("block", {
|
||||
groups = {pickaxey = 2, building_block = 1},
|
||||
-- Copper blocks are no longer the manufacturing material for doors but this definition will be
|
||||
-- maintained here to avoid individual registration of 16 blocks.
|
||||
-- Same for buttons, pressure plates and panes.
|
||||
--_mcl_doors = true,
|
||||
_mesecons_buttons = true,
|
||||
_mesecons_pp = true,
|
||||
_xpanes = true
|
||||
})
|
||||
-- Using the function above to register the cut copper blocks.
|
||||
register_copper_variants("cut", {
|
||||
|
@ -296,69 +289,6 @@ register_copper_variants("cut", {
|
|||
_mcl_stairs = true,
|
||||
})
|
||||
|
||||
-- Using the function above to register the copper grates.
|
||||
register_copper_variants("grate", {
|
||||
drawtype = "allfaces",
|
||||
groups = {pickaxey = 2, building_block = 1, disable_suffocation = 1},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
register_copper_variants("chiseled", {
|
||||
groups = {pickaxey = 2, building_block = 1}
|
||||
})
|
||||
|
||||
register_copper_variants("bulb_off", {
|
||||
groups = {pickaxey = 2, building_block = 1},
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function (pos, node)
|
||||
minetest.swap_node(pos, {name = node.name:gsub("bulb_off", "bulb_powered_on")})
|
||||
end
|
||||
},
|
||||
},
|
||||
})
|
||||
--[[
|
||||
register_copper_variants("bulb_on", {
|
||||
drop = "bulb_off",
|
||||
groups = {pickaxey = 2, building_block = 1, not_in_creative_inventory = 1},
|
||||
light_source = 14,
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function (pos, node)
|
||||
minetest.swap_node(pos, {name = node.name:gsub("bulb_on", "bulb_powered_off")})
|
||||
end
|
||||
},
|
||||
},
|
||||
paramtype = "light"
|
||||
})
|
||||
|
||||
register_copper_variants("bulb_powered_off", {
|
||||
drop = "bulb_off",
|
||||
groups = {pickaxey = 2, building_block = 1, not_in_creative_inventory = 1},
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_off = function (pos, node)
|
||||
minetest.swap_node(pos, {name = node.name:gsub("bulb_powered_off", "bulb_off")})
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
register_copper_variants("bulb_powered_on", {
|
||||
drop = "bulb_off",
|
||||
groups = {pickaxey = 2, building_block = 1, not_in_creative_inventory = 1},
|
||||
light_source = 14,
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_off = function (pos, node)
|
||||
minetest.swap_node(pos, {name = node.name:gsub("bulb_powered_on", "bulb_on")})
|
||||
end
|
||||
}
|
||||
},
|
||||
paramtype = "light"
|
||||
})
|
||||
]]
|
||||
-- Registering specific blocks.
|
||||
minetest.register_node("mcl_copper:stone_with_copper", {
|
||||
description = S("Copper Ore"),
|
||||
|
|
|
@ -126,52 +126,6 @@ local end_rod_def = {
|
|||
}
|
||||
minetest.register_node(end_rod_name, end_rod_def)
|
||||
|
||||
-- register colored end_rods
|
||||
local colored_end_rods = {
|
||||
{"white", S("White End Rod"), "white"},
|
||||
{"grey", S("Grey End Rod"), "dark_grey"},
|
||||
{"silver", S("Light Grey End Rod"), "grey"},
|
||||
{"black", S("Black End Rod"), "black"},
|
||||
{"red", S("Red End Rod"), "red"},
|
||||
{"yellow", S("Yellow End Rod"), "yellow"},
|
||||
{"green", S("Green End Rod"), "dark_green"},
|
||||
{"cyan", S("Cyan End Rod"), "cyan"},
|
||||
{"blue", S("Blue End Rod"), "blue"},
|
||||
{"magenta", S("Magenta End Rod"), "magenta"},
|
||||
{"orange", S("Orange End Rod"), "orange"},
|
||||
{"purple", S("Purple End Rod"), "violet"},
|
||||
{"brown", S("Brown End Rod"), "brown"},
|
||||
{"pink", S("Pink End Rod"), "pink"},
|
||||
{"lime", S("Lime End Rod"), "green"},
|
||||
{"lightblue", S("Light Blue End Rod"), "lightblue"},
|
||||
}
|
||||
local end_rod_mask = "^[mask:mcl_end_end_rod_mask.png"
|
||||
for num, row in ipairs(colored_end_rods) do
|
||||
local name = row[1]
|
||||
local desc = row[2]
|
||||
local dye = row[3]
|
||||
local def = table.copy(end_rod_def)
|
||||
def.description = desc
|
||||
def._doc_items_longdesc = nil
|
||||
def._doc_items_create_entry = false
|
||||
def.use_texture_alpha = "clip"
|
||||
local side_tex
|
||||
if name == "pink" then
|
||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. end_rod_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
||||
elseif num > 4 then
|
||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. end_rod_mask .. "^[multiply:" .. name .. "^[hsl:0:300^[opacity:120)"
|
||||
else
|
||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. end_rod_mask .. "^[multiply:" .. name .. "^[hsl:0:-100^[opacity:170)"
|
||||
end
|
||||
minetest.register_node(end_rod_name.."_"..name, def)
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = end_rod_name.."_"..name,
|
||||
recipe = {"group:end_rod", "mcl_dye:"..dye}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("mcl_end:dragon_egg", {
|
||||
description = S("Dragon Egg"),
|
||||
_doc_items_longdesc = S("A dragon egg is a decorative item which can be placed."),
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# textdomain: building
|
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 818 B |
Before Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 496 B |
Before Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 399 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 694 B |
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 797 B |