Adding timer for look how many time need for load
This commit is contained in:
parent
c6c2607e23
commit
15256967eb
17 changed files with 272 additions and 37 deletions
|
@ -553,10 +553,13 @@ minetest.register_abm({
|
|||
interval = 30,
|
||||
chance = 20,
|
||||
action = function(pos)
|
||||
if pos == nil then
|
||||
return
|
||||
end
|
||||
local can_change = 0
|
||||
for i=1,4 do
|
||||
p = {x=pos.x, y=pos.y+i, z=pos.z}
|
||||
n = minetest.env:get_node(p)
|
||||
local p = {x=pos.x, y=pos.y+i, z=pos.z}
|
||||
local n = minetest.env:get_node(p)
|
||||
-- On verifie si il y a de l'air
|
||||
if (n.name=="air") then
|
||||
can_change = can_change + 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- Minetest 0.4 mod: default
|
||||
-- See README.txt for licensing and other information.
|
||||
|
||||
local init = os.clock()
|
||||
-- The API documentation in here was moved into doc/lua_api.txt
|
||||
|
||||
WATER_ALPHA = 160
|
||||
|
@ -8,6 +8,16 @@ WATER_VISC = 1
|
|||
LAVA_VISC = 7
|
||||
LIGHT_MAX = 20
|
||||
|
||||
-- Show the ModPack Name :D
|
||||
print(" __ __ _ _____ _ ___ ___ _ _ ")
|
||||
print("| \\/ (_) / ____| | / _ \\ |__ \\| || | ")
|
||||
print("| \\ / |_ _ __ ___| | | | ___ _ __ ___ __ _| | | | ) | || |_ ")
|
||||
print("| |\\/| | | '_ \\ / _ \\ | | |/ _ \\| '_ \\ / _ \\ \\ \\ / / | | | / /|__ _|")
|
||||
print("| | | | | | | | __/ |____| | (_) | | | | __/ \\ V /| |_| | / /_ | | ")
|
||||
print("|_| |_|_|_| |_|\\___|\\_____|_|\\___/|_| |_|\\___| \\_/ \\___(_)____| |_| ")
|
||||
|
||||
|
||||
|
||||
-- Definitions made by this mod that other mods can use too
|
||||
default = {}
|
||||
|
||||
|
@ -24,4 +34,7 @@ dofile(minetest.get_modpath("default").."/player.lua")
|
|||
minetest.register_alias("default:desert_sand", "default:sand")
|
||||
minetest.register_alias("default:desert_stone", "default:sandstone")
|
||||
minetest.register_alias("default:iron_lump", "default:stone_with_iron")
|
||||
minetest.register_alias("default:gold_lump", "default:stone_with_gold")
|
||||
minetest.register_alias("default:gold_lump", "default:stone_with_gold")
|
||||
|
||||
local time_to_load= os.clock() - init
|
||||
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue