From 81f82bad1578c84eca8ea40619d06d11f003fde2 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Tue, 15 Sep 2015 22:24:56 +0200 Subject: [PATCH] Update MinetestForFunGame --- minetestforfun_game/minetest.conf | 1 + minetestforfun_game/mods/beds/Changelog.txt | 18 -- .../bucket/textures/bucket_river_water.png | Bin 221 -> 221 bytes .../mods/bucket/textures/bucket_water.png | Bin 221 -> 221 bytes minetestforfun_game/mods/default/mapgen.lua | 26 ++- minetestforfun_game/mods/default/nodes.lua | 3 +- .../schematics/jungle_tree_from_sapling.mts | Bin 245 -> 246 bytes minetestforfun_game/mods/fire/init.lua | 166 ++++++++++-------- minetestforfun_game/mods/flowers/init.lua | 1 + 9 files changed, 117 insertions(+), 98 deletions(-) delete mode 100755 minetestforfun_game/mods/beds/Changelog.txt mode change 100755 => 100644 minetestforfun_game/mods/default/schematics/jungle_tree_from_sapling.mts diff --git a/minetestforfun_game/minetest.conf b/minetestforfun_game/minetest.conf index a38db451..9606fdc7 100755 --- a/minetestforfun_game/minetest.conf +++ b/minetestforfun_game/minetest.conf @@ -1,2 +1,3 @@ # Enable jungles on new worlds, disable biome blend and mud flow (faster, looks better). mgv6_spflags = jungles, nobiomeblend, nomudflow +disable_fire = true diff --git a/minetestforfun_game/mods/beds/Changelog.txt b/minetestforfun_game/mods/beds/Changelog.txt deleted file mode 100755 index 988db2af..00000000 --- a/minetestforfun_game/mods/beds/Changelog.txt +++ /dev/null @@ -1,18 +0,0 @@ -1.0.1 beta ----------- -- Add backwards compatibility with PilzAdam's beds mod -- Fix placement -- Fix small bugs -- Prevent possible crash - -1.1 ---- -- Add fancy bed model (based on jp's model) -- Add API to register beds -- Allow players always to detach from bed (by donat-b) -- If more than 50% of players want sleep they can skip the night -- Don't show sleep dialog in singleplayer - -1.1.1 ------ -- Prevent possbile crash by trying to reposition leaving players diff --git a/minetestforfun_game/mods/bucket/textures/bucket_river_water.png b/minetestforfun_game/mods/bucket/textures/bucket_river_water.png index 7afc5b0709e37ac46ae34ccd31253f03acb78337..d4648bb3f5c4588f9cfca82bf6f861d57e14339c 100755 GIT binary patch delta 58 zcmV-A0LA~^0o?(RFfgk1D6;=6n)olX_&1XEJAwZ@uJuZ&^-z-kVPRo{f`X8cke{EQ QrlzL4y1IuE{XUUkeXiReasU7T delta 58 zcmV-A0LA~^0o?(RFfg(8D7gPCq4+Pj_&1sLJBR-}wDn4^^-!4qVPRo{f`X8cke{EQ QrlzL4y1LI&GNX}TeYlMv%>V!Z diff --git a/minetestforfun_game/mods/bucket/textures/bucket_water.png b/minetestforfun_game/mods/bucket/textures/bucket_water.png index d44011a37f7fdf03736d9281f15c59931bbf04a0..5af836bc8c524fecdfafa007a7d4a535ace25aba 100755 GIT binary patch delta 61 zcmV-D0K)&>0o?(REi+m509^kBMfeC}_z*w!5+wf=VD%s%AR}G%Cp`aQVPS%Tf{>7q TpP!$mrlz{Ox0o?(REi-EM0B`>USNI5X_z+O_5;p%7arGb|AR}z`Cr$rhVPS%Tf{>7q TpP!$mrlz{Ox;ovOfRSK*SOguS diff --git a/minetestforfun_game/mods/default/mapgen.lua b/minetestforfun_game/mods/default/mapgen.lua index b834efb3..6d67716c 100755 --- a/minetestforfun_game/mods/default/mapgen.lua +++ b/minetestforfun_game/mods/default/mapgen.lua @@ -659,6 +659,7 @@ function default.register_biomes() node_water_top = "default:ice", depth_water_top = 10, --node_water = "", + node_river_water = "default:ice", y_min = -8, y_max = 31000, heat_point = -5, @@ -676,6 +677,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = -9, heat_point = -5, @@ -695,6 +697,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 2, y_max = 31000, heat_point = 20, @@ -712,6 +715,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 1, heat_point = 20, @@ -729,6 +733,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 2, y_max = 31000, heat_point = 20, @@ -746,6 +751,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 1, heat_point = 20, @@ -765,6 +771,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 6, y_max = 31000, heat_point = 45, @@ -782,6 +789,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 5, heat_point = 45, @@ -799,6 +807,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 6, y_max = 31000, heat_point = 45, @@ -816,6 +825,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 5, heat_point = 45, @@ -835,6 +845,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 6, y_max = 31000, heat_point = 70, @@ -852,6 +863,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 5, heat_point = 70, @@ -869,6 +881,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 6, y_max = 31000, heat_point = 70, @@ -886,6 +899,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 5, heat_point = 70, @@ -905,6 +919,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 5, y_max = 31000, heat_point = 95, @@ -922,6 +937,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 4, heat_point = 95, @@ -939,6 +955,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 5, y_max = 31000, heat_point = 95, @@ -956,6 +973,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = 4, heat_point = 95, @@ -973,6 +991,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 1, y_max = 31000, heat_point = 95, @@ -990,6 +1009,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = 0, y_max = 0, heat_point = 95, @@ -1007,6 +1027,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -112, y_max = -1, heat_point = 95, @@ -1026,6 +1047,7 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", y_min = -31000, y_max = -113, heat_point = 50, @@ -1206,8 +1228,8 @@ function default.register_decorations() place_on = {"default:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = offset, - scale = scale, + offset = 0.04, + scale = 0.02, spread = {x = 100, y = 100, z = 100}, seed = 1220999, octaves = 3, diff --git a/minetestforfun_game/mods/default/nodes.lua b/minetestforfun_game/mods/default/nodes.lua index 5db96877..bad528ce 100755 --- a/minetestforfun_game/mods/default/nodes.lua +++ b/minetestforfun_game/mods/default/nodes.lua @@ -2232,7 +2232,8 @@ minetest.register_node("default:glass", { minetest.register_node("default:obsidian_glass", { description = "Obsidian Glass", drawtype = "glasslike_framed_optional", - tiles = {"default_obsidian_glass_frame.png", "default_obsidian_glass_detail.png"}, + tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"}, + inventory_image = minetest.inventorycube("default_obsidian_glass.png"), paramtype = "light", is_ground_content = false, sunlight_propagates = true, diff --git a/minetestforfun_game/mods/default/schematics/jungle_tree_from_sapling.mts b/minetestforfun_game/mods/default/schematics/jungle_tree_from_sapling.mts old mode 100755 new mode 100644 index 39d46d7c49530d4e1591c28ccacbeb4b4573b7ca..babaa45f7a11de1fc017b341cea0751974ce2ab4 GIT binary patch delta 172 zcmV;d08{_<0rmlqQhy5$!ypK?T+E|*1di~IzA3}j4|HZROP1`BB1(bhiy?dghnT&a z|Ld&>-9|f@Qpc2BrleoX^kPh6Ui9uBc2wt(GB~EJRcmY7YP(z0s*9)HeVwoAe)#Wf zz3!9x0Ss=I7ZNikae9E$#igbInnedC0rdfpQh$LB#2^S%7IPFwU<5|*E5!&^YV$EoKKV06)E=A{LwEs^$9y&Z zXNLvcW;>LEQ3|e7kWVY^ih+lht?n_;S|1PvaX6iE=bmbBcYE4=@w~g|`JV2F|IVKC zzTsbhglamG5ixU+4YFYgB2tqy%2Z00Eexfy9MVxjqBQnUfg~!eN^Hx1%Jrlu-=Ndd ZN}*AwaaH;lShYBW!P7r}0w1GLHY4CrPmllr diff --git a/minetestforfun_game/mods/fire/init.lua b/minetestforfun_game/mods/fire/init.lua index e15ea27a..7eef94f7 100755 --- a/minetestforfun_game/mods/fire/init.lua +++ b/minetestforfun_game/mods/fire/init.lua @@ -16,11 +16,13 @@ minetest.register_node("fire:basic_flame", { aspect_w = 16, aspect_h = 16, length = 1}, }}, inventory_image = "fire_basic_flame.png", + paramtype = "light", light_source = 14, groups = {igniter = 2, dig_immediate = 3, hot = 3}, drop = '', walkable = false, buildable_to = true, + sunlight_propagates = true, damage_per_second = 4, on_construct = function(pos) @@ -31,21 +33,13 @@ minetest.register_node("fire:basic_flame", { minetest.after(0, fire.on_flame_remove_at, pos) end, - -- unaffected by explosions - on_blast = function() end, + on_blast = function() end, -- unaffected by explosions }) --- 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 = { @@ -62,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) @@ -73,9 +73,9 @@ function fire.update_sounds_around(pos) local should_have_sound = (#flames_p > 0) local wanted_sound = nil if #flames_p >= 9 then - wanted_sound = {name = "fire_large", gain = 1.5} + wanted_sound = {name = "fire_large", gain = 0.7} elseif #flames_p > 0 then - wanted_sound = {name = "fire_small", gain = 1.5} + wanted_sound = {name = "fire_small", gain = 0.9} end local p0_hash = minetest.hash_node_position(p0) local sound = fire.sounds[p0_hash] @@ -125,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"}, @@ -182,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/init.lua b/minetestforfun_game/mods/flowers/init.lua index ee6f6c1c..63c45431 100755 --- a/minetestforfun_game/mods/flowers/init.lua +++ b/minetestforfun_game/mods/flowers/init.lua @@ -39,6 +39,7 @@ local function add_simple_flower(name, desc, box, f_groups) minetest.register_node("flowers:" .. name, { description = desc, drawtype = "plantlike", + waving = 1, tiles = {"flowers_" .. name .. ".png"}, inventory_image = "flowers_" .. name .. ".png", wield_image = "flowers_" .. name .. ".png",