use mesh node for plasma screen
also, add an "off" variant, accessible by punching.
|
@ -3,5 +3,14 @@ PLASMASCREEN
|
|||
|
||||
Mod adding a plasma screen TV for Minetest.
|
||||
|
||||
This mod adds a 2x3 plasma screen TV consisting of 6 nodeboxes.
|
||||
Code and textures are WTFPL.
|
||||
This mod adds a 2x3 plasma screen TV using a single large mesh node.
|
||||
|
||||
Point at the bottom center position where you want the TV to go, when placing.
|
||||
|
||||
Note: If you're at a really steep view angle when trying to place a screen,
|
||||
the mod may occasionally refuse to place it (or it just appears for a moment).
|
||||
Just move over a bit, so that your target position is more directly in front
|
||||
of you.
|
||||
|
||||
Code, textures and model are WTFPL.
|
||||
|
||||
|
|
|
@ -16,177 +16,96 @@ minetest.register_node("plasmascreen:stand", {
|
|||
{-0.3750,-0.1875,-0.3750,0.3750,0.3125,-0.2500}, --NodeBox 4
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, -0.5000, 0.5000, 0.5000, 0.0000},
|
||||
}
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, -0.5000, 0.5000, 0.5000, 0.0000},
|
||||
}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
|
||||
})
|
||||
|
||||
minetest.register_node("plasmascreen:screen1", {
|
||||
description = "Plasma Screen 1",
|
||||
tiles = {
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_back.png",
|
||||
{ name="plasmascreen_screen1.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=44
|
||||
}
|
||||
}
|
||||
minetest.register_alias("plasmascreen:screen1", "air")
|
||||
minetest.register_alias("plasmascreen:screen2", "air")
|
||||
minetest.register_alias("plasmascreen:screen3", "air")
|
||||
minetest.register_alias("plasmascreen:screen4", "air")
|
||||
minetest.register_alias("plasmascreen:screen5", "plasmascreen:tv")
|
||||
minetest.register_alias("plasmascreen:screen6", "air")
|
||||
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
light_source = 10,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.4375, 0.5000, 0.5000, 0.5000},
|
||||
{-0.5000, 0.5000, 0.3750, 0.5000, 0.3125, 0.4375},
|
||||
{-0.5000, -0.5000, 0.5000, -0.3125, 0.5000, 0.3750},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2500, -0.2500, 0.4500, 0.2500, 0.2500, 0.4500}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
|
||||
})
|
||||
minetest.register_node("plasmascreen:screen2", {
|
||||
description = "Plasma Screen 2",
|
||||
tiles = {
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_back.png",
|
||||
{ name="plasmascreen_screen2.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=44
|
||||
}
|
||||
}
|
||||
local fdir_to_left = {
|
||||
{ -1, 0 },
|
||||
{ 0, 1 },
|
||||
{ 1, 0 },
|
||||
{ 0, -1 },
|
||||
}
|
||||
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
light_source = 10,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.4375, 0.5000, 0.5000, 0.5000},
|
||||
{-0.5000, 0.5000, 0.3750, 0.5000, 0.3125, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2500, -0.2500, 0.4500, 0.2500, 0.2500, 0.4500}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
|
||||
})
|
||||
minetest.register_node("plasmascreen:screen3", {
|
||||
description = "Plasma Screen 3",
|
||||
tiles = {
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_back.png",
|
||||
{ name="plasmascreen_screen3.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=44
|
||||
}
|
||||
}
|
||||
local fdir_to_right = {
|
||||
{ 1, 0 },
|
||||
{ 0, -1 },
|
||||
{ -1, 0 },
|
||||
{ 0, 1 },
|
||||
}
|
||||
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
light_source = 10,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.5000, 0.4375, 0.5000, 0.5000, 0.5000},
|
||||
{-0.5000, 0.5000, 0.3750, 0.5000, 0.3125, 0.4375},
|
||||
{0.3125, -0.5000, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2500, -0.2500, 0.4500, 0.2500, 0.2500, 0.4500}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
|
||||
})
|
||||
minetest.register_node("plasmascreen:screen4", {
|
||||
description = "Plasma Screen 4",
|
||||
tiles = {
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_back.png",
|
||||
{ name="plasmascreen_screen4.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=44
|
||||
}
|
||||
}
|
||||
local tv_cbox = {
|
||||
type = "fixed",
|
||||
fixed = {-1.5050, -0.3125, 0.3700, 1.5050, 1.5050, 0.5050}
|
||||
}
|
||||
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
light_source = 10,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.3125, 0.4375, 0.5000, 0.5000, 0.5000},
|
||||
{-0.5000, -0.3125, 0.3750, 0.5000, -0.1250, 0.4375},
|
||||
{-0.5000, -0.3125, 0.5000, -0.3125, 0.5000, 0.3750},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2500, -0.2500, 0.4500, 0.2500, 0.2500, 0.4500}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
|
||||
})
|
||||
local function checkwall(pos)
|
||||
|
||||
minetest.register_node("plasmascreen:screen5", {
|
||||
local fdir = minetest.get_node(pos).param2
|
||||
|
||||
local dxl = fdir_to_left[fdir + 1][1] -- dxl = "[D]elta [X] [L]eft"
|
||||
local dzl = fdir_to_left[fdir + 1][2] -- Z left
|
||||
|
||||
local dxr = fdir_to_right[fdir + 1][1] -- X right
|
||||
local dzr = fdir_to_right[fdir + 1][2] -- Z right
|
||||
|
||||
local node1 = minetest.get_node({x=pos.x+dxl, y=pos.y, z=pos.z+dzl})
|
||||
if not node1 or not minetest.registered_nodes[node1.name]
|
||||
or not minetest.registered_nodes[node1.name].buildable_to then
|
||||
return false
|
||||
end
|
||||
|
||||
local node2 = minetest.get_node({x=pos.x+dxr, y=pos.y, z=pos.z+dzr})
|
||||
if not node2 or not minetest.registered_nodes[node2.name]
|
||||
or not minetest.registered_nodes[node2.name].buildable_to then
|
||||
return false
|
||||
end
|
||||
|
||||
local node3 = minetest.get_node({x=pos.x+dxl, y=pos.y+1, z=pos.z+dzl})
|
||||
if not node3 or not minetest.registered_nodes[node3.name]
|
||||
or not minetest.registered_nodes[node3.name].buildable_to then
|
||||
return false
|
||||
end
|
||||
|
||||
local node4 = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
if not node4 or not minetest.registered_nodes[node4.name]
|
||||
or not minetest.registered_nodes[node4.name].buildable_to then
|
||||
return false
|
||||
end
|
||||
|
||||
local node5 = minetest.get_node({x=pos.x+dxr, y=pos.y+1, z=pos.z+dzr})
|
||||
if not node5 or not minetest.registered_nodes[node5.name]
|
||||
or not minetest.registered_nodes[node5.name].buildable_to then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.register_node("plasmascreen:tv", {
|
||||
description = "Plasma TV",
|
||||
drawtype = "mesh",
|
||||
mesh = "plasmascreen_tv.obj",
|
||||
tiles = {
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_back.png",
|
||||
{ name="plasmascreen_screen5.png",
|
||||
"plasmascreen_case.png",
|
||||
{ name="plasmascreen_video.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=44
|
||||
aspect_w = 42,
|
||||
aspect_h = 23,
|
||||
length = 44
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,260 +114,53 @@ minetest.register_node("plasmascreen:screen5", {
|
|||
wield_image = "plasmascreen_tv_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = 10,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.3125, 0.4375, 0.5000, 0.5000, 0.5000},
|
||||
{-0.5000, -0.3125, 0.3750, 0.5000, -0.1250, 0.4375},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1.5050, -0.3125, 0.3700, 1.5050, 1.5050, 0.5050}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2},
|
||||
|
||||
after_place_node = function(pos,placer,itemstack)
|
||||
local param2 = minetest.get_node(pos).param2
|
||||
local p = {x=pos.x, y=pos.y, z=pos.z}
|
||||
if param2 == 0 then
|
||||
pos.x = pos.x-1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.x = pos.x+2
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.x = pos.x-1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.x = pos.x-1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
elseif param2 == 1 then
|
||||
pos.z = pos.z+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.z = pos.z-2
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.z = pos.z+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.z = pos.z+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
elseif param2 == 2 then
|
||||
pos.x = pos.x+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.x = pos.x-2
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.x = pos.x+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.x = pos.x+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
elseif param2 == 3 then
|
||||
pos.z = pos.z-1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen4", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.z = pos.z+2
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen6", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen3", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.z = pos.z-1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen2", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
pos.z = pos.z-1
|
||||
if minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
|
||||
minetest.set_node(pos,{name="plasmascreen:screen1", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
return true
|
||||
end
|
||||
light_source = 10,
|
||||
selection_box = tv_cbox,
|
||||
collision_box = tv_cbox,
|
||||
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
if not checkwall(pos) then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
return true -- "API: If return true no item is taken from itemstack"
|
||||
end
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
if oldnode.param2 == 0 then
|
||||
pos.x = pos.x-1
|
||||
minetest.remove_node(pos)
|
||||
pos.x = pos.x+2
|
||||
minetest.remove_node(pos)
|
||||
pos.y = pos.y+1
|
||||
minetest.remove_node(pos)
|
||||
pos.x = pos.x-1
|
||||
minetest.remove_node(pos)
|
||||
pos.x = pos.x-1
|
||||
minetest.remove_node(pos)
|
||||
elseif oldnode.param2 == 1 then
|
||||
pos.z = pos.z+1
|
||||
minetest.remove_node(pos)
|
||||
pos.z = pos.z-2
|
||||
minetest.remove_node(pos)
|
||||
pos.y = pos.y+1
|
||||
minetest.remove_node(pos)
|
||||
pos.z = pos.z+1
|
||||
minetest.remove_node(pos)
|
||||
pos.z = pos.z+1
|
||||
minetest.remove_node(pos)
|
||||
elseif oldnode.param2 == 2 then
|
||||
pos.x = pos.x+1
|
||||
minetest.remove_node(pos)
|
||||
pos.x = pos.x-2
|
||||
minetest.remove_node(pos)
|
||||
pos.y = pos.y+1
|
||||
minetest.remove_node(pos)
|
||||
pos.x = pos.x+1
|
||||
minetest.remove_node(pos)
|
||||
pos.x = pos.x+1
|
||||
minetest.remove_node(pos)
|
||||
elseif oldnode.param2 == 3 then
|
||||
pos.z = pos.z-1
|
||||
minetest.remove_node(pos)
|
||||
pos.z = pos.z+2
|
||||
minetest.remove_node(pos)
|
||||
pos.y = pos.y+1
|
||||
minetest.remove_node(pos)
|
||||
pos.z = pos.z-1
|
||||
minetest.remove_node(pos)
|
||||
pos.z = pos.z-1
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
minetest.set_node(pos, {name = "plasmascreen:tv_off", param2 = node.fdir})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("plasmascreen:screen6", {
|
||||
description = "Plasma Screen 6",
|
||||
minetest.register_node("plasmascreen:tv_off", {
|
||||
description = "Plasma TV (off)",
|
||||
drawtype = "mesh",
|
||||
mesh = "plasmascreen_tv.obj",
|
||||
tiles = {
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_screen.png",
|
||||
"plasmascreen_back.png",
|
||||
"plasmascreen_back.png",
|
||||
{ name="plasmascreen_screen6.png",
|
||||
animation={
|
||||
type="vertical_frames",
|
||||
aspect_w=16,
|
||||
aspect_h=16,
|
||||
length=44
|
||||
}
|
||||
}
|
||||
|
||||
"plasmascreen_case_off.png",
|
||||
"plasmascreen_screen_off.png",
|
||||
},
|
||||
inventory_image = "plasmascreen_tv_inv.png",
|
||||
wield_image = "plasmascreen_tv_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
light_source = 10,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5000, -0.3125, 0.4375, 0.5000, 0.5000, 0.5000},
|
||||
{-0.5000, -0.3125, 0.3750, 0.5000, -0.1250, 0.4375},
|
||||
{0.3125, -0.3125, 0.5000, 0.5000, 0.5000, 0.3750},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2500, -0.2500, 0.4500, 0.2500, 0.2500, 0.4500}
|
||||
},
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1},
|
||||
light_source = 10,
|
||||
selection_box = tv_cbox,
|
||||
collision_box = tv_cbox,
|
||||
groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
if not checkwall(pos) then
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
return true -- "API: If return true no item is taken from itemstack"
|
||||
end
|
||||
end,
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
minetest.set_node(pos, {name = "plasmascreen:tv", param2 = node.fdir})
|
||||
end,
|
||||
drop = "plasmascreen:tv"
|
||||
})
|
||||
|
||||
-- crafting recipes
|
||||
|
||||
minetest.register_craft({
|
||||
output = "plasmascreen:screen5",
|
||||
output = "plasmascreen:tv",
|
||||
recipe = {
|
||||
{'default:glass', 'default:coal_lump', 'default:glass'},
|
||||
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
|
||||
|
@ -458,7 +170,7 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "plasmascreen:screen5",
|
||||
output = "plasmascreen:tv",
|
||||
recipe = {'homedecor:television', 'homedecor:television'},
|
||||
})
|
||||
|
||||
|
|
135
plasmascreen/models/plasmascreen_tv.obj
Normal file
|
@ -0,0 +1,135 @@
|
|||
# Blender v2.73 (sub 0) OBJ File: 'plasmascreen.blend'
|
||||
# www.blender.org
|
||||
o Cylinder
|
||||
v -1.500000 -0.312500 0.500000
|
||||
v -1.500000 -0.312500 0.375000
|
||||
v 1.500000 -0.312500 0.375000
|
||||
v 1.500000 -0.312500 0.500000
|
||||
v -1.500000 1.500000 0.500000
|
||||
v -1.500000 1.500000 0.375000
|
||||
v 1.500000 1.500000 0.375000
|
||||
v 1.500000 1.500000 0.500000
|
||||
v -1.312500 -0.125000 0.437500
|
||||
v 1.375000 1.375000 0.375000
|
||||
v -1.312500 1.312500 0.437500
|
||||
v 1.375000 -0.187500 0.375000
|
||||
v -1.375000 1.375000 0.375000
|
||||
v 1.312500 -0.125000 0.437500
|
||||
v -1.375000 -0.187500 0.375000
|
||||
v 1.312500 1.312500 0.437500
|
||||
v 1.500000 1.375000 0.375000
|
||||
v 1.500000 -0.187500 0.375000
|
||||
v -1.500000 1.375000 0.375000
|
||||
v -1.500000 -0.187500 0.375000
|
||||
v -1.312500 -0.187500 0.375000
|
||||
v -1.312500 1.375000 0.375000
|
||||
v 1.312500 -0.187500 0.375000
|
||||
v 1.312500 1.375000 0.375000
|
||||
v -1.375000 -0.125000 0.375000
|
||||
v -1.375000 1.312500 0.375000
|
||||
v 1.375000 -0.125000 0.375000
|
||||
v 1.375000 1.312500 0.375000
|
||||
v -1.312811 -0.125310 0.437500
|
||||
v -1.312811 1.312810 0.437500
|
||||
v 1.312811 -0.125310 0.437500
|
||||
v 1.312811 1.312810 0.437500
|
||||
vt 0.953125 0.984375
|
||||
vt 0.921875 0.984375
|
||||
vt 0.921875 0.531250
|
||||
vt 0.953125 0.531250
|
||||
vt 0.906250 0.984375
|
||||
vt 0.875000 0.984375
|
||||
vt 0.875000 0.531250
|
||||
vt 0.906250 0.531250
|
||||
vt 0.812500 0.984375
|
||||
vt 0.781250 0.984375
|
||||
vt 0.781250 0.593750
|
||||
vt 0.812500 0.593750
|
||||
vt 0.015625 0.953125
|
||||
vt 0.765625 0.953125
|
||||
vt 0.765625 0.984375
|
||||
vt 0.015625 0.984375
|
||||
vt 0.015625 0.812500
|
||||
vt 0.765625 0.812500
|
||||
vt 0.765625 0.843750
|
||||
vt 0.015625 0.843750
|
||||
vt 0.765625 0.796875
|
||||
vt 0.015625 0.796875
|
||||
vt 0.015625 0.343750
|
||||
vt 0.765625 0.343750
|
||||
vt 0.828125 0.593750
|
||||
vt 0.859375 0.593750
|
||||
vt 0.859375 0.984375
|
||||
vt 0.828125 0.984375
|
||||
vt 0.015625 0.890625
|
||||
vt 0.015625 0.859375
|
||||
vt 0.765625 0.859375
|
||||
vt 0.765625 0.890625
|
||||
vt 0.015625 0.937500
|
||||
vt 0.015625 0.906250
|
||||
vt 0.765625 0.906250
|
||||
vt 0.765625 0.937500
|
||||
vt 0.031250 0.296875
|
||||
vt 0.031250 0.281250
|
||||
vt 0.687500 0.281250
|
||||
vt 0.687500 0.296875
|
||||
vt 0.687500 0.312500
|
||||
vt 0.687500 0.328125
|
||||
vt 0.031250 0.328125
|
||||
vt 0.031250 0.312500
|
||||
vt 0.375000 0.250000
|
||||
vt 0.375000 0.265625
|
||||
vt 0.015625 0.265625
|
||||
vt 0.015625 0.250000
|
||||
vt 0.703125 0.296875
|
||||
vt 0.703125 0.281250
|
||||
vt 0.015625 0.234375
|
||||
vt 0.015625 0.218750
|
||||
vt 0.375000 0.218750
|
||||
vt 0.375000 0.234375
|
||||
vt 0.703125 0.328125
|
||||
vt 0.703125 0.312500
|
||||
vt 0.015625 0.328125
|
||||
vt 0.015625 0.312500
|
||||
vt 0.015625 0.281250
|
||||
vt 0.015625 0.296875
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt -0.000000 -0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 0.707100 -0.707100
|
||||
vn 0.000000 -0.707100 -0.707100
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
vn 0.707100 0.000000 -0.707100
|
||||
vn 0.000000 -0.707100 0.707100
|
||||
g Cylinder_Cylinder_case
|
||||
s off
|
||||
f 5/1/1 6/2/1 2/3/1 1/4/1
|
||||
f 7/5/2 8/6/2 4/7/2 3/8/2
|
||||
f 10/9/3 17/10/3 18/11/3 12/12/3
|
||||
f 5/13/4 8/14/4 7/15/4 6/16/4
|
||||
f 2/17/5 3/18/5 4/19/5 1/20/5
|
||||
f 8/21/6 5/22/6 1/23/6 4/24/6
|
||||
f 15/25/3 20/26/3 19/27/3 13/28/3
|
||||
f 18/29/3 3/30/3 2/31/3 20/32/3
|
||||
f 7/33/3 17/34/3 19/35/3 6/36/3
|
||||
f 14/37/7 23/38/7 21/39/7 9/40/7
|
||||
f 11/41/8 22/42/8 24/43/8 16/44/8
|
||||
f 16/45/9 28/46/9 27/47/9 14/48/9
|
||||
f 25/49/10 9/40/10 15/50/10
|
||||
f 15/50/7 9/40/7 21/39/7
|
||||
f 9/51/10 25/52/10 26/53/10 11/54/10
|
||||
f 13/55/10 11/41/10 26/56/10
|
||||
f 22/42/8 11/41/8 13/55/8
|
||||
f 10/57/8 16/44/8 24/43/8
|
||||
f 28/58/9 16/44/9 10/57/9
|
||||
f 12/59/9 14/37/9 27/60/9
|
||||
f 23/38/11 12/59/11 14/37/11
|
||||
g Cylinder_Cylinder_screen
|
||||
f 30/61/3 32/62/3 31/63/3 29/64/3
|
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 81 B |
BIN
plasmascreen/textures/plasmascreen_case.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
plasmascreen/textures/plasmascreen_case_off.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 82 B |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.4 KiB |
BIN
plasmascreen/textures/plasmascreen_screen_off.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
plasmascreen/textures/plasmascreen_video.png
Normal file
After Width: | Height: | Size: 21 KiB |