forked from Mineclonia/Mineclonia
Add back the redstone help
This commit is contained in:
parent
aebe0dec9f
commit
5b38bb2737
|
@ -1 +1,2 @@
|
||||||
mesecons
|
mesecons
|
||||||
|
doc?
|
||||||
|
|
|
@ -214,21 +214,33 @@ local function register_wires()
|
||||||
local tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off }
|
local tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off }
|
||||||
local tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on }
|
local tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on }
|
||||||
|
|
||||||
|
local wirehelp, longdesc, usagehelp
|
||||||
if nodeid == "00000000" then
|
if nodeid == "00000000" then
|
||||||
-- Non-connected redstone wire
|
-- Non-connected redstone wire
|
||||||
nodebox.fixed = {-8/16, -.5, -8/16, 8/16, -.5+1/64, 8/16}
|
nodebox.fixed = {-8/16, -.5, -8/16, 8/16, -.5+1/64, 8/16}
|
||||||
-- “Dot” texture
|
-- “Dot” texture
|
||||||
tiles_off = { dot_off, dot_off, "blank.png", "blank.png", "blank.png", "blank.png" }
|
tiles_off = { dot_off, dot_off, "blank.png", "blank.png", "blank.png", "blank.png" }
|
||||||
tiles_on = { dot_on, dot_on, "blank.png", "blank.png", "blank.png", "blank.png" }
|
tiles_on = { dot_on, dot_on, "blank.png", "blank.png", "blank.png", "blank.png" }
|
||||||
|
|
||||||
|
longdesc = [[Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on trail the ground as a trail.
|
||||||
|
A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.
|
||||||
|
Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.]]
|
||||||
|
usagehelp = [[Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills. An easy way to power a redstone trail is by placing a redstone torch.
|
||||||
|
|
||||||
|
Read the help entries on the other redstone components to learn how redstone components interact.]]
|
||||||
else
|
else
|
||||||
-- Connected redstone wire
|
-- Connected redstone wire
|
||||||
table.insert(nodebox, box_center)
|
table.insert(nodebox, box_center)
|
||||||
tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off, }
|
tiles_off = { crossing_off, crossing_off, straight0_off, straight1_off, straight0_off, straight1_off, }
|
||||||
tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on, }
|
tiles_on = { crossing_on, crossing_on, straight0_on, straight1_on, straight0_on, straight1_on, }
|
||||||
|
wirehelp = false
|
||||||
end
|
end
|
||||||
|
|
||||||
mesecon.register_node(":mesecons:wire_"..nodeid, {
|
mesecon.register_node(":mesecons:wire_"..nodeid, {
|
||||||
description = "Redstone",
|
description = "Redstone",
|
||||||
|
_doc_items_create_entry = wirehelp,
|
||||||
|
_doc_items_longdesc = longdesc,
|
||||||
|
_doc_items_usagehelp = usagehelp,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
inventory_image = "redstone_redstone_dust.png",
|
inventory_image = "redstone_redstone_dust.png",
|
||||||
wield_image = "redstone_redstone_dust.png",
|
wield_image = "redstone_redstone_dust.png",
|
||||||
|
@ -243,6 +255,14 @@ local function register_wires()
|
||||||
}, {tiles = tiles_off, mesecons = meseconspec_off, groups = groups_off},
|
}, {tiles = tiles_off, mesecons = meseconspec_off, groups = groups_off},
|
||||||
{tiles = tiles_on, mesecons = meseconspec_on, groups = groups_on})
|
{tiles = tiles_on, mesecons = meseconspec_on, groups = groups_on})
|
||||||
|
|
||||||
|
-- Add Help entry aliases for e.g. making it identifiable by the lookup tool [doc_identifier]
|
||||||
|
if minetest.get_modpath("doc") then
|
||||||
|
if nodeid ~= "00000000" then
|
||||||
|
doc.add_entry_alias("nodes", "mesecons:wire_00000000_off", "nodes", "mesecons:wire_"..nodeid.."_off")
|
||||||
|
end
|
||||||
|
doc.add_entry_alias("nodes", "mesecons:wire_00000000_off", "nodes", "mesecons:wire_"..nodeid.."_on")
|
||||||
|
end
|
||||||
|
|
||||||
if (nid_inc(nid) == false) then return end
|
if (nid_inc(nid) == false) then return end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue