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

[beds & boats & bucket & ... ] Update MinetestForFun game

This commit is contained in:
LeMagnesium 2015-10-05 20:51:58 +02:00
parent a2b30a2aba
commit 82c90e76e9
29 changed files with 373 additions and 279 deletions

View File

@ -1,22 +1,23 @@
The main game for the Minetest game engine [minetest_game]
==========================================================
Minetest Game [minetest_game]
=============================
The main subgame for the Minetest engine
========================================
To use this game with Minetest, insert this repository as
To use this subgame with the Minetest engine, insert this repository as
/games/minetest_game
in the Minetest Engine.
The Minetest Engine can be found in:
The Minetest engine can be found in:
https://github.com/minetest/minetest/
Compatibility
--------------
The minetest_game github master HEAD is generally compatible with the github
master HEAD of minetest.
The Minetest Game github master HEAD is generally compatible with the github
master HEAD of the Minetest engine.
Additionally, when the minetest engine is tagged to be a certain version (eg.
0.4.10), minetest_game is tagged with the version too.
Additionally, when the Minetest engine is tagged to be a certain version (eg.
0.4.10), Minetest Game is tagged with the version too.
When stable releases are made, minetest_game is packaged and made available in
When stable releases are made, Minetest Game is packaged and made available in
http://minetest.net/download
and in case the repository has grown too much, it may be reset. In that sense,
this is not a "real" git repository. (Package maintainers please note!)

View File

@ -1,11 +1,11 @@
minetest_game API
======================
Minetest Game API
=================
GitHub Repo: https://github.com/minetest/minetest_game
Introduction
------------
The minetest_game gamemode offers multiple new possibilities in addition to Minetest's built-in API, allowing you to
add new plants to farming mod, buckets for new liquids, new stairs and custom panes.
The Minetest Game subgame offers multiple new possibilities in addition to the Minetest engine's built-in API,
allowing you to add new plants to farming mod, buckets for new liquids, new stairs and custom panes.
For information on the Minetest API, visit https://github.com/minetest/minetest/blob/master/doc/lua_api.txt
Please note:
[XYZ] refers to a section the Minetest API
@ -17,11 +17,12 @@ Bucket API
The bucket API allows registering new types of buckets for non-default liquids.
bucket.register_liquid(
"default:lava_source", -- Source node name
"default:lava_flowing", -- Flowing node name
"bucket:bucket_lava", -- Name to be used for bucket
"bucket_lava.png", -- Bucket texture (for wielditem and inventory_image)
"Lava Bucket" -- Bucket description
"default:lava_source", -- name of the source node
"default:lava_flowing", -- name of the flowing node
"bucket:bucket_lava", -- name of the new bucket item (or nil if liquid is not takeable)
"bucket_lava.png", -- texture of the new bucket item (ignored if itemname == nil)
"Lava Bucket", -- text description of the bucket item
{lava_bucket = 1} -- groups of the bucket item, OPTIONAL
)
Beds API
@ -216,7 +217,7 @@ raillike nodes within this group and the same group value.
Use `minetest.raillike_group(<Name>)` to get the group value.
| Node type | Raillike group name
+-----------------------+----------------------------------
+-----------------------+--------------------
| default:rail | "rail"
| tnt:gunpowder | "gunpowder"
| tnt:gunpowder_burning | "gunpowder"
@ -283,11 +284,11 @@ Model Definition
{
animation_speed = 30, -- Default animation speed, in FPS.
textures = {"character.png", }, -- Default array of textures.
visual_size = {x=1, y=1,}, -- Used to scale the model.
visual_size = {x = 1, y = 1}, -- Used to scale the model.
animations = {
-- <anim_name> = { x=<start_frame>, y=<end_frame>, },
foo = { x= 0, y=19, },
bar = { x=20, y=39, },
-- <anim_name> = {x = <start_frame>, y = <end_frame>},
foo = {x = 0, y = 19},
bar = {x = 20, y = 39},
-- ...
},
}
@ -375,10 +376,22 @@ dye.excolors
Trees
-----
default.grow_tree(pos, is_apple_tree)
^ Grows a tree or apple tree at pos
^ Grows a mgv6 tree or apple tree at pos
default.grow_jungle_tree(pos)
^ Grows a jungletree at pos
^ Grows a mgv6 jungletree at pos
default.grow_pine_tree(pos)
^ Grows a pinetree at pos
^ Grows a mgv6 pinetree at pos
default.grow_new_apple_tree(pos)
^ Grows a new design apple tree at pos
default.grow_new_jungle_tree(pos)
^ Grows a new design jungle tree at pos
default.grow_new_pine_tree(pos)
^ Grows a new design pine tree at pos
default.grow_new_acacia_tree(pos)
^ Grows a new design acacia tree at pos

