diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-25 20:29:56 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-25 20:30:58 +0300 |
commit | 6779036d25e460ca5e8c6d290772e78c3277ccfc (patch) | |
tree | 79eef0ca1026053b740ca1ec1e5314c73f0d3ea4 /games/mesetint/mods/bucket | |
parent | 4fb6c07535cff9a385344f5025b25892b828ebc4 (diff) | |
download | minetest-6779036d25e460ca5e8c6d290772e78c3277ccfc.tar.gz minetest-6779036d25e460ca5e8c6d290772e78c3277ccfc.tar.bz2 minetest-6779036d25e460ca5e8c6d290772e78c3277ccfc.zip |
Make server world selection not brain dead and use gameid 'minetest' instead of 'mesetint'
Diffstat (limited to 'games/mesetint/mods/bucket')
-rw-r--r-- | games/mesetint/mods/bucket/depends.txt | 2 | ||||
-rw-r--r-- | games/mesetint/mods/bucket/init.lua | 95 | ||||
-rw-r--r-- | games/mesetint/mods/bucket/textures/bucket.png | bin | 329 -> 0 bytes | |||
-rw-r--r-- | games/mesetint/mods/bucket/textures/bucket_lava.png | bin | 363 -> 0 bytes | |||
-rw-r--r-- | games/mesetint/mods/bucket/textures/bucket_water.png | bin | 369 -> 0 bytes |
5 files changed, 0 insertions, 97 deletions
diff --git a/games/mesetint/mods/bucket/depends.txt b/games/mesetint/mods/bucket/depends.txt deleted file mode 100644 index 3a7daa1d7..000000000 --- a/games/mesetint/mods/bucket/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default - diff --git a/games/mesetint/mods/bucket/init.lua b/games/mesetint/mods/bucket/init.lua deleted file mode 100644 index 8ed9da522..000000000 --- a/games/mesetint/mods/bucket/init.lua +++ /dev/null @@ -1,95 +0,0 @@ --- bucket (Minetest 0.4 mod) --- A bucket, which can pick up water and lava - -minetest.register_alias("bucket", "bucket:bucket_empty") -minetest.register_alias("bucket_water", "bucket:bucket_water") -minetest.register_alias("bucket_lava", "bucket:bucket_lava") - -minetest.register_craft({ - output = 'bucket:bucket_empty 1', - recipe = { - {'default:steel_ingot', '', 'default:steel_ingot'}, - {'', 'default:steel_ingot', ''}, - } -}) - -bucket = {} -bucket.liquids = {} - --- Register a new liquid --- source = name of the source node --- flowing = name of the flowing node --- itemname = name of the new bucket item (or nil if liquid is not takeable) --- inventory_image = texture of the new bucket item (ignored if itemname == nil) --- This function can be called from any mod (that depends on bucket). -function bucket.register_liquid(source, flowing, itemname, inventory_image) - bucket.liquids[source] = { - source = source, - flowing = flowing, - itemname = itemname, - } - bucket.liquids[flowing] = bucket.liquids[source] - - if itemname ~= nil then - minetest.register_craftitem(itemname, { - inventory_image = inventory_image, - stack_max = 1, - liquids_pointable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type ~= "node" then - return - end - -- Check if pointing to a liquid - n = minetest.env:get_node(pointed_thing.under) - if bucket.liquids[n.name] == nil then - -- Not a liquid - minetest.env: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}) - end - return {name="bucket:bucket_empty"} - end - }) - end -end - -minetest.register_craftitem("bucket:bucket_empty", { - inventory_image = "bucket.png", - stack_max = 1, - liquids_pointable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type ~= "node" then - return - end - -- Check if pointing to a liquid source - n = minetest.env: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"}) - return {name=liquiddef.itemname} - end - end, -}) - -bucket.register_liquid( - "default:water_source", - "default:water_flowing", - "bucket:bucket_water", - "bucket_water.png" -) - -bucket.register_liquid( - "default:lava_source", - "default:lava_flowing", - "bucket:bucket_lava", - "bucket_lava.png" -) - -minetest.register_craft({ - type = "fuel", - recipe = "default:bucket_lava", - burntime = 60, -}) diff --git a/games/mesetint/mods/bucket/textures/bucket.png b/games/mesetint/mods/bucket/textures/bucket.png Binary files differdeleted file mode 100644 index f165fd209..000000000 --- a/games/mesetint/mods/bucket/textures/bucket.png +++ /dev/null diff --git a/games/mesetint/mods/bucket/textures/bucket_lava.png b/games/mesetint/mods/bucket/textures/bucket_lava.png Binary files differdeleted file mode 100644 index 7cf27cd1f..000000000 --- a/games/mesetint/mods/bucket/textures/bucket_lava.png +++ /dev/null diff --git a/games/mesetint/mods/bucket/textures/bucket_water.png b/games/mesetint/mods/bucket/textures/bucket_water.png Binary files differdeleted file mode 100644 index f220ec51e..000000000 --- a/games/mesetint/mods/bucket/textures/bucket_water.png +++ /dev/null |