From ab433775777c4f5055bcf4d2a1cffc506c4f9961 Mon Sep 17 00:00:00 2001 From: sapier Date: Sat, 25 May 2013 00:51:02 +0200 Subject: Move scriptapi to separate folder (by sapier) On the lua side, notably minetest.env:() should now be replaced by minetest.(). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl) --- games/minimal/mods/bucket/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'games/minimal/mods/bucket') diff --git a/games/minimal/mods/bucket/init.lua b/games/minimal/mods/bucket/init.lua index 6aa0921d5..dcd59ed38 100644 --- a/games/minimal/mods/bucket/init.lua +++ b/games/minimal/mods/bucket/init.lua @@ -41,13 +41,13 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image) return end -- Check if pointing to a liquid - n = minetest.env:get_node(pointed_thing.under) + n = minetest.get_node(pointed_thing.under) if bucket.liquids[n.name] == nil then -- Not a liquid - minetest.env:add_node(pointed_thing.above, {name=source}) + minetest.add_node(pointed_thing.above, {name=source}) elseif n.name ~= source then -- It's a liquid - minetest.env:add_node(pointed_thing.under, {name=source}) + minetest.add_node(pointed_thing.under, {name=source}) end return {name="bucket:bucket_empty"} end @@ -65,10 +65,10 @@ minetest.register_craftitem("bucket:bucket_empty", { return end -- Check if pointing to a liquid source - n = minetest.env:get_node(pointed_thing.under) + n = minetest.get_node(pointed_thing.under) liquiddef = bucket.liquids[n.name] if liquiddef ~= nil and liquiddef.source == n.name and liquiddef.itemname ~= nil then - minetest.env:add_node(pointed_thing.under, {name="air"}) + minetest.add_node(pointed_thing.under, {name="air"}) return {name=liquiddef.itemname} end end, -- cgit v1.2.3