View File

@ -1,6 +1,4 @@
# This file contains settings of minetest_game that can be changed in
# minetest.conf
#
# This file contains settings of Minetest Game that can be changed in minetest.conf
# By default, all the settings are commented and not functional.
# Uncomment settings by removing the preceding #.
@ -26,3 +24,11 @@
# Enable the stairs mod ABM that replaces the old 'upside down'
# stair and slab nodes in old maps with the new param2 versions.
#enable_stairs_replace_abm = false
# Whether you allow respawning in beds
# Default value is true
#enable_bed_respawn = true
# Whether players can skip night by sleeping
# Default value is true
#enable_bed_night_skip = true

View File

@ -1,5 +1,5 @@
Minetest mod "Beds"
===================
Minetest Game mod: beds
=======================
by BlockMen (c) 2014-2015
Version: 1.1.1
@ -14,7 +14,8 @@ if more than 50% of the players are lying in bed and use this option.
Another feature is a controled respawning. If you have slept in bed (not just lying in it) your respawn point
is set to the beds location and you will respawn there after death.
You can disable the respawn at beds by setting "enable_bed_respawn = false" in minetest.conf
You can also disable the night skip feature by setting "enable_bed_night_skip = false" in minetest.conf or by using
the /set command ingame.
License of source code, textures: WTFPL

View File

@ -21,6 +21,14 @@ local function get_look_yaw(pos)
end
end
local function is_night_skip_enabled()
local enable_night_skip = minetest.setting_getbool("enable_bed_night_skip")
if enable_night_skip == nil then
enable_night_skip = true
end
return enable_night_skip
end
local function check_in_beds(players)
local in_bed = beds.player
if not players then
@ -101,7 +109,7 @@ local function update_formspecs(finished)
else
form_n = beds.formspec ..
"label[2.2,11;"..tostring(player_in_bed).." of "..tostring(ges).." players are in bed]"
if is_majority then
if is_majority and is_night_skip_enabled() then
form_n = form_n ..
"button_exit[2,8;4,0.75;force;Force night skip]"
end
@ -154,11 +162,13 @@ function beds.on_rightclick(pos, player)
-- skip the night and let all players stand up
if check_in_beds() then
minetest.after(2, function()
beds.skip_night()
if not is_sp then
update_formspecs(true)
update_formspecs(is_night_skip_enabled())
end
if is_night_skip_enabled() then
beds.skip_night()
beds.kick_players()
end
end)
end
end
@ -189,9 +199,11 @@ minetest.register_on_leaveplayer(function(player)
beds.player[name] = nil
if check_in_beds() then
minetest.after(2, function()
update_formspecs(is_night_skip_enabled())
if is_night_skip_enabled() then
beds.skip_night()
update_formspecs(true)
beds.kick_players()
end
end)
end
end)
@ -206,8 +218,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
if fields.force then
update_formspecs(is_night_skip_enabled())
if is_night_skip_enabled() then
beds.skip_night()
update_formspecs(true)
beds.kick_players()
end
end
end)

View File

@ -1,6 +1,6 @@
Minetest 0.4 mod: boats
=======================
by PilzAdam, slightly modified for NeXt
Minetest Game mod: boats
========================
by PilzAdam
License of source code:
-----------------------

View File

@ -1,4 +1,4 @@
Minetest 0.4 mod: bucket
Minetest Game mod: bucket
=========================
License of source code:

View File

@ -1,5 +1,5 @@
Minetest 0.4 mod: creative
==========================
Minetest Game mod: creative
===========================
Implements creative mode.

