summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-06-02 03:17:19 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-06-02 03:17:19 -0400
commit1ae88c7f27d406a2431d552794fba8dc14f12478 (patch)
tree6186c9ac11f9749aa730b6fe25b8781c37a02579
parent2b45a7d33c487758a3ef53318dd779462b414495 (diff)
downloaddreambuilder_modpack-1ae88c7f27d406a2431d552794fba8dc14f12478.tar
dreambuilder_modpack-1ae88c7f27d406a2431d552794fba8dc14f12478.tar.gz
dreambuilder_modpack-1ae88c7f27d406a2431d552794fba8dc14f12478.tar.bz2
dreambuilder_modpack-1ae88c7f27d406a2431d552794fba8dc14f12478.tar.xz
dreambuilder_modpack-1ae88c7f27d406a2431d552794fba8dc14f12478.zip
update digistuff, homedecor, ilights, technic, and unified_inventory
-rw-r--r--digistuff/README6
-rw-r--r--digistuff/init.lua1
-rw-r--r--digistuff/nic.lua1
-rw-r--r--digistuff/textures/digistuff_timer_top.pngbin0 -> 6301 bytes
-rw-r--r--digistuff/timer.lua80
-rw-r--r--homedecor_furniture_medieval/init.lua51
-rw-r--r--homedecor_lighting/init.lua1306
-rw-r--r--homedecor_lighting/textures/homedecor_generic_light_source_off.png (renamed from homedecor_lighting/textures/homedecor_table_generic_light_source_off.png)bin450 -> 450 bytes
-rw-r--r--homedecor_lighting/textures/homedecor_generic_light_source_white.png (renamed from homedecor_lighting/textures/homedecor_table_generic_light_source_on.png)bin594 -> 594 bytes
-rw-r--r--homedecor_lighting/textures/homedecor_generic_light_source_yellow.png (renamed from homedecor_common/textures/homedecor_light.png)bin524 -> 524 bytes
-rw-r--r--ilights/init.lua23
-rw-r--r--technic/machines/register/alloy_recipes.lua1
-rw-r--r--unified_inventory/internal.lua4
-rw-r--r--unified_inventory/textures/bags_large.pngbin13428 -> 12624 bytes
-rw-r--r--unified_inventory/textures/bags_medium.pngbin12362 -> 11709 bytes
-rw-r--r--unified_inventory/textures/bags_small.pngbin10295 -> 9333 bytes
-rw-r--r--unified_inventory/textures/ui_1_icon.pngbin546 -> 456 bytes
-rw-r--r--unified_inventory/textures/ui_2_icon.pngbin1225 -> 961 bytes
-rw-r--r--unified_inventory/textures/ui_3_icon.pngbin1457 -> 1154 bytes
-rw-r--r--unified_inventory/textures/ui_4_icon.pngbin777 -> 658 bytes
-rw-r--r--unified_inventory/textures/ui_5_icon.pngbin1154 -> 928 bytes
-rw-r--r--unified_inventory/textures/ui_bags_icon.pngbin13428 -> 12503 bytes
-rw-r--r--unified_inventory/textures/ui_bags_lg_form.pngbin13171 -> 8119 bytes
-rw-r--r--unified_inventory/textures/ui_bags_main_form.pngbin9948 -> 6068 bytes
-rw-r--r--unified_inventory/textures/ui_bags_med_form.pngbin11567 -> 7197 bytes
-rw-r--r--unified_inventory/textures/ui_bags_sm_form.pngbin10356 -> 6411 bytes
-rw-r--r--unified_inventory/textures/ui_bags_trash.pngbin1790 -> 1382 bytes
-rw-r--r--unified_inventory/textures/ui_blank_image.pngbin81 -> 71 bytes
-rw-r--r--unified_inventory/textures/ui_blue_icon_background.pngbin3840 -> 3335 bytes
-rw-r--r--unified_inventory/textures/ui_circular_arrows_icon.pngbin10512 -> 8818 bytes
-rw-r--r--unified_inventory/textures/ui_craft_icon.pngbin16352 -> 15693 bytes
-rw-r--r--unified_inventory/textures/ui_craftgrid_icon.pngbin896 -> 483 bytes
-rw-r--r--unified_inventory/textures/ui_craftguide_form.pngbin11903 -> 962 bytes
-rw-r--r--unified_inventory/textures/ui_craftguide_icon.pngbin17118 -> 15765 bytes
-rw-r--r--unified_inventory/textures/ui_crafting_form.pngbin2962 -> 2343 bytes
-rw-r--r--unified_inventory/textures/ui_doubleleft_icon.pngbin10492 -> 9234 bytes
-rw-r--r--unified_inventory/textures/ui_doubleright_icon.pngbin10531 -> 9322 bytes
-rw-r--r--unified_inventory/textures/ui_form_bg.pngbin1656 -> 1650 bytes
-rw-r--r--unified_inventory/textures/ui_gohome_icon.pngbin16087 -> 15013 bytes
-rw-r--r--unified_inventory/textures/ui_green_icon_background.pngbin4317 -> 3727 bytes
-rw-r--r--unified_inventory/textures/ui_group.pngbin23701 -> 22281 bytes
-rw-r--r--unified_inventory/textures/ui_home_icon.pngbin14717 -> 14289 bytes
-rw-r--r--unified_inventory/textures/ui_left_icon.pngbin7172 -> 6433 bytes
-rw-r--r--unified_inventory/textures/ui_main_inventory.pngbin4682 -> 4112 bytes
-rw-r--r--unified_inventory/textures/ui_misc_form.pngbin8941 -> 5368 bytes
-rw-r--r--unified_inventory/textures/ui_moon_icon.pngbin13900 -> 12865 bytes
-rw-r--r--unified_inventory/textures/ui_off_icon.pngbin5979 -> 5716 bytes
-rw-r--r--unified_inventory/textures/ui_ok_icon.pngbin3878 -> 3664 bytes
-rw-r--r--unified_inventory/textures/ui_on_icon.pngbin6064 -> 5708 bytes
-rw-r--r--unified_inventory/textures/ui_pencil_icon.pngbin6494 -> 6038 bytes
-rw-r--r--unified_inventory/textures/ui_red_icon_background.pngbin3896 -> 3318 bytes
-rw-r--r--unified_inventory/textures/ui_reset_icon.pngbin11310 -> 10548 bytes
-rw-r--r--unified_inventory/textures/ui_right_icon.pngbin7232 -> 6502 bytes
-rw-r--r--unified_inventory/textures/ui_search_icon.pngbin11242 -> 10461 bytes
-rw-r--r--unified_inventory/textures/ui_sethome_icon.pngbin14430 -> 13517 bytes
-rw-r--r--unified_inventory/textures/ui_single_slot.pngbin988 -> 629 bytes
-rw-r--r--unified_inventory/textures/ui_skip_backward_icon.pngbin9533 -> 8260 bytes
-rw-r--r--unified_inventory/textures/ui_skip_forward_icon.pngbin9433 -> 8145 bytes
-rw-r--r--unified_inventory/textures/ui_sun_icon.pngbin19453 -> 18167 bytes
-rw-r--r--unified_inventory/textures/ui_trash_icon.pngbin14491 -> 13264 bytes
-rw-r--r--unified_inventory/textures/ui_waypoint_set_icon.pngbin4599 -> 3739 bytes
-rw-r--r--unified_inventory/textures/ui_waypoints_icon.pngbin15818 -> 15051 bytes
-rw-r--r--unified_inventory/textures/ui_xyz_icon.pngbin2454 -> 2182 bytes
-rw-r--r--unified_inventory/textures/ui_xyz_on_icon.pngbin2454 -> 2182 bytes
64 files changed, 816 insertions, 657 deletions
diff --git a/digistuff/README b/digistuff/README
index 0212160..824e50c 100644
--- a/digistuff/README
+++ b/digistuff/README
@@ -10,7 +10,7 @@ Textures WITH "adwaita" in the file name - These are icons by the GNOME Project,
Depends:
Required: digilines (base only) and mesecons (base only)
-Only needed for craft recipes: default, mesecons_luacontroller, homedecor
+Only needed for craft recipes: default, mesecons_luacontroller, basic_materials
How to use digilines buttons:
@@ -50,6 +50,10 @@ Every second while a player is within "radius" meters of that point, a table lis
How to use the dimmable lights:
After setting the channel, send a number from 0 to 14 to set the light level.
+
+How to use the timer:
+Send a number representing a time in seconds, from 0.5 to 3600. When the time expires, the timer will send "done" back on the same channel. If the loop feature is enabled (use the commands "loop_on" and "loop_off" to set this) the timer will automatically be set for the same time again each time it expires.
+
How to use the junction box:
These are just plain digilines conductors (like digimese) but can skip over one node to another junction box or certain other nodes.
As in, [digiline][junction box][dirt][junction box][digiline] will work to transmit signals "through" the dirt.
diff --git a/digistuff/init.lua b/digistuff/init.lua
index dcf5e29..300a32c 100644
--- a/digistuff/init.lua
+++ b/digistuff/init.lua
@@ -12,6 +12,7 @@ local components = {
"piezo",
"detector",
"piston",
+ "timer",
}
for _,name in ipairs(components) do
dofile(string.format("%s%s%s.lua",minetest.get_modpath(minetest.get_current_modname()),DIR_DELIM,name))
diff --git a/digistuff/nic.lua b/digistuff/nic.lua
index 8760bdf..50bf105 100644
--- a/digistuff/nic.lua
+++ b/digistuff/nic.lua
@@ -14,6 +14,7 @@ minetest.register_node("digistuff:nic", {
"jeija_microcontroller_sides.png",
"jeija_microcontroller_sides.png"
},
+ inventory_image = "digistuff_nic_top.png",
drawtype = "nodebox",
selection_box = {
--From luacontroller
diff --git a/digistuff/textures/digistuff_timer_top.png b/digistuff/textures/digistuff_timer_top.png
new file mode 100644
index 0000000..63bf5c0
--- /dev/null
+++ b/digistuff/textures/digistuff_timer_top.png
Binary files differ
diff --git a/digistuff/timer.lua b/digistuff/timer.lua
new file mode 100644
index 0000000..4755564
--- /dev/null
+++ b/digistuff/timer.lua
@@ -0,0 +1,80 @@
+minetest.register_node("digistuff:timer", {
+ description = "Digilines Timer",
+ groups = {cracky=3},
+ on_construct = function(pos)
+ local meta = minetest.get_meta(pos)
+ meta:set_string("formspec","field[channel;Channel;${channel}")
+ end,
+ tiles = {
+ "digistuff_timer_top.png",
+ "jeija_microcontroller_bottom.png",
+ "jeija_microcontroller_sides.png",
+ "jeija_microcontroller_sides.png",
+ "jeija_microcontroller_sides.png",
+ "jeija_microcontroller_sides.png"
+ },
+ inventory_image = "digistuff_timer_top.png",
+ drawtype = "nodebox",
+ selection_box = {
+ --From luacontroller
+ type = "fixed",
+ fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 },
+ },
+ node_box = {
+ --From Luacontroller
+ type = "fixed",
+ fixed = {
+ {-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}, -- Bottom slab
+ {-5/16, -7/16, -5/16, 5/16, -6/16, 5/16}, -- Circuit board
+ {-3/16, -6/16, -3/16, 3/16, -5/16, 3/16}, -- IC
+ }
+ },
+ paramtype = "light",
+ sunlight_propagates = true,
+ on_receive_fields = function(pos, formname, fields, sender)
+ local name = sender:get_player_name()
+ if minetest.is_protected(pos,name) and not minetest.check_player_privs(name,{protection_bypass=true}) then
+ minetest.record_protection_violation(pos,name)
+ return
+ end
+ local meta = minetest.get_meta(pos)
+ if fields.channel then meta:set_string("channel",fields.channel) end
+ end,
+ on_timer = function(pos)
+ local meta = minetest.get_meta(pos)
+ local channel = meta:get_string("channel")
+ digiline:receptor_send(pos,digiline.rules.default,channel,"done")
+ local loop = meta:get_int("loop") > 0
+ return loop
+ end,
+ digiline =
+ {
+ receptor = {},
+ effector = {
+ action = function(pos,node,channel,msg)
+ local meta = minetest.get_meta(pos)
+ if meta:get_string("channel") ~= channel then return end
+ if msg == "loop_on" then
+ meta:set_int("loop",1)
+ elseif msg == "loop_off" then
+ meta:set_int("loop",0)
+ else
+ local time = tonumber(msg)
+ if time and time >= 0.5 and time <= 3600 then
+ local timer = minetest.get_node_timer(pos)
+ timer:start(time)
+ end
+ end
+ end
+ },
+ },
+
+})
+minetest.register_craft({
+ output = "digistuff:timer 2",
+ recipe = {
+ {"","mesecons:wire_00000000_off","default:coal_lump"},
+ {"digilines:wire_std_00000000","basic_materials:ic","mesecons:wire_00000000_off"},
+ {"","mesecons:wire_00000000_off","default:paper"},
+ }
+})
diff --git a/homedecor_furniture_medieval/init.lua b/homedecor_furniture_medieval/init.lua
index 9fb9a9e..87b9def 100644
--- a/homedecor_furniture_medieval/init.lua
+++ b/homedecor_furniture_medieval/init.lua
@@ -58,61 +58,10 @@ homedecor.register("chains", {
sounds = default.node_sound_stone_defaults(),
})
-homedecor.register("torch_wall", {
- description = S("Wall Torch"),
- mesh = "forniture_torch.obj",
- tiles = {
- {
- name="forniture_torch_flame.png",
- animation={
- type="vertical_frames",
- aspect_w=40,
- aspect_h=40,
- length=1.0,
- },
- },
- { name = "homedecor_generic_metal.png", color = homedecor.color_black },
- { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
- "forniture_coal.png",
- },
- inventory_image="forniture_torch_inv.png",
- walkable = false,
- light_source = 14,
- selection_box = {
- type = "fixed",
- fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
- },
- groups = {cracky=3},
-})
-
-local wl_cbox = {
- type = "fixed",
- fixed = { -0.2, -0.5, 0, 0.2, 0.5, 0.5 },
-}
-
-homedecor.register("wall_lamp", {
- description = S("Wall Lamp"),
- mesh = "homedecor_wall_lamp.obj",
- tiles = {
- { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
- homedecor.lux_wood,
- "homedecor_light.png",
- "homedecor_generic_metal_wrought_iron.png"
- },
- use_texture_alpha = true,
- inventory_image = "homedecor_wall_lamp_inv.png",
- groups = {snappy=3},
- light_source = 11,
- selection_box = wl_cbox,
- walkable = false
-})
-
minetest.register_alias("3dforniture:bars", "homedecor:bars")
minetest.register_alias("3dforniture:L_binding_bars", "homedecor:L_binding_bars")
minetest.register_alias("3dforniture:chains", "homedecor:chains")
-minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
minetest.register_alias('bars', 'homedecor:bars')
minetest.register_alias('binding_bars', 'homedecor:L_binding_bars')
minetest.register_alias('chains', 'homedecor:chains')
-minetest.register_alias('torch_wall', 'homedecor:torch_wall')
diff --git a/homedecor_lighting/init.lua b/homedecor_lighting/init.lua
index 23c3b0e..3c1ce64 100644
--- a/homedecor_lighting/init.lua
+++ b/homedecor_lighting/init.lua
@@ -13,7 +13,7 @@ end
-- control and brightness for dimmable lamps
-local repl = {
+local brightn_cycle = {
["off"] = "low",
["low"] = "med",
["med"] = "hi",
@@ -22,12 +22,40 @@ local repl = {
["on"] = "off",
}
-local brightness_tab = {
- 0xffd0d0d0,
- 0xffd8d8d8,
- 0xffe0e0e0,
- 0xffe8e8e8,
- 0xffffffff,
+local brightn_light_source = {
+ ["off"] = 0,
+ ["low"] = 3,
+ ["med"] = 7,
+ ["hi"] = 11,
+ ["on"] = 14,
+ ["max"] = 14,
+}
+
+local brightn_hex = {
+ ["off"] = 0xffd0d0d0,
+ ["low"] = 0xffd8d8d8,
+ ["med"] = 0xffe0e0e0,
+ ["hi"] = 0xffe8e8e8,
+ ["on"] = 0xffffffff,
+ ["max"] = 0xffffffff,
+}
+
+local bright_to_word = {
+ [0] = "off",
+ [1] = "low",
+ [2] = "low",
+ [3] = "low",
+ [4] = "med",
+ [5] = "med",
+ [6] = "med",
+ [7] = "med",
+ [8] = "hi",
+ [9] = "hi",
+ [10] = "hi",
+ [11] = "hi",
+ [12] = "on",
+ [13] = "on",
+ [14] = "on",
}
local rules_xz = {
@@ -122,18 +150,21 @@ if minetest.get_modpath("digilines") then
local on_digiline_receive_string = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
local setchan = meta:get_string("channel")
-
if setchan ~= channel then return end
- if msg and msg ~= "" and type(msg) == "string" then
- if msg == "off"
- or msg == "low"
- or msg == "med"
- or msg == "hi"
- or msg == "max"
- or msg == "on" then
- local basename = string.sub(node.name, 1, string.find(node.name, "_", -5) - 1)
+
+ if msg and msg ~= "" then
+ local n = tonumber(msg)
+ local msg = bright_to_word[n] or msg
+ print(node.name, dump(msg))
+
+ local basename = string.sub(node.name, 1, string.find(node.name, "_", -5) - 1)
+ if brightn_light_source[msg] then
if minetest.registered_nodes[basename.."_"..msg] then
minetest.swap_node(pos, {name = basename.."_"..msg, param2 = node.param2})
+ elseif (n and n > 3) or msg == "hi" or msg == "max" or msg == "med" then
+ minetest.swap_node(pos, {name = basename.."_on", param2 = node.param2})
+ elseif (n and n < 4) or msg == "low" then
+ minetest.swap_node(pos, {name = basename.."_off", param2 = node.param2})
end
end
end
@@ -213,14 +244,6 @@ end
-- turn on/off, cycle brightness
-function on_rightclick(pos, node, clicker, itemstack, pointed_thing)
- if is_protected(pos, clicker) then return end
- local delim = string.find(node.name, "_", -5)
- local basename = string.sub(node.name, 1, delim - 1)
- local suffix = string.sub(node.name, delim + 1)
- minetest.swap_node(pos, {name = basename.."_"..repl[suffix], param2 = node.param2})
-end
-
function homedecor.toggle_light(pos, node, clicker, itemstack, pointed_thing)
if is_protected(pos, clicker) then return end
local sep = string.find(node.name, "_o", -5)
@@ -229,491 +252,597 @@ function homedecor.toggle_light(pos, node, clicker, itemstack, pointed_thing)
minetest.swap_node(pos, {name = newname, param2 = node.param2})
end
------
--- The actual lights! :-)
+------------------
+-- Dimmable lights
-for _, onoff in ipairs({"on", "off"}) do
+for light_brightn_name in pairs(brightn_light_source) do
- local onflag = (onoff == "on")
- local offon = "on" -- always the inverse of 'onoff'
- if onoff == "on" then offon = "off" end
+ if brightn_light_source ~= "max" then
- local tiles
- local overlay
- local nici
- if not onflag then nici = 1 end
+ local tiles
+ local overlay
- local glowlight_nodebox = {
- half = homedecor.nodebox.slab_y(1/2),
- quarter = homedecor.nodebox.slab_y(1/4),
- small_cube = {
- type = "fixed",
- fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
- },
- }
+ local onflag = (light_brightn_name ~= "off")
+ local nici = (light_brightn_name ~= "on") and 1 or nil
- local base = "homedecor_glowlight_base.png"
+ local gen_ls_tex_white = "homedecor_generic_light_source_off.png"
+ if onflag then gen_ls_tex_white = "homedecor_generic_light_source_white.png" end
- local tb_edges = "homedecor_glowlight_tb_edges.png"
- local sides_edges = "homedecor_glowlight_thick_sides_edges.png"
- local sides_glare = "homedecor_glowlight_thick_sides_glare.png"
+ local gen_ls_tex_yellow = "homedecor_generic_light_source_off.png"
+ if onflag then gen_ls_tex_yellow = "homedecor_generic_light_source_yellow.png" end
- if onflag then
- tiles = {
- "("..base.."^"..tb_edges..")^[brighten",
- "("..base.."^"..tb_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- }
- overlay = {
- { name = "homedecor_glowlight_top_glare.png", color = "white"},
- "",
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- }
- else
- tiles = {
- base.."^"..tb_edges,
- base.."^"..tb_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
+ local glowlight_nodebox = {
+ half = homedecor.nodebox.slab_y(1/2),
+ quarter = homedecor.nodebox.slab_y(1/4),
+ small_cube = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
+ },
}
- overlay = nil
- end
- minetest.register_node(":homedecor:glowlight_half_"..onoff, {
- description = S("Thick Glowlight"),
- tiles = tiles,
- overlay_tiles = overlay,
- use_texture_alpha = true,
- drawtype = "nodebox",
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = {
- type = "wallmounted",
- wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 },
- wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
- wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }
- },
- node_box = glowlight_nodebox.half,
- groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
- light_source = onflag and default.LIGHT_MAX or nil,
- sounds = default.node_sound_glass_defaults(),
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
- end,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:glowlight_half_on"}, inherit_color = true },
+ local base = "homedecor_glowlight_base.png"
+
+ local tb_edges = "homedecor_glowlight_tb_edges.png"
+ local sides_edges = "homedecor_glowlight_thick_sides_edges.png"
+ local sides_glare = "homedecor_glowlight_thick_sides_glare.png"
+
+ if onflag then
+ tiles = {
+ "("..base.."^"..tb_edges..")^[brighten",
+ "("..base.."^"..tb_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
}
- },
- mesecons = homedecor.mesecon_wall_light,
- digiline = homedecor.digiline_wall_light,
- on_punch = digiline_on_punch
- })
+ overlay = {
+ { name = "homedecor_glowlight_top_glare.png", color = "white"},
+ "",
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ }
+ else
+ tiles = {
+ base.."^"..tb_edges,
+ base.."^"..tb_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ }
+ overlay = nil
+ end
- sides_edges = "homedecor_glowlight_thin_sides_edges.png"
- sides_glare = "homedecor_glowlight_thin_sides_glare.png"
+ minetest.register_node(":homedecor:glowlight_half_"..light_brightn_name, {
+ description = S("Thick Glowlight"),
+ tiles = tiles,
+ overlay_tiles = overlay,
+ use_texture_alpha = true,
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "colorwallmounted",
+ palette = "unifieddyes_palette_colorwallmounted.png",
+ selection_box = {
+ type = "wallmounted",
+ wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 },
+ wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
+ wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 }
+ },
+ node_box = glowlight_nodebox.half,
+ groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
+ light_source = brightn_light_source[light_brightn_name],
+ sounds = default.node_sound_glass_defaults(),
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ end,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:glowlight_half_on"}, inherit_color = true },
+ }
+ },
+ mesecons = homedecor.mesecon_wall_light,
+ digiline = homedecor.digiline_wall_light,
+ on_punch = digiline_on_punch
+ })
- if onflag then
- tiles = {
- "("..base.."^"..tb_edges..")^[brighten",
- "("..base.."^"..tb_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- }
- overlay = {
- { name = "homedecor_glowlight_top_glare.png", color = "white"},
- "",
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- }
- else
- tiles = {
- base.."^"..tb_edges,
- base.."^"..tb_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- }
- overlay = nil
- end
+ sides_edges = "homedecor_glowlight_thin_sides_edges.png"
+ sides_glare = "homedecor_glowlight_thin_sides_glare.png"
- minetest.register_node(":homedecor:glowlight_quarter_"..onoff, {
- description = S("Thin Glowlight"),
- tiles = tiles,
- overlay_tiles = overlay,
- use_texture_alpha = true,
- drawtype = "nodebox",
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = {
- type = "wallmounted",
- wall_top = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 },
- wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 },
- wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 }
- },
- node_box = glowlight_nodebox.quarter,
- groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
- light_source = onflag and (default.LIGHT_MAX - 1) or nil,
- sounds = default.node_sound_glass_defaults(),
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
- end,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:glowlight_quarter_on"}, inherit_color = true },
+ if onflag then
+ tiles = {
+ "("..base.."^"..tb_edges..")^[brighten",
+ "("..base.."^"..tb_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
}
- },
- mesecons = homedecor.mesecon_wall_light,
- digiline = homedecor.digiline_wall_light,
- on_punch = digiline_on_punch
- })
+ overlay = {
+ { name = "homedecor_glowlight_top_glare.png", color = "white"},
+ "",
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ }
+ else
+ tiles = {
+ base.."^"..tb_edges,
+ base.."^"..tb_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ }
+ overlay = nil
+ end
- tb_edges = "homedecor_glowlight_cube_tb_edges.png"
- sides_edges = "homedecor_glowlight_cube_sides_edges.png"
- sides_glare = "homedecor_glowlight_cube_sides_glare.png"
+ minetest.register_node(":homedecor:glowlight_quarter_"..light_brightn_name, {
+ description = S("Thin Glowlight"),
+ tiles = tiles,
+ overlay_tiles = overlay,
+ use_texture_alpha = true,
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "colorwallmounted",
+ palette = "unifieddyes_palette_colorwallmounted.png",
+ selection_box = {
+ type = "wallmounted",
+ wall_top = { -0.5, 0.25, -0.5, 0.5, 0.5, 0.5 },
+ wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 },
+ wall_side = { -0.5, -0.5, -0.5, -0.25, 0.5, 0.5 }
+ },
+ node_box = glowlight_nodebox.quarter,
+ groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
+ light_source = brightn_light_source[light_brightn_name],
+ sounds = default.node_sound_glass_defaults(),
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ end,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:glowlight_quarter_on"}, inherit_color = true },
+ }
+ },
+ mesecons = homedecor.mesecon_wall_light,
+ digiline = homedecor.digiline_wall_light,
+ on_punch = digiline_on_punch
+ })
- if onflag then
- tiles = {
- "("..base.."^"..tb_edges..")^[brighten",
- "("..base.."^"..tb_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- "("..base.."^"..sides_edges..")^[brighten",
- }
- overlay = {
- { name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
- "",
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- { name = sides_glare, color = "white"},
- }
- else
- tiles = {
- base.."^"..tb_edges,
- base.."^"..tb_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- base.."^"..sides_edges,
- }
- overlay = nil
- end
+ tb_edges = "homedecor_glowlight_cube_tb_edges.png"
+ sides_edges = "homedecor_glowlight_cube_sides_edges.png"
+ sides_glare = "homedecor_glowlight_cube_sides_glare.png"
- minetest.register_node(":homedecor:glowlight_small_cube_"..onoff, {
- description = S("Small Glowlight Cube"),
- tiles = tiles,
- overlay_tiles = overlay,
- use_texture_alpha = true,
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- drawtype = "nodebox",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = {
- type = "wallmounted",
- wall_top = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 },
- wall_bottom = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 },
- wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 }
- },
- node_box = glowlight_nodebox.small_cube,
- groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
- light_source = onflag and (default.LIGHT_MAX - 1) or nil,
- sounds = default.node_sound_glass_defaults(),
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
- end,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:glowlight_small_cube_on"}, inherit_color = true },
+ if onflag then
+ tiles = {
+ "("..base.."^"..tb_edges..")^[brighten",
+ "("..base.."^"..tb_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
+ "("..base.."^"..sides_edges..")^[brighten",
}
- },
- mesecons = homedecor.mesecon_wall_light,
- digiline = homedecor.digiline_wall_light,
- on_punch = digiline_on_punch
- })
+ overlay = {
+ { name = "homedecor_glowlight_cube_top_glare.png", color = "white"},
+ "",
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ { name = sides_glare, color = "white"},
+ }
+ else
+ tiles = {
+ base.."^"..tb_edges,
+ base.."^"..tb_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ base.."^"..sides_edges,
+ }
+ overlay = nil
+ end
- local lighttex
+ minetest.register_node(":homedecor:glowlight_small_cube_"..light_brightn_name, {
+ description = S("Small Glowlight Cube"),
+ tiles = tiles,
+ overlay_tiles = overlay,
+ use_texture_alpha = true,
+ paramtype = "light",
+ paramtype2 = "colorwallmounted",
+ drawtype = "nodebox",
+ palette = "unifieddyes_palette_colorwallmounted.png",
+ selection_box = {
+ type = "wallmounted",
+ wall_top = { -0.25, 0, -0.25, 0.25, 0.5, 0.25 },
+ wall_bottom = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 },
+ wall_side = { -0.5, -0.25, -0.25, 0, 0.25, 0.25 }
+ },
+ node_box = glowlight_nodebox.small_cube,
+ groups = { snappy = 3, ud_param2_colorable = 1, not_in_creative_inventory = nici },
+ light_source = brightn_light_source[light_brightn_name],
+ sounds = default.node_sound_glass_defaults(),
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ end,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:glowlight_small_cube_on"}, inherit_color = true },
+ }
+ },
+ mesecons = homedecor.mesecon_wall_light,
+ digiline = homedecor.digiline_wall_light,
+ on_punch = digiline_on_punch
+ })
- if onflag then
- lighttex = {
- name="homedecor_plasma_storm.png",
- animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
- }
- else
- lighttex = "homedecor_plasma_lamp_off.png"
- end
+ local lighttex
- homedecor.register("plasma_lamp_"..onoff, {
- description = S("Plasma Lamp/Light"),
- drawtype = "mesh",
- mesh = "plasma_lamp.obj",
- tiles = {
- "default_gold_block.png",
- lighttex
- },
- use_texture_alpha = true,
- light_source = onflag and (default.LIGHT_MAX - 1) or nil,
- sunlight_propagates = true,
- groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici},
- sounds = default.node_sound_glass_defaults(),
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:plasma_lamp_on"}},
+ if onflag then
+ lighttex = {
+ name="homedecor_plasma_storm.png",
+ animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
}
- },
- mesecons = homedecor.mesecon_alldir_light,
- digiline = homedecor.digiline_alldir_light,
- on_punch = digiline_on_punch
- })
+ else
+ lighttex = "homedecor_plasma_lamp_off.png"
+ end
- local lighttex = "homedecor_blanktile.png"
- if onflag then
- lighttex = {
- name = "homedecor_plasma_ball_streamers.png",
- animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
- }
- end
+ homedecor.register("plasma_lamp_"..light_brightn_name, {
+ description = S("Plasma Lamp/Light"),
+ drawtype = "mesh",
+ mesh = "plasma_lamp.obj",
+ tiles = {
+ "default_gold_block.png",
+ lighttex
+ },
+ use_texture_alpha = true,
+ light_source = brightn_light_source[light_brightn_name],
+ sunlight_propagates = true,
+ groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici},
+ sounds = default.node_sound_glass_defaults(),
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:plasma_lamp_on"}},
+ }
+ },
+ mesecons = homedecor.mesecon_alldir_light,
+ digiline = homedecor.digiline_alldir_light,
+ on_punch = digiline_on_punch
+ })
- homedecor.register("plasma_ball_"..onoff, {
- description = S("Plasma Ball"),
- mesh = "homedecor_plasma_ball.obj",
- tiles = {
- { name = "homedecor_generic_plastic.png", color = homedecor.color_black },
- lighttex,
- "homedecor_plasma_ball_glass.png"
- },
- inventory_image = "homedecor_plasma_ball_inv.png",
- selection_box = {
+ local gl_cbox = {
type = "fixed",
- fixed = { -0.1875, -0.5, -0.1875, 0.1875, 0, 0.1875 }
- },
- walkable = false,
- use_texture_alpha = true,
- light_source = onflag and (default.LIGHT_MAX - 5) or nil,
- sunlight_propagates = true,
- groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici},
- sounds = default.node_sound_glass_defaults(),
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:plasma_ball_on"}},
- }
- },
- mesecons = homedecor.mesecon_xz_light,
- digiline = homedecor.digiline_xz_light,
- on_punch = digiline_on_punch
- })
+ fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 },
+ }
- local gl_cbox = {
- type = "fixed",
- fixed = { -0.25, -0.5, -0.25, 0.25, 0.45, 0.25 },
- }
+ homedecor.register("ground_lantern_"..light_brightn_name, {
+ description = S("Ground Lantern/Light"),
+ mesh = "homedecor_ground_lantern.obj",
+ tiles = { gen_ls_tex_yellow, "homedecor_generic_metal_wrought_iron.png" },
+ use_texture_alpha = true,
+ inventory_image = "homedecor_ground_lantern_inv.png",
+ wield_image = "homedecor_ground_lantern_inv.png",
+ groups = {snappy=3, not_in_creative_inventory = nici},
+ light_source = brightn_light_source[light_brightn_name],
+ selection_box = gl_cbox,
+ walkable = false,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:ground_lantern_on"}},
+ }
+ },
+ mesecons = homedecor.mesecon_xz_light,
+ digiline = homedecor.digiline_xz_light,
+ on_punch = digiline_on_punch
+ })
- local lighttex
- if onflag then
- lighttex = "homedecor_light.png"
- else
- lighttex = "homedecor_table_generic_light_source_off.png"
- end
+ local hl_cbox = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.2, 0.25, 0.5, 0.5 },
+ }
- homedecor.register("ground_lantern_"..onoff, {
- description = S("Ground Lantern/Light"),
- mesh = "homedecor_ground_lantern.obj",
- tiles = { lighttex, "homedecor_generic_metal_wrought_iron.png" },
- use_texture_alpha = true,
- inventory_image = "homedecor_ground_lantern_inv.png",
- wield_image = "homedecor_ground_lantern_inv.png",
- groups = {snappy=3, not_in_creative_inventory = nici},
- light_source = onflag and (default.LIGHT_MAX - 3) or nil,
- selection_box = gl_cbox,
- walkable = false,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:ground_lantern_on"}},
- }
- },
- mesecons = homedecor.mesecon_xz_light,
- digiline = homedecor.digiline_xz_light,
- on_punch = digiline_on_punch
- })
+ homedecor.register("hanging_lantern_"..light_brightn_name, {
+ description = S("Hanging Lantern/Light"),
+ mesh = "homedecor_hanging_lantern.obj",
+ tiles = { "homedecor_generic_metal_wrought_iron.png", gen_ls_tex_yellow },
+ use_texture_alpha = true,
+ inventory_image = "homedecor_hanging_lantern_inv.png",
+ wield_image = "homedecor_hanging_lantern_inv.png",
+ groups = {snappy=3, not_in_creative_inventory = nici},
+ light_source = brightn_light_source[light_brightn_name],
+ selection_box = hl_cbox,
+ walkable = false,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:hanging_lantern_on"}},
+ }
+ },
+ mesecons = homedecor.mesecon_alldir_light,
+ digiline = homedecor.digiline_alldir_light,
+ on_punch = digiline_on_punch
+ })
- local hl_cbox = {
- type = "fixed",
- fixed = { -0.25, -0.5, -0.2, 0.25, 0.5, 0.5 },
- }
+ local cl_cbox = {
+ type = "fixed",
+ fixed = { -0.35, -0.45, -0.35, 0.35, 0.5, 0.35 }
+ }
- homedecor.register("hanging_lantern_"..onoff, {
- description = S("Hanging Lantern/Light"),
- mesh = "homedecor_hanging_lantern.obj",
- tiles = { "homedecor_generic_metal_wrought_iron.png", lighttex },
- use_texture_alpha = true,
- inventory_image = "homedecor_hanging_lantern_inv.png",
- wield_image = "homedecor_hanging_lantern_inv.png",
- groups = {snappy=3, not_in_creative_inventory = nici},
- light_source = onflag and (default.LIGHT_MAX - 3) or nil,
- selection_box = hl_cbox,
- walkable = false,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:hanging_lantern_on"}},
- }
- },
- mesecons = homedecor.mesecon_alldir_light,
- digiline = homedecor.digiline_alldir_light,
- on_punch = digiline_on_punch
- })
+ homedecor.register("ceiling_lantern_"..light_brightn_name, {
+ drawtype = "mesh",
+ mesh = "homedecor_ceiling_lantern.obj",
+ tiles = { gen_ls_tex_yellow, "homedecor_generic_metal_wrought_iron.png" },
+ use_texture_alpha = true,
+ inventory_image = "homedecor_ceiling_lantern_inv.png",
+ description = S("Ceiling Lantern/Light"),
+ groups = {snappy=3, not_in_creative_inventory = nici},
+ light_source = brightn_light_source[light_brightn_name],
+ selection_box = cl_cbox,
+ walkable = false,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:ceiling_lantern_on"}},
+ }
+ },
+ mesecons = homedecor.mesecon_toponly_light,
+ digiline = homedecor.digiline_toponly_light,
+ on_punch = digiline_on_punch
+ })
- local cl_cbox = {
- type = "fixed",
- fixed = { -0.35, -0.45, -0.35, 0.35, 0.5, 0.35 }
- }
+ if minetest.get_modpath("darkage") then
+ sm_light = default.LIGHT_MAX-5
+ else
- homedecor.register("ceiling_lantern_"..onoff, {
- drawtype = "mesh",
- mesh = "homedecor_ceiling_lantern.obj",
- tiles = { lighttex, "homedecor_generic_metal_wrought_iron.png" },
- use_texture_alpha = true,
- inventory_image = "homedecor_ceiling_lantern_inv.png",
- description = S("Ceiling Lantern/Light"),
- groups = {snappy=3, not_in_creative_inventory = nici},
- light_source = onflag and (default.LIGHT_MAX - 3) or nil,
- selection_box = cl_cbox,
- walkable = false,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:ceiling_lantern_on"}},
- }
- },
- mesecons = homedecor.mesecon_toponly_light,
- digiline = homedecor.digiline_toponly_light,
- on_punch = digiline_on_punch
- })
+ homedecor.register("lattice_lantern_large_"..light_brightn_name, {
+ description = S("Lattice lantern/Light (large)"),
+ tiles = { gen_ls_tex_yellow.."^homedecor_lattice_lantern_large_overlay.png" },
+ groups = { snappy = 3, not_in_creative_inventory = nici },
+ light_source = brightn_light_source[light_brightn_name],
+ sounds = default.node_sound_glass_defaults(),
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:lattice_lantern_large_on"}},
+ }
+ },
+ mesecons = homedecor.mesecon_alldir_light,
+ digiline = homedecor.digiline_alldir_light,
+ on_punch = digiline_on_punch
+ })
+ end
+
+ local lighttex_tb
+ local lighttex_sides
- if minetest.get_modpath("darkage") then
- sm_light = default.LIGHT_MAX-5
- else
- local lighttex
if onflag then
- lighttex = "homedecor_lattice_lantern_large_light.png"
+ lighttex_tb = "homedecor_lattice_lantern_small_tb_light.png"
+ lighttex_sides = "homedecor_lattice_lantern_small_sides_light.png"
else
- lighttex = "homedecor_table_generic_light_source_off.png"
+ lighttex_tb = "homedecor_generic_light_source_off.png"
+ lighttex_sides = "homedecor_generic_light_source_off.png"
end
- homedecor.register("lattice_lantern_large_"..onoff, {
- description = S("Lattice lantern/Light (large)"),
- tiles = { lighttex.."^homedecor_lattice_lantern_large_overlay.png" },
+ homedecor.register("lattice_lantern_small_"..light_brightn_name, {
+ description = S("Lattice lantern/light (small)"),
+ tiles = {
+ lighttex_tb.."^homedecor_lattice_lantern_small_tb_overlay.png",
+ lighttex_tb.."^homedecor_lattice_lantern_small_tb_overlay.png",
+ lighttex_sides.."^homedecor_lattice_lantern_small_sides_overlay.png"
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
+ },
+ node_box = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
+ },
groups = { snappy = 3, not_in_creative_inventory = nici },
- light_source = onflag and default.LIGHT_MAX or nil,
+ light_source = brightn_light_source[light_brightn_name],
sounds = default.node_sound_glass_defaults(),
+ on_place = minetest.rotate_node,
on_rightclick = homedecor.toggle_light,
drop = {
items = {
- {items = {"homedecor:lattice_lantern_large_on"}},
+ {items = {"homedecor:lattice_lantern_small_on"}},
}
},
mesecons = homedecor.mesecon_alldir_light,
digiline = homedecor.digiline_alldir_light,
on_punch = digiline_on_punch
})
+
+ -- "gooseneck" style desk lamps
+
+ local dlamp_cbox = {
+ type = "wallmounted",
+ wall_side = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 },
+ }
+
+ homedecor.register("desk_lamp_"..light_brightn_name, {
+ description = S("Desk Lamp/Light"),
+ mesh = "homedecor_desk_lamp.obj",
+ tiles = {
+ "homedecor_generic_metal.png",
+ "homedecor_generic_metal.png",
+ { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
+ { name = gen_ls_tex_white, color = brightn_hex[light_brightn_name] },
+ },
+ inventory_image = "homedecor_desk_lamp_inv.png",
+ paramtype = "light",
+ paramtype2 = "colorwallmounted",
+ palette = "unifieddyes_palette_colorwallmounted.png",
+ selection_box = dlamp_cbox,
+ node_box = dlamp_cbox,
+ walkable = false,
+ groups = {snappy=3, ud_param2_colorable = 1, not_in_creative_inventory = nici},
+ after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
+ end,
+ on_rotate = unifieddyes.fix_after_screwdriver_nsew,
+ light_source = brightn_light_source[light_brightn_name],
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:desk_lamp_on"}, inherit_color = true },
+ }
+ },
+ mesecons = homedecor.mesecon_xz_light,
+ digiline = homedecor.digiline_xz_light,
+ on_punch = digiline_on_punch
+ })
+
+ -- "kitchen"/"dining room" ceiling lamp
+
+ homedecor.register("ceiling_lamp_"..light_brightn_name, {
+ description = S("Ceiling Lamp/Light"),
+ mesh = "homedecor_ceiling_lamp.obj",
+ tiles = {
+ "homedecor_generic_metal_brass.png",
+ "homedecor_ceiling_lamp_glass.png",
+ gen_ls_tex_white,
+ { name = "homedecor_generic_plastic.png", color = 0xff442d04 },
+ },
+ inventory_image = "homedecor_ceiling_lamp_inv.png",
+ light_source = brightn_light_source[light_brightn_name],
+ groups = {snappy=3, not_in_creative_inventory = nici},
+ walkable = false,
+ on_rightclick = homedecor.toggle_light,
+ drop = {
+ items = {
+ {items = {"homedecor:ceiling_lamp_on"}},
+ }
+ },
+ mesecons = homedecor.mesecon_toponly_light,
+ digiline = homedecor.digiline_toponly_light,
+ on_punch = digiline_on_punch
+ })
+
+ local tlamp_cbox = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 }
+ }
+
+ local slamp_cbox = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 }
+ }
+
+ local wool_brightened = "wool_grey.png^[colorize:#ffffff:"..(brightn_light_source[light_brightn_name] * 15)
+
+ homedecor.register("table_lamp_"..light_brightn_name, {
+ description = S("Table Lamp/Light"),
+ mesh = "homedecor_table_lamp.obj",
+ tiles = {
+ wool_brightened,
+ { name = gen_ls_tex_white, color = brightn_hex[light_brightn_name] },
+ { name = "homedecor_generic_wood_red.png", color = 0xffffffff },
+ { name = "homedecor_generic_metal.png", color = homedecor.color_black },
+ },
+ inventory_image = "homedecor_table_lamp_foot_inv.png^homedecor_table_lamp_top_inv.png",
+ paramtype = "light",
+ paramtype2 = "color",
+ palette = "unifieddyes_palette_extended.png",
+ walkable = false,
+ light_source = brightn_light_source[light_brightn_name],
+ selection_box = tlamp_cbox,
+ sounds = default.node_sound_wood_defaults(),
+ groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici },
+ drop = {
+ items = {
+ {items = {"homedecor:table_lamp_hi"}, inherit_color = true },
+ }
+ },
+ digiline = homedecor.digiline_xz_light,
+ mesecons = homedecor.mesecon_wall_light,
+ on_rightclick = homedecor.toggle_light,
+ on_punch = digiline_on_punch
+ })
+
+ homedecor.register("standing_lamp_"..light_brightn_name, {
+ description = S("Standing Lamp/Light"),
+ mesh = "homedecor_standing_lamp.obj",
+ tiles = {
+ wool_brightened,
+ { name = gen_ls_tex_white, color = brightn_hex[light_brightn_name] },
+ { name = "homedecor_generic_wood_red.png", color = 0xffffffff },
+ { name = "homedecor_generic_metal.png", color = homedecor.color_black },
+ },
+ inventory_image = "homedecor_standing_lamp_foot_inv.png^homedecor_standing_lamp_top_inv.png",
+ paramtype = "light",
+ paramtype2 = "color",
+ palette = "unifieddyes_palette_extended.png",
+ walkable = false,
+ light_source = brightn_light_source[light_brightn_name],
+ groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1, not_in_creative_inventory=nici },
+ selection_box = slamp_cbox,
+ sounds = default.node_sound_wood_defaults(),
+ on_rotate = screwdriver.rotate_simple,
+ --expand = { top="air" },
+ drop = {
+ items = {
+ {items = {"homedecor:standing_lamp_hi"}, inherit_color = true },
+ }
+ },
+ digiline = homedecor.digiline_xz_light,
+ mesecons = homedecor.mesecon_wall_light,
+ on_rightclick = homedecor.toggle_light,
+ on_punch = digiline_on_punch
+ })
end
+end
+
+------------------------------------------
+-- Simple non-dimmable, on/off-only lights
+
+for _, light_brightn_name in ipairs({"off", "on"}) do
- local lighttex_tb
- local lighttex_sides
+ local onflag = (light_brightn_name == "on")
+ local nici = (light_brightn_name == "off") and 1 or nil
+ local gen_ls_tex_white = "homedecor_generic_light_source_off.png"
+ if onflag then gen_ls_tex_white = "homedecor_generic_light_source_white.png" end
+
+ local gen_ls_tex_yellow = "homedecor_generic_light_source_off.png"
+ if onflag then gen_ls_tex_yellow = "homedecor_generic_light_source_yellow.png" end
+
+ local lighttex = "homedecor_blanktile.png"
if onflag then
- lighttex_tb = "homedecor_lattice_lantern_small_tb_light.png"
- lighttex_sides = "homedecor_lattice_lantern_small_sides_light.png"
- else
- lighttex_tb = "homedecor_table_generic_light_source_off.png"
- lighttex_sides = "homedecor_table_generic_light_source_off.png"
+ lighttex = {
+ name = "homedecor_plasma_ball_streamers.png",
+ animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0},
+ }
end
- homedecor.register("lattice_lantern_small_"..onoff, {
- description = S("Lattice lantern/light (small)"),
+ homedecor.register("plasma_ball_"..light_brightn_name, {
+ description = S("Plasma Ball"),
+ mesh = "homedecor_plasma_ball.obj",
tiles = {
- lighttex_tb.."^homedecor_lattice_lantern_small_tb_overlay.png",
- lighttex_tb.."^homedecor_lattice_lantern_small_tb_overlay.png",
- lighttex_sides.."^homedecor_lattice_lantern_small_sides_overlay.png"
+ { name = "homedecor_generic_plastic.png", color = homedecor.color_black },
+ lighttex,
+ "homedecor_plasma_ball_glass.png"
},
+ inventory_image = "homedecor_plasma_ball_inv.png",
selection_box = {
type = "fixed",
- fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
- },
- node_box = {
- type = "fixed",
- fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
- },
- groups = { snappy = 3, not_in_creative_inventory = nici },
- light_source = onflag and (default.LIGHT_MAX - 2) or nil,
- sounds = default.node_sound_glass_defaults(),
- on_place = minetest.rotate_node,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:lattice_lantern_small_on"}},
- }
- },
- mesecons = homedecor.mesecon_alldir_light,
- digiline = homedecor.digiline_alldir_light,
- on_punch = digiline_on_punch
- })
-
- -- "gooseneck" style desk lamps
-
- local dlamp_cbox = {
- type = "wallmounted",
- wall_side = { -0.2, -0.5, -0.15, 0.32, 0.12, 0.15 },
- }
-
- homedecor.register("desk_lamp_"..onoff, {
- description = S("Desk Lamp/Light"),
- mesh = "homedecor_desk_lamp.obj",
- tiles = {
- "homedecor_generic_metal.png",
- "homedecor_generic_metal.png",
- { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
- { name = "homedecor_table_generic_light_source_"..onoff..".png", color = brightness_tab[5] },
+ fixed = { -0.1875, -0.5, -0.1875, 0.1875, 0, 0.1875 }
},
- inventory_image = "homedecor_desk_lamp_inv.png",
- paramtype = "light",
- paramtype2 = "colorwallmounted",
- palette = "unifieddyes_palette_colorwallmounted.png",
- selection_box = dlamp_cbox,
- node_box = dlamp_cbox,
walkable = false,
- groups = {snappy=3, ud_param2_colorable = 1, not_in_creative_inventory = nici},
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
- end,
- on_rotate = unifieddyes.fix_after_screwdriver_nsew,
- light_source = onflag and (default.LIGHT_MAX - 2) or nil,
+ use_texture_alpha = true,
+ light_source = onflag and (default.LIGHT_MAX - 5) or nil,
+ sunlight_propagates = true,
+ groups = {cracky=3, oddly_breakable_by_hand=3, not_in_creative_inventory = nici},
+ sounds = default.node_sound_glass_defaults(),
on_rightclick = homedecor.toggle_light,
drop = {
items = {
- {items = {"homedecor:desk_lamp_on"}, inherit_color = true },
+ {items = {"homedecor:plasma_ball_on"}},
}
},
mesecons = homedecor.mesecon_xz_light,
@@ -721,42 +850,21 @@ for _, onoff in ipairs({"on", "off"}) do
on_punch = digiline_on_punch
})
- -- "kitchen"/"dining room" ceiling lamp
-
- homedecor.register("ceiling_lamp_"..onoff, {
- description = S("Ceiling Lamp/Light"),
- mesh = "homedecor_ceiling_lamp.obj",
- tiles = {
- "homedecor_generic_metal_brass.png",
- "homedecor_ceiling_lamp_glass.png",
- "homedecor_table_generic_light_source_"..onoff..".png",
- { name = "homedecor_generic_plastic.png", color = 0xff442d04 },
- },
- inventory_image = "homedecor_ceiling_lamp_inv.png",
- light_source = onflag and default.LIGHT_MAX or nil,
- groups = {snappy=3, not_in_creative_inventory = nici},
- walkable = false,
- on_rightclick = homedecor.toggle_light,
- drop = {
- items = {
- {items = {"homedecor:ceiling_lamp_on"}},
- }
- },
- mesecons = homedecor.mesecon_toponly_light,
- digiline = homedecor.digiline_toponly_light,
- on_punch = digiline_on_punch
- })
+ local wl_cbox = {
+ type = "fixed",
+ fixed = { -0.2, -0.5, 0, 0.2, 0.5, 0.5 },
+ }
--- rope lighting
+ -- rope lighting
- minetest.register_node(":homedecor:rope_light_on_floor_"..onoff, {
+ minetest.register_node(":homedecor:rope_light_on_floor_"..light_brightn_name, {
description = "Rope lighting (on floor)",
inventory_image = "homedecor_rope_light_on_floor.png",
paramtype = "light",
- light_source = onflag and (default.LIGHT_MAX - 3) or nil,
+ light_source = brightn_light_source[light_brightn_name],
walkable = false,
sunlight_propagates = true,
- tiles = { "homedecor_table_generic_light_source_"..onoff..".png" },
+ tiles = { gen_ls_tex_white },
drawtype = "nodebox",
node_box = {
type = "connected",
@@ -777,7 +885,6 @@ for _, onoff in ipairs({"on", "off"}) do
"homedecor:rope_light_on_floor_off",
"group:mesecon_conductor_craftable"
},
- mesh = "homedecor_chandelier.obj",
groups = {cracky=3, not_in_creative_inventory = nici},
sounds = default.node_sound_stone_defaults(),
on_rightclick = homedecor.toggle_light,
@@ -796,14 +903,14 @@ for _, onoff in ipairs({"on", "off"}) do
}
})
- minetest.register_node(":homedecor:rope_light_on_ceiling_"..onoff, {
+ minetest.register_node(":homedecor:rope_light_on_ceiling_"..light_brightn_name, {
description = "Rope lighting (on ceiling)",
inventory_image = "homedecor_rope_light_on_ceiling.png",
paramtype = "light",
- light_source = onflag and (default.LIGHT_MAX - 3) or nil,
+ light_source = brightn_light_source[light_brightn_name],
walkable = false,
sunlight_propagates = true,
- tiles = { "homedecor_table_generic_light_source_"..onoff..".png" },
+ tiles = { gen_ls_tex_white },
drawtype = "nodebox",
node_box = {
type = "connected",
@@ -824,7 +931,6 @@ for _, onoff in ipairs({"on", "off"}) do
"homedecor:rope_light_on_ceiling_off",
"group:mesecon_conductor_craftable"
},
- mesh = "homedecor_chandelier.obj",
groups = {cracky=3, not_in_creative_inventory = nici},
sounds = default.node_sound_stone_defaults(),
on_rightclick = homedecor.toggle_light,
@@ -843,10 +949,35 @@ for _, onoff in ipairs({"on", "off"}) do
}
})
+ homedecor.register("wall_lamp_"..light_brightn_name, {
+ description = S("Wall Lamp"),
+ mesh = "homedecor_wall_lamp.obj",
+ tiles = {
+ { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
+ homedecor.lux_wood,
+ gen_ls_tex_yellow,
+ "homedecor_generic_metal_wrought_iron.png"
+ },
+ use_texture_alpha = true,
+ inventory_image = "homedecor_wall_lamp_inv.png",
+ groups = {snappy=3, not_in_creative_inventory = nici},
+ light_source = onflag and (default.LIGHT_MAX - 3) or nil,
+ selection_box = wl_cbox,
+ walkable = false,
+ drop = {
+ items = {
+ {items = {"homedecor:wall_lamp_on"}},
+ }
+ },
+ on_rightclick = homedecor.toggle_light,
+ mesecons = homedecor.mesecon_alldir_light,
+ digiline = homedecor.digiline_alldir_light,
+ on_punch = digiline_on_punch
+ })
end
--- Light sources and other items that either don't turn on/off
--- or which need special light-control code.
+-------------------------------------------------------
+-- Light sources and other items that don't turn on/off
local tc_cbox = {
type = "fixed",
@@ -1078,6 +1209,33 @@ minetest.register_node(":homedecor:chandelier_brass", {
sounds = default.node_sound_stone_defaults(),
})
+homedecor.register("torch_wall", {
+ description = S("Wall Torch"),
+ mesh = "forniture_torch.obj",
+ tiles = {
+ {
+ name="forniture_torch_flame.png",
+ animation={
+ type="vertical_frames",
+ aspect_w=40,
+ aspect_h=40,
+ length=1.0,
+ },
+ },
+ { name = "homedecor_generic_metal.png", color = homedecor.color_black },
+ { name = "homedecor_generic_metal.png", color = homedecor.color_med_grey },
+ "forniture_coal.png",
+ },
+ inventory_image="forniture_torch_inv.png",
+ walkable = false,
+ light_source = 14,
+ selection_box = {
+ type = "fixed",
+ fixed = { -0.15, -0.45, 0.15, 0.15,0.35, 0.5 },
+ },
+ groups = {cracky=3},
+})
+
-- table lamps and standing lamps
local lamp_colors = {
@@ -1089,100 +1247,6 @@ local lamp_colors = {
"violet",
}
-local tlamp_cbox = {
- type = "fixed",
- fixed = { -0.25, -0.5, -0.25, 0.25, 0.5, 0.25 }
-}
-
-local slamp_cbox = {
- type = "fixed",
- fixed = { -0.25, -0.5, -0.25, 0.25, 1.5, 0.25 }
-}
-
-local function reg_lamp(suffix, nxt, light, brightness)
-
- local wool_brighten = (light or 0) * 15
- local onoff = (suffix == "off") and "off" or "on"
-
- homedecor.register("table_lamp_"..suffix, {
- description = S("Table Lamp/Light"),
- mesh = "homedecor_table_lamp.obj",
- tiles = {
- "wool_grey.png^[colorize:#ffffff:"..wool_brighten,
- { name = "homedecor_table_generic_light_source_"..onoff..".png", color = brightness_tab[brightness] },
- { name = "homedecor_generic_wood_red.png", color = 0xffffffff },
- { name = "homedecor_generic_metal.png", color = homedecor.color_black },
- },
- inventory_image = "homedecor_table_lamp_foot_inv.png^homedecor_table_lamp_top_inv.png",
- paramtype = "light",
- paramtype2 = "color",
- palette = "unifieddyes_palette_extended.png",
- walkable = false,
- light_source = light,
- selection_box = tlamp_cbox,
- sounds = default.node_sound_wood_defaults(),
- groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1,
- not_in_creative_inventory=((light ~= nil) and 1) or nil,
- },
- drop = {
- items = {
- {items = {"homedecor:table_lamp_hi"}, inherit_color = true },
- }
- },
- digiline = homedecor.digiline_xz_light,
- mesecons = homedecor.mesecon_wall_light,
- on_rightclick = on_rightclick,
- on_punch = digiline_on_punch
- })
-
- homedecor.register("standing_lamp_"..suffix, {
- description = S("Standing Lamp/Light"),
- mesh = "homedecor_standing_lamp.obj",
- tiles = {
- "wool_grey.png^[colorize:#ffffff:"..wool_brighten,
- { name = "homedecor_table_generic_light_source_"..onoff..".png", color = brightness_tab[brightness] },
- { name = "homedecor_generic_wood_red.png", color = 0xffffffff },
- { name = "homedecor_generic_metal.png", color = homedecor.color_black },
- },
- inventory_image = "homedecor_standing_lamp_foot_inv.png^homedecor_standing_lamp_top_inv.png",
- paramtype = "light",
- paramtype2 = "color",
- palette = "unifieddyes_palette_extended.png",
- walkable = false,
- light_source = light,
- groups = {cracky=2,oddly_breakable_by_hand=1, ud_param2_colorable = 1,
- not_in_creative_inventory=((light ~= nil) and 1) or nil,
- },
- selection_box = slamp_cbox,
- sounds = default.node_sound_wood_defaults(),
- on_rotate = screwdriver.rotate_simple,
- --expand = { top="air" },
- drop = {
- items = {
- {items = {"homedecor:standing_lamp_hi"}, inherit_color = true },
- }
- },
- digiline = homedecor.digiline_xz_light,
- mesecons = homedecor.mesecon_wall_light,
- on_rightclick = on_rightclick,
- on_punch = digiline_on_punch
- })
-
-
- -- for old maps that had the original 3dforniture mod
- minetest.register_alias("3dforniture:table_lamp_"..suffix, "homedecor:table_lamp_"..suffix)
-end
-
-reg_lamp("off", "low", nil, 1 )
-reg_lamp("low", "med", 3, 2 )
-reg_lamp("med", "hi", 7, 3 )
-reg_lamp("hi", "max", 11, 4 )
-reg_lamp("max", "off", 14, 5 )
-
--- mesecons compatibility
-minetest.register_alias("homedecor:table_lamp_on", "homedecor:table_lamp_max")
-minetest.register_alias("homedecor:standing_lamp_on", "homedecor:standing_lamp_max")
-
-- conversion LBM for param2 coloring
homedecor.old_static_nodes = {
@@ -1774,29 +1838,75 @@ unifieddyes.register_color_craft({
-- aliases
-minetest.register_alias("chains:chain_top", "homedecor:chain_steel_top")
-minetest.register_alias("chains:chain_top_brass", "homedecor:chain_brass_top")
-
-minetest.register_alias("chains:chandelier_steel", "homedecor:chandelier_steel")
-minetest.register_alias("chains:chandelier_brass", "homedecor:chandelier_brass")
-
-minetest.register_alias("homedecor:glowlight_half", "homedecor:glowlight_half_on")
-minetest.register_alias("homedecor:glowlight_quarter", "homedecor:glowlight_quarter_on")
-minetest.register_alias("homedecor:glowlight_small_cube", "homedecor:glowlight_small_cube_on")
-minetest.register_alias("homedecor:plasma_lamp", "homedecor:plasma_lamp_on")
-minetest.register_alias("homedecor:plasma_ball", "homedecor:plasma_ball_on")
-minetest.register_alias("homedecor:wall_lantern", "homedecor:ground_lantern")
-minetest.register_alias("homedecor:ground_lantern", "homedecor:ground_lantern_on")
-minetest.register_alias("homedecor:hanging_lantern", "homedecor:hanging_lantern_on")
-minetest.register_alias("homedecor:ceiling_lamp", "homedecor:ceiling_lamp_on")
-minetest.register_alias("homedecor:ceiling_lantern", "homedecor:ceiling_lantern_on")
-minetest.register_alias("homedecor:lattice_lantern_large", "homedecor:lattice_lantern_large_on")
-minetest.register_alias("homedecor:lattice_lantern_small", "homedecor:lattice_lantern_small_on")
-minetest.register_alias("homedecor:desk_lamp", "homedecor:desk_lamp_on")
-minetest.register_alias("homedecor:rope_light_on_floor", "homedecor:rope_light_on_floor_on")
-minetest.register_alias("homedecor:rope_light_on_ceiling", "homedecor:rope_light_on_ceiling_on")
+minetest.register_alias("chains:chain_top", "homedecor:chain_steel_top")
+minetest.register_alias("chains:chain_top_brass", "homedecor:chain_brass_top")
+
+minetest.register_alias("chains:chandelier_steel", "homedecor:chandelier_steel")
+minetest.register_alias("chains:chandelier_brass", "homedecor:chandelier_brass")
+
+minetest.register_alias("homedecor:glowlight_half", "homedecor:glowlight_half_on")
+minetest.register_alias("homedecor:glowlight_half_max", "homedecor:glowlight_half_on")
+
+minetest.register_alias("homedecor:glowlight_quarter", "homedecor:glowlight_quarter_on")
+minetest.register_alias("homedecor:glowlight_quarter_max", "homedecor:glowlight_quarter_on")
+
+minetest.register_alias("homedecor:glowlight_small_cube", "homedecor:glowlight_small_cube_on")
+minetest.register_alias("homedecor:glowlight_small_cube_max", "homedecor:glowlight_small_cube_on")
+
+minetest.register_alias("homedecor:rope_light_on_floor", "homedecor:rope_light_on_floor_on")
+minetest.register_alias("homedecor:rope_light_on_floor_max", "homedecor:rope_light_on_floor_on")
+
+minetest.register_alias("homedecor:rope_light_on_ceiling", "homedecor:rope_light_on_ceiling_on")
+minetest.register_alias("homedecor:rope_light_on_ceiling_max", "homedecor:rope_light_on_ceiling_on")
+
+minetest.register_alias("homedecor:plasma_lamp", "homedecor:plasma_lamp_on")
+minetest.register_alias("homedecor:plasma_lamp_max", "homedecor:plasma_lamp_on")
+
+minetest.register_alias("homedecor:plasma_ball", "homedecor:plasma_ball_on")
+minetest.register_alias("homedecor:plasma_ball_max", "homedecor:plasma_ball_on")
+
+minetest.register_alias("homedecor:ground_lantern", "homedecor:ground_lantern_on")
+minetest.register_alias("homedecor:ground_lantern_max", "homedecor:ground_lantern_on")
+
+minetest.register_alias("homedecor:hanging_lantern", "homedecor:hanging_lantern_on")
+minetest.register_alias("homedecor:hanging_lantern_max", "homedecor:hanging_lantern_on")
+
+minetest.register_alias("homedecor:ceiling_lantern", "homedecor:ceiling_lantern_on")
+minetest.register_alias("homedecor:ceiling_lantern_max", "homedecor:ceiling_lantern_on")
+
+minetest.register_alias("homedecor:lattice_lantern_large", "homedecor:lattice_lantern_large_on")
+minetest.register_alias("homedecor:lattice_lantern_large_max", "homedecor:lattice_lantern_large_on")
+
+minetest.register_alias("homedecor:lattice_lantern_small", "homedecor:lattice_lantern_small_on")
+minetest.register_alias("homedecor:lattice_lantern_small_max", "homedecor:lattice_lantern_small_on")
+
+minetest.register_alias("homedecor:desk_lamp", "homedecor:desk_lamp_on")
+minetest.register_alias("homedecor:desk_lamp_max", "homedecor:desk_lamp_on")
+
+minetest.register_alias("homedecor:ceiling_lamp", "homedecor:ceiling_lamp_on")
+minetest.register_alias("homedecor:ceiling_lamp_max", "homedecor:ceiling_lamp_on")
+
+minetest.register_alias("homedecor:table_lamp", "homedecor:table_lamp_on")
+minetest.register_alias("homedecor:table_lamp_max", "homedecor:table_lamp_on")
+
+minetest.register_alias("homedecor:standing_lamp", "homedecor:standing_lamp_on")
+minetest.register_alias("homedecor:standing_lamp_max", "homedecor:standing_lamp_on")
+
+minetest.register_alias("homedecor:wall_lamp", "homedecor:wall_lamp_on")
+minetest.register_alias("homedecor:wall_lamp_max", "homedecor:wall_lamp_on")
+
+-- for old maps that had the original 3dforniture mod
+minetest.register_alias("3dforniture:table_lamp", "homedecor:table_lamp_on")
+
+minetest.register_alias("3dforniture:torch_wall", "homedecor:torch_wall")
+minetest.register_alias("torch_wall", "homedecor:torch_wall")
if minetest.get_modpath("darkage") then
- minetest.register_alias("homedecor:lattice_lantern_large_on", "darkage:lamp")
minetest.register_alias("homedecor:lattice_lantern_large_off", "darkage:lamp")
+ minetest.register_alias("homedecor:lattice_lantern_large_low", "darkage:lamp")
+ minetest.register_alias("homedecor:lattice_lantern_large_med", "darkage:lamp")
+ minetest.register_alias("homedecor:lattice_lantern_large_hi", "darkage:lamp")
+ minetest.register_alias("homedecor:lattice_lantern_large_max", "darkage:lamp")
+ minetest.register_alias("homedecor:lattice_lantern_large_on", "darkage:lamp")
+ minetest.register_alias("homedecor:lattice_lantern_large", "darkage:lamp")
end
diff --git a/homedecor_lighting/textures/homedecor_table_generic_light_source_off.png b/homedecor_lighting/textures/homedecor_generic_light_source_off.png
index e18bb2c..e18bb2c 100644
--- a/homedecor_lighting/textures/homedecor_table_generic_light_source_off.png
+++ b/homedecor_lighting/textures/homedecor_generic_light_source_off.png
Binary files differ
diff --git a/homedecor_lighting/textures/homedecor_table_generic_light_source_on.png b/homedecor_lighting/textures/homedecor_generic_light_source_white.png
index cd93c8f..cd93c8f 100644
--- a/homedecor_lighting/textures/homedecor_table_generic_light_source_on.png
+++ b/homedecor_lighting/textures/homedecor_generic_light_source_white.png
Binary files differ
diff --git a/homedecor_common/textures/homedecor_light.png b/homedecor_lighting/textures/homedecor_generic_light_source_yellow.png
index ca304e9..ca304e9 100644
--- a/homedecor_common/textures/homedecor_light.png
+++ b/homedecor_lighting/textures/homedecor_generic_light_source_yellow.png
Binary files differ
diff --git a/ilights/init.lua b/ilights/init.lua
index 2b4c396..2716d5c 100644
--- a/ilights/init.lua
+++ b/ilights/init.lua
@@ -70,6 +70,15 @@ local player_last_clicked = {}
local digiline_on_punch
+local onoff_tab = {
+ ["off"] = "off",
+ ["low"] = "off",
+ ["med"] = "on",
+ ["hi"] = "on",
+ ["max"] = "on",
+ ["on"] = "on",
+}
+
if minetest.get_modpath("digilines") then
local on_digiline_receive_string = function(pos, node, channel, msg)
@@ -77,11 +86,17 @@ if minetest.get_modpath("digilines") then
local setchan = meta:get_string("channel")
if setchan ~= channel then return end
- if msg and msg ~= "" and type(msg) == "string" then
- if msg == "off" or msg == "on" then
+ if msg and msg ~= "" then
+ local n = tonumber(msg)
+ if n then
+ msg = (n > 3) and "on" or "off" -- same threshold as in homedecor's lights
+ end
+
+ local light = onoff_tab[msg]
+ if light then
local basename = string.sub(node.name, 1, string.find(node.name, "_", -5) - 1)
- if minetest.registered_nodes[basename.."_"..msg] then
- minetest.swap_node(pos, {name = basename.."_"..msg, param2 = node.param2})
+ if minetest.registered_nodes[basename.."_"..light] then
+ minetest.swap_node(pos, {name = basename.."_"..light, param2 = node.param2})
end
end
end
diff --git a/technic/machines/register/alloy_recipes.lua b/technic/machines/register/alloy_recipes.lua
index d5a4a4e..a058dad 100644
--- a/technic/machines/register/alloy_recipes.lua
+++ b/technic/machines/register/alloy_recipes.lua
@@ -28,6 +28,7 @@ local recipes = {
-- The highest volume use of carbon black is as a reinforcing filler in rubber products, especially tires.
-- "[Compounding a] pure gum vulcanizate … with 50% of its weight of carbon black improves its tensile strength and wear resistance …"
{"technic:raw_latex 4", "technic:coal_dust 2", "technic:rubber 6", 2},
+ {"default:ice", "bucket:bucket_empty", "bucket:bucket_water", 1 },
}
for _, data in pairs(recipes) do
diff --git a/unified_inventory/internal.lua b/unified_inventory/internal.lua
index aa7ce66..0f7fa34 100644
--- a/unified_inventory/internal.lua
+++ b/unified_inventory/internal.lua
@@ -297,15 +297,13 @@ function unified_inventory.apply_filter(player, filter, search_dir)
return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true)
end
end
- local is_creative = unified_inventory.is_creative(player_name)
unified_inventory.filtered_items_list[player_name]={}
for name, def in pairs(minetest.registered_items) do
if (not def.groups.not_in_creative_inventory
or def.groups.not_in_creative_inventory == 0)
and def.description
and def.description ~= ""
- and ffilter(name, def)
- and (is_creative or unified_inventory.crafts_for.recipe[def.name]) then
+ and ffilter(name, def) then
table.insert(unified_inventory.filtered_items_list[player_name], name)
end
end
diff --git a/unified_inventory/textures/bags_large.png b/unified_inventory/textures/bags_large.png
index 6d56299..187021c 100644
--- a/unified_inventory/textures/bags_large.png
+++ b/unified_inventory/textures/bags_large.png
Binary files differ
diff --git a/unified_inventory/textures/bags_medium.png b/unified_inventory/textures/bags_medium.png
index 59ba11d..d908883 100644
--- a/unified_inventory/textures/bags_medium.png
+++ b/unified_inventory/textures/bags_medium.png
Binary files differ
diff --git a/unified_inventory/textures/bags_small.png b/unified_inventory/textures/bags_small.png
index d48ffcb..9e4f4f6 100644
--- a/unified_inventory/textures/bags_small.png
+++ b/unified_inventory/textures/bags_small.png
Binary files differ
diff --git a/unified_inventory/textures/ui_1_icon.png b/unified_inventory/textures/ui_1_icon.png
index f4e85a0..ed4ceb9 100644
--- a/unified_inventory/textures/ui_1_icon.png
+++ b/unified_inventory/textures/ui_1_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_2_icon.png b/unified_inventory/textures/ui_2_icon.png
index 96175a6..f4566d8 100644
--- a/unified_inventory/textures/ui_2_icon.png
+++ b/unified_inventory/textures/ui_2_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_3_icon.png b/unified_inventory/textures/ui_3_icon.png
index 1db2916..ff6ebbb 100644
--- a/unified_inventory/textures/ui_3_icon.png
+++ b/unified_inventory/textures/ui_3_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_4_icon.png b/unified_inventory/textures/ui_4_icon.png
index f344af4..3a12bfd 100644
--- a/unified_inventory/textures/ui_4_icon.png
+++ b/unified_inventory/textures/ui_4_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_5_icon.png b/unified_inventory/textures/ui_5_icon.png
index e5dc4b0..c389152 100644
--- a/unified_inventory/textures/ui_5_icon.png
+++ b/unified_inventory/textures/ui_5_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_bags_icon.png b/unified_inventory/textures/ui_bags_icon.png
index 6d56299..2882a23 100644
--- a/unified_inventory/textures/ui_bags_icon.png
+++ b/unified_inventory/textures/ui_bags_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_bags_lg_form.png b/unified_inventory/textures/ui_bags_lg_form.png
index 713cacc..24dab30 100644
--- a/unified_inventory/textures/ui_bags_lg_form.png
+++ b/unified_inventory/textures/ui_bags_lg_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_bags_main_form.png b/unified_inventory/textures/ui_bags_main_form.png
index 37450f3..8c168d2 100644
--- a/unified_inventory/textures/ui_bags_main_form.png
+++ b/unified_inventory/textures/ui_bags_main_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_bags_med_form.png b/unified_inventory/textures/ui_bags_med_form.png
index 33e922e..27a1591 100644
--- a/unified_inventory/textures/ui_bags_med_form.png
+++ b/unified_inventory/textures/ui_bags_med_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_bags_sm_form.png b/unified_inventory/textures/ui_bags_sm_form.png
index b3b66bb..6234eb8 100644
--- a/unified_inventory/textures/ui_bags_sm_form.png
+++ b/unified_inventory/textures/ui_bags_sm_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_bags_trash.png b/unified_inventory/textures/ui_bags_trash.png
index 6338999..0bc11c5 100644
--- a/unified_inventory/textures/ui_bags_trash.png
+++ b/unified_inventory/textures/ui_bags_trash.png
Binary files differ
diff --git a/unified_inventory/textures/ui_blank_image.png b/unified_inventory/textures/ui_blank_image.png
index a8735b8..83d9d1a 100644
--- a/unified_inventory/textures/ui_blank_image.png
+++ b/unified_inventory/textures/ui_blank_image.png
Binary files differ
diff --git a/unified_inventory/textures/ui_blue_icon_background.png b/unified_inventory/textures/ui_blue_icon_background.png
index 9434217..2f872a4 100644
--- a/unified_inventory/textures/ui_blue_icon_background.png
+++ b/unified_inventory/textures/ui_blue_icon_background.png
Binary files differ
diff --git a/unified_inventory/textures/ui_circular_arrows_icon.png b/unified_inventory/textures/ui_circular_arrows_icon.png
index d687bbf..c6846e6 100644
--- a/unified_inventory/textures/ui_circular_arrows_icon.png
+++ b/unified_inventory/textures/ui_circular_arrows_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_craft_icon.png b/unified_inventory/textures/ui_craft_icon.png
index fbe4cc7..a2283e3 100644
--- a/unified_inventory/textures/ui_craft_icon.png
+++ b/unified_inventory/textures/ui_craft_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_craftgrid_icon.png b/unified_inventory/textures/ui_craftgrid_icon.png
index 6731327..5111f1e 100644
--- a/unified_inventory/textures/ui_craftgrid_icon.png
+++ b/unified_inventory/textures/ui_craftgrid_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_craftguide_form.png b/unified_inventory/textures/ui_craftguide_form.png
index 3cd8643..d9be53f 100644
--- a/unified_inventory/textures/ui_craftguide_form.png
+++ b/unified_inventory/textures/ui_craftguide_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_craftguide_icon.png b/unified_inventory/textures/ui_craftguide_icon.png
index 5866b7b..d6c89e6 100644
--- a/unified_inventory/textures/ui_craftguide_icon.png
+++ b/unified_inventory/textures/ui_craftguide_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_crafting_form.png b/unified_inventory/textures/ui_crafting_form.png
index 8c980ac..9043287 100644
--- a/unified_inventory/textures/ui_crafting_form.png
+++ b/unified_inventory/textures/ui_crafting_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_doubleleft_icon.png b/unified_inventory/textures/ui_doubleleft_icon.png
index 587bb25..64d50c0 100644
--- a/unified_inventory/textures/ui_doubleleft_icon.png
+++ b/unified_inventory/textures/ui_doubleleft_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_doubleright_icon.png b/unified_inventory/textures/ui_doubleright_icon.png
index f552acc..af20930 100644
--- a/unified_inventory/textures/ui_doubleright_icon.png
+++ b/unified_inventory/textures/ui_doubleright_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_form_bg.png b/unified_inventory/textures/ui_form_bg.png
index 74a6a3b..d973b34 100644
--- a/unified_inventory/textures/ui_form_bg.png
+++ b/unified_inventory/textures/ui_form_bg.png
Binary files differ
diff --git a/unified_inventory/textures/ui_gohome_icon.png b/unified_inventory/textures/ui_gohome_icon.png
index b3397ef..c5126ae 100644
--- a/unified_inventory/textures/ui_gohome_icon.png
+++ b/unified_inventory/textures/ui_gohome_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_green_icon_background.png b/unified_inventory/textures/ui_green_icon_background.png
index b06c29c..ea28c82 100644
--- a/unified_inventory/textures/ui_green_icon_background.png
+++ b/unified_inventory/textures/ui_green_icon_background.png
Binary files differ
diff --git a/unified_inventory/textures/ui_group.png b/unified_inventory/textures/ui_group.png
index 2e4714a..b6b8d28 100644
--- a/unified_inventory/textures/ui_group.png
+++ b/unified_inventory/textures/ui_group.png
Binary files differ
diff --git a/unified_inventory/textures/ui_home_icon.png b/unified_inventory/textures/ui_home_icon.png
index e44419d..b9ce4f3 100644
--- a/unified_inventory/textures/ui_home_icon.png
+++ b/unified_inventory/textures/ui_home_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_left_icon.png b/unified_inventory/textures/ui_left_icon.png
index 68cffb8..373b71e 100644
--- a/unified_inventory/textures/ui_left_icon.png
+++ b/unified_inventory/textures/ui_left_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_main_inventory.png b/unified_inventory/textures/ui_main_inventory.png
index 3d380de..b7860ca 100644
--- a/unified_inventory/textures/ui_main_inventory.png
+++ b/unified_inventory/textures/ui_main_inventory.png
Binary files differ
diff --git a/unified_inventory/textures/ui_misc_form.png b/unified_inventory/textures/ui_misc_form.png
index e74a605..2d6ad01 100644
--- a/unified_inventory/textures/ui_misc_form.png
+++ b/unified_inventory/textures/ui_misc_form.png
Binary files differ
diff --git a/unified_inventory/textures/ui_moon_icon.png b/unified_inventory/textures/ui_moon_icon.png
index b2d7b44..cec7009 100644
--- a/unified_inventory/textures/ui_moon_icon.png
+++ b/unified_inventory/textures/ui_moon_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_off_icon.png b/unified_inventory/textures/ui_off_icon.png
index 319fc6e..187e59a 100644
--- a/unified_inventory/textures/ui_off_icon.png
+++ b/unified_inventory/textures/ui_off_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_ok_icon.png b/unified_inventory/textures/ui_ok_icon.png
index dcbda1d..4073899 100644
--- a/unified_inventory/textures/ui_ok_icon.png
+++ b/unified_inventory/textures/ui_ok_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_on_icon.png b/unified_inventory/textures/ui_on_icon.png
index a9884cf..0f5c48f 100644
--- a/unified_inventory/textures/ui_on_icon.png
+++ b/unified_inventory/textures/ui_on_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_pencil_icon.png b/unified_inventory/textures/ui_pencil_icon.png
index a73b740..dfcc19b 100644
--- a/unified_inventory/textures/ui_pencil_icon.png
+++ b/unified_inventory/textures/ui_pencil_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_red_icon_background.png b/unified_inventory/textures/ui_red_icon_background.png
index 67f5dcc..8d4d807 100644
--- a/unified_inventory/textures/ui_red_icon_background.png
+++ b/unified_inventory/textures/ui_red_icon_background.png
Binary files differ
diff --git a/unified_inventory/textures/ui_reset_icon.png b/unified_inventory/textures/ui_reset_icon.png
index ec9ef62..e966685 100644
--- a/unified_inventory/textures/ui_reset_icon.png
+++ b/unified_inventory/textures/ui_reset_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_right_icon.png b/unified_inventory/textures/ui_right_icon.png
index 1f11868..cbdab76 100644
--- a/unified_inventory/textures/ui_right_icon.png
+++ b/unified_inventory/textures/ui_right_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_search_icon.png b/unified_inventory/textures/ui_search_icon.png
index b529e43..2934bdc 100644
--- a/unified_inventory/textures/ui_search_icon.png
+++ b/unified_inventory/textures/ui_search_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_sethome_icon.png b/unified_inventory/textures/ui_sethome_icon.png
index 5c56d64..4c0f6e5 100644
--- a/unified_inventory/textures/ui_sethome_icon.png
+++ b/unified_inventory/textures/ui_sethome_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_single_slot.png b/unified_inventory/textures/ui_single_slot.png
index ef2a246..63da98d 100644
--- a/unified_inventory/textures/ui_single_slot.png
+++ b/unified_inventory/textures/ui_single_slot.png
Binary files differ
diff --git a/unified_inventory/textures/ui_skip_backward_icon.png b/unified_inventory/textures/ui_skip_backward_icon.png
index fde4fea..eac6e4c 100644
--- a/unified_inventory/textures/ui_skip_backward_icon.png
+++ b/unified_inventory/textures/ui_skip_backward_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_skip_forward_icon.png b/unified_inventory/textures/ui_skip_forward_icon.png
index 182e7ed..3f85a9f 100644
--- a/unified_inventory/textures/ui_skip_forward_icon.png
+++ b/unified_inventory/textures/ui_skip_forward_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_sun_icon.png b/unified_inventory/textures/ui_sun_icon.png
index 262b1f3..11c7eef 100644
--- a/unified_inventory/textures/ui_sun_icon.png
+++ b/unified_inventory/textures/ui_sun_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_trash_icon.png b/unified_inventory/textures/ui_trash_icon.png
index 081bac7..c5ac97c 100644
--- a/unified_inventory/textures/ui_trash_icon.png
+++ b/unified_inventory/textures/ui_trash_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_waypoint_set_icon.png b/unified_inventory/textures/ui_waypoint_set_icon.png
index 6eb9d19..4649a4d 100644
--- a/unified_inventory/textures/ui_waypoint_set_icon.png
+++ b/unified_inventory/textures/ui_waypoint_set_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_waypoints_icon.png b/unified_inventory/textures/ui_waypoints_icon.png
index 530c1d7..91d6e3b 100644
--- a/unified_inventory/textures/ui_waypoints_icon.png
+++ b/unified_inventory/textures/ui_waypoints_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_xyz_icon.png b/unified_inventory/textures/ui_xyz_icon.png
index 9b48acb..003ea63 100644
--- a/unified_inventory/textures/ui_xyz_icon.png
+++ b/unified_inventory/textures/ui_xyz_icon.png
Binary files differ
diff --git a/unified_inventory/textures/ui_xyz_on_icon.png b/unified_inventory/textures/ui_xyz_on_icon.png
index 9b48acb..003ea63 100644
--- a/unified_inventory/textures/ui_xyz_on_icon.png
+++ b/unified_inventory/textures/ui_xyz_on_icon.png
Binary files differ