From 82c90e76e9e8be8e139c8c9a915bf155c214370c Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Mon, 5 Oct 2015 20:51:58 +0200 Subject: [PATCH] [beds & boats & bucket & ... ] Update MinetestForFun game --- minetestforfun_game/README.txt | 27 +-- minetestforfun_game/game_api.txt | 103 ++++++----- minetestforfun_game/minetest.conf.example | 12 +- minetestforfun_game/mods/beds/README.txt | 7 +- minetestforfun_game/mods/beds/functions.lua | 34 +++- minetestforfun_game/mods/boats/README.txt | 6 +- minetestforfun_game/mods/bucket/README.txt | 2 +- minetestforfun_game/mods/creative/README.txt | 4 +- minetestforfun_game/mods/default/README.txt | 2 +- minetestforfun_game/mods/default/mapgen.lua | 173 ++++++++++++------ minetestforfun_game/mods/default/nodes.lua | 1 - .../mods/default/schematics/acacia_tree.mts | Bin 204 -> 204 bytes .../mods/default/schematics/apple_tree.mts | Bin 163 -> 161 bytes .../mods/default/schematics/papyrus.mts | Bin 73 -> 99 bytes .../mods/default/schematics/pine_tree.mts | Bin 175 -> 175 bytes .../default/textures/default_mineral_mese.png | Bin 345 -> 546 bytes minetestforfun_game/mods/doors/README.txt | 4 +- minetestforfun_game/mods/dye/README.txt | 2 +- minetestforfun_game/mods/fire/README.txt | 4 +- minetestforfun_game/mods/fire/init.lua | 157 ++++++++-------- minetestforfun_game/mods/flowers/README.txt | 4 +- minetestforfun_game/mods/flowers/init.lua | 13 +- minetestforfun_game/mods/flowers/mapgen.lua | 17 +- .../mods/screwdriver/readme.txt | 6 +- minetestforfun_game/mods/stairs/README.txt | 2 +- minetestforfun_game/mods/vessels/README.txt | 2 +- minetestforfun_game/mods/wool/README.txt | 4 +- minetestforfun_game/mods/xpanes/README.txt | 4 +- minetestforfun_game/mods/xpanes/init.lua | 62 +++---- 29 files changed, 373 insertions(+), 279 deletions(-) mode change 100755 => 100644 minetestforfun_game/mods/default/schematics/acacia_tree.mts mode change 100755 => 100644 minetestforfun_game/mods/default/schematics/apple_tree.mts mode change 100755 => 100644 minetestforfun_game/mods/default/schematics/papyrus.mts mode change 100755 => 100644 minetestforfun_game/mods/default/schematics/pine_tree.mts diff --git a/minetestforfun_game/README.txt b/minetestforfun_game/README.txt index 7a9b12f5..8c85d665 100755 --- a/minetestforfun_game/README.txt +++ b/minetestforfun_game/README.txt @@ -1,23 +1,24 @@ -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 - /games/minetest_game -in the Minetest Engine. +To use this subgame with the Minetest engine, insert this repository as + /games/minetest_game -The Minetest Engine can be found in: - https://github.com/minetest/minetest/ +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 - http://minetest.net/download +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!) diff --git a/minetestforfun_game/game_api.txt b/minetestforfun_game/game_api.txt index 791a7f92..9c717e75 100755 --- a/minetestforfun_game/game_api.txt +++ b/minetestforfun_game/game_api.txt @@ -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,23 +17,24 @@ 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 -------- beds.register_bed( - "beds:bed", -- Bed name - def: See [#Bed definition] -- Bed definition + "beds:bed", -- Bed name + def: See [#Bed definition] -- Bed definition ) - beds.read_spawns() -- returns a table containing players respawn positions - beds.kick_players() -- forces all players to leave bed - beds.skip_night() -- sets world time to morning and saves respawn position of all players currently sleeping + beds.read_spawns() -- returns a table containing players respawn positions + beds.kick_players() -- forces all players to leave bed + beds.skip_night() -- sets world time to morning and saves respawn position of all players currently sleeping #Bed definition --------------- @@ -50,11 +51,11 @@ Beds API } }, nodebox = { - bottom = regular nodebox, see [Node boxes], -- bottm part of bed - top = regular nodebox, see [Node boxes], -- top part of bed + bottom = regular nodebox, see [Node boxes], -- bottm part of bed + top = regular nodebox, see [Node boxes], -- top part of bed }, - selectionbox = regular nodebox, see [Node boxes], -- for both nodeboxes - recipe = { -- Craft recipe + selectionbox = regular nodebox, see [Node boxes], -- for both nodeboxes + recipe = { -- Craft recipe {"group:wool", "group:wool", "group:wool"}, {"group:wood", "group:wood", "group:wood"} } @@ -104,9 +105,9 @@ doors.register_trapdoor(name, def) sound_open = sound to play when opening the trapdoor, OPTIONAL, sound_close = sound to play when closing the trapdoor, OPTIONAL, -> You can add any other node definition properties for minetest.register_node, - such as wield_image, inventory_image, sounds, groups, description, ... - Only node_box, selection_box, tiles, drop, drawtype, paramtype, paramtype2, on_rightclick - will be overwritten by the trapdoor registration function + such as wield_image, inventory_image, sounds, groups, description, ... + Only node_box, selection_box, tiles, drop, drawtype, paramtype, paramtype2, on_rightclick + will be overwritten by the trapdoor registration function } Farming API @@ -122,11 +123,11 @@ farming.register_plant(name, Plant definition) #Hoe Definition --------------- { - description = "", -- Description for tooltip - inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image - max_uses = 30, -- Uses until destroyed - material = "", -- Material for recipes - recipe = { -- Craft recipe, if material isn't used + description = "", -- Description for tooltip + inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image + max_uses = 30, -- Uses until destroyed + material = "", -- Material for recipes + recipe = { -- Craft recipe, if material isn't used {"air", "air", "air"}, {"", "group:stick"}, {"", "group:stick"}, @@ -136,12 +137,12 @@ farming.register_plant(name, Plant definition) #Plant definition ----------------- { - description = "", -- Description of seed item - inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image - steps = 8, -- How many steps the plant has to grow, until it can be harvested + description = "", -- Description of seed item + inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image + steps = 8, -- How many steps the plant has to grow, until it can be harvested ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber) - minlight = 13, -- Minimum light to grow - maxlight = default.LIGHT_MAX -- Maximum light to grow + minlight = 13, -- Minimum light to grow + maxlight = default.LIGHT_MAX -- Maximum light to grow } Screwdriver API @@ -155,7 +156,7 @@ on_rotate(pos, node, user, mode, new_param2) ^ mode: screwdriver.ROTATE_FACE or screwdriver.ROTATE_AXIS ^ new_param2: the new value of param2 that would have been set if on_rotate wasn't there ^ return value: false to disallow rotation, nil to keep default behaviour, true to allow - it but to indicate that changed have already been made (so the screwdriver will wear out) + it but to indicate that changed have already been made (so the screwdriver will wear out) ^ use on_rotate = screwdriver.disallow to always disallow rotation ^ use on_rotate = screwdriver.rotate_simple to allow only face rotation @@ -215,10 +216,10 @@ The following nodes use the group `connect_to_raillike` and will only connect to raillike nodes within this group and the same group value. Use `minetest.raillike_group()` to get the group value. -| Node type | Raillike group name -+-----------------------+---------------------------------- -| default:rail | "rail" -| tnt:gunpowder | "gunpowder" +| Node type | Raillike group name ++-----------------------+-------------------- +| default:rail | "rail" +| tnt:gunpowder | "gunpowder" | tnt:gunpowder_burning | "gunpowder" Example: @@ -281,13 +282,13 @@ default.player_get_animation(player) 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. + 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. animations = { - -- = { x=, y=, }, - foo = { x= 0, y=19, }, - bar = { x=20, y=39, }, + -- = {x = , y = }, + 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 diff --git a/minetestforfun_game/minetest.conf.example b/minetestforfun_game/minetest.conf.example index 47d03b00..0e3c2c55 100755 --- a/minetestforfun_game/minetest.conf.example +++ b/minetestforfun_game/minetest.conf.example @@ -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 diff --git a/minetestforfun_game/mods/beds/README.txt b/minetestforfun_game/mods/beds/README.txt index 21d4433f..9710c459 100755 --- a/minetestforfun_game/mods/beds/README.txt +++ b/minetestforfun_game/mods/beds/README.txt @@ -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 diff --git a/minetestforfun_game/mods/beds/functions.lua b/minetestforfun_game/mods/beds/functions.lua index 13642ab6..59b22480 100755 --- a/minetestforfun_game/mods/beds/functions.lua +++ b/minetestforfun_game/mods/beds/functions.lua @@ -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 - beds.kick_players() 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() - beds.skip_night() - update_formspecs(true) - beds.kick_players() + update_formspecs(is_night_skip_enabled()) + if is_night_skip_enabled() then + beds.skip_night() + 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 - beds.skip_night() - update_formspecs(true) - beds.kick_players() + update_formspecs(is_night_skip_enabled()) + if is_night_skip_enabled() then + beds.skip_night() + beds.kick_players() + end end end) diff --git a/minetestforfun_game/mods/boats/README.txt b/minetestforfun_game/mods/boats/README.txt index 5100481d..1de71678 100755 --- a/minetestforfun_game/mods/boats/README.txt +++ b/minetestforfun_game/mods/boats/README.txt @@ -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: ----------------------- diff --git a/minetestforfun_game/mods/bucket/README.txt b/minetestforfun_game/mods/bucket/README.txt index 7dad6419..a6674b43 100755 --- a/minetestforfun_game/mods/bucket/README.txt +++ b/minetestforfun_game/mods/bucket/README.txt @@ -1,4 +1,4 @@ -Minetest 0.4 mod: bucket +Minetest Game mod: bucket ========================= License of source code: diff --git a/minetestforfun_game/mods/creative/README.txt b/minetestforfun_game/mods/creative/README.txt index 7d49b981..a34dcaad 100755 --- a/minetestforfun_game/mods/creative/README.txt +++ b/minetestforfun_game/mods/creative/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4 mod: creative -========================== +Minetest Game mod: creative +=========================== Implements creative mode. diff --git a/minetestforfun_game/mods/default/README.txt b/minetestforfun_game/mods/default/README.txt index 13fdef5f..f0dea682 100755 --- a/minetestforfun_game/mods/default/README.txt +++ b/minetestforfun_game/mods/default/README.txt @@ -1,4 +1,4 @@ -Minetest 0.4 mod: default +Minetest Game mod: default ========================== License of source code: diff --git a/minetestforfun_game/mods/default/mapgen.lua b/minetestforfun_game/mods/default/mapgen.lua index 6d67716c..b672e591 100755 --- a/minetestforfun_game/mods/default/mapgen.lua +++ b/minetestforfun_game/mods/default/mapgen.lua @@ -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 diff --git a/minetestforfun_game/mods/default/nodes.lua b/minetestforfun_game/mods/default/nodes.lua index e09f8d9c..1bb515b0 100755 --- a/minetestforfun_game/mods/default/nodes.lua +++ b/minetestforfun_game/mods/default/nodes.lua @@ -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", { diff --git a/minetestforfun_game/mods/default/schematics/acacia_tree.mts b/minetestforfun_game/mods/default/schematics/acacia_tree.mts old mode 100755 new mode 100644 index 43e7867a4f1262815fad4e05f1ccd3868ee5ed6f..4732ade3d9df99c4f543ad168dc090e551cfdee5 GIT binary patch delta 85 zcmV-b0IL7Y0n7mpO;l4&00aOD00;mHe}6xb4@LugbZU`UJ~nX<PK>~Xy0 r|K&ZDy%q`%dK&WtQRF+mf3O>7bmx-ZctRd6Pxo#Xi;vj=)n_rDB?=jb0-^+vBYyw}VoOIv0RI600RN!9r;`8x010qNS#tmY3labT3lag+-G2N4 z000McNliru-w7B1HUUW*xVQiS0k26!K~y-)rISx6gK-$gzk7Qbc38^TE^10E4y@FR zS9%YWrC4hRh2&ssDR~{F-h(Lr57XkNBs-{OHx8Qvq7)94i+{ffaS_UEsh7vaYwye` zd+Jxep6A>5_k8>G(-9HUDOSCRvA2|>6+0`;FBl}ZQ}(o+D;L@s^IhmZG)9+-SgW?* z*o<+Wlk2=bh*up(SFT?_Je|Wb2^(mHoYx2O3FuM#;SdHa7D$Uh+@BrigidZ`W@7`d z07eov2!}8*Ie(3{*%|n?eSIdtR~b-NhA!ZlG35gJ1>ln+xQ>+dTdz{zcA1z{jgY0s z>CJuYeRm(YzQT4=gjA(Qh(_RXyI?n4P`72|Idek4D1+e#{d7XOy=fZfkB2cVQft1#^>Gj&)RsJky3xVrfsQ*o-Qof&-g3jWNYaluZ_OZa;wt=oMNHYV9`<`U& z2u^Q;_uN7djvJtYFir&5d<4ZY_b~a=#PLiV&k8&WUgKuc+kaX7yX9k@pks}dEeIni zNC?z-3G{=zl6bMMYht#@6g(nmI&bevf&VQYXM&$vZEuGv=Aai(l^u_wqOw|Wz6_{Q z7#aNpMVB-a>|PYe&a{{!Uv4HXr=_2v!nMXqQbAonEh1@l9pZ4RIiiKiY%t*mCc3BM z3OuOiytn$$;{%4<25xK# RKw|&^002ovPDHLkV1gcCm978) diff --git a/minetestforfun_game/mods/doors/README.txt b/minetestforfun_game/mods/doors/README.txt index 146af8ed..5ae63caf 100755 --- a/minetestforfun_game/mods/doors/README.txt +++ b/minetestforfun_game/mods/doors/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4 mod: doors -======================= +Minetest Game mod: doors +======================== version: 1.3 License of source code: diff --git a/minetestforfun_game/mods/dye/README.txt b/minetestforfun_game/mods/dye/README.txt index d414c2cc..b1035419 100755 --- a/minetestforfun_game/mods/dye/README.txt +++ b/minetestforfun_game/mods/dye/README.txt @@ -1,4 +1,4 @@ -Minetest 0.4 mod: dye +Minetest Game mod: dye ====================== See init.lua for documentation. diff --git a/minetestforfun_game/mods/fire/README.txt b/minetestforfun_game/mods/fire/README.txt index fdbce15f..bf143e5c 100755 --- a/minetestforfun_game/mods/fire/README.txt +++ b/minetestforfun_game/mods/fire/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4 mod: fire -====================== +Minetest Game mod: fire +======================= License of source code: ----------------------- diff --git a/minetestforfun_game/mods/fire/init.lua b/minetestforfun_game/mods/fire/init.lua index 40fa6a6d..7eef94f7 100755 --- a/minetestforfun_game/mods/fire/init.lua +++ b/minetestforfun_game/mods/fire/init.lua @@ -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,39 +125,90 @@ 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({ - nodenames = {"group:flammable"}, - neighbors = {"group:igniter"}, - interval = 7, - chance = 32, - action = function(p0, node, _, _) - -- If there is water or stuff like that around flame, don't ignite - if fire.flame_should_extinguish(p0) then - return - end - local p = fire.find_pos_for_flame_around(p0) - if p then - minetest.set_node(p, {name = "fire:basic_flame"}) - end - end, -}) +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 = 16, + action = function(p0, node, _, _) + -- If there is water or stuff like that around node, don't ignite + if fire.flame_should_extinguish(p0) then + return + end + local p = fire.find_pos_for_flame_around(p0) + if p then + 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, }) - +--]] diff --git a/minetestforfun_game/mods/flowers/README.txt b/minetestforfun_game/mods/flowers/README.txt index 6cfa0eea..ebd4a21f 100755 --- a/minetestforfun_game/mods/flowers/README.txt +++ b/minetestforfun_game/mods/flowers/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4 mod: flowers -========================= +Minetest Game mod: flowers +========================== License of source code: ----------------------- diff --git a/minetestforfun_game/mods/flowers/init.lua b/minetestforfun_game/mods/flowers/init.lua index 84780eba..27f3a20f 100755 --- a/minetestforfun_game/mods/flowers/init.lua +++ b/minetestforfun_game/mods/flowers/init.lua @@ -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 + 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 - minetest.set_node(pos, {name = "flowers:waterlily", param2 = math.random(0, 3)}) end }) diff --git a/minetestforfun_game/mods/flowers/mapgen.lua b/minetestforfun_game/mods/flowers/mapgen.lua index bcdb8205..eac24b10 100755 --- a/minetestforfun_game/mods/flowers/mapgen.lua +++ b/minetestforfun_game/mods/flowers/mapgen.lua @@ -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", diff --git a/minetestforfun_game/mods/screwdriver/readme.txt b/minetestforfun_game/mods/screwdriver/readme.txt index ced1ff55..bdf109b8 100755 --- a/minetestforfun_game/mods/screwdriver/readme.txt +++ b/minetestforfun_game/mods/screwdriver/readme.txt @@ -1,5 +1,5 @@ -Minetest mod: screwdriver -========================= +Minetest Game mod: screwdriver +============================== License of source code: ----------------------- @@ -18,4 +18,4 @@ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by-sa/3.0/ Created by Gambit (WTFPL): - screwdriver.png \ No newline at end of file + screwdriver.png diff --git a/minetestforfun_game/mods/stairs/README.txt b/minetestforfun_game/mods/stairs/README.txt index 716a677c..9bd0b213 100755 --- a/minetestforfun_game/mods/stairs/README.txt +++ b/minetestforfun_game/mods/stairs/README.txt @@ -1,4 +1,4 @@ -Minetest 0.4 mod: stairs +Minetest Game mod: stairs ========================= License of source code: diff --git a/minetestforfun_game/mods/vessels/README.txt b/minetestforfun_game/mods/vessels/README.txt index 150b501d..d5c3da84 100755 --- a/minetestforfun_game/mods/vessels/README.txt +++ b/minetestforfun_game/mods/vessels/README.txt @@ -1,4 +1,4 @@ -Minetest 0.4 mod: vessels +Minetest Game mod: vessels ========================== Crafts diff --git a/minetestforfun_game/mods/wool/README.txt b/minetestforfun_game/mods/wool/README.txt index 9db13327..f57b6dd3 100755 --- a/minetestforfun_game/mods/wool/README.txt +++ b/minetestforfun_game/mods/wool/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4 mod: wool -====================== +Minetest Game mod: wool +======================= Mostly backward-compatible with jordach's 16-color wool mod. diff --git a/minetestforfun_game/mods/xpanes/README.txt b/minetestforfun_game/mods/xpanes/README.txt index 233978c4..b89e74a2 100755 --- a/minetestforfun_game/mods/xpanes/README.txt +++ b/minetestforfun_game/mods/xpanes/README.txt @@ -1,5 +1,5 @@ -Minetest 0.4.x mod: xpanes -========================== +Minetest Game mod: xpanes +========================= License: -------- diff --git a/minetestforfun_game/mods/xpanes/init.lua b/minetestforfun_game/mods/xpanes/init.lua index 2ecf2ea8..77c28830 100755 --- a/minetestforfun_game/mods/xpanes/init.lua +++ b/minetestforfun_game/mods/xpanes/init.lua @@ -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"} } })