mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
Update MinetestForFun Game (flowers)
This commit is contained in:
parent
425ca584c9
commit
80362a7454
@ -17,6 +17,7 @@ WTFPL
|
||||
|
||||
Gambit (WTFPL):
|
||||
flowers_mushroom_*.png
|
||||
flowers_waterlily.png
|
||||
|
||||
DanDuncombe (WTFPL):
|
||||
flowers_spores_*.png
|
||||
|
@ -259,3 +259,40 @@ minetest.register_abm({
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Waterlily
|
||||
--
|
||||
|
||||
minetest.register_node("flowers:waterlily", {
|
||||
description = "Waterlily",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = {"flowers_waterlily.png"},
|
||||
inventory_image = "flowers_waterlily.png",
|
||||
wield_image = "flowers_waterlily.png",
|
||||
liquids_pointable = true,
|
||||
walkable = false,
|
||||
groups = {snappy = 3, flower = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.46875, 0.5}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}
|
||||
},
|
||||
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
local find_water = minetest.find_nodes_in_area({x = pos.x - 1, y = pos.y, z = pos.z - 1},
|
||||
{x = pos.x + 1, y = pos.y, z = pos.z + 1}, "default:water_source")
|
||||
if #find_water ~= 0 then
|
||||
minetest.set_node(pos, {name = "default:water_source"})
|
||||
pos.y = pos.y + 1
|
||||
end
|
||||
minetest.set_node(pos, {name = "flowers:waterlily", param2 = math.random(0, 3)})
|
||||
end
|
||||
})
|
||||
|
@ -42,6 +42,26 @@ local function register_mgv6_mushroom(name)
|
||||
})
|
||||
end
|
||||
|
||||
local function register_mgv6_waterlily()
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.12,
|
||||
scale = 0.3,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 33,
|
||||
octaves = 3,
|
||||
persist = 0.7
|
||||
},
|
||||
y_min = 0,
|
||||
y_max = 0,
|
||||
schematic = minetest.get_modpath("flowers").."/schematics/waterlily.mts",
|
||||
rotation = "random",
|
||||
})
|
||||
end
|
||||
|
||||
function flowers.register_mgv6_decorations()
|
||||
register_mgv6_flower("rose")
|
||||
register_mgv6_flower("tulip")
|
||||
@ -52,6 +72,8 @@ function flowers.register_mgv6_decorations()
|
||||
|
||||
register_mgv6_mushroom("mushroom_fertile_brown")
|
||||
register_mgv6_mushroom("mushroom_fertile_red")
|
||||
|
||||
register_mgv6_waterlily()
|
||||
end
|
||||
|
||||
|
||||
@ -104,6 +126,28 @@ local function register_mushroom(name)
|
||||
})
|
||||
end
|
||||
|
||||
local function register_waterlily()
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt", "default:sand"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.12,
|
||||
scale = 0.3,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 33,
|
||||
octaves = 3,
|
||||
persist = 0.7
|
||||
},
|
||||
biomes = {"deciduous_forest_ocean", "sandstone_grassland_ocean",
|
||||
"rainforest_swamp", "savanna_ocean", "desert_ocean"},
|
||||
y_min = 0,
|
||||
y_max = 0,
|
||||
schematic = minetest.get_modpath("flowers").."/schematics/waterlily.mts",
|
||||
rotation = "random",
|
||||
})
|
||||
end
|
||||
|
||||
function flowers.register_decorations()
|
||||
register_flower(436, "rose")
|
||||
register_flower(19822, "tulip")
|
||||
@ -114,6 +158,8 @@ function flowers.register_decorations()
|
||||
|
||||
register_mushroom("mushroom_fertile_brown")
|
||||
register_mushroom("mushroom_fertile_red")
|
||||
|
||||
register_waterlily()
|
||||
end
|
||||
|
||||
|
||||
|
BIN
minetestforfun_game/mods/flowers/schematics/waterlily.mts
Normal file
BIN
minetestforfun_game/mods/flowers/schematics/waterlily.mts
Normal file
Binary file not shown.
BIN
minetestforfun_game/mods/flowers/textures/flowers_waterlily.png
Normal file
BIN
minetestforfun_game/mods/flowers/textures/flowers_waterlily.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Loading…
Reference in New Issue
Block a user