minor bugfixes
This commit is contained in:
parent
ec76d94ee3
commit
049baaa2dc
@ -87,8 +87,12 @@ local function plan(images)
|
||||
for x=1,#images[1] do
|
||||
local img = images[y][x] or false
|
||||
if img ~= false then
|
||||
local x_offs, y_offs = (x-1) * 1, (y-1) * 1 + 0.8
|
||||
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";1,1;"..img.."]"
|
||||
local x_offs, y_offs = (x-1) * 0.9, (y-1) * 0.9 + 0.8
|
||||
if string.find(img, ":") then
|
||||
tbl[#tbl+1] = "item_image["..x_offs..","..y_offs..";1,1;"..img.."]"
|
||||
else
|
||||
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";1,1;"..img.."]"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -100,35 +104,35 @@ local function formspec_help(player_name)
|
||||
local cat, key = get_ref(player_name)
|
||||
local hdef = HelpPages[cat][key] or DUMMY
|
||||
local index = formspec_context[player_name].index or 1
|
||||
local box = "box[7.5,0.9;1,1.1;#BBBBBB]"
|
||||
local box = "box[8.5,0.9;1,1.1;#BBBBBB]"
|
||||
|
||||
if hdef.item_name == "-" then
|
||||
bttn = ""
|
||||
elseif hdef.item_name == "plan" then
|
||||
bttn = "button[7.6,1;1,1;plan;"..S("Plan").."]"
|
||||
bttn = "button[8.6,1;1,1;plan;"..S("Plan").."]"
|
||||
else
|
||||
bttn = box.."item_image[7.6,1;1,1;"..hdef.item_name.."]"
|
||||
bttn = box.."item_image[8.6,1;1,1;"..hdef.item_name.."]"
|
||||
end
|
||||
return "size[9,9]"..
|
||||
return "size[10,9]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
"item_image[7.6,0;1,1;techage:construction_board]"..
|
||||
"item_image[8.6,0;1,1;techage:construction_board]"..
|
||||
bttn..
|
||||
"table[0.1,0;7,4;page;"..entries_as_string(player_name)..";"..index.."]"..
|
||||
"textarea[0.3,4.7;9,5.3;help;"..S("Help")..":;"..hdef.text.."]"..
|
||||
"box[0,4.75;8.775,4.45;#000000]"
|
||||
"table[0.1,0;8,4;page;"..entries_as_string(player_name)..";"..index.."]"..
|
||||
"textarea[0.3,4.7;10,5.3;help;"..S("Help")..":;"..hdef.text.."]"..
|
||||
"box[0,4.75;9.775,4.45;#000000]"
|
||||
end
|
||||
|
||||
local function formspec_plan(player_name)
|
||||
local cat, key = get_ref(player_name)
|
||||
local hdef = HelpPages[cat][key] or DUMMY
|
||||
return "size[9,9]"..
|
||||
return "size[10,9]"..
|
||||
default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
default.gui_slots..
|
||||
"label[0,0;"..hdef.name..":]"..
|
||||
"button[8,0;1,0.8;back;<<]"..
|
||||
"button[9,0;1,0.8;back;<<]"..
|
||||
plan(hdef.images)
|
||||
end
|
||||
|
||||
|
@ -62,6 +62,7 @@ function techage.mark_region(name, pos1, pos2)
|
||||
end
|
||||
|
||||
marker_region[name] = markers
|
||||
minetest.after(20, techage.unmark_region, name)
|
||||
end
|
||||
|
||||
function techage.switch_region(name, pos1, pos2)
|
||||
|
@ -59,13 +59,13 @@ local Images = {
|
||||
{false, false, false, false, false, false, false},
|
||||
{"techage_steam_knee.png", 'techage_steam_pipe.png', 'techage_steam_pipe.png',
|
||||
'techage_steam_pipe.png', 'techage_steam_pipe.png', 'techage_steam_pipe.png', "techage_steam_knee.png^[transformR270"},
|
||||
{'techage_steam_pipe.png^[transformR90', "techage_boiler_top_ta3.png", 'techage_steam_pipe.png',
|
||||
{'techage_steam_pipe.png^[transformR90', "techage:coalboiler_top", 'techage_steam_pipe.png',
|
||||
'techage_steam_knee.png^[transformR270', 'techage_steam_knee.png',
|
||||
"techage_filling_ta3.png^techage_frame_ta3.png^techage_cooler.png",
|
||||
"techage_steam_knee.png^[transformR180"},
|
||||
{"techage_steam_knee.png^[transformR90", "techage_boiler_bottom_ta3.png", false, 'techage_steam_pipe.png^[transformR90',
|
||||
{"techage_steam_knee.png^[transformR90", "techage:coalboiler_base", false, 'techage_steam_pipe.png^[transformR90',
|
||||
'techage_steam_pipe.png^[transformR90'},
|
||||
{false, "techage_firebox_ta3.png", false, "techage_steam_knee.png^[transformR90",
|
||||
{false, "techage:coalfirebox", false, "techage_steam_knee.png^[transformR90",
|
||||
"techage_filling_ta3.png^techage_appl_turbine.png^techage_frame_ta3.png",
|
||||
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_generator.png"},
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ techage.register_category_page("ta4",
|
||||
|
||||
local ROTOR = "techage_wind_turbine_inv.png"
|
||||
local CANELLE = "techage_rotor.png"
|
||||
local PILLAR = "techage_pillar_inv.png"
|
||||
local PILLAR = "techage:pillar"
|
||||
|
||||
local Images = {
|
||||
{false, false, false, ROTOR, CANELLE, false, false},
|
||||
|
@ -194,8 +194,10 @@ techage.register_node({"techage:ta3_nodedetector_off", "techage:ta3_nodedetector
|
||||
|
||||
techage.register_entry_page("ta3l", "node_detector",
|
||||
S("TA3 Node Detector"),
|
||||
S("The Node Detector can send a 'on' signal when it detects that nodes appear@n"..
|
||||
S("The Node Detector sends an 'on' signal when it detects that nodes appear@n"..
|
||||
"or disappear, but has to be configured accordingly.@n"..
|
||||
"After the node switches back to the default state (grey block)@n"..
|
||||
"an 'off' signal will be sent.@n"..
|
||||
"Valid nodes are all kind of blocks and plants.@n"..
|
||||
"The sensor range is 3 nodes/meters in the arrow direction."),
|
||||
"techage:ta3_nodedetector_on")
|
||||
|
@ -27,8 +27,8 @@ local Images = {
|
||||
{false, false, false, false, false, false, false},
|
||||
{false, false, false, false, false, false, false},
|
||||
{false, false, "techage_steam_knee.png", 'techage_steam_pipe.png', "techage_steam_knee.png^[transformR270"},
|
||||
{false, false, "techage_boiler_top_ta2.png", false, 'techage_steam_pipe.png^[transformR90'},
|
||||
{false, false, "techage_boiler_bottom_ta2.png", false, 'techage_steam_pipe.png^[transformR90'},
|
||||
{false, false, "techage:boiler2", false, 'techage_steam_pipe.png^[transformR90'},
|
||||
{false, false, "techage:boiler1", false, 'techage_steam_pipe.png^[transformR90'},
|
||||
{false, false, "techage_firebox.png^techage_appl_firehole.png^techage_frame_ta2.png", false,
|
||||
"techage_steam_knee.png^[transformR90",
|
||||
"techage_filling_ta2.png^techage_cylinder.png^techage_frame_ta2.png",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 915 B |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 616 B |
@ -44,7 +44,10 @@ local function hide_node(pos, node, meta, placer)
|
||||
and not ndef.on_construct then
|
||||
meta:set_string("techage_hidden_nodename", node.name)
|
||||
meta:set_string("techage_hidden_param2", node.param2)
|
||||
local param2 = minetest.dir_to_facedir(placer:get_look_dir(), true)
|
||||
local param2 = 0
|
||||
if ndef.paramtype2 and ndef.paramtype2 == "facedir" then
|
||||
param2 = minetest.dir_to_facedir(placer:get_look_dir(), true)
|
||||
end
|
||||
minetest.swap_node(pos, {name = taken:get_name(), param2 = param2})
|
||||
inv:set_stack("main", 1, stack)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user