Made init and node definitions and added wire (raillike) texture

master
Bas 2012-12-30 00:48:54 +01:00
parent 49af32d8f2
commit ebce3a620e
35 changed files with 114 additions and 0 deletions

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

113
init.lua Normal file
View File

@ -0,0 +1,113 @@
local mod_name="portal"
local node_group
--if creative mode make diggable
if minetest.setting_getbool("creative_mode") then
print("HABALAMASNDWDWHD")
node_group = {dig_immediate=3}
else
node_group = {immortal}
end
--regster nodes
local solid = {
'node_acid',
'node_companion',
'node_floor_checker',
'node_floor_checker_white',
'node_unbreakable_half',
'node_unbreakable_one',
'node_unbreakable_quart',
'node_wall_bottom',
'node_wall_top',
}
local luminescent = {
'node_wall_bottom_light',
}
local transparent = {
'node_mesh',
}
local sign = {
'sign_arrow_down',
'sign_arrow_left',
'sign_arrow_right',
'sign_arrow_up',
'sign_cake',
'sign_cube',
'sign_exit',
'sign_number_1',
'sign_number_2',
'sign_number_3',
'sign_number_4',
'sign_number_5',
'sign_number_6',
'sign_number_7',
'sign_number_8',
'sign_number_9',
'sign_false',
'sign_true',
}
local wire = {
'wire_false',
'wire_true',
}
for i, name in ipairs(wire) do
minetest.register_node(mod_name..":"..name,{
description = name,
paramtype = "light",
tile_images = {name..".png"},
groups = node_group,
drawtype="raillike",
walkable = false,
selection_box = {
type = "fixed",
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
})
end
for i, name in ipairs(solid) do
minetest.register_node(mod_name..":"..name,{
description = name,
tile_images = {name..".png"},
groups = node_group,
sounds = default.node_sound_stone_defaults(),
})
end
for i, name in ipairs(transparent) do
minetest.register_node(mod_name..":"..name,{
description = name,
tile_images = {name..".png"},
drawtype = "glasslike",
paramtype = "light",
groups = node_group,
})
end
for i, name in ipairs(sign) do
minetest.register_node(mod_name..":"..name,{
description = name,
paramtype = "light",
light_source = 5,
walkable = false,
sunlight_propagates = true,
tile_images = {name..".png"},
drawtype = "signlike",
paramtype2 = 'wallmounted',
selection_box = {
type = "wallmounted",
--wall_side = = <default>
},
inventory_image = name..".png",
wield_image = name..".png",
groups = node_group,
})
end
for i, name in ipairs(luminescent) do
minetest.register_node(mod_name..":"..name,{
description = name,
light_source = 5,
tile_images = {name..".png"},
groups = node_group,
})
end
--end
print("["..mod_name.."] Loaded!")

BIN
textures/node_acid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

BIN
textures/node_companion.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

BIN
textures/node_mesh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

BIN
textures/node_wall_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

BIN
textures/sign_arrow_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

BIN
textures/sign_cake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

BIN
textures/sign_cube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

BIN
textures/sign_exit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

BIN
textures/sign_false.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

BIN
textures/sign_number_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

BIN
textures/sign_number_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

BIN
textures/sign_number_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

BIN
textures/sign_number_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

BIN
textures/sign_number_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

BIN
textures/sign_number_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

BIN
textures/sign_number_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

BIN
textures/sign_number_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

BIN
textures/sign_number_9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

BIN
textures/sign_true.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

BIN
textures/wire__false.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

BIN
textures/wire_false.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

BIN
textures/wire_true.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B