diff --git a/skyblock/register_misc.lua b/skyblock/register_misc.lua index 0cb6d66..da87deb 100644 --- a/skyblock/register_misc.lua +++ b/skyblock/register_misc.lua @@ -80,7 +80,7 @@ minetest.register_on_generated(function(minp, maxp, seed) -- add cloud floor local cloud_y = skyblock.world_bottom-2 - if minp.y<=cloud_y and maxp.y>=cloud_y then + if minp.y<=cloud_y and maxp.y>=cloud_y then for x=minp.x,maxp.x do for z=minp.z,maxp.z do data[area:index(x,cloud_y,z)] = id_cloud @@ -100,7 +100,7 @@ minetest.register_on_generated(function(minp, maxp, seed) end end end - + -- add starting blocks --[[ local start_pos_list = skyblock.get_start_positions_in_mapchunk(minp, maxp) @@ -115,7 +115,7 @@ minetest.register_on_generated(function(minp, maxp, seed) vm:write_to_map(data) -- vm:update_liquids() data = nil -end) +end) -- no placing low nodes diff --git a/skyblock/register_node.lua b/skyblock/register_node.lua index ff6bbb6..662567c 100644 --- a/skyblock/register_node.lua +++ b/skyblock/register_node.lua @@ -16,7 +16,7 @@ minetest.register_node('skyblock:quest', { is_ground_content = true, paramtype = 'light', sunlight_propagates = true, - light_source = 15, + light_source = 15, can_dig = function(pos, player) return false end, diff --git a/skyblock/skyblock.lua b/skyblock/skyblock.lua index 9ce7d31..e5afc75 100644 --- a/skyblock/skyblock.lua +++ b/skyblock/skyblock.lua @@ -133,14 +133,14 @@ end function skyblock.spawn_player(player) local player_name = player:get_player_name() skyblock.log('skyblock.spawn_player() '..player_name) - + -- find the player spawn point local spawn = skyblock.get_spawn(player_name) if spawn == nil then spawn = skyblock.get_next_spawn() skyblock.set_spawn(player_name,spawn) end - + -- add the start block and teleport the player skyblock.make_spawn_blocks(spawn,player_name) player:set_pos({x=spawn.x,y=spawn.y+6,z=spawn.z}) @@ -150,10 +150,10 @@ end -- load schem local schempath = minetest.get_modpath(minetest.get_current_modname())..'/schems' function skyblock.load_schem(origin, filename) - local file, err = io.open(schempath..'/'..filename, 'rb') + local file,_ = io.open(schempath..'/'..filename, 'rb') local value = file:read('*a') file:close() - + local nodes = minetest.deserialize(value) if not nodes then return nil end @@ -221,7 +221,7 @@ local function sindex(y, x) -- returns the value at (x, y) in a spiral that star return (2*l-1)^2+4*l+2*l*sn(x+y)+sn(y^2-x^2)*(l-(av(y)==l and sn(y)*x or sn(x)*y)) -- OH GOD WHAT end local function spiralt(side) - local ret, id, start, stop = {}, 0, math.floor((-side+1)/2), math.floor((side-1)/2) + local ret,_ , start, stop = {}, 0, math.floor((-side+1)/2), math.floor((side-1)/2) for i = 1, side do for j = 1, side do local id = side^2 - sindex(stop - i + 1,start + j - 1) @@ -284,7 +284,7 @@ local function load_start_positions() io.close(output) input = io.open(filename..'.start_positions', 'r') end - + -- read start positions skyblock.log('read start positions') while true do @@ -303,7 +303,7 @@ load_start_positions() -- run it now -- load the last start position from disk local function load_last_start_id() local input = io.open(filename..'.last_start_id', 'r') - + -- create last_start_id file if needed if not input then local output = io.open(filename..'.last_start_id', 'w') @@ -311,13 +311,13 @@ local function load_last_start_id() io.close(output) input = io.open(filename..'.last_start_id', 'r') end - + -- read last start id last_start_id = input:read('*n') if last_start_id == nil then last_start_id = 0 end io.close(input) - + end load_last_start_id() -- run it now diff --git a/skyblock_levels/register_abm.lua b/skyblock_levels/register_abm.lua index 1f92b6b..218d253 100644 --- a/skyblock_levels/register_abm.lua +++ b/skyblock_levels/register_abm.lua @@ -29,7 +29,6 @@ minetest.register_abm({ if minetest.get_node(pos).name == 'air' then local rand = math.random(1,8); - local node if rand==1 then node = 'default:junglegrass' elseif rand==2 then diff --git a/skyblock_levels/register_command.lua b/skyblock_levels/register_command.lua index 633299a..184d342 100644 --- a/skyblock_levels/register_command.lua +++ b/skyblock_levels/register_command.lua @@ -18,7 +18,7 @@ minetest.register_chatcommand('level', { privs = {level = true}, params = " ", func = function(name, param) - local found, _, player_name, level = param:find("^([^%s]+)%s+(.+)$") + local _, _, player_name, level = param:find("^([^%s]+)%s+(.+)$") if not player_name then player_name = name end diff --git a/skyblock_levels/register_misc.lua b/skyblock_levels/register_misc.lua index 31a3069..d6a5399 100644 --- a/skyblock_levels/register_misc.lua +++ b/skyblock_levels/register_misc.lua @@ -38,9 +38,9 @@ minetest.register_on_dieplayer(function(player) else skyblock.feats.reset_level(player_name) end - + -- back to start of this level - + end) -- player receive fields @@ -59,6 +59,6 @@ if minetest.get_modpath('unified_inventory') then tooltip = 'Skyblock Quests', action = function(player) skyblock.feats.update(player:get_player_name()) - end, + end, }) end diff --git a/skyblock_levels/skyblock.craft_guide.lua b/skyblock_levels/skyblock.craft_guide.lua index d0ad68f..dbe5401 100644 --- a/skyblock_levels/skyblock.craft_guide.lua +++ b/skyblock_levels/skyblock.craft_guide.lua @@ -38,7 +38,7 @@ skyblock.craft_guide.image_button_link = function(stack_string) if group_placeholder[stack_string] then stack_string = group_placeholder[stack_string] group = 'G' - end + end local stack = ItemStack(stack_string) local new_node_name = stack_string if( stack and stack:get_name()) then @@ -133,7 +133,7 @@ skyblock.craft_guide.get_formspec = function(node_name, fields) if outstack and outstack:get_count() and outstack:get_count()>1 then formspec = formspec..'label[4.5,3;'..tostring(outstack:get_count())..']' end - + if receipe.type=='normal' then receipe.type = 'craft' elseif receipe.type=='cooking' then diff --git a/skyblock_levels/skyblock.feats.lua b/skyblock_levels/skyblock.feats.lua index dca19ce..d39b66d 100644 --- a/skyblock_levels/skyblock.feats.lua +++ b/skyblock_levels/skyblock.feats.lua @@ -79,12 +79,12 @@ function skyblock.feats.update(player_name) end end minetest.log('action', player_name..' completed level '..level) - + skyblock.feats.add(0,info.player_name,'level') skyblock.levels[level+1].init(info.player_name) info = skyblock.levels[level+1].get_info(info.player_name) end - + -- update formspecs local player = minetest.get_player_by_name(player_name) if player then @@ -227,11 +227,11 @@ for _,v in ipairs({'doors:door_wood','doors:door_glass','doors:door_steel','door on_place(v,1); end for _,v in ipairs({ - 'default:cactus', - 'farming:seed_wheat', - 'farming:seed_cotton', + 'default:cactus', + 'farming:seed_wheat', + 'farming:seed_cotton', 'default:sign_wall', - 'default:sign_wall_wood', + 'default:sign_wall_wood', 'default:apple'}) do on_place(v,0); end @@ -272,28 +272,32 @@ local function bucket_on_use(itemstack, user, pointed_thing) if pointed_thing.type ~= 'node' then return end + -- Check if protected if minetest.is_protected(pointed_thing.under, user:get_player_name()) then return end + -- Get the Node and Registered Item local n = minetest.get_node_or_nil(pointed_thing.under) - local ndef - if n then - ndef = minetest.registered_items[n.name] - end - -- Call on_rightclick if the pointed node defines it - if ndef and ndef.on_rightclick and user and not user:get_player_control().sneak then - return ndef.on_rightclick(pointed_thing.under, n, user, itemstack) or itemstack - end - -- Check if pointing to a liquid source + local ndef + if n then + ndef = minetest.registered_items[n.name] + end + + -- Call on_rightclick if the pointed node defines it + if ndef and ndef.on_rightclick and user and not user:get_player_control().sneak then + return ndef.on_rightclick(pointed_thing.under, n, user, itemstack) or itemstack + end + + -- Check if pointing to a liquid source local liquid = bucket.liquids[n.name] if liquid ~= nil and liquid.source == n.name and liquid.itemname ~= nil then - + -- begin track bucket feats skyblock.feats.bucket_on_use(itemstack, user, pointed_thing) -- end track bucket feats - + minetest.env:add_node(pointed_thing.under, {name='air'}) return {name=liquid.itemname} end @@ -323,7 +327,7 @@ local function bucket_water_on_use(itemstack, user, pointed_thing) if ndef and ndef.on_rightclick and user and not user:get_player_control().sneak then return ndef.on_rightclick(pointed_thing.under, n, user, itemstack) or itemstack end - -- Check if pointing to a liquid + -- Check if pointing to a liquid if bucket.liquids[n.name] == nil then -- Not a liquid @@ -333,8 +337,8 @@ local function bucket_water_on_use(itemstack, user, pointed_thing) local range = tonumber(minetest.settings:get("bucket_use_range")) or false -- how far from spawn you can use water local pos = pointed_thing.under if range and (spawn==nil - or (pos.x-spawn.x > range or pos.x-spawn.x < range*-1) - or (pos.y-spawn.y > range/2 or pos.y-spawn.y < range*-1/2) + or (pos.x-spawn.x > range or pos.x-spawn.x < range*-1) + or (pos.y-spawn.y > range/2 or pos.y-spawn.y < range*-1/2) or (pos.z-spawn.z > range or pos.z-spawn.z < range*-1)) then minetest.chat_send_player(player_name, 'Cannot use bucket so far from your home.') return @@ -441,7 +445,7 @@ function skyblock.feats.save(data,player_name) if not file then mkdir(filepath) file = io.open(filepath..'/'..player_name, 'wb') - if not file then + if not file then skyblock.log('cannot open feat file for writing "'..filepath..'/'..player_name..'"') end end diff --git a/skyblock_levels/skyblock.levels.1.lua b/skyblock_levels/skyblock.levels.1.lua index eb5371d..58ffe43 100644 --- a/skyblock_levels/skyblock.levels.1.lua +++ b/skyblock_levels/skyblock.levels.1.lua @@ -38,47 +38,47 @@ skyblock.levels[level].feats = { { name = 'dig 10 Dirt', hint = nil, - feat = 'dig_dirt', - count = 10, + feat = 'dig_dirt', + count = 10, reward = 'default:stick', dignode = {'default:dirt', 'default:dirt_with_grass', 'default:dirt_with_grass_footsteps'}, }, { name = 'place 10 Dirt', hint = 'default:dirt', - feat = 'place_dirt', - count = 10, + feat = 'place_dirt', + count = 10, reward = 'default:leaves 6', placenode = {'default:dirt'}, }, { name = 'craft a Sapling and grow a Tree', hint = 'default:sapling', - feat = 'place_sapling', - count = 1, + feat = 'place_sapling', + count = 1, reward = 'default:tree', placenode = {'default:sapling'}, }, { name = 'craft an Axe and dig 16 Tree', hint = 'default:axe_wood', - feat = 'dig_tree', - count = 16, + feat = 'dig_tree', + count = 16, reward = 'default:cobble 8', dignode = {'default:tree'}, }, { name = 'craft and place a Furnace', hint = 'default:furnace', - feat = 'place_furnace', - count = 1, + feat = 'place_furnace', + count = 1, reward = 'default:axe_steel', placenode = {'default:furnace'}, }, { name = 'craft and place 50 Cobblestone', hint = 'default:cobble', - feat = 'place_cobble', + feat = 'place_cobble', count = 50, reward = 'stairs:stair_cobble 4', placenode = {'default:cobble'}, @@ -87,7 +87,7 @@ skyblock.levels[level].feats = { name = 'craft and place a Chest', hint = 'default:chest', feat = 'place_chest', - count = 1, + count = 1, reward = 'default:papyrus 5', placenode = {'default:chest'}, }, @@ -131,13 +131,13 @@ end -- get level information skyblock.levels[level].get_info = function(player_name) - local info = { - level=level, - total=10, - count=0, - player_name=player_name, - infotext='', - formspec = '', + local info = { + level=level, + total=10, + count=0, + player_name=player_name, + infotext='', + formspec = '', formspec_quest = '', } @@ -146,10 +146,10 @@ skyblock.levels[level].get_info = function(player_name) ..'label[0,1.0;We can no longer live on the surface.]' ..'label[0,1.5;Can you help us rebuild in the sky?]' ..'label[0,2.0;Complete the quests to receive great rewards!]' - + info.formspec = skyblock.levels.get_inventory_formspec(level,info.player_name,true)..text info.formspec_quest = skyblock.levels.get_inventory_formspec(level,info.player_name)..text - + for k,v in ipairs(skyblock.levels[level].feats) do info.formspec = info.formspec..skyblock.levels.get_feat_formspec(info,k,v.feat,v.count,v.name,v.hint,true) info.formspec_quest = info.formspec_quest..skyblock.levels.get_feat_formspec(info,k,v.feat,v.count,v.name,v.hint) @@ -159,7 +159,7 @@ skyblock.levels[level].get_info = function(player_name) end info.infotext = 'LEVEL '..info.level..' for '..info.player_name..': '..info.count..' of '..info.total - + return info end @@ -194,7 +194,7 @@ skyblock.levels[level].bucket_on_use = function(player_name, pointed_thing) end -- track bucket water feats -skyblock.levels[level].bucket_water_on_use = function(player_name, pointed_thing) +skyblock.levels[level].bucket_water_on_use = function(player_name, pointed_thing) skyblock.levels.bucket_water_on_use(level, player_name, pointed_thing) end diff --git a/skyblock_levels/skyblock.levels.2.lua b/skyblock_levels/skyblock.levels.2.lua index c81c9c2..308969c 100644 --- a/skyblock_levels/skyblock.levels.2.lua +++ b/skyblock_levels/skyblock.levels.2.lua @@ -38,72 +38,72 @@ skyblock.levels[level].feats = { { name = 'place a Trapdoor', hint = 'doors:trapdoor', - feat = 'place_trapdoor', - count = 1, + feat = 'place_trapdoor', + count = 1, reward = 'default:desert_stonebrick 50', placenode = {'doors:trapdoor'}, }, { name = 'place 10 Ladders', hint = 'default:ladder_wood', - feat = 'place_ladder', - count = 10, + feat = 'place_ladder', + count = 10, reward = 'default:desert_cobble 50', placenode = {'default:ladder_wood', 'default:ladder_steel'}, }, { name = 'place 20 Wood Fences', hint = 'default:fence_wood', - feat = 'place_fence', - count = 20, + feat = 'place_fence', + count = 20, reward = 'default:cobble 25', placenode = {'default:fence_wood'}, }, { name = 'build a structure using 100 Gravel', hint = 'default:gravel', - feat = 'place_gravel', - count = 100, + feat = 'place_gravel', + count = 100, reward = 'stairs:stair_cobble 4', placenode = {'default:gravel'}, }, { name = 'extend your Island with 100 Dirt', hint = 'default:dirt', - feat = 'place_dirt', - count = 100, + feat = 'place_dirt', + count = 100, reward = 'default:jungleleaves 6', placenode = {'default:dirt'}, }, { name = 'craft and place 100 Cobblestone', hint = 'default:cobble', - feat = 'place_cobble', - count = 100, + feat = 'place_cobble', + count = 100, reward = 'default:coal_lump', placenode = {'default:cobble'}, }, { name = 'dig 2 Coal Lumps', hint = 'default:stone_with_coal', - feat = 'dig_stone_with_coal', - count = 2, + feat = 'dig_stone_with_coal', + count = 2, reward = 'default:sandstonebrick 50', dignode = {'default:stone_with_coal'}, }, { name = 'place 8 Torches', hint = 'default:torch', - feat = 'place_torch', - count = 8, + feat = 'place_torch', + count = 8, reward = 'default:iron_lump', placenode = {'default:torch'}, }, { name = 'dig 4 Iron Lumps', hint = 'default:stone_with_iron', - feat = 'dig_stone_with_iron', - count = 4, + feat = 'dig_stone_with_iron', + count = 4, reward = 'default:pine_needles 6', dignode = {'default:stone_with_iron'}, }, @@ -111,7 +111,7 @@ skyblock.levels[level].feats = { name = 'collect the Water Source', hint = 'bucket:bucket_empty', feat = 'collect_water', - count = 1, + count = 1, reward = 'default:copper_lump', bucket = {'default:water_source'}, }, @@ -123,13 +123,13 @@ end -- get level information skyblock.levels[level].get_info = function(player_name) - local info = { - level=level, - total=10, - count=0, - player_name=player_name, - infotext='', - formspec = '', + local info = { + level=level, + total=10, + count=0, + player_name=player_name, + infotext='', + formspec = '', formspec_quest = '', } @@ -151,14 +151,14 @@ skyblock.levels[level].get_info = function(player_name) end info.infotext = 'LEVEL '..info.level..' for '..info.player_name..': '..info.count..' of '..info.total - + return info end -- reward_feat skyblock.levels[level].reward_feat = function(player_name, feat) local rewarded = skyblock.levels.reward_feat(level, player_name, feat) - + -- add water after dig_stone_with_iron if rewarded and feat == 'dig_stone_with_iron' then local pos = skyblock.get_spawn(player_name) @@ -211,7 +211,7 @@ skyblock.levels[level].bucket_on_use = function(player_name, pointed_thing) end -- track bucket water feats -skyblock.levels[level].bucket_water_on_use = function(player_name, pointed_thing) +skyblock.levels[level].bucket_water_on_use = function(player_name, pointed_thing) skyblock.levels.bucket_water_on_use(level, player_name, pointed_thing) end diff --git a/skyblock_levels/skyblock.levels.3.lua b/skyblock_levels/skyblock.levels.3.lua index dfca780..a2ae611 100644 --- a/skyblock_levels/skyblock.levels.3.lua +++ b/skyblock_levels/skyblock.levels.3.lua @@ -38,7 +38,7 @@ skyblock.levels[level].feats = { { name = 'grow and collect 20 Papyrus', hint = nil, - feat = 'dig_papyrus', + feat = 'dig_papyrus', count = 20, reward = 'wool:white 50', dignode = {'default:papyrus'}, @@ -46,7 +46,7 @@ skyblock.levels[level].feats = { { name = 'place 50 Brick', hint = 'default:brick', - feat = 'place_brick', + feat = 'place_brick', count = 50, reward = 'stairs:stair_brick 4', placenode = {'default:brick'}, @@ -54,7 +54,7 @@ skyblock.levels[level].feats = { { name = 'place 50 Mossy Cobblestone', hint = 'default:mossycobble', - feat = 'place_mossycobble', + feat = 'place_mossycobble', count = 50, reward = 'wool:blue 50', placenode = {'default:mossycobble'}, @@ -62,7 +62,7 @@ skyblock.levels[level].feats = { { name = 'place 4 Bookshelves', hint = 'default:bookshelf', - feat = 'place_bookshelf', + feat = 'place_bookshelf', count = 4, reward = 'wool:red 50', placenode = {'default:bookshelf'}, @@ -70,7 +70,7 @@ skyblock.levels[level].feats = { { name = 'place 4 Steel Blocks', hint = 'default:steelblock', - feat = 'place_steelblock', + feat = 'place_steelblock', count = 4, reward = 'default:obsidian_shard', placenode = {'default:steelblock'}, @@ -78,7 +78,7 @@ skyblock.levels[level].feats = { { name = 'place 50 Sand', hint = 'default:sand', - feat = 'place_sand', + feat = 'place_sand', count = 50, reward = 'wool:green 50', placenode = {'default:sand'}, @@ -86,7 +86,7 @@ skyblock.levels[level].feats = { { name = 'dig 4 Copper lumps', hint = 'default:stone_with_copper', - feat = 'dig_stone_with_copper', + feat = 'dig_stone_with_copper', count = 4, reward = 'wool:orange 50', dignode = {'default:stone_with_copper'}, @@ -94,7 +94,7 @@ skyblock.levels[level].feats = { { name = 'place 8 Iron Bars', hint = 'xpanes:bar_flat', - feat = 'place_bar', + feat = 'place_bar', count = 8, reward = 'default:mese_crystal', placenode = {'xpanes:bar_flat'}, @@ -102,16 +102,16 @@ skyblock.levels[level].feats = { { name = 'dig 4 Mese Crystals', hint = 'default:stone_with_mese', - feat = 'dig_stone_with_mese', - count = 4, + feat = 'dig_stone_with_mese', + count = 4, reward = 'default:gold_lump', dignode = {'default:stone_with_mese'}, }, { name = 'place Infinite Water (diagonal)', hint = 'bucket:bucket_empty', - feat = 'place_water_infinite', - count = 1, + feat = 'place_water_infinite', + count = 1, reward = 'default:diamond', --bucket_water = {}, }, @@ -123,13 +123,13 @@ end -- get level information skyblock.levels[level].get_info = function(player_name) - local info = { - level=level, - total=10, - count=0, - player_name=player_name, - infotext='', - formspec = '', + local info = { + level=level, + total=10, + count=0, + player_name=player_name, + infotext='', + formspec = '', formspec_quest = '', } @@ -151,14 +151,14 @@ skyblock.levels[level].get_info = function(player_name) end info.infotext = 'LEVEL '..info.level..' for '..info.player_name..': '..info.count..' of '..info.total - + return info end -- reward_feat skyblock.levels[level].reward_feat = function(player_name, feat) local rewarded = skyblock.levels.reward_feat(level, player_name, feat) - + -- add water after dig_stone_with_mese if rewarded and feat == 'dig_stone_with_mese' then local pos = skyblock.get_spawn(player_name) @@ -195,19 +195,19 @@ skyblock.levels[level].bucket_on_use = function(player_name, pointed_thing) end -- track bucket water feats -skyblock.levels[level].bucket_water_on_use = function(player_name, pointed_thing) +skyblock.levels[level].bucket_water_on_use = function(player_name, pointed_thing) skyblock.levels.bucket_water_on_use(level, player_name, pointed_thing) - + -- place_water_infinite local pos = pointed_thing.under - if minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name=='default:water_source' + if minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name=='default:water_source' or minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name=='default:water_source' or minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name=='default:water_source' or minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name=='default:water_source' then skyblock.feats.add(level,player_name,'place_water_infinite') return end - + end -- track bucket lava feats diff --git a/skyblock_levels/skyblock.levels.4.lua b/skyblock_levels/skyblock.levels.4.lua index d802c32..e33345a 100644 --- a/skyblock_levels/skyblock.levels.4.lua +++ b/skyblock_levels/skyblock.levels.4.lua @@ -30,21 +30,21 @@ end -- get level information skyblock.levels[level].get_info = function(player_name) - local info = { - level=level, - total=1, - count=0, - player_name=player_name, - infotext='', - formspec = '', + local info = { + level=level, + total=1, + count=0, + player_name=player_name, + infotext='', + formspec = '', formspec_quest = '', } - + local text = 'label[0,0.5; THE END]' ..'label[0,1.0; I hope you enjoyed your journey, and you]' ..'label[0,1.5; are welcome to stay and keep building]' ..'label[0,2.0; your new sky world.]' - + info.formspec = skyblock.levels.get_inventory_formspec(level,info.player_name,true)..text info.formspec_quest = skyblock.levels.get_inventory_formspec(level,info.player_name)..text info.infotext = 'THE END! for '.. player_name ..' ... or is it ...' diff --git a/skyblock_levels/skyblock.levels.X.lua b/skyblock_levels/skyblock.levels.X.lua index 62755f6..61c6f07 100644 --- a/skyblock_levels/skyblock.levels.X.lua +++ b/skyblock_levels/skyblock.levels.X.lua @@ -12,7 +12,7 @@ License: GPLv3 --[[ not a real level, just ideas and leftover code - + feats: * place_cactus * place_papyrus @@ -45,4 +45,4 @@ rewards: craft = {'unified_inventory:bag_small'}, }, ---]] +--]] diff --git a/skyblock_levels/skyblock.levels.lua b/skyblock_levels/skyblock.levels.lua index f6775f1..ac16588 100644 --- a/skyblock_levels/skyblock.levels.lua +++ b/skyblock_levels/skyblock.levels.lua @@ -72,7 +72,7 @@ function skyblock.levels.get_inventory_formspec(level,player_name,inventory) ..'button[11,0;2,0.5;restart;Restart]' ..'button_exit[13,0;2,0.5;close;Close]' end - + formspec = formspec ..'background[-0.1,-0.1;6.6,10.3;goals.png]' ..'label[0,0; --== LEVEL '..level..' for '..player_name..' ==--]' @@ -86,7 +86,7 @@ function skyblock.levels.get_inventory_formspec(level,player_name,inventory) ..'background[9.9,1.4;5.2,3.8;craft.png]' ..'list[current_player;craft;10,2;3,3;]' ..'list[current_player;craftpreview;14,3;1,1;]' - + ..'label[7,5.5; Inventory]' ..'background[6.9,5.4;8.2,4.8;inventory.png]' ..'list[current_player;main;7,6;8,4;]' @@ -255,7 +255,7 @@ function skyblock.levels.bucket_on_use(level,player_name,pointed_thing) end -- track bucket water feats -function skyblock.levels.bucket_water_on_use(level,player_name,pointed_thing) +function skyblock.levels.bucket_water_on_use(level,player_name,pointed_thing) local node = minetest.env:get_node(pointed_thing.under) for _,v in ipairs(skyblock.levels[level].feats) do if v.bucket_water then