Fix RTAN violations

Also fix deprecated use_texture_alpha, missing screenshot, game.conf title...
This commit is contained in:
ROllerozxa 2023-01-21 11:36:05 +01:00
parent 9037220521
commit f3974abc4c
51 changed files with 103 additions and 82 deletions

View File

@ -1,4 +1,5 @@
name = Labyrinth name = labyrinth
title = Labyrinth
author = Just_Visiting author = Just_Visiting
description = An aMAZEing Game description = An aMAZEing Game
allowed_mapgens = singlenode allowed_mapgens = singlenode

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

View File

@ -45,9 +45,30 @@ local background_primary_c = handleColor("laby_background_primary_c", "#F0F0
local background_secondary_c = handleColor("laby_background_secondary_c", "#D0D0D0FF") local background_secondary_c = handleColor("laby_background_secondary_c", "#D0D0D0FF")
--End Settings Load --End Settings Load
local DefaultGenerateMaze = dofile(minetest.get_modpath("game") .. "/maze.lua") local modpath = minetest.get_modpath("labyrinth")
local DefaultGenerateMaze = dofile(modpath .. "/maze.lua")
local GenMaze = DefaultGenerateMaze local GenMaze = DefaultGenerateMaze
-- Set mapgen to singlenode if not already
minetest.set_mapgen_params('mgname', 'singlenode', true)
-- Compatibility aliases
for _, node in ipairs({
"inv",
"cave_ground", "cave_torch", "cave_rock",
"classic_ground", "classic_wall",
"club_walkway", "club_wall", "club_ceiling", "club_edge", "club_light", "club_ground",
"glass_glass",
"grassy_dirt", "grassy_hedge", "grassy_grass",
}) do
minetest.register_alias("game:" .. node, "labyrinth:" .. node)
end
--Style registrations --Style registrations
local numStyles = 0 local numStyles = 0
@ -76,28 +97,28 @@ function laby_register_style(name, music_name, map_from_maze, cleanup, genMaze)
end end
--Common node between styles, used for hidden floor to fall onto --Common node between styles, used for hidden floor to fall onto
minetest.register_node("game:inv", minetest.register_node("labyrinth:inv",
{ {
description = "Ground Block", description = "Ground Block",
drawtype = "airlike", drawtype = "airlike",
tiles = {"inv.png"}, tiles = {"blank.png"},
light_source = 11, light_source = 11,
}) })
--Override the default hand --Override the default hand
minetest.register_item(":", { minetest.register_item(":", {
type = "none", type = "none",
wield_image = "inv.png", wield_image = "blank.png",
groups = {not_in_creative_inventory=1}, groups = {not_in_creative_inventory=1},
range = 0 range = 0
}) })
--Style Registrations --Style Registrations
dofile(minetest.get_modpath("game") .. "/styles/classic.lua") dofile(modpath .. "/styles/classic.lua")
dofile(minetest.get_modpath("game") .. "/styles/grassy.lua") dofile(modpath .. "/styles/grassy.lua")
dofile(minetest.get_modpath("game") .. "/styles/glass.lua") dofile(modpath .. "/styles/glass.lua")
dofile(minetest.get_modpath("game") .. "/styles/cave.lua") dofile(modpath .. "/styles/cave.lua")
dofile(minetest.get_modpath("game") .. "/styles/club.lua") dofile(modpath .. "/styles/club.lua")
local restart = styles[1].gen_map local restart = styles[1].gen_map
local cleanup = styles[1].cleanup local cleanup = styles[1].cleanup
@ -221,7 +242,7 @@ end
local function to_game_menu(player) local function to_game_menu(player)
first_load = false first_load = false
minetest.show_formspec(player:get_player_name(), "game:main", main_menu()) minetest.show_formspec(player:get_player_name(), "labyrinth:main", main_menu())
cleanup(gwidth, gheight) cleanup(gwidth, gheight)
if music then if music then
minetest.sound_fade(music, 0.5, 0) minetest.sound_fade(music, 0.5, 0)
@ -237,13 +258,13 @@ end
-- --
-- onRecieveFields(player, formname, fields) -- onRecieveFields(player, formname, fields)
-- --
-- player: player object -- player: player object
-- formname: use provided form name -- formname: use provided form name
-- fields: standard recieve fields -- fields: standard recieve fields
-- Callback for on_recieve fields -- Callback for on_recieve fields
---------------------------------------------------------- ----------------------------------------------------------
local function onRecieveFields(player, formname, fields) local function onRecieveFields(player, formname, fields)
if formname ~= "game:main" and formname ~= "" then return end if formname ~= "labyrinth:main" and formname ~= "" then return end
if formname == "" then --process the inventory formspec if formname == "" then --process the inventory formspec
if fields.game_menu then if fields.game_menu then
minetest.after(0.15, function() to_game_menu(player) end) minetest.after(0.15, function() to_game_menu(player) end)
@ -254,7 +275,7 @@ local function onRecieveFields(player, formname, fields)
end end
return return
end end
local scroll_in = 0 local scroll_in = 0
local width_in = 39 local width_in = 39
local height_in = 74 local height_in = 74
@ -274,7 +295,7 @@ local function onRecieveFields(player, formname, fields)
local newStyle = tonumber(string.sub(name,6,-1)) local newStyle = tonumber(string.sub(name,6,-1))
if newStyle ~= selectedStyle then --load level style if newStyle ~= selectedStyle then --load level style
selectedStyle = newStyle selectedStyle = newStyle
minetest.show_formspec(player:get_player_name(), "game:main", main_menu(width_in, height_in, scroll_in)) minetest.show_formspec(player:get_player_name(), "labyrinth:main", main_menu(width_in, height_in, scroll_in))
end end
end end
end end
@ -302,13 +323,13 @@ local function onRecieveFields(player, formname, fields)
end end
setup(player) setup(player)
elseif fields.quit then elseif fields.quit then
minetest.after(0.10, function() minetest.show_formspec(player:get_player_name(), "game:main", main_menu(width_in, height_in, scroll_in)) end) minetest.after(0.10, function() minetest.show_formspec(player:get_player_name(), "labyrinth:main", main_menu(width_in, height_in, scroll_in)) end)
return return
elseif fields.labyexit then elseif fields.labyexit then
minetest.request_shutdown("Thanks for playing!") minetest.request_shutdown("Thanks for playing!")
return return
else else
--minetest.show_formspec(player:get_player_name(), "game:main", main_menu(width_in, height_in, scroll_in)) --minetest.show_formspec(player:get_player_name(), "labyrinth:main", main_menu(width_in, height_in, scroll_in))
end end
end end
@ -322,9 +343,9 @@ local function safe_clear(w, l)
MinEdge = emin, MinEdge = emin,
MaxEdge = emax MaxEdge = emax
} }
local invisible = minetest.get_content_id("game:inv") local invisible = minetest.get_content_id("labyrinth:inv")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
for z=0, l-10 do --z for z=0, l-10 do --z
for y=0,10 do --y for y=0,10 do --y
for x=0, w-10 do --x for x=0, w-10 do --x
@ -346,7 +367,7 @@ minetest.register_on_joinplayer(
function(player) function(player)
safe_clear(300,300) safe_clear(300,300)
player:set_properties({ player:set_properties({
textures = {"inv.png", "inv.png"}, textures = {"blank.png", "blank.png"},
visual = "upright_sprite", visual = "upright_sprite",
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3}, collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3},
stepheight = 0.6, stepheight = 0.6,
@ -364,7 +385,7 @@ function(player)
} }
) )
player:set_inventory_formspec(pause_menu()) player:set_inventory_formspec(pause_menu())
minetest.show_formspec(player:get_player_name(), "game:main", main_menu()) minetest.show_formspec(player:get_player_name(), "labyrinth:main", main_menu())
music = minetest.sound_play("main", { music = minetest.sound_play("main", {
gain = 1.0, -- default gain = 1.0, -- default
fade = 0.8, -- default, change to a value > 0 to fade the sound in fade = 0.8, -- default, change to a value > 0 to fade the sound in

View File

@ -55,7 +55,7 @@ local function getNextPoint(current_point,height,width,last_dir)
while(1) do while(1) do
local dir = math.random(3) local dir = math.random(3)
if last_dir == 3 then --east if last_dir == 3 then --east
if dir == 1 then --north if dir == 1 then --north
if current_point[1]-2 > 0 then if current_point[1]-2 > 0 then
return {current_point[1]-2,current_point[2]}, 2 return {current_point[1]-2,current_point[2]}, 2
@ -225,14 +225,14 @@ local function Generate_Maze(width, height, view)
table.insert(maze[i], 0) table.insert(maze[i], 0)
end end
end end
--initialize first point --initialize first point
math.randomseed(os.time()) math.randomseed(os.time())
local x = math.random(math.floor(maze.width/2)-1)*2+1 local x = math.random(math.floor(maze.width/2)-1)*2+1
local y = math.random(math.floor(maze.height/2)-1)*2+1 local y = math.random(math.floor(maze.height/2)-1)*2+1
--local spot = findNextStarting(maze) --local spot = findNextStarting(maze)
maze[y][x] = 1 maze[y][x] = 1
--Execute Algorithm --Execute Algorithm
wilsonsAlgo(maze, view) wilsonsAlgo(maze, view)

View File

@ -1,2 +1,2 @@
name = game name = labyrinth
description = Labyrinth Core Game description = Labyrinth Core Game

View File

@ -6,7 +6,7 @@
-- Node Registrations -- Node Registrations
minetest.register_node("game:cave_rock", minetest.register_node("labyrinth:cave_rock",
{ {
description = "Rock Block", description = "Rock Block",
drawtype = "mesh", drawtype = "mesh",
@ -25,12 +25,12 @@ minetest.register_node("game:cave_rock",
}, },
selection_box = { selection_box = {
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}, },
tiles = {{name = "cave_stone.png", backface_culling=true}}, tiles = {{name = "cave_stone.png", backface_culling=true}},
}) })
minetest.register_node("game:cave_ground", minetest.register_node("labyrinth:cave_ground",
{ {
description = "Ground Rock", description = "Ground Rock",
drawtype = "mesh", drawtype = "mesh",
@ -54,7 +54,7 @@ minetest.register_node("game:cave_ground",
tiles = {{name = "cave_stone.png", backface_culling=true}}, tiles = {{name = "cave_stone.png", backface_culling=true}},
}) })
minetest.register_node("game:cave_torch", minetest.register_node("labyrinth:cave_torch",
{ {
drawtype = "mesh", drawtype = "mesh",
mesh = "torch.obj", mesh = "torch.obj",
@ -71,7 +71,8 @@ minetest.register_node("game:cave_torch",
type = "wallmounted", type = "wallmounted",
wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8}, wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8},
}, },
on_rotate = false on_rotate = false,
use_texture_alpha = "clip"
}) })
local clock = os.clock local clock = os.clock
@ -93,11 +94,11 @@ local function map_function(maze, player)
MinEdge = emin, MinEdge = emin,
MaxEdge = emax MaxEdge = emax
} }
local wall = minetest.get_content_id("game:cave_rock") local wall = minetest.get_content_id("labyrinth:cave_rock")
local ground = minetest.get_content_id("game:cave_ground") local ground = minetest.get_content_id("labyrinth:cave_ground")
local torch = minetest.get_content_id("game:cave_torch") local torch = minetest.get_content_id("labyrinth:cave_torch")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--player target coords --player target coords
player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*3+1 player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*3+1
player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*3+1 player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*3+1
@ -105,7 +106,7 @@ local function map_function(maze, player)
player:set_physics_override({gravity=0}) player:set_physics_override({gravity=0})
player:set_velocity({x=0,y=0,z=0}) player:set_velocity({x=0,y=0,z=0})
player:set_pos({x=player_x,y=1,z=player_z}) player:set_pos({x=player_x,y=1,z=player_z})
--Set up the level itself --Set up the level itself
local torch_count = 0 local torch_count = 0
for z=1, width do --z for z=1, width do --z
@ -158,7 +159,7 @@ local function cleanup(width, height)
MaxEdge = emax MaxEdge = emax
} }
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--zero it out --zero it out
for z=0, width*3+1 do --z for z=0, width*3+1 do --z
for y=0,5 do -- for y=0,5 do --

