update digistuff, homedecor, ilights, technic, and unified_inventory
|
@ -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.
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
After Width: | Height: | Size: 6.2 KiB |
|
@ -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"},
|
||||
}
|
||||
})
|
|
@ -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')
|
||||
|
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 594 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 961 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 928 B |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 81 B After Width: | Height: | Size: 71 B |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 962 B |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 988 B After Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.1 KiB |