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
description = An aMAZEing Game
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")
--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
-- 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
local numStyles = 0
@ -76,28 +97,28 @@ function laby_register_style(name, music_name, map_from_maze, cleanup, genMaze)
end
--Common node between styles, used for hidden floor to fall onto
minetest.register_node("game:inv",
minetest.register_node("labyrinth:inv",
{
description = "Ground Block",
drawtype = "airlike",
tiles = {"inv.png"},
tiles = {"blank.png"},
light_source = 11,
})
--Override the default hand
minetest.register_item(":", {
type = "none",
wield_image = "inv.png",
wield_image = "blank.png",
groups = {not_in_creative_inventory=1},
range = 0
})
--Style Registrations
dofile(minetest.get_modpath("game") .. "/styles/classic.lua")
dofile(minetest.get_modpath("game") .. "/styles/grassy.lua")
dofile(minetest.get_modpath("game") .. "/styles/glass.lua")
dofile(minetest.get_modpath("game") .. "/styles/cave.lua")
dofile(minetest.get_modpath("game") .. "/styles/club.lua")
dofile(modpath .. "/styles/classic.lua")
dofile(modpath .. "/styles/grassy.lua")
dofile(modpath .. "/styles/glass.lua")
dofile(modpath .. "/styles/cave.lua")
dofile(modpath .. "/styles/club.lua")
local restart = styles[1].gen_map
local cleanup = styles[1].cleanup
@ -221,7 +242,7 @@ end
local function to_game_menu(player)
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)
if music then
minetest.sound_fade(music, 0.5, 0)
@ -243,7 +264,7 @@ end
-- Callback for on_recieve 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 fields.game_menu then
minetest.after(0.15, function() to_game_menu(player) end)
@ -274,7 +295,7 @@ local function onRecieveFields(player, formname, fields)
local newStyle = tonumber(string.sub(name,6,-1))
if newStyle ~= selectedStyle then --load level style
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
@ -302,13 +323,13 @@ local function onRecieveFields(player, formname, fields)
end
setup(player)
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
elseif fields.labyexit then
minetest.request_shutdown("Thanks for playing!")
return
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
@ -322,7 +343,7 @@ local function safe_clear(w, l)
MinEdge = emin,
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")
for z=0, l-10 do --z
@ -346,7 +367,7 @@ minetest.register_on_joinplayer(
function(player)
safe_clear(300,300)
player:set_properties({
textures = {"inv.png", "inv.png"},
textures = {"blank.png", "blank.png"},
visual = "upright_sprite",
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3},
stepheight = 0.6,
@ -364,7 +385,7 @@ function(player)
}
)
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", {
gain = 1.0, -- default
fade = 0.8, -- default, change to a value > 0 to fade the sound in

View File

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

View File