View File

@ -7,14 +7,14 @@
-- Node Registrations -- Node Registrations
minetest.register_node("game:classic_ground", minetest.register_node("labyrinth:classic_ground",
{ {
description = "Ground Block", description = "Ground Block",
tiles = {"classic_ground.png"}, tiles = {"classic_ground.png"},
light_source = 11, light_source = 11,
}) })
minetest.register_node("game:classic_wall", minetest.register_node("labyrinth:classic_wall",
{ {
description = "Ground Block", description = "Ground Block",
tiles = {"classic_wall.png"}, tiles = {"classic_wall.png"},
@ -34,9 +34,9 @@ local function map_function(maze, player)
MinEdge = emin, MinEdge = emin,
MaxEdge = emax MaxEdge = emax
} }
local ground = minetest.get_content_id("game:classic_ground") local ground = minetest.get_content_id("labyrinth:classic_ground")
local wall = minetest.get_content_id("game:classic_wall") local wall = minetest.get_content_id("labyrinth:classic_wall")
local invisble = minetest.get_content_id("game:inv") local invisble = minetest.get_content_id("labyrinth:inv")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--Set up the level itself --Set up the level itself
@ -94,9 +94,9 @@ local function cleanup(width, height)
MinEdge = emin, MinEdge = emin,
MaxEdge = emax MaxEdge = emax
} }
local ground = minetest.get_content_id("game:classic_ground") local ground = minetest.get_content_id("labyrinth:classic_ground")
local wall = minetest.get_content_id("game:classic_wall") local wall = minetest.get_content_id("labyrinth:classic_wall")
local invisble = minetest.get_content_id("game:inv") local invisble = minetest.get_content_id("labyrinth:inv")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--Generally a good idea to zero it out --Generally a good idea to zero it out

