This commit is contained in:
HybridDog 2015-06-14 14:20:48 +02:00
commit da548853ff
5 changed files with 33 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
## Generic ignorable patterns and files
*~
debug.txt

1
LICENSE.txt Normal file
View File

@ -0,0 +1 @@
WTFPL

1
README.md Normal file
View File

@ -0,0 +1 @@
begin 14:14

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

27
init.lua Normal file
View File

@ -0,0 +1,27 @@
local load_time_start = os.clock()
local function light_cave(player, name, maxlight)
local pos =
end
minetest.register_chatcommand("light_cave",{
description = "light a cave",
params = "[maxlight]",
privs = {give = true},
func = function(name, param)
local player = minetest.get_player_from_name(name)
local maxlight = tonumber(param) or 10
if not player then
return false, "Player not found"
end
light_cave(player, name, maxlight)
end
})
local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100
local msg = "[cave_lighting] loaded after ca. "..time
if time > 0.05 then
print(msg)
else
minetest.log("info", msg)
end