@ -6,7 +6,7 @@
-- Node Registrations
minetest.register_node("game:cave_rock",
minetest.register_node("labyrinth:cave_rock",
{
description = "Rock Block",
drawtype = "mesh",
@ -30,7 +30,7 @@ minetest.register_node("game:cave_rock",
tiles = {{name = "cave_stone.png", backface_culling=true}},
})
minetest.register_node("game:cave_ground",
minetest.register_node("labyrinth:cave_ground",
{
description = "Ground Rock",
drawtype = "mesh",
@ -54,7 +54,7 @@ minetest.register_node("game:cave_ground",
tiles = {{name = "cave_stone.png", backface_culling=true}},
})
minetest.register_node("game:cave_torch",
minetest.register_node("labyrinth:cave_torch",
{
drawtype = "mesh",
mesh = "torch.obj",
@ -71,7 +71,8 @@ minetest.register_node("game:cave_torch",
type = "wallmounted",
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
@ -93,9 +94,9 @@ local function map_function(maze, player)
MinEdge = emin,
MaxEdge = emax
}
local wall = minetest.get_content_id("game:cave_rock")
local ground = minetest.get_content_id("game:cave_ground")
local torch = minetest.get_content_id("game:cave_torch")
local wall = minetest.get_content_id("labyrinth:cave_rock")
local ground = minetest.get_content_id("labyrinth:cave_ground")
local torch = minetest.get_content_id("labyrinth:cave_torch")
local air = minetest.get_content_id("air")
--player target coords

View File

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

View File

@ -7,19 +7,19 @@
-- Node Registrations
minetest.register_node("game:club_ground",
minetest.register_node("labyrinth:club_ground",
{
description = "Club Ground",
tiles = {"club_ground.png"},
})
minetest.register_node("game:club_walkway",
minetest.register_node("labyrinth:club_walkway",
{
description = "Club Walkway",
tiles = {"club_walkway.png"},
})
minetest.register_node("game:club_wall",
minetest.register_node("labyrinth:club_wall",
{
description = "Club Wall",
tiles = {"club_wall.png"},
@ -29,24 +29,22 @@ minetest.register_node("game:club_wall",
fixed = {-0.5,-0.499,-0.5,0.5,1.14,0.5},
},
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",
tiles = {"club_ceiling.png"},
})
minetest.register_node("game:club_edge",
minetest.register_node("labyrinth:club_edge",
{
description = "Club Edge",
tiles = {"club_edge.png"},
walkable = false,
use_texture_alpha = true,
})
minetest.register_node("game:club_light",
minetest.register_node("labyrinth:club_light",
{
description = "Club light",
tiles = {"club_light.png"},
@ -103,12 +101,12 @@ local function map_function(maze, player)
MinEdge = emin,
MaxEdge = emax
}
local club_ground = minetest.get_content_id("game:club_ground")
local club_wall = minetest.get_content_id("game:club_wall")
local club_ceiling = minetest.get_content_id("game:club_ceiling")
local club_light = minetest.get_content_id("game:club_light")
local club_walkway = minetest.get_content_id("game:club_walkway")
local club_edge = minetest.get_content_id("game:club_edge")
local club_ground = minetest.get_content_id("labyrinth:club_ground")
local club_wall = minetest.get_content_id("labyrinth:club_wall")
local club_ceiling = minetest.get_content_id("labyrinth:club_ceiling")
local club_light = minetest.get_content_id("labyrinth:club_light")
local club_walkway = minetest.get_content_id("labyrinth:club_walkway")
local club_edge = minetest.get_content_id("labyrinth:club_edge")
local air = minetest.get_content_id("air")
minetest.set_timeofday(0.8)

View File

@ -6,7 +6,7 @@
-- \_____/ |_| \_||_|(___/ (___/
---- Node Registrations ----
minetest.register_node("game:glass_glass",
minetest.register_node("labyrinth:glass_glass",
{
description = "Glass",
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
-- 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")
--Set up the level itself

View File

@ -7,21 +7,21 @@
-- Node Registrations
minetest.register_node("game:grassy_grass",
minetest.register_node("labyrinth:grassy_grass",
{
description = "Ground Block",
tiles = {"grassy_grass.png"},
light_source = 12,
})
minetest.register_node("game:grassy_dirt",
minetest.register_node("labyrinth:grassy_dirt",
{
description = "Ground Block",
tiles = {"grassy_dirt.png"},
light_source = 12,
})
minetest.register_node("game:grassy_hedge",
minetest.register_node("labyrinth:grassy_hedge",
{
description = "Ground Block",
drawtype = "allfaces",
@ -42,10 +42,10 @@ local function map_function(maze, player)
MinEdge = emin,
MaxEdge = emax
}
local grass = minetest.get_content_id("game:grassy_grass")
local dirt = minetest.get_content_id("game:grassy_dirt")
local hedge = minetest.get_content_id("game:grassy_hedge")
local invisble = minetest.get_content_id("game:inv")
local grass = minetest.get_content_id("labyrinth:grassy_grass")
local dirt = minetest.get_content_id("labyrinth:grassy_dirt")
local hedge = minetest.get_content_id("labyrinth:grassy_hedge")
local invisble = minetest.get_content_id("labyrinth:inv")
local air = minetest.get_content_id("air")
--Set up the level itself

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