View File

@ -7,46 +7,44 @@
-- Node Registrations -- Node Registrations
minetest.register_node("game:club_ground", minetest.register_node("labyrinth:club_ground",
{ {
description = "Club Ground", description = "Club Ground",
tiles = {"club_ground.png"}, tiles = {"club_ground.png"},
}) })
minetest.register_node("game:club_walkway", minetest.register_node("labyrinth:club_walkway",
{ {
description = "Club Walkway", description = "Club Walkway",
tiles = {"club_walkway.png"}, tiles = {"club_walkway.png"},
}) })
minetest.register_node("game:club_wall", minetest.register_node("labyrinth:club_wall",
{ {
description = "Club Wall", description = "Club Wall",
tiles = {"club_wall.png"}, tiles = {"club_wall.png"},
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = {-0.5,-0.499,-0.5,0.5,1.14,0.5}, fixed = {-0.5,-0.499,-0.5,0.5,1.14,0.5},
}, },
selection_box = {0,0,0,0.01,0.01,0.01}, selection_box = {0,0,0,0.01,0.01,0.01},
use_texture_alpha = true,
}) })
minetest.register_node("game:club_ceiling", minetest.register_node("labyrinth:club_ceiling",
{ {
description = "Club ceiling", description = "Club ceiling",
tiles = {"club_ceiling.png"}, tiles = {"club_ceiling.png"},
}) })
minetest.register_node("game:club_edge", minetest.register_node("labyrinth:club_edge",
{ {
description = "Club Edge", description = "Club Edge",
tiles = {"club_edge.png"}, tiles = {"club_edge.png"},
walkable = false, walkable = false,
use_texture_alpha = true,
}) })
minetest.register_node("game:club_light", minetest.register_node("labyrinth:club_light",
{ {
description = "Club light", description = "Club light",
tiles = {"club_light.png"}, tiles = {"club_light.png"},
@ -93,7 +91,7 @@ local function map_function(maze, player)
local loc_maze = maze local loc_maze = maze
width = loc_maze.width width = loc_maze.width
height = loc_maze.height height = loc_maze.height
baseParticleDef.amount = math.floor(width*height/98) --rouhgly good :) baseParticleDef.amount = math.floor(width*height/98) --rouhgly good :)
--Copy to the map --Copy to the map
local vm = minetest.get_voxel_manip() local vm = minetest.get_voxel_manip()
@ -103,16 +101,16 @@ local function map_function(maze, player)
MinEdge = emin, MinEdge = emin,
MaxEdge = emax MaxEdge = emax
} }
local club_ground = minetest.get_content_id("game:club_ground") local club_ground = minetest.get_content_id("labyrinth:club_ground")
local club_wall = minetest.get_content_id("game:club_wall") local club_wall = minetest.get_content_id("labyrinth:club_wall")
local club_ceiling = minetest.get_content_id("game:club_ceiling") local club_ceiling = minetest.get_content_id("labyrinth:club_ceiling")
local club_light = minetest.get_content_id("game:club_light") local club_light = minetest.get_content_id("labyrinth:club_light")
local club_walkway = minetest.get_content_id("game:club_walkway") local club_walkway = minetest.get_content_id("labyrinth:club_walkway")
local club_edge = minetest.get_content_id("game:club_edge") local club_edge = minetest.get_content_id("labyrinth:club_edge")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
minetest.set_timeofday(0.8) minetest.set_timeofday(0.8)
--player target coords --player target coords
player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*2 player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*2
player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*2 player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*2
@ -121,7 +119,7 @@ local function map_function(maze, player)
player:set_physics_override({gravity=0}) player:set_physics_override({gravity=0})
player:set_velocity({x=0,y=0,z=0}) player:set_velocity({x=0,y=0,z=0})
player:set_pos({x=player_x,y=1.5,z=player_z}) player:set_pos({x=player_x,y=1.5,z=player_z})
--Set up the level itself --Set up the level itself
for z=1, width do --z for z=1, width do --z
for x=1, height do --x for x=1, height do --x
@ -209,7 +207,7 @@ local function cleanup(width, height)
minetest.delete_particlespawner(particleID[6]) minetest.delete_particlespawner(particleID[6])
minetest.delete_particlespawner(particleID[7]) minetest.delete_particlespawner(particleID[7])
minetest.delete_particlespawner(particleID[8]) minetest.delete_particlespawner(particleID[8])
--Delete the map --Delete the map
local vm = minetest.get_voxel_manip() local vm = minetest.get_voxel_manip()
local emin, emax = vm:read_from_map({x=0,y=0,z=0}, {x=height*2+1,y=10,z=width*2+1}) local emin, emax = vm:read_from_map({x=0,y=0,z=0}, {x=height*2+1,y=10,z=width*2+1})
@ -219,7 +217,7 @@ local function cleanup(width, height)
MaxEdge = emax MaxEdge = emax
} }
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--zero it out --zero it out
for z=0, width*2+1 do --z for z=0, width*2+1 do --z
for y=0,10 do -- for y=0,10 do --

