aboutsummaryrefslogtreecommitdiff
path: root/models/blender/gleis/rail_my_rt_switches.blend
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-08-28 22:05:35 +0200
committerorwell96 <mono96.mml@gmail.com>2016-08-28 22:05:35 +0200
commit0db3276a25d80ee42cfca2c7aec95fc6a7657b7d (patch)
tree059b3e4819327dbacea8199afc1098101a732049 /models/blender/gleis/rail_my_rt_switches.blend
parent0a5630011de05e04d0040091137b2a8d27a3536f (diff)
downloadadvtrains-0db3276a25d80ee42cfca2c7aec95fc6a7657b7d.tar.gz
advtrains-0db3276a25d80ee42cfca2c7aec95fc6a7657b7d.tar.bz2
advtrains-0db3276a25d80ee42cfca2c7aec95fc6a7657b7d.zip
correcting an error that caused a crash
Diffstat (limited to 'models/blender/gleis/rail_my_rt_switches.blend')
0 files changed, 0 insertions, 0 deletions
n>}, {'', '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.get_node(pointed_thing.under) if bucket.liquids[n.name] == nil then -- Not a liquid minetest.add_node(pointed_thing.above, {name=source}) elseif n.name ~= source then -- It's a liquid minetest.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.get_node(pointed_thing.under) liquiddef = bucket.liquids[n.name] if liquiddef ~= nil and liquiddef.source == n.name and liquiddef.itemname ~= nil then minetest.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 = "bucket:bucket_lava", burntime = 60, })