Proper code indentation, remove legacy code

This commit is contained in:
Wuzzy 2016-03-26 20:38:25 +01:00
parent 514ec4616a
commit d3a5ee97c1

View File

@ -76,8 +76,6 @@ local function fill_chest(pos)
if n.name == "tsm_mines:dummy" then
minetest.set_node(pos, {name="default:chest"})
local meta = minetest.get_meta(pos)
--meta:set_string("formspec",default.chest_formspec)
--meta:set_string("infotext", "Chest")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
local stacks = {}
@ -101,16 +99,12 @@ end
local function check_dir(dir,old_dir)
if old_dir == 1 and dir == 3 then
--n_switch = 2
return true
elseif old_dir == 3 and dir == 1 then
--n_switch = 4
return true
elseif old_dir == 2 and dir == 4 then
--n_switch = 1
return true
elseif old_dir == 4 and dir == 2 then
--n_switch = 3
return true
end
return false
@ -209,16 +203,12 @@ local function make_mine(mpos,p2,p3, vm_data, vx_area,cnt)
end
if switch == 1 then
pos.z = pos.z+20
--pos.x = pos.x+step
elseif switch == 2 then
pos.x = pos.x+20
--pos.z = pos.z+step
elseif switch == 3 then
pos.z = pos.z-20
--pos.x = pos.x+step
elseif switch == 4 then
pos.x = pos.x-20
--pos.z = pos.z+step
end
end
if cnt == 0 then
@ -251,7 +241,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
if cnt < 8/MINE_FACTOR then return end
cnt = 0
--if math.random(0,100) > 85 then return end
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local data = vm:get_data()
local va = VoxelArea:new{ MinEdge = emin, MaxEdge = emax }