1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

OK, ROLLBACK!

- All the modifications done before 7845fd5f1f are reverted
- Merged commits from http://github.com/minetest/minetest_game from 10 days ago to today. (concerning default mod)

TODO: Merge the other mods which have been reverted.
      Add all the commits of Ombridride after the 7845fd5f1f one.

Signed-off-by: LeMagnesium <mg.minetest@gmail.com>
This commit is contained in:
LeMagnesium
2014-12-10 16:49:14 +01:00
parent beb7e8e900
commit 2155ecc638
50 changed files with 443 additions and 506 deletions

View File

@ -1,6 +1,9 @@
-- Minetest 0.4 mod: default
-- See README.txt for licensing and other information.
-- Namespace for functions
flowers = {}
-- Map Generation
dofile(minetest.get_modpath("flowers").."/mapgen.lua")
@ -18,16 +21,15 @@ minetest.register_node("flowers:dandelion_white", {
tiles = { "flowers_dandelion_white.png" },
inventory_image = "flowers_dandelion_white.png",
wield_image = "flowers_dandelion_white.png",
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1, attached_node = 1, color_white = 1},
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_white=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15},
fixed = { -0.5, -0.5, -0.5, 0.5, -0.2, 0.5 },
},
})
@ -37,16 +39,15 @@ minetest.register_node("flowers:dandelion_yellow", {
tiles = { "flowers_dandelion_yellow.png" },
inventory_image = "flowers_dandelion_yellow.png",
wield_image = "flowers_dandelion_yellow.png",
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1, attached_node = 1, color_yellow = 1},
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_yellow=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15},
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
})
@ -56,16 +57,15 @@ minetest.register_node("flowers:geranium", {
tiles = { "flowers_geranium.png" },
inventory_image = "flowers_geranium.png",
wield_image = "flowers_geranium.png",
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1, attached_node = 1, color_blue = 1},
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_blue=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15},
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
})
@ -75,16 +75,15 @@ minetest.register_node("flowers:rose", {
tiles = { "flowers_rose.png" },
inventory_image = "flowers_rose.png",
wield_image = "flowers_rose.png",
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1, attached_node = 1, color_red = 1},
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_red=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15},
fixed = { -0.15, -0.5, -0.15, 0.15, 0.3, 0.15 },
},
})
@ -94,16 +93,15 @@ minetest.register_node("flowers:tulip", {
tiles = { "flowers_tulip.png" },
inventory_image = "flowers_tulip.png",
wield_image = "flowers_tulip.png",
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1, attached_node = 1, color_orange = 1},
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_orange=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15},
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
},
})
@ -113,65 +111,48 @@ minetest.register_node("flowers:viola", {
tiles = { "flowers_viola.png" },
inventory_image = "flowers_viola.png",
wield_image = "flowers_viola.png",
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1, attached_node = 1, color_violet = 1},
groups = {snappy=3,flammable=2,flower=1,flora=1,attached_node=1,color_violet=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15},
},
})
minetest.register_node("flowers:lily_pad", {
description = "Lily Pad",
drawtype = "nodebox",
tiles = { "flowers_lily_pad.png" },
inventory_image = "flowers_lily_pad.png",
wield_image = "flowers_lily_pad.png",
wield_scale = {x = 1, y = 1, z = 0.001},
is_ground_content = true,
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flower = 1, flora = 1},
sounds = default.node_sound_leaves_defaults(),
node_box = {
type = "fixed",
fixed = {-0.5, -0.45, -0.5, 0.5, -0.4375, 0.5},
},
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
fixed = { -0.5, -0.5, -0.5, 0.5, -0.2, 0.5 },
},
})
minetest.register_abm({
nodenames = {"group:flora"},
neighbors = {"default:dirt_with_grass", "default:desert_sand"},
interval = 2,
chance = 500,
interval = 50,
chance = 25,
action = function(pos, node)
pos.y = pos.y - 1
local under = minetest.get_node(pos)
pos.y = pos.y + 1
if under.name == "default:desert_sand" then
minetest.set_node(pos, {name="default:dry_shrub"})
elseif under.name ~= "default:dirt_with_grass" then return end
elseif under.name ~= "default:dirt_with_grass" then
return
end
local light = minetest.get_node_light(pos)
if not light or light < 13 then return end
if not light or light < 13 then
return
end
local pos0 = {x = pos.x - 4, y = pos.y - 4, z = pos.z - 4}
local pos1 = {x = pos.x + 4, y = pos.y + 4, z = pos.z + 4}
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora_block") > 0 then return end
local pos0 = {x=pos.x-4,y=pos.y-4,z=pos.z-4}
local pos1 = {x=pos.x+4,y=pos.y+4,z=pos.z+4}
if #minetest.find_nodes_in_area(pos0, pos1, "group:flora_block") > 0 then
return
end
local flowers = minetest.find_nodes_in_area(pos0, pos1, "group:flora")
if #flowers > 3 then return end
if #flowers > 3 then
return
end
local seedling = minetest.find_nodes_in_area(pos0, pos1, "default:dirt_with_grass")
if #seedling > 0 then
@ -187,7 +168,3 @@ minetest.register_abm({
end
end,
})
if minetest.setting_getbool("log_mods") then
minetest.log("action", "Carbone: [flowers] loaded.")
end

View File

@ -1,4 +1,4 @@
minetest.register_on_generated(function(minp, maxp, seed)
function flowers.mgv6ongen(minp, maxp, seed)
if maxp.y >= 2 and minp.y <= 0 then
-- Generate flowers
local perlin1 = minetest.get_perlin(436, 3, 0.6, 100)
@ -21,19 +21,19 @@ minetest.register_on_generated(function(minp, maxp, seed)
-- Find ground level (0...15)
local ground_y = nil
for y=30,0,-1 do
if minetest.get_node({x = x, y = y, z = z}).name ~= "air" then
if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
ground_y = y
break
end
end
if ground_y then
local p = {x = x, y = ground_y + 1, z = z}
local p = {x=x,y=ground_y+1,z=z}
local nn = minetest.get_node(p).name
-- Check if the node can be replaced
if minetest.registered_nodes[nn] and
minetest.registered_nodes[nn].buildable_to then
nn = minetest.get_node({x = x, y = ground_y, z = z}).name
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
if nn == "default:dirt_with_grass" then
local flower_choice = pr:next(1, 6)
local flower
@ -50,19 +50,21 @@ minetest.register_on_generated(function(minp, maxp, seed)
elseif flower_choice == 6 then
flower = "flowers:viola"
end
minetest.set_node(p, {name = flower})
elseif nn == "default:water_source" then
minetest.set_node(p, {name = "flowers:lily_pad"})
elseif nn == "default:sand" then
minetest.set_node(p, {name = "default:dry_shrub"})
elseif nn == "default:dirt_with_snow" then
minetest.set_node(p, {name = "default:snow"})
minetest.set_node(p, {name=flower})
end
end
end
end
end
end
end
end
-- Enable in mapgen v6 only
minetest.register_on_mapgen_init(function(mg_params)
if mg_params.mgname == "v6" then
minetest.register_on_generated(flowers.mgv6ongen)
end
end)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 291 B