diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 20:02:19 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 21:09:33 -0400 |
commit | da66780a569712c23ae4f2996cfb4608a9f9d69d (patch) | |
tree | 217556029a78bc23ad4564720afc86de97228a04 /bobblocks | |
parent | 615b22df4d423aded3613db7716943a2f389b047 (diff) | |
download | dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.gz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.bz2 dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.xz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.zip |
copy all standard Dreambuilder mods in from the old subgame
(exactly as last supplied there, updates to these mods will follow later)
Diffstat (limited to 'bobblocks')
37 files changed, 1005 insertions, 0 deletions
diff --git a/bobblocks/blocks.lua b/bobblocks/blocks.lua new file mode 100644 index 0000000..652bc07 --- /dev/null +++ b/bobblocks/blocks.lua @@ -0,0 +1,844 @@ +-- BobBlocks mod by RabbiBob +-- State Changes + +local update_bobblock = function (pos, node) + local nodename="" + local param2="" + --Switch Block State + if + -- Start Blocks + node.name == 'bobblocks:redblock_off' then nodename = 'bobblocks:redblock' + elseif node.name == 'bobblocks:redblock' then nodename = 'bobblocks:redblock_off' + elseif node.name == 'bobblocks:orangeblock_off' then nodename = 'bobblocks:orangeblock' + elseif node.name == 'bobblocks:orangeblock' then nodename = 'bobblocks:orangeblock_off' + elseif node.name == 'bobblocks:yellowblock_off' then nodename = 'bobblocks:yellowblock' + elseif node.name == 'bobblocks:yellowblock' then nodename = 'bobblocks:yellowblock_off' + elseif node.name == 'bobblocks:greenblock_off' then nodename = 'bobblocks:greenblock' + elseif node.name == 'bobblocks:greenblock' then nodename = 'bobblocks:greenblock_off' + elseif node.name == 'bobblocks:blueblock_off' then nodename = 'bobblocks:blueblock' + elseif node.name == 'bobblocks:blueblock' then nodename = 'bobblocks:blueblock_off' + elseif node.name == 'bobblocks:indigoblock_off' then nodename = 'bobblocks:indigoblock' + elseif node.name == 'bobblocks:indigoblock' then nodename = 'bobblocks:indigoblock_off' + elseif node.name == 'bobblocks:violetblock_off' then nodename = 'bobblocks:violetblock' + elseif node.name == 'bobblocks:violetblock' then nodename = 'bobblocks:violetblock_off' + elseif node.name == 'bobblocks:whiteblock_off' then nodename = 'bobblocks:whiteblock' + elseif node.name == 'bobblocks:whiteblock' then nodename = 'bobblocks:whiteblock_off' + -- Start Poles + elseif node.name == 'bobblocks:redpole_off' then nodename = 'bobblocks:redpole' + elseif node.name == 'bobblocks:redpole' then nodename = 'bobblocks:redpole_off' + elseif node.name == 'bobblocks:orangepole_off' then nodename = 'bobblocks:orangepole' + elseif node.name == 'bobblocks:orangepole' then nodename = 'bobblocks:orangepole_off' + elseif node.name == 'bobblocks:yellowpole_off' then nodename = 'bobblocks:yellowpole' + elseif node.name == 'bobblocks:yellowpole' then nodename = 'bobblocks:yellowpole_off' + elseif node.name == 'bobblocks:greenpole_off' then nodename = 'bobblocks:greenpole' + elseif node.name == 'bobblocks:greenpole' then nodename = 'bobblocks:greenpole_off' + elseif node.name == 'bobblocks:bluepole_off' then nodename = 'bobblocks:bluepole' + elseif node.name == 'bobblocks:bluepole' then nodename = 'bobblocks:bluepole_off' + elseif node.name == 'bobblocks:indigopole_off' then nodename = 'bobblocks:indigopole' + elseif node.name == 'bobblocks:indigopole' then nodename = 'bobblocks:indigopole_off' + elseif node.name == 'bobblocks:violetpole_off' then nodename = 'bobblocks:violetpole' + elseif node.name == 'bobblocks:violetpole' then nodename = 'bobblocks:violetpole_off' + elseif node.name == 'bobblocks:whitepole_off' then nodename = 'bobblocks:whitepole' + elseif node.name == 'bobblocks:whitepole' then nodename = 'bobblocks:whitepole_off' + end + minetest.add_node(pos, {name = nodename}) + minetest.sound_play("bobblocks_glassblock", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) +end + + +-- Punch Blocks +local on_bobblock_punched = function (pos, node, puncher) + if + -- Start Blocks + node.name == 'bobblocks:redblock_off' or node.name == 'bobblocks:redblock' or + node.name == 'bobblocks:orangeblock_off' or node.name == 'bobblocks:orangeblock' or + node.name == 'bobblocks:yellowblock_off' or node.name == 'bobblocks:yellowblock' or + node.name == 'bobblocks:greenblock_off' or node.name == 'bobblocks:greenblock' or + node.name == 'bobblocks:blueblock_off' or node.name == 'bobblocks:blueblock' or + node.name == 'bobblocks:indigoblock_off' or node.name == 'bobblocks:indigoblock' or + node.name == 'bobblocks:violetblock_off' or node.name == 'bobblocks:violetblock' or + node.name == 'bobblocks:whiteblock_off' or node.name == 'bobblocks:whiteblock' or + --Start Poles + node.name == 'bobblocks:redpole_off' or node.name == 'bobblocks:redpole' or + node.name == 'bobblocks:orangepole_off' or node.name == 'bobblocks:orangepole' or + node.name == 'bobblocks:yellowpole_off' or node.name == 'bobblocks:yellowpole' or + node.name == 'bobblocks:greenpole_off' or node.name == 'bobblocks:greenpole' or + node.name == 'bobblocks:bluepole_off' or node.name == 'bobblocks:bluepole' or + node.name == 'bobblocks:indigopole_off' or node.name == 'bobblocks:indigopole' or + node.name == 'bobblocks:violetpole_off' or node.name == 'bobblocks:violetpole' or + node.name == 'bobblocks:whitepole_off' or node.name == 'bobblocks:whitepole' + then + update_bobblock(pos, node) + end +end + +minetest.register_on_punchnode(on_bobblock_punched) + +-- Nodes +-- Misc Node + +minetest.register_node("bobblocks:btm", { + description = "Bobs TransMorgifier v5", + tiles = {"bobblocks_btm_sides.png", "bobblocks_btm_sides.png", "bobblocks_btm_sides.png", + "bobblocks_btm_sides.png", "bobblocks_btm_sides.png", "bobblocks_btm.png"}, + inventory_image = "bobblocks_btm.png", + paramtype2 = "facedir", + material = minetest.digprop_dirtlike(1.0), + legacy_facedir_simple = true, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + +}) + + +-- Start Block Nodes +minetest.register_node("bobblocks:redblock", { + description = "Red Block", + drawtype = "glasslike", + tiles = {"bobblocks_redblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_redblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:redblock_off" + }} +}) + +minetest.register_node("bobblocks:redblock_off", { + description = "Red Block", + tiles = {"bobblocks_redblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:redblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:redblock" + }} + +}) + +minetest.register_node("bobblocks:orangeblock", { + description = "Orange Block", + drawtype = "glasslike", + tiles = {"bobblocks_orangeblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_orangeblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:orangeblock_off" + }} +}) + +minetest.register_node("bobblocks:orangeblock_off", { + description = "Orange Block", + tiles = {"bobblocks_orangeblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:orangeblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:orangeblock" + }} + +}) + +minetest.register_node("bobblocks:yellowblock", { + description = "Yellow Block", + drawtype = "glasslike", + tiles = {"bobblocks_yellowblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_yellowblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:yellowblock_off" + }} +}) + +minetest.register_node("bobblocks:yellowblock_off", { + description = "Yellow Block", + tiles = {"bobblocks_yellowblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:yellowblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:yellowblock" + }} + +}) + +minetest.register_node("bobblocks:greenblock", { + description = "Green Block", + drawtype = "glasslike", + tiles = {"bobblocks_greenblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_greenblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:greenblock_off" + }} +}) + +minetest.register_node("bobblocks:greenblock_off", { + description = "Green Block", + tiles = {"bobblocks_greenblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:greenblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:greenblock" + }} + +}) + + +minetest.register_node("bobblocks:blueblock", { + description = "Blue Block", + drawtype = "glasslike", + tiles = {"bobblocks_blueblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_blueblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:blueblock_off" + }} +}) + +minetest.register_node("bobblocks:blueblock_off", { + description = "Blue Block", + tiles = {"bobblocks_blueblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:blueblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:blueblock" + }} + +}) + +minetest.register_node("bobblocks:indigoblock", { + description = "Indigo Block", + drawtype = "glasslike", + tiles = {"bobblocks_indigoblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_indigoblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:indigoblock_off" + }} +}) + +minetest.register_node("bobblocks:indigoblock_off", { + description = "Indigo Block", + tiles = {"bobblocks_indigoblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:indigoblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:indigoblock" + }} + +}) + + +minetest.register_node("bobblocks:violetblock", { + description = "Violet Block", + drawtype = "glasslike", + tiles = {"bobblocks_violetblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_violetblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:violetblock_off" + }} +}) + +minetest.register_node("bobblocks:violetblock_off", { + description = "Violet Block", + tiles = {"bobblocks_violetblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:violetblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:violetblock" + }} + +}) + +minetest.register_node("bobblocks:whiteblock", { + description = "White Block", + drawtype = "glasslike", + tiles = {"bobblocks_whiteblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_whiteblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:whiteblock_off" + }} +}) + +minetest.register_node("bobblocks:whiteblock_off", { + description = "White Block", + tiles = {"bobblocks_whiteblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:whiteblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:whiteblock" + }} + +}) + + +minetest.register_node("bobblocks:greyblock", { + description = "Grey Block", + drawtype = "glasslike", + tiles = {"bobblocks_greyblock.png"}, + inventory_image = minetest.inventorycube("bobblocks_greyblock.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:greyblock_off" + }} +}) + +minetest.register_node("bobblocks:greyblock_off", { + description = "Grey Block", + tiles = {"bobblocks_greyblock.png"}, + is_ground_content = true, + alpha = WATER_ALPHA, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:greyblock', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:greyblock" + }} + +}) + + +-- Block Poles +minetest.register_node("bobblocks:redpole", { + description = "Red Pole", + drawtype = "fencelike", + tiles = {"bobblocks_redblock.png"}, + inventory_image = ("bobblocks_invredpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:redpole_off" + }} +}) + +minetest.register_node("bobblocks:redpole_off", { + description = "Red Pole", + drawtype = "fencelike", + tiles = {"bobblocks_redblock.png"}, + inventory_image = ("bobblocks_invredpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:redpole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:redpole" + }} + +}) + +minetest.register_node("bobblocks:orangepole", { + description = "Orange Pole", + drawtype = "fencelike", + tiles = {"bobblocks_orangeblock.png"}, + inventory_image = ("bobblocks_invorangepole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:orangepole_off" + }} +}) + +minetest.register_node("bobblocks:orangepole_off", { + description = "Orange Pole", + drawtype = "fencelike", + tiles = {"bobblocks_orangeblock.png"}, + inventory_image = ("bobblocks_invorangepole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:orangepole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:orangepole" + }} + +}) + +minetest.register_node("bobblocks:yellowpole", { + description = "Yellow Pole", + drawtype = "fencelike", + tiles = {"bobblocks_yellowblock.png"}, + inventory_image = ("bobblocks_invyellowpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:yellowpole_off" + }} +}) + +minetest.register_node("bobblocks:yellowpole_off", { + description = "Yellow Pole", + drawtype = "fencelike", + tiles = {"bobblocks_yellowblock.png"}, + inventory_image = ("bobblocks_invyellowpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:yellowpole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:yellowpole" + }} + +}) + +minetest.register_node("bobblocks:greenpole", { + description = "Green Pole", + drawtype = "fencelike", + tiles = {"bobblocks_greenblock.png"}, + inventory_image = ("bobblocks_invgreenpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:greenpole_off" + }} +}) + +minetest.register_node("bobblocks:greenpole_off", { + description = "Green Pole", + drawtype = "fencelike", + tiles = {"bobblocks_greenblock.png"}, + inventory_image = ("bobblocks_invgreenpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:greenpole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:greenpole" + }} + +}) + +minetest.register_node("bobblocks:bluepole", { + description = "Blue Pole", + drawtype = "fencelike", + tiles = {"bobblocks_blueblock.png"}, + inventory_image = ("bobblocks_invbluepole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:bluepole_off" + }} +}) + +minetest.register_node("bobblocks:bluepole_off", { + description = "Blue Pole", + drawtype = "fencelike", + tiles = {"bobblocks_blueblock.png"}, + inventory_image = ("bobblocks_invbluepole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:bluepole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:bluepole" + }} + +}) + +minetest.register_node("bobblocks:indigopole", { + description = "Indigo Pole", + drawtype = "fencelike", + tiles = {"bobblocks_indigoblock.png"}, + inventory_image = ("bobblocks_invindigopole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:indigopole_off" + }} +}) + +minetest.register_node("bobblocks:indigopole_off", { + description = "Indigo Pole", + drawtype = "fencelike", + tiles = {"bobblocks_indigoblock.png"}, + inventory_image = ("bobblocks_invindigopole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:indigopole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:indigopole" + }} + +}) + +minetest.register_node("bobblocks:violetpole", { + description = "Violet Pole", + drawtype = "fencelike", + tiles = {"bobblocks_violetblock.png"}, + inventory_image = ("bobblocks_invvioletpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:violetpole_off" + }} +}) + +minetest.register_node("bobblocks:violetpole_off", { + description = "Violet Pole", + drawtype = "fencelike", + tiles = {"bobblocks_violetblock.png"}, + inventory_image = ("bobblocks_invvioletpole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:violetpole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:violetpole" + }} + +}) + +minetest.register_node("bobblocks:whitepole", { + description = "White Pole", + drawtype = "fencelike", + tiles = {"bobblocks_whiteblock.png"}, + inventory_image = ("bobblocks_invwhitepole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + foo = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:whitepole_off" + }} +}) + +minetest.register_node("bobblocks:whitepole_off", { + description = "White Pole", + drawtype = "fencelike", + tiles = {"bobblocks_whiteblock.png"}, + inventory_image = ("bobblocks_invwhitepole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + light_source = LIGHT_MAX-10, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + drop = 'bobblocks:whitepole', + foo = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:whitepole" + }} + +}) + +minetest.register_node("bobblocks:greypole", { + description = "Grey Pole", + drawtype = "fencelike", + tiles = {"bobblocks_greyblock.png"}, + inventory_image = ("bobblocks_invgreypole.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = true, + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + --light_source = LIGHT_MAX-0, +}) + + + +-- Crafts +-- BTM +minetest.register_craft({ + output = 'NodeItem "bobblocks:btm" 1', + recipe = { + {'node "default:glass" 1', 'node "default:torch" 1', 'node "default:leaves" 1', + 'node "default:mese" 1','node "default:rat" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:greyblock" 2', + recipe = { + {'node "default:glass" 1', 'node "default:torch" 1', 'node "default:cobble" 1'}, + }, +}) + +-- Red / Yellow / Blue / White +-- Red / Yellow -> Orange +-- Red / Blue -> Violet +-- Blue / Yellow -> Green +-- Red / Yellow / White -> Indigo + +minetest.register_craft({ + output = 'NodeItem "bobblocks:redblock" 2', + recipe = { + {'node "default:glass" 1', 'node "default:torch" 1', 'node "default:brick" 1'}, + }, +}) +minetest.register_craft({ + output = 'NodeItem "bobblocks:yellowblock" 2', + recipe = { + {'node "default:glass" 1', 'node "default:torch" 1', 'node "default:sand" 1'}, + }, +}) +minetest.register_craft({ + output = 'NodeItem "bobblocks:blueblock" 2', + recipe = { + {'node "default:glass" 1', 'node "default:torch" 1', 'node "default:gravel" 1'}, + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:whiteblock" 2', + recipe = { + {'node "default:glass" 1', 'node "default:torch" 1', 'node "default:dirt" 1'}, + }, +}) + + +minetest.register_craft({ + output = 'NodeItem "bobblocks:orangeblock" 2', + recipe = { + {'node "bobblocks:redblock" 1', 'node "bobblocks:yellowblock" 1'}, + + }, +}) + + +minetest.register_craft({ + output = 'NodeItem "bobblocks:violetblock" 2', + recipe = { + {'node "bobblocks:redblock" 1', 'node "bobblocks:blueblock" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:greenblock" 2', + recipe = { + {'node "bobblocks:blueblock" 1', 'node "bobblocks:yellowblock" 1'}, + + }, +}) + + +minetest.register_craft({ + output = 'NodeItem "bobblocks:indigoblock" 3', + recipe = { + {'node "bobblocks:redblock" 1', 'node "bobblocks:blueblock" 1', 'node "bobblocks:whiteblock" 1'}, + + }, +}) + +-- Poles + +minetest.register_craft({ + output = 'NodeItem "bobblocks:redpole" 1', + recipe = { + {'node "bobblocks:redblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:yellowpole" 1', + recipe = { + {'node "bobblocks:yellowblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:bluepole" 1', + recipe = { + {'node "bobblocks:blueblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:whitepole" 1', + recipe = { + {'node "bobblocks:whiteblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:orangepole" 1', + recipe = { + {'node "bobblocks:orangeblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:violetpole" 1', + recipe = { + {'node "bobblocks:violetblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:greenpole" 1', + recipe = { + {'node "bobblocks:greenblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:indigopole" 1', + recipe = { + {'node "bobblocks:indigoblock" 1', 'node "default:stick" 1'}, + + }, +}) + +minetest.register_craft({ + output = 'NodeItem "bobblocks:greypole" 1', + recipe = { + {'node "bobblocks:greyblock" 1', 'node "default:stick" 1'}, + + }, +}) + + +-- MESECON +-- Add jeija to bobblocks\default.txt and paste the below in at the bottom of bobblocks\blocks.lua + diff --git a/bobblocks/depends.txt b/bobblocks/depends.txt new file mode 100644 index 0000000..aca967d --- /dev/null +++ b/bobblocks/depends.txt @@ -0,0 +1,2 @@ +default +mesecons diff --git a/bobblocks/health.lua b/bobblocks/health.lua new file mode 100644 index 0000000..a26e552 --- /dev/null +++ b/bobblocks/health.lua @@ -0,0 +1,95 @@ +local is_healthpack = function(node) + if node.name == 'bobblocks:health_off' or node.name == 'health_on' then + return true + end + return false +end + +local update_healthpack = function (pos, node) + local nodename="" + local param2="" + --Switch HealthPack State + if node.name == 'bobblocks:health_off' then + nodename = 'bobblocks:health_on' + elseif node.name == 'bobblocks:health_on' then + nodename = 'bobblocks:health_off' + end + minetest.add_node(pos, {name = nodename}) +end + +local toggle_healthpack = function (pos, node) + if not is_healthgate(node) then return end + update_healthpack (pos, node, state) +end + +local on_healthpack_punched = function (pos, node, puncher) + if node.name == 'bobblocks:health_off' or node.name == 'bobblocks:health_on' then + update_healthpack(pos, node) + end +end + +-- Healing Node + +minetest.register_node("bobblocks:health_off", { + description = "Health Pack 1 Off", + tiles = {"bobblocks_health_off.png"}, + inventory_image = "bobblocks_health_off.png", + paramtype2 = "facedir", + legacy_facedir_simple = true, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + is_ground_content = true, + walkable = false, + climbable = false, + mesecons = {conductor={ + state = mesecon.state.off, + onstate = "bobblocks:health_on" + }} +}) + +minetest.register_node("bobblocks:health_on", { + description = "Health Pack 1 On", + tiles = {"bobblocks_health_on.png"}, + paramtype2 = "facedir", + legacy_facedir_simple = true, + light_source = LIGHT_MAX-0, + groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, + is_ground_content = true, + walkable = false, + climbable = false, + drop = "bobblocks:health_off", + mesecons = {conductor={ + state = mesecon.state.on, + offstate = "bobblocks:health_off" + }} +}) + + +minetest.register_abm( + {nodenames = {"bobblocks:health_on"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local objs = minetest.get_objects_inside_radius(pos, 1) + for k, obj in pairs(objs) do + minetest.sound_play("bobblocks_health", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + obj:set_hp(obj:get_hp()+10) -- give 10HP + minetest.remove_node(pos) -- remove the node after use + end + end, + +}) + +--- Health + +minetest.register_craft({ + output = 'NodeItem "bobblocks:health_off" 1', + recipe = { + {'node "default:dirt" 1', 'node "default:paper" 1', 'node "default:apple" 2'}, + + }, +}) + + +minetest.register_on_punchnode(on_healthpack_punched) + diff --git a/bobblocks/init.lua b/bobblocks/init.lua new file mode 100644 index 0000000..3bcf03f --- /dev/null +++ b/bobblocks/init.lua @@ -0,0 +1,11 @@ +print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loading....") +print("[BobBlocks] loading Blocks") +dofile(minetest.get_modpath("bobblocks") .. "/blocks.lua") +print("[BobBlocks] loaded Blocks") +print("[BobBlocks] loading Health") +dofile(minetest.get_modpath("bobblocks") .. "/health.lua") +print("[BobBlocks] loaded Health") +print("[BobBlocks] loading Traps") +dofile(minetest.get_modpath("bobblocks") .. "/trap.lua") +print("[BobBlocks] loaded Traps") +print("[BobBlocks By minetest@rabbibob.com] Version 0.0.8 loaded!")
\ No newline at end of file diff --git a/bobblocks/readme.txt b/bobblocks/readme.txt new file mode 100644 index 0000000..947ae5e --- /dev/null +++ b/bobblocks/readme.txt @@ -0,0 +1,53 @@ +-- BobBlocks v0.0.8 +-- (Minetest 0.4.5 compatible 20130315) +-- http://forum.minetest.net/viewtopic.php?id=1274 +-------------------------------------------------------------------------- +-------------------------------------------------------------------------- +-- Requirements: Mesecons -- +-- http://forum.minetest.net/viewtopic.php?id=628 -- +-- -- +-- Does not support jeija or older version of Mesecons -- +-- before 1/20/2013 -- +-- http://forum.minetest.net/viewtopic.php?pid=64976#p64976 -- +-------------------------------------------------------------------------- +-------------------------------------------------------------------------- +-- Colored Lit Blocks +---- Default state = Solid lit block +---- Secondary state (punch) = transparent unlit block +---- Mesecons activation [CONDUCTOR] +-- Colored Lit Poles +---- Default state = Solid lit block +---- Secondary state (punch) = unlit block +---- Mesecons activation [CONDUCTOR] +-- Health Kit +---- Default state = health kit inactive +---- Secondary state (punch) = health kit active +10HP when walked through +---- Mesecons activation [CONDUCTOR] +-- Trap +---- Default Grass (walkable off) +---- Spike Minor (1HP per hit) +------ Spikes can be 'set' and activated when walked over +---- Spike Major (100HP per hit) +------ Spikes can be 'set' and activated when walked over + +# [ATTRIBUTION] +# Unless otherwise noted, all graphics & sounds +# created by Rabbi Bob +# Licensed under the GPLv2/later + +# [GRAPHICS] +# minor & major spikes by Death Dealer +# License: WTFPL +# http://minetest.net/forum/viewtopic.php?id=1582 + +# [SOUNDS] +# bobblocks_glass + # Author: Ch0cchi + # http://www.freesound.org/people/Ch0cchi/sounds/15285/ + # Edited by rabbibob +# bobblocks_trap_fall & bobblocks_trap_fall_major + # Author: Rock Savage + # http://www.freesound.org/people/Rock%20Savage/sounds/65924/# + # Edited by rabbibob +# bobblocks_health + # http://hamsterrepublic.com/ohrrpgce/Free_Sound_Effects.html
\ No newline at end of file diff --git a/bobblocks/sounds/bobblocks_glassblock.ogg b/bobblocks/sounds/bobblocks_glassblock.ogg Binary files differnew file mode 100644 index 0000000..d60859f --- /dev/null +++ b/bobblocks/sounds/bobblocks_glassblock.ogg diff --git a/bobblocks/sounds/bobblocks_health.ogg b/bobblocks/sounds/bobblocks_health.ogg Binary files differnew file mode 100644 index 0000000..4a0148b --- /dev/null +++ b/bobblocks/sounds/bobblocks_health.ogg diff --git a/bobblocks/sounds/bobblocks_trap_fall.ogg b/bobblocks/sounds/bobblocks_trap_fall.ogg Binary files differnew file mode 100644 index 0000000..a49efb3 --- /dev/null +++ b/bobblocks/sounds/bobblocks_trap_fall.ogg diff --git a/bobblocks/sounds/bobblocks_trap_fall_major.ogg b/bobblocks/sounds/bobblocks_trap_fall_major.ogg Binary files differnew file mode 100644 index 0000000..b6bdea6 --- /dev/null +++ b/bobblocks/sounds/bobblocks_trap_fall_major.ogg diff --git a/bobblocks/textures/bobblocks_blueblock.png b/bobblocks/textures/bobblocks_blueblock.png Binary files differnew file mode 100644 index 0000000..df5d835 --- /dev/null +++ b/bobblocks/textures/bobblocks_blueblock.png diff --git a/bobblocks/textures/bobblocks_btm.png b/bobblocks/textures/bobblocks_btm.png Binary files differnew file mode 100644 index 0000000..7e14d08 --- /dev/null +++ b/bobblocks/textures/bobblocks_btm.png diff --git a/bobblocks/textures/bobblocks_btm_sides.png b/bobblocks/textures/bobblocks_btm_sides.png Binary files differnew file mode 100644 index 0000000..0e1ca0d --- /dev/null +++ b/bobblocks/textures/bobblocks_btm_sides.png diff --git a/bobblocks/textures/bobblocks_greenblock.png b/bobblocks/textures/bobblocks_greenblock.png Binary files differnew file mode 100644 index 0000000..0acebc5 --- /dev/null +++ b/bobblocks/textures/bobblocks_greenblock.png diff --git a/bobblocks/textures/bobblocks_greyblock.png b/bobblocks/textures/bobblocks_greyblock.png Binary files differnew file mode 100644 index 0000000..c372878 --- /dev/null +++ b/bobblocks/textures/bobblocks_greyblock.png diff --git a/bobblocks/textures/bobblocks_health_off.png b/bobblocks/textures/bobblocks_health_off.png Binary files differnew file mode 100644 index 0000000..9f9aaac --- /dev/null +++ b/bobblocks/textures/bobblocks_health_off.png diff --git a/bobblocks/textures/bobblocks_health_on.png b/bobblocks/textures/bobblocks_health_on.png Binary files differnew file mode 100644 index 0000000..ec808c9 --- /dev/null +++ b/bobblocks/textures/bobblocks_health_on.png diff --git a/bobblocks/textures/bobblocks_health_one_sides.png b/bobblocks/textures/bobblocks_health_one_sides.png Binary files differnew file mode 100644 index 0000000..ac24409 --- /dev/null +++ b/bobblocks/textures/bobblocks_health_one_sides.png diff --git a/bobblocks/textures/bobblocks_indigoblock.png b/bobblocks/textures/bobblocks_indigoblock.png Binary files differnew file mode 100644 index 0000000..0dbf7fd --- /dev/null +++ b/bobblocks/textures/bobblocks_indigoblock.png diff --git a/bobblocks/textures/bobblocks_invbluepole.png b/bobblocks/textures/bobblocks_invbluepole.png Binary files differnew file mode 100644 index 0000000..e60d3eb --- /dev/null +++ b/bobblocks/textures/bobblocks_invbluepole.png diff --git a/bobblocks/textures/bobblocks_invgreenpole.png b/bobblocks/textures/bobblocks_invgreenpole.png Binary files differnew file mode 100644 index 0000000..72b83c7 --- /dev/null +++ b/bobblocks/textures/bobblocks_invgreenpole.png diff --git a/bobblocks/textures/bobblocks_invgreypole.png b/bobblocks/textures/bobblocks_invgreypole.png Binary files differnew file mode 100644 index 0000000..e9ad643 --- /dev/null +++ b/bobblocks/textures/bobblocks_invgreypole.png diff --git a/bobblocks/textures/bobblocks_invindigopole.png b/bobblocks/textures/bobblocks_invindigopole.png Binary files differnew file mode 100644 index 0000000..8650912 --- /dev/null +++ b/bobblocks/textures/bobblocks_invindigopole.png diff --git a/bobblocks/textures/bobblocks_invorangepole.png b/bobblocks/textures/bobblocks_invorangepole.png Binary files differnew file mode 100644 index 0000000..4f8cb97 --- /dev/null +++ b/bobblocks/textures/bobblocks_invorangepole.png diff --git a/bobblocks/textures/bobblocks_invredpole.png b/bobblocks/textures/bobblocks_invredpole.png Binary files differnew file mode 100644 index 0000000..a6c9a65 --- /dev/null +++ b/bobblocks/textures/bobblocks_invredpole.png diff --git a/bobblocks/textures/bobblocks_invvioletpole.png b/bobblocks/textures/bobblocks_invvioletpole.png Binary files differnew file mode 100644 index 0000000..3eeb60a --- /dev/null +++ b/bobblocks/textures/bobblocks_invvioletpole.png diff --git a/bobblocks/textures/bobblocks_invwhitepole.png b/bobblocks/textures/bobblocks_invwhitepole.png Binary files differnew file mode 100644 index 0000000..3f35401 --- /dev/null +++ b/bobblocks/textures/bobblocks_invwhitepole.png diff --git a/bobblocks/textures/bobblocks_invyellowpole.png b/bobblocks/textures/bobblocks_invyellowpole.png Binary files differnew file mode 100644 index 0000000..2b5c1ee --- /dev/null +++ b/bobblocks/textures/bobblocks_invyellowpole.png diff --git a/bobblocks/textures/bobblocks_majorspike.png b/bobblocks/textures/bobblocks_majorspike.png Binary files differnew file mode 100644 index 0000000..159ddc3 --- /dev/null +++ b/bobblocks/textures/bobblocks_majorspike.png diff --git a/bobblocks/textures/bobblocks_minorspike.png b/bobblocks/textures/bobblocks_minorspike.png Binary files differnew file mode 100644 index 0000000..fd2e9f3 --- /dev/null +++ b/bobblocks/textures/bobblocks_minorspike.png diff --git a/bobblocks/textures/bobblocks_orangeblock.png b/bobblocks/textures/bobblocks_orangeblock.png Binary files differnew file mode 100644 index 0000000..40e34f9 --- /dev/null +++ b/bobblocks/textures/bobblocks_orangeblock.png diff --git a/bobblocks/textures/bobblocks_redblock.png b/bobblocks/textures/bobblocks_redblock.png Binary files differnew file mode 100644 index 0000000..096d3f1 --- /dev/null +++ b/bobblocks/textures/bobblocks_redblock.png diff --git a/bobblocks/textures/bobblocks_redblock_off.png b/bobblocks/textures/bobblocks_redblock_off.png Binary files differnew file mode 100644 index 0000000..ca0bc5c --- /dev/null +++ b/bobblocks/textures/bobblocks_redblock_off.png diff --git a/bobblocks/textures/bobblocks_trap_set.png b/bobblocks/textures/bobblocks_trap_set.png Binary files differnew file mode 100644 index 0000000..55d1cf9 --- /dev/null +++ b/bobblocks/textures/bobblocks_trap_set.png diff --git a/bobblocks/textures/bobblocks_violetblock.png b/bobblocks/textures/bobblocks_violetblock.png Binary files differnew file mode 100644 index 0000000..c1a98ca --- /dev/null +++ b/bobblocks/textures/bobblocks_violetblock.png diff --git a/bobblocks/textures/bobblocks_whiteblock.png b/bobblocks/textures/bobblocks_whiteblock.png Binary files differnew file mode 100644 index 0000000..857fa47 --- /dev/null +++ b/bobblocks/textures/bobblocks_whiteblock.png diff --git a/bobblocks/textures/bobblocks_yellowblock.png b/bobblocks/textures/bobblocks_yellowblock.png Binary files differnew file mode 100644 index 0000000..975ffe8 --- /dev/null +++ b/bobblocks/textures/bobblocks_yellowblock.png diff --git a/bobblocks/trap.lua b/bobblocks/trap.lua new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/bobblocks/trap.lua |