From 3d1f7fcfdc47322a9a122144000d37bf6a42ce97 Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Thu, 8 Jun 2017 00:36:28 -0700 Subject: [PATCH] [bridges] Update to Git patch ba8f71a: https://github.com/AntumDeluge/mtmod-bridges/tree/ba8f71a --- README.md | 3 ++- mods/buildings/bridges/init.lua | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 79fd9951..faa3e621 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m * [awards][] ([LGPL][lic.lgpl2.1]) -- version: [096fe16 Git][ver.awards] *2017-02-25* ([patched][patch.awards]) * [antum][] ([MIT][lic.antum]) -- version: [3af5496 Git][ver.antum] *2017-06-08* * buildings/ - * [bridges][] ([GPL][lic.gpl3.0]) -- version: [5b5f475 Git][ver.bridges] *2015-08-23* + * [bridges][] ([GPL][lic.gpl3.0]) -- version: [5b5f475 Git][ver.bridges] *2015-08-23* ([patched][patch.bridges]) * [christmas][] ([MIT][lic.christmas]) -- version [d3bd872 Git][ver.christmas] *2013-01-11* ([patched][patch.christmas]) * [elevator][] ([WTFPL][lic.elevator]) * [fort_spikes][] ([MIT][lic.fort_spikes] / [CC0][lic.cc0]) -- version: [3c7d7c6 Git][ver.fort_spikes] *2017-05-06* @@ -497,6 +497,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m [patch.awards]: https://github.com/AntumDeluge/mtmod-awards/tree/638c137 [patch.bags]: https://github.com/AntumDeluge/mtmod-bags/tree/4363284 [patch.bedrock2]: https://github.com/AntumDeluge/mtmod-bedrock2/tree/51b25b6 +[patch.bridges]: https://github.com/AntumDeluge/mtmod-bridges/tree/ba8f71a [patch.campfire]: https://github.com/AntumDeluge/mtmod-campfire/tree/7b2394a [patch.castle_gates]: https://github.com/AntumDeluge/mtmod-castle_gates/tree/465ad4f [patch.castle_lighting]: https://github.com/AntumDeluge/mtmod-castle_lighting/tree/b360c54 diff --git a/mods/buildings/bridges/init.lua b/mods/buildings/bridges/init.lua index 9931d569..7af54148 100644 --- a/mods/buildings/bridges/init.lua +++ b/mods/buildings/bridges/init.lua @@ -289,7 +289,7 @@ minetest.register_node("bridges:bridge_auto", { drop = "", -- all leftover parts are in the "chest" on_construct = function(pos) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); meta:set_string("formspec", "invsize[8,9;]".. "list[current_name;main;0,0;8,4;]".. @@ -300,7 +300,7 @@ minetest.register_node("bridges:bridge_auto", { end, can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); local inv = meta:get_inventory(); return inv:is_empty("main"); end, @@ -347,18 +347,18 @@ minetest.register_node("bridges:bridge_auto", { -- is there space for a bridge? p = {x=pos.x+(x_dir*i), y=pos.y, z=pos.z+(z_dir*i)}; - n = minetest.env:get_node(p); + n = minetest.get_node(p); if( n == nil or (n.name ~= "air" and n.name ~= 'moonrealm:vacuum' and n.name ~= 'moonrealm:air' and n.name ~= 'moontest:vacuum' and n.name ~= 'moontest:air')) then i = MAX_BRIDGE_LENGTH+1; -- end -- print("At length "..tostring(i)..": node at target position not air; no place for bridge: "..tostring(n.name)); else -- one small bridge is followed by two middle parts if( i%3 == 1 ) then - minetest.env:add_node(p, {name="bridges:bridge_small", param1=0, param2=fdir}); + minetest.add_node(p, {name="bridges:bridge_small", param1=0, param2=fdir}); rem_small = rem_small - 1; -- one small bridge used -- print("Placing small bridge at dist "..tostring(i)); else - minetest.env:add_node(p, {name="bridges:bridge_middle", param1=0, param2=fdir}); + minetest.add_node(p, {name="bridges:bridge_middle", param1=0, param2=fdir}); rem_middle = rem_middle -1; -- one middle part used -- print("Placing middle bridge at dist "..tostring(i)); end @@ -369,7 +369,7 @@ minetest.register_node("bridges:bridge_auto", { -- do we have to give any leftover parts back? - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); local inv = meta:get_inventory(); if( rem_small > 0 ) then