View File

@ -1,4 +1,4 @@
Minetest 0.4 mod: default
Minetest Game mod: default
==========================
License of source code:

View File

@ -701,7 +701,7 @@ function default.register_biomes()
y_min = 2,
y_max = 31000,
heat_point = 20,
humidity_point = 30,
humidity_point = 25,
})
minetest.register_biome({
@ -719,9 +719,10 @@ function default.register_biomes()
y_min = -112,
y_max = 1,
heat_point = 20,
humidity_point = 30,
humidity_point = 25,
})
minetest.register_biome({
name = "taiga",
node_dust = "default:snow",
@ -737,7 +738,7 @@ function default.register_biomes()
y_min = 2,
y_max = 31000,
heat_point = 20,
humidity_point = 70,
humidity_point = 75,
})
minetest.register_biome({
@ -755,10 +756,10 @@ function default.register_biomes()
y_min = -112,
y_max = 1,
heat_point = 20,
humidity_point = 70,
humidity_point = 75,
})
-- Cool
-- Temperate
minetest.register_biome({
name = "stone_grassland",
@ -772,10 +773,10 @@ function default.register_biomes()
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 6,
y_min = 5,
y_max = 31000,
heat_point = 45,
humidity_point = 30,
humidity_point = 25,
})
minetest.register_biome({
@ -791,11 +792,12 @@ function default.register_biomes()
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = 5,
y_max = 4,
heat_point = 45,
humidity_point = 30,
humidity_point = 25,
})
minetest.register_biome({
name = "coniferous_forest",
--node_dust = "",
@ -808,10 +810,28 @@ function default.register_biomes()
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 6,
y_min = 9,
y_max = 31000,
heat_point = 45,
humidity_point = 70,
humidity_point = 75,
})
minetest.register_biome({
name = "coniferous_forest_dunes",
--node_dust = "",
node_top = "default:sand",
depth_top = 1,
node_filler = "default:sand",
depth_filler = 2,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 5,
y_max = 8,
heat_point = 45,
humidity_point = 75,
})
minetest.register_biome({
@ -827,12 +847,11 @@ function default.register_biomes()
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = 5,
y_max = 4,
heat_point = 45,
humidity_point = 70,
humidity_point = 75,
})
-- Warm
minetest.register_biome({
name = "sandstone_grassland",
@ -846,10 +865,10 @@ function default.register_biomes()
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 6,
y_min = 5,
y_max = 31000,
heat_point = 70,
humidity_point = 30,
humidity_point = 25,
})
minetest.register_biome({
@ -865,11 +884,12 @@ function default.register_biomes()
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = 5,
y_max = 4,
heat_point = 70,
humidity_point = 30,
humidity_point = 25,
})
minetest.register_biome({
name = "deciduous_forest",
--node_dust = "",
@ -882,10 +902,28 @@ function default.register_biomes()
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 6,
y_min = 1,
y_max = 31000,
heat_point = 70,
humidity_point = 70,
humidity_point = 75,
})
minetest.register_biome({
name = "deciduous_forest_swamp",
--node_dust = "",
node_top = "default:dirt",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 2,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = -3,
y_max = 0,
heat_point = 70,
humidity_point = 75,
})
minetest.register_biome({
@ -901,9 +939,9 @@ function default.register_biomes()
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = 5,
y_max = -4,
heat_point = 70,
humidity_point = 70,
humidity_point = 75,
})
-- Hot
@ -944,6 +982,7 @@ function default.register_biomes()
humidity_point = 10,
})
minetest.register_biome({
name = "savanna",
--node_dust = "",
@ -956,12 +995,30 @@ function default.register_biomes()
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 5,
y_min = 1,
y_max = 31000,
heat_point = 95,
humidity_point = 50,
})
minetest.register_biome({
name = "savanna_swamp",
--node_dust = "",
node_top = "default:dirt",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 2,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = -3,
y_max = 0,
heat_point = 95,
humidity_point = 50,
})
minetest.register_biome({
name = "savanna_ocean",
--node_dust = "",
@ -975,11 +1032,12 @@ function default.register_biomes()
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = 4,
y_max = -4,
heat_point = 95,
humidity_point = 50,
})
minetest.register_biome({
name = "rainforest",
--node_dust = "",
@ -1010,7 +1068,7 @@ function default.register_biomes()
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
y_min = 0,
y_min = -3,
y_max = 0,
heat_point = 95,
humidity_point = 90,
@ -1029,7 +1087,7 @@ function default.register_biomes()
--node_water = "",
--node_river_water = "",
y_min = -112,
y_max = -1,
y_max = -4,
heat_point = 95,
humidity_point = 90,
})
@ -1040,9 +1098,9 @@ function default.register_biomes()
name = "underground",
--node_dust = "",
--node_top = "",
depth_top = 0,
--depth_top = ,
--node_filler = "",
depth_filler = -4,
--depth_filler = ,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
@ -1181,18 +1239,14 @@ local function register_grass_decoration(offset, scale, length)
noise_params = {
offset = offset,
scale = scale,
spread = {x = 100, y = 100, z = 100},
seed = 436,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {
"stone_grassland", "stone_grassland_ocean",
"sandstone_grassland", "sandstone_grassland_ocean",
"deciduous_forest", "deciduous_forest_ocean",
"coniferous_forest", "coniferous_forest_ocean",
},
y_min = 5,
biomes = {"stone_grassland", "sandstone_grassland",
"deciduous_forest", "coniferous_forest", "coniferous_forest_dunes"},
y_min = 1,
y_max = 31000,
decoration = "default:grass_"..length,
})
@ -1206,13 +1260,13 @@ local function register_dry_grass_decoration(offset, scale, length)
noise_params = {
offset = offset,
scale = scale,
spread = {x = 100, y = 100, z = 100},
seed = 19822,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"savana"},
y_min = -31000,
biomes = {"savanna"},
y_min = 1,
y_max = 31000,
decoration = "default:dry_grass_"..length,
})
@ -1230,13 +1284,13 @@ function default.register_decorations()
noise_params = {
offset = 0.04,
scale = 0.02,
spread = {x = 100, y = 100, z = 100},
seed = 1220999,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"deciduous_forest"},
y_min = 6,
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default").."/schematics/apple_tree.mts",
flags = "place_center_x, place_center_z",
@ -1254,6 +1308,7 @@ function default.register_decorations()
y_max = 31000,
schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
-- Taiga and temperate forest pine tree
@ -1263,10 +1318,10 @@ function default.register_decorations()
place_on = {"default:snowblock", "default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = -0.02,
scale = 0.03,
spread = {x = 100, y = 100, z = 100},
seed = 1133,
offset = 0.04,
scale = 0.02,
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
@ -1286,13 +1341,13 @@ function default.register_decorations()
noise_params = {
offset = 0,
scale = 0.003,
spread = {x=250, y=250, z=250},
spread = {x = 250, y = 250, z = 250},
seed = 2,
octaves = 3,
persist = 0.66
},
biomes = {"savanna"},
y_min = 6,
y_min = 1,
y_max = 31000,
schematic = minetest.get_modpath("default").."/schematics/acacia_tree.mts",
flags = "place_center_x, place_center_z",
@ -1306,10 +1361,10 @@ function default.register_decorations()
place_on = {"default:desert_sand"},
sidelen = 80,
noise_params = {
offset = 0.04,
scale = 0.08,
spread = {x = 100, y = 100, z = 100},
seed = 66440,
offset = -0.0005,
scale = 0.0015,
spread = {x = 200, y = 200, z = 200},
seed = 230,
octaves = 3,
persist = 0.6
},
@ -1330,7 +1385,7 @@ function default.register_decorations()
noise_params = {
offset = -0.0005,
scale = 0.0015,
spread = {x=200, y=200, z=200},
spread = {x = 200, y = 200, z = 200},
seed = 230,
octaves = 3,
persist = 0.6
@ -1347,17 +1402,17 @@ function default.register_decorations()
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:sand"},
place_on = {"default:dirt"},
sidelen = 16,
noise_params = {
offset = -0.3,
scale = 0.7,
spread = {x=200, y=200, z=200},
spread = {x = 200, y = 200, z = 200},
seed = 354,
octaves = 3,
persist = 0.7
},
biomes = {"savanna_ocean", "desert_ocean"},
biomes = {"savanna_swamp"},
y_min = 0,
y_max = 0,
schematic = minetest.get_modpath("default").."/schematics/papyrus.mts",
@ -1401,7 +1456,7 @@ function default.register_decorations()
noise_params = {
offset = 0,
scale = 0.02,
spread = {x=200, y=200, z=200},
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6

View File

@ -1036,7 +1036,6 @@ minetest.register_node("default:stone_with_mese", {
},
},
sounds = default.node_sound_stone_defaults(),
light_source = 1,
})
minetest.register_node("default:mese", {

Binary file not shown.

Binary file not shown.

BIN
minetestforfun_game/mods/default/schematics/papyrus.mts Executable file → Normal file

Binary file not shown.

BIN
minetestforfun_game/mods/default/schematics/pine_tree.mts Executable file → Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 546 B

View File

@ -1,5 +1,5 @@
Minetest 0.4 mod: doors
=======================
Minetest Game mod: doors
========================
version: 1.3
License of source code:

View File

@ -1,4 +1,4 @@
Minetest 0.4 mod: dye
Minetest Game mod: dye
======================
See init.lua for documentation.

View File

@ -1,5 +1,5 @@
Minetest 0.4 mod: fire
======================
Minetest Game mod: fire
=======================
License of source code:
-----------------------

View File

@ -37,16 +37,9 @@ minetest.register_node("fire:basic_flame", {
})
-- Fire sounds table
-- key: position hash of low corner of area
-- value: {handle=sound handle, name=sound name}
fire.sounds = {}
-- Get sound area of position
-- size of sound areas
fire.D = 6
fire.D = 6 -- size of sound areas
function fire.get_area_p0p1(pos)
local p0 = {
@ -63,6 +56,12 @@ function fire.get_area_p0p1(pos)
end
-- Fire sounds table
-- key: position hash of low corner of area
-- value: {handle=sound handle, name=sound name}
fire.sounds = {}
-- Update fire sounds in sound area of position
function fire.update_sounds_around(pos)
@ -126,24 +125,50 @@ end
-- Detect nearby extinguishing nodes
function fire.flame_should_extinguish(pos)
if minetest.setting_getbool("disable_fire") then return true end
--return minetest.find_node_near(pos, 1, {"group:puts_out_fire"})
local p0 = {x = pos.x - 1, y = pos.y, z = pos.z - 1}
local p1 = {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1}
local ps = minetest.find_nodes_in_area(p0, p1, {"group:puts_out_fire"})
return (#ps ~= 0)
return minetest.find_node_near(pos, 1, {"group:puts_out_fire"})
end
-- Ignite neighboring nodes
-- Enable ABMs according to 'disable fire' setting
--[[minetest.register_abm({
if minetest.setting_getbool("disable_fire") then
-- Extinguish flames quickly with dedicated ABM
minetest.register_abm({
nodenames = {"fire:basic_flame"},
interval = 3,
chance = 2,
action = function(p0, node, _, _)
minetest.remove_node(p0)
end,
})
else
-- Extinguish flames quickly with water, snow, ice
minetest.register_abm({
nodenames = {"fire:basic_flame"},
neighbors = {"group:puts_out_fire"},
interval = 3,
chance = 2,
action = function(p0, node, _, _)
minetest.remove_node(p0)
minetest.sound_play("fire_extinguish_flame",
{pos = p0, max_hear_distance = 16, gain = 0.25})
end,
})
-- Ignite neighboring nodes
minetest.register_abm({
nodenames = {"group:flammable"},
neighbors = {"group:igniter"},
interval = 7,
chance = 32,
chance = 16,
action = function(p0, node, _, _)
-- If there is water or stuff like that around flame, don't ignite
-- If there is water or stuff like that around node, don't ignite
if fire.flame_should_extinguish(p0) then
return
end
@ -152,13 +177,38 @@ end
minetest.set_node(p, {name = "fire:basic_flame"})
end
end,
})
})
-- Remove flames and flammable nodes
minetest.register_abm({
nodenames = {"fire:basic_flame"},
interval = 5,
chance = 16,
action = function(p0, node, _, _)
-- If there are no flammable nodes around flame, remove flame
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
minetest.remove_node(p0)
return
end
if math.random(1, 4) == 1 then
-- remove flammable nodes around flame
local p = minetest.find_node_near(p0, 1, {"group:flammable"})
if p then
minetest.remove_node(p)
nodeupdate(p)
end
end
end,
})
end
-- Rarely ignite things from far
-- Currently disabled to reduce the chance of uncontrollable spreading
-- fires that disrupt servers. Also for less lua processing load.
--[[ Currently disabled to reduce the chance of uncontrollable spreading
fires that disrupt servers. Also for less lua processing load.
minetest.register_abm({
nodenames = {"group:igniter"},
@ -183,44 +233,5 @@ minetest.register_abm({
end
end
end,
})]]
-- Remove flammable nodes and flame
minetest.register_abm({
nodenames = {"fire:basic_flame"},
interval = 5,
chance = 16,
action = function(p0, node, _, _)
-- If there is water or stuff like that around flame, remove flame
if fire.flame_should_extinguish(p0) then
minetest.remove_node(p0)
return
end
-- Make the following things rarer
if math.random(1, 3) == 1 then
return
end
-- If there are no flammable nodes around flame, remove flame
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
minetest.remove_node(p0)
return
end
if math.random(1, 4) == 1 then
-- remove a flammable node around flame
local p = minetest.find_node_near(p0, 1, {"group:flammable"})
if p then
-- If there is water or stuff like that around flame, don't remove
if fire.flame_should_extinguish(p0) then
return
end
minetest.remove_node(p)
nodeupdate(p)
end
else
-- remove flame
minetest.remove_node(p0)
end
end,
})
--]]

View File

@ -1,5 +1,5 @@
Minetest 0.4 mod: flowers
=========================
Minetest Game mod: flowers
==========================
License of source code:
-----------------------

View File

@ -46,6 +46,7 @@ local function add_simple_flower(name, desc, box, f_groups)
sunlight_propagates = true,
paramtype = "light",
walkable = false,
buildable_to = true,
stack_max = 99,
groups = f_groups,
sounds = default.node_sound_leaves_defaults(),
@ -275,6 +276,7 @@ minetest.register_node("flowers:waterlily", {
wield_image = "flowers_waterlily.png",
liquids_pointable = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flower = 1},
sounds = default.node_sound_leaves_defaults(),
node_box = {
@ -289,10 +291,19 @@ minetest.register_node("flowers:waterlily", {
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")
local find_river_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:river_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)})
elseif #find_river_water ~= 0 then
minetest.set_node(pos, {name = "default:river_water_source"})
pos.y = pos.y + 1
minetest.set_node(pos, {name = "flowers:waterlily", param2 = math.random(0, 3)})
else
minetest.remove_node(pos)
return true
end
end
})

View File

@ -94,13 +94,9 @@ local function register_flower(seed, name)
octaves = 3,
persist = 0.6
},
biomes = {
"stone_grassland",
"sandstone_grassland",
"deciduous_forest",
"coniferous_forest",
},
y_min = 6,
biomes = {"stone_grassland", "sandstone_grassland",
"deciduous_forest", "coniferous_forest"},
y_min = 1,
y_max = 31000,
decoration = "flowers:"..name,
})
@ -120,7 +116,7 @@ local function register_mushroom(name)
persist = 0.66
},
biomes = {"deciduous_forest", "coniferous_forest"},
y_min = 6,
y_min = 1,
y_max = 31000,
decoration = "flowers:"..name,
})
@ -129,7 +125,7 @@ end
local function register_waterlily()
minetest.register_decoration({
deco_type = "schematic",
place_on = {"default:dirt", "default:sand"},
place_on = {"default:dirt"},
sidelen = 16,
noise_params = {
offset = -0.12,
@ -139,8 +135,7 @@ local function register_waterlily()
octaves = 3,
persist = 0.7
},
biomes = {"deciduous_forest_ocean", "sandstone_grassland_ocean",
"rainforest_swamp", "savanna_ocean", "desert_ocean"},
biomes = {"rainforest_swamp", "savanna_swamp", "deciduous_forest_swamp"},
y_min = 0,
y_max = 0,
schematic = minetest.get_modpath("flowers").."/schematics/waterlily.mts",

View File

@ -1,5 +1,5 @@
Minetest mod: screwdriver
=========================
Minetest Game mod: screwdriver
==============================
License of source code:
-----------------------

View File

@ -1,4 +1,4 @@
Minetest 0.4 mod: stairs
Minetest Game mod: stairs
=========================
License of source code:

View File

@ -1,4 +1,4 @@
Minetest 0.4 mod: vessels
Minetest Game mod: vessels
==========================
Crafts

View File

@ -1,5 +1,5 @@
Minetest 0.4 mod: wool
======================
Minetest Game mod: wool
=======================
Mostly backward-compatible with jordach's 16-color wool mod.

View File

@ -1,5 +1,5 @@
Minetest 0.4.x mod: xpanes
==========================
Minetest Game mod: xpanes
=========================
License:
--------

View File

@ -17,11 +17,7 @@ local function update_pane(pos, name)
end
local sum = 0
for i, dir in pairs(directions) do
local node = minetest.get_node({
x = pos.x + dir.x,
y = pos.y + dir.y,
z = pos.z + dir.z
})
local node = minetest.get_node(vector.add(pos, dir))
local def = minetest.registered_nodes[node.name]
local pane_num = def and def.groups.pane or 0
if pane_num > 0 or not def or (def.walkable ~= false and
@ -50,14 +46,13 @@ local function update_nearby(pos, node)
name = name:sub(8, underscore_pos - 1)
end
for i, dir in pairs(directions) do
update_pane({
x = pos.x + dir.x,
y = pos.y + dir.y,
z = pos.z + dir.z
}, name)
update_pane(vector.add(pos, dir), name)
end
end
minetest.register_on_placenode(update_nearby)
minetest.register_on_dignode(update_nearby)
local half_boxes = {
{0, -0.5, -1/32, 0.5, 0.5, 1/32},
{-1/32, -0.5, 0, 1/32, 0.5, 0.5},
@ -82,6 +77,18 @@ local sb_full_boxes = {
{-0.06, -0.5, -0.5, 0.06, 0.5, 0.5}
}
local pane_def_fields = {
drawtype = "airlike",
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
air_equivalent = true,
}
function xpanes.register_pane(name, def)
for i = 1, 15 do
local need = {}
@ -132,6 +139,10 @@ function xpanes.register_pane(name, def)
})
end
for k, v in pairs(pane_def_fields) do
def[k] = def[k] or v
end
def.on_construct = function(pos)
update_pane(pos, name)
end
@ -144,52 +155,29 @@ function xpanes.register_pane(name, def)
})
end
minetest.register_on_placenode(update_nearby)
minetest.register_on_dignode(update_nearby)
xpanes.register_pane("pane", {
description = "Glass Pane",
tiles = {"xpanes_space.png"},
drawtype = "airlike",
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
air_equivalent = true,
textures = {"default_glass.png","xpanes_pane_half.png","xpanes_white.png"},
inventory_image = "default_glass.png",
wield_image = "default_glass.png",
sounds = default.node_sound_glass_defaults(),
groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3, pane=1},
recipe = {
{'default:glass', 'default:glass', 'default:glass'},
{'default:glass', 'default:glass', 'default:glass'}
{"default:glass", "default:glass", "default:glass"},
{"default:glass", "default:glass", "default:glass"}
}
})
xpanes.register_pane("bar", {
description = "Iron bar",
tiles = {"xpanes_space.png"},
drawtype = "airlike",
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
air_equivalent = true,
textures = {"xpanes_bar.png","xpanes_bar.png","xpanes_space.png"},
inventory_image = "xpanes_bar.png",
wield_image = "xpanes_bar.png",
groups = {cracky=3, pane=1}, -- //MFF
sounds = default.node_sound_stone_defaults(),
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}
}
})