View File

@ -6,7 +6,7 @@
-- \_____/ |_| \_||_|(___/ (___/ -- \_____/ |_| \_||_|(___/ (___/
---- Node Registrations ---- ---- Node Registrations ----
minetest.register_node("game:glass_glass", minetest.register_node("labyrinth:glass_glass",
{ {
description = "Glass", description = "Glass",
drawtype = "allfaces", drawtype = "allfaces",
@ -36,7 +36,7 @@ local function map_function(maze, player)
} }
-- All nodes are stored as a 16-bit content ID in the map -- All nodes are stored as a 16-bit content ID in the map
-- We need those exact numbers to manipulate the voxel manip -- We need those exact numbers to manipulate the voxel manip
local glass = minetest.get_content_id("game:glass_glass") local glass = minetest.get_content_id("labyrinth:glass_glass")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--Set up the level itself --Set up the level itself

View File

@ -7,21 +7,21 @@
-- Node Registrations -- Node Registrations
minetest.register_node("game:grassy_grass", minetest.register_node("labyrinth:grassy_grass",
{ {
description = "Ground Block", description = "Ground Block",
tiles = {"grassy_grass.png"}, tiles = {"grassy_grass.png"},
light_source = 12, light_source = 12,
}) })
minetest.register_node("game:grassy_dirt", minetest.register_node("labyrinth:grassy_dirt",
{ {
description = "Ground Block", description = "Ground Block",
tiles = {"grassy_dirt.png"}, tiles = {"grassy_dirt.png"},
light_source = 12, light_source = 12,
}) })
minetest.register_node("game:grassy_hedge", minetest.register_node("labyrinth:grassy_hedge",
{ {
description = "Ground Block", description = "Ground Block",
drawtype = "allfaces", drawtype = "allfaces",
@ -42,12 +42,12 @@ local function map_function(maze, player)
MinEdge = emin, MinEdge = emin,
MaxEdge = emax MaxEdge = emax
} }
local grass = minetest.get_content_id("game:grassy_grass") local grass = minetest.get_content_id("labyrinth:grassy_grass")
local dirt = minetest.get_content_id("game:grassy_dirt") local dirt = minetest.get_content_id("labyrinth:grassy_dirt")
local hedge = minetest.get_content_id("game:grassy_hedge") local hedge = minetest.get_content_id("labyrinth:grassy_hedge")
local invisble = minetest.get_content_id("game:inv") local invisble = minetest.get_content_id("labyrinth:inv")
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--Set up the level itself --Set up the level itself
for z=1, width do --z for z=1, width do --z
for x=1, height do --x for x=1, height do --x
@ -72,11 +72,11 @@ local function map_function(maze, player)
end end
vm:set_data(data) vm:set_data(data)
vm:write_to_map(true) vm:write_to_map(true)
--player target coords --player target coords
player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*2 player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*2
player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*2 player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*2
--Lets now overwrite the channel for the player to fall into: --Lets now overwrite the channel for the player to fall into:
local emin, emax = vm:read_from_map({x=player_x-1,y=4,z=player_z-1}, {x=player_x+1,y=32,z=player_z+1}) local emin, emax = vm:read_from_map({x=player_x-1,y=4,z=player_z-1}, {x=player_x+1,y=32,z=player_z+1})
local data = vm:get_data() local data = vm:get_data()
@ -98,7 +98,7 @@ local function map_function(maze, player)
end end
vm:set_data(data) vm:set_data(data)
vm:write_to_map(true) vm:write_to_map(true)
--Finally, move the player --Finally, move the player
player:set_velocity({x=0,y=0,z=0}) player:set_velocity({x=0,y=0,z=0})
player:set_pos({x=player_x,y=32,z=player_z}) player:set_pos({x=player_x,y=32,z=player_z})
@ -114,7 +114,7 @@ local function cleanup(width, height)
MaxEdge = emax MaxEdge = emax
} }
local air = minetest.get_content_id("air") local air = minetest.get_content_id("air")
--zero it out --zero it out
for z=0, width*2+1 do --z for z=0, width*2+1 do --z
for y=0,4 do -- for y=0,4 do --
@ -125,11 +125,11 @@ local function cleanup(width, height)
end end
vm:set_data(data) vm:set_data(data)
vm:write_to_map(true) vm:write_to_map(true)
--player target coords --player target coords
player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*2 player_x = (math.floor(height/2)+(math.floor(height/2)+1)%2)*2
player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*2 player_z = (math.floor(width/2)+(math.floor(width/2)+1)%2)*2
--Lets now overwrite the channel for the player to fall into: --Lets now overwrite the channel for the player to fall into:
local emin, emax = vm:read_from_map({x=player_x-1,y=4,z=player_z-1}, {x=player_x+1,y=32,z=player_z+1}) local emin, emax = vm:read_from_map({x=player_x-1,y=4,z=player_z-1}, {x=player_x+1,y=32,z=player_z+1})
local data = vm:get_data() local data = vm:get_data()

View File

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 293 B

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 70 B

View File

Before

Width:  |  Height:  |  Size: 830 B

After

Width:  |  Height:  |  Size: 830 B

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 108 B

View File

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 99 B

View File

Before

Width:  |  Height:  |  Size: 209 B

After

Width:  |  Height:  |  Size: 209 B

View File

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 117 B

View File

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 263 B

View File

Before

Width:  |  Height:  |  Size: 85 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB