123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- minetest.register_node('furniture:traffic_barrel', {
- description = 'Traffic Barrel',
- drawtype = 'mesh',
- mesh = 'furniture_traffic_barrel.obj',
- tiles = {'furniture_traffic_barrel.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.3125, -.5, -.3125, .3125, .5, .3125},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.3125, -.5, -.3125, .3125, .5, .3125},
- },
- groups = {breakable=1},
- })
- minetest.register_node('furniture:traffic_barricade', {
- description = 'Traffic Barricade',
- drawtype = 'mesh',
- mesh = 'furniture_traffic_barricade.obj',
- tiles = {'furniture_traffic_barricade.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.125, 1.5, .5, .125},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.125, 1.5, 1, .125},
- },
- groups = {breakable=1},
- })
- minetest.register_node('furniture:fire_hydrant', {
- description = 'Fire Hydrant',
- drawtype = 'mesh',
- mesh = 'furniture_fire_hydrant.obj',
- tiles = {'furniture_fire_hydrant.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.3125, -.5, -.3125, .3125, .5, .3125},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.3125, -.5, -.3125, .3125, .5, .3125},
- },
- groups = {breakable=1},
- after_place_node = function(pos)
- local under_node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
- if minetest.get_item_group(under_node, 'slab') > 0 then
- local node = minetest.get_node(pos)
- minetest.set_node(pos, {name = 'furniture:fire_hydrant_1', param2 = node.param2})
- end
- end,
- })
- minetest.register_node('furniture:fire_hydrant_1', {
- description = 'Fire Hydrant',
- drawtype = 'mesh',
- mesh = 'furniture_fire_hydrant_1.obj',
- tiles = {'furniture_fire_hydrant.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- drop = 'furniture:fire_hydrant',
- selection_box = {
- type = 'fixed',
- fixed = {-.3125, -1, -.3125, .3125, 0, .3125},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.3125, -1, -.3125, .3125, 0, .3125},
- },
- groups = {breakable=1, not_in_creative_inventory=1},
- })
- minetest.register_node('furniture:parking_bumper', {
- description = 'Parking Bumper',
- drawtype = 'mesh',
- mesh = 'furniture_parking_bumper.obj',
- tiles = {'furniture_parking_bumper.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.375, -.5, .125, 1.375, -.3125, .375},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.375, -.5, .125, 1.375, -.3125, .375},
- },
- groups = {breakable=1},
- })
- minetest.register_node('furniture:bollard_popup_0', { --Closed
- description = 'Popup Bollard',
- drawtype = 'mesh',
- mesh = 'furniture_popup_bollard_down.obj',
- tiles = {'furniture_popup_bollard_down.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- drop = 'furniture:bollard_popup_1',
- selection_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.1875, .5, -.375, .1875},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.1875, .5, -.375, .1875},
- },
- groups = {breakable=1, not_in_creative_inventory=1},
- on_rightclick = function(pos, node, clicker)
- local player_name = clicker:get_player_name()
- if not minetest.is_protected(pos, player_name) and minetest.check_player_privs(player_name, { creative = true }) then
- local node = minetest.get_node(pos)
- minetest.set_node(pos, {name = 'furniture:bollard_popup_1', param2 = node.param2})
- end
- end
- })
- minetest.register_node('furniture:bollard_popup_1', { --Open
- description = 'Popup Bollard',
- drawtype = 'mesh',
- mesh = 'furniture_popup_bollard_up.obj',
- tiles = {'furniture_popup_bollard_up.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {{-.5, -.5, -.1875, .5, -.375, .1875},
- {-.125, -.375, -.125, .125, .5, .125}}
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.1875, .5, 1, .1875},
- },
- groups = {breakable=1},
- on_rightclick = function(pos, node, clicker)
- local player_name = clicker:get_player_name()
- if not minetest.is_protected(pos, player_name) and minetest.check_player_privs(player_name, { creative = true }) then
- local node = minetest.get_node(pos)
- minetest.set_node(pos, {name = 'furniture:bollard_popup_0', param2 = node.param2})
- end
- end
- })
- minetest.register_node('furniture:well', {
- description = 'Well',
- drawtype = 'mesh',
- mesh = 'furniture_well.obj',
- tiles = {'furniture_well.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {{-.6875, -.5, .5, .6875, .125, .6875},
- {.5, -.5, -.6875, .6875, .125, .6875},
- {-.6875, -.5, -.6875, -.5, .125, .6875},
- {-.6875, -.5, -.6875, .6875, .125, -.5},
- {-.6875, .75, -.9375, .6875, 1.375, .9375}}
- },
- collision_box = {
- type = 'fixed',
- fixed = {{-.6875, -.5, .5, .6875, .125, .6875},
- {.5, -.5, -.6875, .6875, .125, .6875},
- {-.6875, -.5, -.6875, -.5, .125, .6875},
- {-.6875, -.5, -.6875, .6875, .125, -.5},
- {-.6875, .75, -.9375, .6875, 1.375, .9375}}
- },
- groups = {breakable=1},
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- if pointed_thing.above.y == pointed_thing.under.y then
- minetest.remove_node(pos)
- local new_pos = {x=pos.x, y=pos.y+1, z=pos.z}
- local node = minetest.get_node(pos)
- minetest.add_node(new_pos, {name='furniture:well', param2=node.param2})
- end
- end,
- })
- minetest.register_node('furniture:trash_bin', {
- description = 'Trash Bin',
- drawtype = 'mesh',
- mesh = 'furniture_trash_bin.obj',
- tiles = {'furniture_trash_bin.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.375, -.5, -.375, .375, .5, .375},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.375, -.5, -.375, .375, .5, .375},
- },
- groups = {breakable=1, stash=1}
- })
- minetest.register_node('furniture:recycling_bin', {
- description = 'Recycling Bin',
- drawtype = 'mesh',
- mesh = 'furniture_recycling_bin.obj',
- tiles = {'furniture_recycling_bin.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {{-.375, -.5, -.375, .375, .5, .375},
- {-.4375, .25, -.4375, .4375, .6875, .4375}
- },
- },
- collision_box = {
- type = 'fixed',
- fixed = {{-.375, -.5, -.375, .375, .5, .375},
- {-.4375, .25, -.4375, .4375, .6875, .4375}
- },
- },
- groups = {breakable=1, stash=1}
- })
- minetest.register_node('furniture:dumpster', {
- description = 'Dumpster',
- drawtype = 'mesh',
- mesh = 'furniture_dumpster.obj',
- tiles = {'furniture_dumpster.png'},
- paramtype = 'light',
- paramtype2 = 'facedir',
- selection_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.5, 1.5, .75, .5},
- },
- collision_box = {
- type = 'fixed',
- fixed = {-.5, -.5, -.5, 1.5, .75, .5},
- },
- groups = {breakable=1, stash=1}
- })
|