flags='nolight' replaces set_lighting. add paramtype='light' to light sources. remove dummy luxore and light spread ABM
This commit is contained in:
parent
6b675f18fd
commit
c9a2401fd4
@ -218,7 +218,7 @@ if SINGLENODE then
|
|||||||
-- Set mapgen parameters
|
-- Set mapgen parameters
|
||||||
|
|
||||||
minetest.register_on_mapgen_init(function(mgparams)
|
minetest.register_on_mapgen_init(function(mgparams)
|
||||||
minetest.set_mapgen_params({mgname="singlenode"})
|
minetest.set_mapgen_params({mgname="singlenode", flags="nolight"})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Spawn player function. Requires chunksize = 80 nodes (the default)
|
-- Spawn player function. Requires chunksize = 80 nodes (the default)
|
||||||
@ -369,18 +369,6 @@ minetest.register_abm({
|
|||||||
end,
|
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
|
-- Appletree sapling
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
|
10
init.lua
10
init.lua
@ -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
|
-- For latest stable Minetest and back to 0.4.8
|
||||||
-- Depends default stairs bucket
|
-- Depends default stairs bucket
|
||||||
-- License: code WTFPL, textures CC BY-SA
|
-- 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
|
-- Parameters
|
||||||
|
|
||||||
@ -177,6 +179,7 @@ local np_magma = {
|
|||||||
-- Stuff
|
-- Stuff
|
||||||
|
|
||||||
-- initialize 3D and 2D noise objects to nil
|
-- initialize 3D and 2D noise objects to nil
|
||||||
|
|
||||||
local nobj_terrain = nil
|
local nobj_terrain = nil
|
||||||
local nobj_fissure = nil
|
local nobj_fissure = nil
|
||||||
local nobj_temp = 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_wslava = minetest.get_content_id("watershed:lava")
|
||||||
local c_wsfreshice = minetest.get_content_id("watershed:freshice")
|
local c_wsfreshice = minetest.get_content_id("watershed:freshice")
|
||||||
local c_wscloud = minetest.get_content_id("watershed:cloud")
|
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")
|
local c_wsicydirt = minetest.get_content_id("watershed:icydirt")
|
||||||
-- perlinmap stuff
|
-- perlinmap stuff
|
||||||
local sidelen = x1 - x0 + 1 -- chunk sidelength
|
local sidelen = x1 - x0 + 1 -- chunk sidelength
|
||||||
local chulensxyz = {x=sidelen, y=sidelen+2, z=sidelen} -- chunk dimensions, '+2' for overgeneration
|
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 minposxyz = {x=x0, y=y0-1, z=z0}
|
||||||
local minposxz = {x=x0, y=z0} -- here x = map x, y = map z
|
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
|
-- 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)
|
watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
|
||||||
|
|
||||||
vm:set_data(data)
|
vm:set_data(data)
|
||||||
vm:set_lighting({day=0, night=0})
|
|
||||||
vm:calc_lighting()
|
vm:calc_lighting()
|
||||||
vm:write_to_map(data)
|
vm:write_to_map(data)
|
||||||
vm:update_liquids()
|
vm:update_liquids()
|
||||||
|
11
nodes.lua
11
nodes.lua
@ -308,15 +308,7 @@ minetest.register_node("watershed:cloud", {
|
|||||||
minetest.register_node("watershed:luxore", {
|
minetest.register_node("watershed:luxore", {
|
||||||
description = "Lux ore",
|
description = "Lux ore",
|
||||||
tiles = {"watershed_luxore.png"},
|
tiles = {"watershed_luxore.png"},
|
||||||
light_source = 14,
|
paramtype = "light",
|
||||||
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"},
|
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
drop = "watershed:luxcrystal 8",
|
drop = "watershed:luxcrystal 8",
|
||||||
@ -326,6 +318,7 @@ minetest.register_node("watershed:luxoreoff", {
|
|||||||
minetest.register_node("watershed:light", {
|
minetest.register_node("watershed:light", {
|
||||||
description = "Light",
|
description = "Light",
|
||||||
tiles = {"watershed_light.png"},
|
tiles = {"watershed_light.png"},
|
||||||
|
paramtype = "light",
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
Loading…
Reference in New Issue
Block a user