1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Down the water, tweak the u-boots, exclude nodes

- Dungeon masters cannot destroy nodes in excluded table neither nodes of
  group unbreakable, neither nether's nodes.
- Tweak of a global variable in seawrecks (aka. choosen_ingot)
- Highlandpools create real lakes now, and not water flower over the
  floor.
This commit is contained in:
LeMagnesium 2014-12-18 20:09:07 +01:00
parent c5d752a3be
commit 5314a1d30b
3 changed files with 27 additions and 4 deletions

View File

@ -86,7 +86,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
elseif c_node == c_watsour then
break
elseif c_node == c_grass then
yasurf = y + 1
yasurf = y --+ 1
break
end
end
@ -160,36 +160,48 @@ minetest.register_on_generated(function(minp, maxp, seed)
local viw = area:index(x - 1, yasurf, z)
local vin = area:index(x, yasurf, z + 1)
local vis = area:index(x, yasurf, z - 1)
local vied = area:index(x + 1, yasurf-1, z)
local viwd = area:index(x - 1, yasurf-1, z)
local vind = area:index(x, yasurf-1, z + 1)
local visd = area:index(x, yasurf-1, z - 1)
if data[vie] == c_tree then
highlandpools_remtree(x + 1, yasurf, z, area, data)
print("w at ".. x+1 ..","..yasurf..","..z)
data[vie] = c_watsour
elseif data[vie] == c_air
or data[vie] == c_apple
or data[vie] == c_leaves then
print("w at ".. x+1 ..","..yasurf..","..z)
data[vie] = c_watsour
end
if data[viw] == c_tree then
highlandpools_remtree(x - 1, yasurf, z, area, data)
print("w at ".. x-1 ..","..yasurf..","..z)
data[viw] = c_watsour
elseif data[viw] == c_air
or data[viw] == c_apple
or data[viw] == c_leaves then
print("w at ".. x-1 ..","..yasurf..","..z)
data[viw] = c_watsour
end
if data[vin] == c_tree then
highlandpools_remtree(x, yasurf, z + 1, area, data)
print("w at "..x..","..yasurf..","..z+1)
data[vin] = c_watsour
elseif data[vin] == c_air
or data[vin] == c_apple
or data[vin] == c_leaves then
print("w at "..x..","..yasurf..","..z+1)
data[vin] = c_watsour
end
if data[vis] == c_tree then
highlandpools_remtree(x, yasurf, z - 1, area, data)
data[vis] = c_watsour
print("w at "..x..","..yasurf..","..z-1)
data[visd] = c_watsour
elseif data[vis] == c_air
or data[vis] == c_apple
or data[vis] == c_leaves then
print("w at "..x..","..yasurf..","..z-1)
data[vis] = c_watsour
end
end

View File

@ -1,6 +1,11 @@
-- Dungeon Master (This one spits out fireballs at you)
-- Node which cannot be destroyed by DungeonMasters' fireballs
local excluded = {"nether:netherrack","default:obsidian_glass","maptools:cobble",
"maptools:sand", "maptools:desert_sand"
}
mobs:register_mob("mobs:dungeon_master", {
type = "monster",
hp_min = 50,
@ -102,7 +107,13 @@ mobs:register_arrow("mobs:fireball", {
for dz=-1,1 do
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
local n = minetest.get_node(p).name
if p.y < -19600 and n ~= "nether:netherrack" and n:split(":")[1] == "nether" then
local including = minetest.registered_nodes[n].groups["unbreakable"] ~= nil
for _,i in ipairs(excluded) do
if i == n then including = false end
end
--if p.y < -19600 and including and n:split(":")[1] == "nether" then
if including then
return
end
if n ~= "default:obsidian" and n ~= "ethereal:obsidian_brick" then

View File

@ -99,7 +99,7 @@ minetest.register_node("seawrecks:ubootchest", {
local amount_of_price = math.floor(math.random()*20)+1
local ingot_price = {"default:steel_ingot","default:copper_ingot","default:gold_ingot","moreores:tin_ingot","moreores:silver_ingot"}
local price_group = {"",""}
choosen_ingot = math.floor(math.random()*10)+1
local choosen_ingot = math.floor(math.random()*10)+1
price_group[1] = ingot_price[choosen_ingot].." "..amount_of_price
if (kind_of_price == 0) then -- Ingots AND mese
price_group[2] = "default:mese_crystal "..math.floor(math.random()*6)+1