Get rid of some global namespace pollution

This commit is contained in:
Wuzzy 2020-03-31 17:25:51 +02:00
parent f82667b019
commit 7d468ba100
6 changed files with 21 additions and 25 deletions

View File

@ -1,5 +1,11 @@
-- AWARDS -- AWARDS
-- by Rubenwardy, CC-BY-SA -- by Rubenwardy, CC-BY-SA
-- CONFIGURATION
-- Use a graphical display for unlocking achievements. (Possible values: true | false)
local Use_Formspec = true
-- END OF CONFIGURATION
------------------------------------------------------- -------------------------------------------------------
-- this is api function file -- this is api function file
------------------------------------------------------- -------------------------------------------------------
@ -68,7 +74,6 @@ end
-- Load files -- Load files
dofile(minetest.get_modpath("awards").."/triggers.lua") dofile(minetest.get_modpath("awards").."/triggers.lua")
dofile(minetest.get_modpath("awards").."/config.txt")
-- API Functions -- API Functions
function awards.register_achievement(name,data_table) function awards.register_achievement(name,data_table)

View File

@ -1,8 +0,0 @@
-- AWARDS
-- by Rubenwardy, CC-BY-SA
-------------------------------------------------------
-- this is the configuration file for the awards mod
-------------------------------------------------------
Use_Formspec = true
--Use a graphical display for unlocking achievements. (Possible values: true | false)

View File

@ -6,15 +6,15 @@
-- --
-- Player animation speed -- Player animation speed
animation_speed = 30 local animation_speed = 30
-- Player animation blending -- Player animation blending
-- Note: This is currently broken due to a bug in Irrlicht, leave at 0 -- Note: This is currently broken due to a bug in Irrlicht, leave at 0
animation_blend = 0 local animation_blend = 0
-- Default player appearance -- Default player appearance
default_model = "character.b3d" local default_model = "character.b3d"
default_textures = {"character.png", } local default_textures = {"character.png", }
-- Frame ranges for each player model -- Frame ranges for each player model
function player_get_animations(model) function player_get_animations(model)

View File

@ -3,10 +3,9 @@
-- The API documentation in here was moved into doc/lua_api.txt -- The API documentation in here was moved into doc/lua_api.txt
WATER_ALPHA = 160 local WATER_ALPHA = 160
WATER_VISC = 1 local WATER_VISC = 1
LAVA_VISC = 7 local LAVA_VISC = 7
LIGHT_MAX = 14
-- Definitions made by this mod that other mods can use too -- Definitions made by this mod that other mods can use too
default = {} default = {}
@ -527,7 +526,7 @@ minetest.register_node("default:lava_flowing", {
}, },
drop = "", drop = "",
paramtype = "light", paramtype = "light",
light_source = LIGHT_MAX - 1, light_source = minetest.LIGHT_MAX - 1,
walkable = false, walkable = false,
pointable = false, pointable = false,
diggable = false, diggable = false,
@ -555,7 +554,7 @@ minetest.register_node("default:lava_source", {
}, },
drop = "", drop = "",
paramtype = "light", paramtype = "light",
light_source = LIGHT_MAX - 1, light_source = minetest.LIGHT_MAX - 1,
walkable = false, walkable = false,
pointable = false, pointable = false,
diggable = false, diggable = false,
@ -585,7 +584,7 @@ minetest.register_node("default:torch", {
paramtype2 = "wallmounted", paramtype2 = "wallmounted",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
light_source = LIGHT_MAX-1, light_source = minetest.LIGHT_MAX-1,
selection_box = { selection_box = {
type = "wallmounted", type = "wallmounted",
wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1}, wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},

View File

@ -1,4 +1,4 @@
MINERALS_LIST={ local MINERALS_LIST={
'lazurite', 'lazurite',
'anthracite', 'anthracite',
'lignite', 'lignite',
@ -39,7 +39,7 @@ MINERALS_LIST={
'charcoal' 'charcoal'
} }
MINERALS_DESC_LIST={ local MINERALS_DESC_LIST={
'Lazurite', 'Lazurite',
'Anthracite', 'Anthracite',
'Lignite', 'Lignite',
@ -121,4 +121,4 @@ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "minerals:anthracite", recipe = "minerals:anthracite",
burntime = 50, burntime = 50,
}) })

View File

@ -32,7 +32,7 @@ local destroy = function(pos)
end end
end end
boom = function(pos, time) local boom = function(pos, time)
minetest.after(time, function(pos) minetest.after(time, function(pos)
if minetest.get_node(pos).name ~= "tnt:tnt_burning" then if minetest.get_node(pos).name ~= "tnt:tnt_burning" then
return return
@ -161,7 +161,7 @@ minetest.register_node("tnt:tnt_burning", {
minetest.register_node("tnt:boom", { minetest.register_node("tnt:boom", {
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"tnt_boom.png"}, tiles = {"tnt_boom.png"},
light_source = LIGHT_MAX, light_source = minetest.LIGHT_MAX,
walkable = false, walkable = false,
drop = "", drop = "",
groups = {dig_immediate=3}, groups = {dig_immediate=3},