flags='nolight' replaces set_lighting. add paramtype='light' to light sources. remove dummy luxore and light spread ABM

This commit is contained in:
paramat 2015-01-05 08:34:06 +00:00
parent 6b675f18fd
commit c9a2401fd4
3 changed files with 9 additions and 26 deletions

View File

@ -218,7 +218,7 @@ if SINGLENODE then
-- Set mapgen parameters
minetest.register_on_mapgen_init(function(mgparams)
minetest.set_mapgen_params({mgname="singlenode"})
minetest.set_mapgen_params({mgname="singlenode", flags="nolight"})
end)
-- Spawn player function. Requires chunksize = 80 nodes (the default)
@ -369,18 +369,6 @@ minetest.register_abm({
end,
})
-- Update luxore light
minetest.register_abm({
nodenames = {"watershed:luxoreoff"},
interval = 5,
chance = 8,
action = function(pos, node)
minetest.add_node(pos, {name="watershed:luxore"})
nodeupdate(pos)
end,
})
-- Appletree sapling
minetest.register_abm({

View File

@ -1,8 +1,10 @@
-- watershed 0.6.4 by paramat
-- watershed 0.7.0 by paramat
-- For latest stable Minetest and back to 0.4.8
-- Depends default stairs bucket
-- License: code WTFPL, textures CC BY-SA
-- flags="nolight" replaces set_lighting
-- add paramtype = "light" to light sources. remove dummy luxore and light spread ABM
-- Parameters
@ -177,6 +179,7 @@ local np_magma = {
-- Stuff
-- initialize 3D and 2D noise objects to nil
local nobj_terrain = nil
local nobj_fissure = nil
local nobj_temp = nil
@ -236,12 +239,12 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
local c_wslava = minetest.get_content_id("watershed:lava")
local c_wsfreshice = minetest.get_content_id("watershed:freshice")
local c_wscloud = minetest.get_content_id("watershed:cloud")
local c_wsluxore = minetest.get_content_id("watershed:luxoreoff")
local c_wsluxore = minetest.get_content_id("watershed:luxore")
local c_wsicydirt = minetest.get_content_id("watershed:icydirt")
-- perlinmap stuff
local sidelen = x1 - x0 + 1 -- chunk sidelength
local chulensxyz = {x=sidelen, y=sidelen+2, z=sidelen} -- chunk dimensions, '+2' for overgeneration
local chulensxz = {x=sidelen, y=sidelen, z=1} -- here x = map x, y = map z
local chulensxz = {x=sidelen, y=sidelen} -- here x = map x, y = map z
local minposxyz = {x=x0, y=y0-1, z=z0}
local minposxz = {x=x0, y=z0} -- here x = map x, y = map z
-- 3D and 2D noise objects created once on first mapchunk generation only
@ -728,7 +731,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
vm:set_data(data)
vm:set_lighting({day=0, night=0})
vm:calc_lighting()
vm:write_to_map(data)
vm:update_liquids()

View File

@ -308,15 +308,7 @@ minetest.register_node("watershed:cloud", {
minetest.register_node("watershed:luxore", {
description = "Lux ore",
tiles = {"watershed_luxore.png"},
light_source = 14,
groups = {cracky=3},
drop = "watershed:luxcrystal 8",
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("watershed:luxoreoff", {
description = "Dark lux ore",
tiles = {"watershed_luxore.png"},
paramtype = "light",
light_source = 14,
groups = {cracky=3},
drop = "watershed:luxcrystal 8",
@ -326,6 +318,7 @@ minetest.register_node("watershed:luxoreoff", {
minetest.register_node("watershed:light", {
description = "Light",
tiles = {"watershed_light.png"},
paramtype = "light",
light_source = 14,
groups = {cracky=3},
sounds = default.node_sound_glass_defaults(),