Compare commits
5 Commits
2063fa296c
...
d0ebaf2e92
Author | SHA1 | Date |
---|---|---|
migdyn | d0ebaf2e92 | |
migdyn | 3fd74a50c8 | |
migdyn | 97fdc14f22 | |
migdyn | 320264dfe8 | |
migdyn | 78898a0d97 |
|
@ -1,5 +1,5 @@
|
|||
SOURCE CODE LICENSE: MIT License (see below)
|
||||
Copyright 2018 migdyn
|
||||
Copyright 2018-2019 migdyn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
230
init.lua
230
init.lua
|
@ -18,6 +18,26 @@ minetest.register_node("industrial_decor:planks",{
|
|||
},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:planks_destroyed",{
|
||||
description = "Destroyed Planks",
|
||||
drawtype = "signlike",
|
||||
tiles = {"industrial_decor_planks_destroyed.png"},
|
||||
inventory_image = "industrial_decor_planks_destroyed.png",
|
||||
wield_image = "industrial_decor_planks_destroyed.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
||||
walkable = true,
|
||||
|
||||
|
||||
groups = {choppy = 3},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
})
|
||||
|
||||
--Lamps
|
||||
minetest.register_node("industrial_decor:lamp",{
|
||||
description = "Industrial Lamp",
|
||||
|
@ -41,7 +61,8 @@ minetest.register_node("industrial_decor:lamp",{
|
|||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "industrial_decor:lamp_damaged"})
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--Damaged
|
||||
minetest.register_node("industrial_decor:lamp_damaged",{
|
||||
description = "Damaged Industrial Lamp",
|
||||
drawtype = "plantlike",
|
||||
|
@ -59,27 +80,82 @@ minetest.register_node("industrial_decor:lamp_damaged",{
|
|||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
|
||||
on_rightclick = function(pos, node, player, pointed_thing)
|
||||
if player:get_wielded_item():get_name() == "electronics:light_bulb_incandescent" then
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "industrial_decor:lamp_bulb"})
|
||||
elseif player:get_wielded_item():get_name() == "tapes:ducttape_black" then
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "industrial_decor:lamp_tape"})
|
||||
end
|
||||
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:wires_hanging",{
|
||||
description = "Hanging Wires",
|
||||
--Light Bulb Only
|
||||
minetest.register_node("industrial_decor:lamp_bulb",{
|
||||
description = "Damaged Industrial Lamp with Light Bulb",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"industrial_decor_wires_hanging.png"},
|
||||
inventory_image = "industrial_decor_wires_hanging.png",
|
||||
wield_image = "industrial_decor_wires_hanging.png",
|
||||
tiles = {
|
||||
{
|
||||
name = "industrial_decor_lamp_bulb.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
inventory_image = "industrial_decor_lamp_bulb_single.png",
|
||||
wield_image = "industrial_decor_lamp_bulb_single.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
|
||||
groups = {snappy = 3},
|
||||
groups = {cracky = 2},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
|
||||
on_rightclick = function(pos, node, player, pointed_thing)
|
||||
if player:get_wielded_item():get_name() == "tapes:ducttape_black" then
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "industrial_decor:lamp_fixed"})
|
||||
end
|
||||
|
||||
end
|
||||
})
|
||||
|
||||
--Taped
|
||||
minetest.register_node("industrial_decor:lamp_tape",{
|
||||
description = "Industrial Lamp with Duct Tape",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"industrial_decor_lamp_tape.png"},
|
||||
inventory_image = "industrial_decor_lamp_tape.png",
|
||||
wield_image = "industrial_decor_lamp_bulb_tape.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
|
||||
groups = {cracky = 2},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
|
||||
on_rightclick = function(pos, node, player, pointed_thing)
|
||||
if player:get_wielded_item():get_name() == "electronics:light_bulb_incandescent" then
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "industrial_decor:lamp_fixed"})
|
||||
end
|
||||
|
||||
end
|
||||
})
|
||||
|
||||
--Fixed
|
||||
minetest.register_node("industrial_decor:lamp_fixed",{
|
||||
description = "Fixed Industrial Lamp",
|
||||
drawtype = "plantlike",
|
||||
|
@ -102,6 +178,26 @@ minetest.register_node("industrial_decor:lamp_fixed",{
|
|||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z}, {name = "industrial_decor:lamp_damaged"})
|
||||
end
|
||||
})
|
||||
--End of Lamps
|
||||
|
||||
minetest.register_node("industrial_decor:wires_hanging",{
|
||||
description = "Hanging Wires",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"industrial_decor_wires_hanging.png"},
|
||||
inventory_image = "industrial_decor_wires_hanging.png",
|
||||
wield_image = "industrial_decor_wires_hanging.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
|
||||
groups = {snappy = 3},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:sheet_tin",{
|
||||
description = "Industrial Tin Sheet",
|
||||
|
@ -111,15 +207,14 @@ minetest.register_node("industrial_decor:sheet_tin",{
|
|||
groups = {cracky = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:desk",{
|
||||
drawtype = "allfaces_optional",
|
||||
minetest.register_node("industrial_decor:shelf_empty",{
|
||||
paramtype = "light",
|
||||
description = "Desk",
|
||||
tiles = {"industrial_decor_desk.png",
|
||||
"industrial_decor_desk.png",
|
||||
"industrial_decor_desk.png",
|
||||
"industrial_decor_desk.png",
|
||||
"industrial_decor_desk_front.png",},
|
||||
description = "Empty Metal Shelf",
|
||||
tiles = {"industrial_decor_sheet_tin.png",
|
||||
"industrial_decor_sheet_tin.png",
|
||||
"industrial_decor_sheet_tin.png",
|
||||
"industrial_decor_sheet_tin.png",
|
||||
"industrial_decor_shelf_empty.png",},
|
||||
|
||||
|
||||
groups = {choppy = 2},
|
||||
|
@ -149,7 +244,7 @@ minetest.register_node("industrial_decor:hvdevice_pol",{
|
|||
walkable = false,
|
||||
|
||||
|
||||
groups = {crumbly = 1},
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
|
@ -169,7 +264,108 @@ minetest.register_node("industrial_decor:hvdevice_pol",{
|
|||
walkable = false,
|
||||
|
||||
|
||||
groups = {crumbly = 1},
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
})
|
||||
|
||||
--Hazard signs
|
||||
minetest.register_node("industrial_decor:hazardsign_generic",{
|
||||
description = "Generic Caution Hazard Sign",
|
||||
drawtype = "signlike",
|
||||
tiles = {"industrial_decor_hazardsign_generic.png"},
|
||||
inventory_image = "industrial_decor_hazardsign_generic.png",
|
||||
wield_image = "industrial_decor_hazardsign_generic.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
||||
walkable = false,
|
||||
|
||||
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:hazardsign_poison",{
|
||||
description = "Poison Hazard Sign",
|
||||
drawtype = "signlike",
|
||||
tiles = {"industrial_decor_hazardsign_poison.png"},
|
||||
inventory_image = "industrial_decor_hazardsign_poison.png",
|
||||
wield_image = "industrial_decor_hazardsign_poison.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
||||
walkable = false,
|
||||
|
||||
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:hazardsign_laser",{
|
||||
description = "Laser Hazard Sign",
|
||||
drawtype = "signlike",
|
||||
tiles = {"industrial_decor_hazardsign_laser.png"},
|
||||
inventory_image = "industrial_decor_hazardsign_laser.png",
|
||||
wield_image = "industrial_decor_hazardsign_laser.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
||||
walkable = false,
|
||||
|
||||
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:hazardsign_radiation_ion",{
|
||||
description = "Ionizing Radiation Hazard Sign",
|
||||
drawtype = "signlike",
|
||||
tiles = {"industrial_decor_hazardsign_ionradiation.png"},
|
||||
inventory_image = "industrial_decor_hazardsignion_ionradiation.png",
|
||||
wield_image = "industrial_decor_hazardsign_ionradiation.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
||||
walkable = false,
|
||||
|
||||
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("industrial_decor:hazardsign_radiation_nonion",{
|
||||
description = "Non-Ionizing Radiation Hazard Sign",
|
||||
drawtype = "signlike",
|
||||
tiles = {"industrial_decor_hazardsign_nonionradiation.png"},
|
||||
inventory_image = "industrial_decor_hazardsign_nonionradiation.png",
|
||||
wield_image = "industrial_decor_hazardsign_nonionradiation.png",
|
||||
light_propagates = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
|
||||
walkable = false,
|
||||
|
||||
|
||||
groups = {cracky = 1},
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
},
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 362 B |
Binary file not shown.
After Width: | Height: | Size: 282 B |
Binary file not shown.
After Width: | Height: | Size: 546 B |
Loading…
Reference in New Issue