Compare commits

...

5 Commits

Author SHA1 Message Date
OldCoder 228c2e35bd Rename directory named as a literal newline to "n" 2022-09-04 21:11:17 -07:00
HybridDog 9c537f7c69 🐈 2016-05-26 12:17:17 +02:00
HybridDog ad18562479 🐈 2015-10-18 16:23:22 +02:00
HybridDog 5a2a075081 🐈 2015-07-09 20:23:51 +02:00
HybridDog bc53d6c447 automatic update 2015-03-15 11:37:05 +01:00
5 changed files with 108 additions and 98 deletions

View File

@ -36,28 +36,6 @@ local function deepcopy(orig)
return copy
end
--Change the old nodes
for _,node in pairs({
{"lavacooling:obsidian", "default:obsidian"},
{"lavacooling:obsidian_brick", "default:obsidianbrick"},
{"default:obsidian_brick", "default:obsidianbrick"},
{"lavacooling:basalt", "default:basalt"},
}) do
local input = node[1]
local output = node[2]
minetest.register_node(":"..input, {})
minetest.register_abm ({
nodenames = {input},
interval = 0,
chance = 1,
action = function (pos)
minetest.add_node (pos, {name = output})
print("[lavacooling] "..input.." changed to "..output.." at ("..pos.x..", "..pos.y..", "..pos.z..")")
end,
})
end
--Nodes/Items
@ -70,6 +48,8 @@ minetest.register_node(":default:basalt", {
})
if not minetest.registered_nodes["default:obsidianbrick"] then
minetest.log("error", "[lavacooling] default obsidian brick missing")
local tmp = deepcopy(minetest.registered_nodes["default:obsidian"])
tmp.description = tmp.description.." brick"
tmp.tiles = {"lavacooling_obsidian_brick.png"}
@ -338,7 +318,37 @@ minetest.register_abm ({
end
end,
})
end
print(string.format("[lavacooling] loaded after ca. %.2fs", os.clock() - load_time_start))
-- legacy
--Change the old nodes
for _,node in pairs({
{"lavacooling:obsidian", "default:obsidian"},
{"lavacooling:obsidian_brick", "default:obsidianbrick"},
{"default:obsidian_brick", "default:obsidianbrick"},
{"lavacooling:basalt", "default:basalt"},
}) do
local input = node[1]
local output = node[2]
minetest.register_node(":"..input, {})
minetest.register_abm ({
nodenames = {input},
interval = 0,
chance = 1,
action = function (pos)
minetest.add_node (pos, {name = output})
print("[lavacooling] "..input.." changed to "..output.." at ("..pos.x..", "..pos.y..", "..pos.z..")")
end,
})
end
local time = math.floor(tonumber(os.clock()-load_time_start)*100+0.5)/100
local msg = "[lavacooling] loaded after ca. "..time
if time > 0.05 then
print(msg)
else
minetest.log("info", msg)
end

View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B

View File

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View File

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 308 B

View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B