1
0
mirror of https://github.com/D00Med/scifi_nodes.git synced 2024-11-13 05:40:28 +01:00

23/11/16 update

>added hanging trap plant
>added "Alien" themed nodes
>Capitalised slope names
>changed infotext on the crate and box
>added builder node, which doesn't do anything at the moment
>added mode slopes
>added more black nodes
>added teleporter
This commit is contained in:
D00Med 2016-11-23 08:29:17 +10:00
parent 47c6382e1a
commit 2c98ef0687
18 changed files with 322 additions and 19 deletions

View File

@ -1,5 +1,40 @@
--scifi_nodes by D00Med
--the builder node
minetest.register_node("scifi_nodes:builder", {
description = "Sci-fi Node Builder",
sunlight_propagates = false,
tiles = {
"scifi_nodes_builder.png",
"scifi_nodes_builder.png",
"scifi_nodes_builder_side.png",
"scifi_nodes_builder_side.png",
"scifi_nodes_builder_side.png",
"scifi_nodes_builder_front.png"
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Node Builder (currently does nothing)")
end,
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1, oddly_breakable_by_hand=1}
})
--nodes
minetest.register_node("scifi_nodes:grassblk", {
description = "Dirt With Alien Grass",
tiles = {"default_grass.png^[colorize:cyan:80", "default_dirt.png",
{name = "default_dirt.png^(default_grass_side.png^[colorize:cyan:80)",
tileable_vertical = false}},
light_source = 2,
groups = {crumbly=1, oddly_breakable_by_hand=1, soil=1}
})
minetest.register_node("scifi_nodes:light", {
description = "blue lightbox",
sunlight_propagates = false,
@ -469,6 +504,8 @@ node.types = {
{"purple", "Purple node", "", 0},
{"rock", "Moonstone", "", 0},
{"rock2", "Moonstone2", "", 0},
{"blackvnt", "Black vent", "", 0},
{"blackplate", "Black plate", "", 0},
}
for _, row in ipairs(node.types) do
@ -599,7 +636,7 @@ minetest.register_node("scifi_nodes:crate", {
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", chest_formspec)
meta:set_string("infotext", "Chest")
meta:set_string("infotext", "Crate")
local inv = meta:get_inventory()
inv:set_size("main", 8 * 4)
end,
@ -638,7 +675,7 @@ minetest.register_node("scifi_nodes:box", {
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", chest_formspec)
meta:set_string("infotext", "Chest")
meta:set_string("infotext", "Box")
local inv = meta:get_inventory()
inv:set_size("main", 8 * 4)
end,
@ -681,7 +718,7 @@ minetest.register_node("scifi_nodes:lightstp", {
tiles = {
"scifi_nodes_lightstripe.png"
},
light_source = 20,
light_source = 14,
paramtype = "light",
groups = {cracky=1}
})

View File

@ -37,18 +37,22 @@ minetest.register_node("scifi_nodes:slope_"..name, {
})
end
scifi_nodes.register_slope("black", "black", {"scifi_nodes_black.png",}, 0)
scifi_nodes.register_slope("white", "white", {"scifi_nodes_white.png",}, 0)
scifi_nodes.register_slope("grey", "grey", {"scifi_nodes_grey.png",}, 0)
scifi_nodes.register_slope("blue", "blue", {"scifi_nodes_bluebars.png",}, 0)
scifi_nodes.register_slope("mesh", "mesh", {"scifi_nodes_mesh2.png",}, 0)
scifi_nodes.register_slope("vent", "vent", {"scifi_nodes_vent2.png",}, 0)
scifi_nodes.register_slope("rlight", "red light", {"scifi_nodes_redlight.png",}, 0)
scifi_nodes.register_slope("blight", "blue light", {"scifi_nodes_light.png",}, 0)
scifi_nodes.register_slope("glight", "green light", {"scifi_nodes_greenlight.png",}, 0)
scifi_nodes.register_slope("holes", "holes", {"scifi_nodes_holes.png",}, 0)
scifi_nodes.register_slope("pipe", "pipe", {"scifi_nodes_pipe.png",}, 0)
scifi_nodes.register_slope("stripes", "stripes", {"scifi_nodes_stripes.png",}, 0)
scifi_nodes.register_slope("screen", "screen", {"scifi_nodes_screen3.png",}, 5)
scifi_nodes.register_slope("lightstripe", "lightstripe", {"scifi_nodes_lightstripe.png",}, 20)
scifi_nodes.register_slope("blight2", "blue light 2", {"scifi_nodes_capsule3.png",}, 20)
scifi_nodes.register_slope("black", "Black", {"scifi_nodes_black.png",}, 0)
scifi_nodes.register_slope("white", "White", {"scifi_nodes_white.png",}, 0)
scifi_nodes.register_slope("grey", "Grey", {"scifi_nodes_grey.png",}, 0)
scifi_nodes.register_slope("blue", "Blue", {"scifi_nodes_bluebars.png",}, 0)
scifi_nodes.register_slope("mesh", "Mesh", {"scifi_nodes_mesh2.png",}, 0)
scifi_nodes.register_slope("vent", "Vent", {"scifi_nodes_vent2.png",}, 0)
scifi_nodes.register_slope("rlight", "Red light", {"scifi_nodes_redlight.png",}, 0)
scifi_nodes.register_slope("blight", "Blue light", {"scifi_nodes_light.png",}, 0)
scifi_nodes.register_slope("glight", "Green light", {"scifi_nodes_greenlight.png",}, 0)
scifi_nodes.register_slope("holes", "Holes", {"scifi_nodes_holes.png",}, 0)
scifi_nodes.register_slope("pipe", "Pipe", {"scifi_nodes_pipe.png",}, 0)
scifi_nodes.register_slope("stripes", "Stripes", {"scifi_nodes_stripes.png",}, 0)
scifi_nodes.register_slope("screen", "Screen", {"scifi_nodes_screen3.png",}, 5)
scifi_nodes.register_slope("lightstripe", "Lightstripe", {"scifi_nodes_lightstripe.png",}, 20)
scifi_nodes.register_slope("blight2", "Blue Light 2", {"scifi_nodes_capsule3.png",}, 20)
scifi_nodes.register_slope("wallpipe", "Alien Pipe", {"scifi_nodes_wallpipe.png",}, 0)
scifi_nodes.register_slope("alien", "Alien Wall", {"scifi_nodes_alnslp.png",}, 0)
scifi_nodes.register_slope("purple", "Purple", {"scifi_nodes_stripes.png",}, 0)
scifi_nodes.register_slope("gblock", "Gblock", {"scifi_nodes_gblock2_front1.png",}, 0)

View File

@ -1,7 +1,269 @@
-- GENERATED CODE
-- Node Box Editor, version 0.9.0
-- Namespace: scifi_nodes
position1 = nil
position2 = nil
minetest.register_node("scifi_nodes:alienslope", {
description = "Alien Platform",
tiles = {
"scifi_nodes_alnslp_top2.png",
"scifi_nodes_alnslp_top.png",
"scifi_nodes_alnslp.png",
"scifi_nodes_alnslp.png",
"scifi_nodes_alnslp_top.png",
"scifi_nodes_alnslp_top.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1},
node_box = {
type = "fixed",
fixed = {
{0, -0.5, -0.5, 0.5, 0.5, 0.5}, -- NodeBox10
{-0.5, -0.5, -0.5, 0, -0.25, 0.5}, -- NodeBox11
{-0.4375, -0.25, -0.5, 0, -0.125, 0.5}, -- NodeBox12
{-0.375, -0.125, -0.5, 0, 0, 0.5}, -- NodeBox13
{-0.3125, 0, -0.5, 0, 0.125, 0.5}, -- NodeBox14
{-0.25, 0.125, -0.5, 0, 0.25, 0.5}, -- NodeBox15
{-0.1875, 0.25, -0.5, 0.0625, 0.375, 0.5}, -- NodeBox16
{-0.125, 0.375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox17
}
},
on_place = minetest.rotate_node
})
minetest.register_node("scifi_nodes:wallpipe", {
description = "Alien wall pipe",
tiles = {
"scifi_nodes_wallpipe.png",
"scifi_nodes_wallpipe.png",
"scifi_nodes_wallpipe.png",
"scifi_nodes_wallpipe.png",
"scifi_nodes_wallpipe.png",
"scifi_nodes_wallpipe.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, -- NodeBox18
{-0.1875, -0.5, -0.0625, 0.1875, 0.5, 0.125}, -- NodeBox19
{-0.125, -0.5, -0.125, 0.125, 0.5, 0.125}, -- NodeBox20
{0.3125, -0.5, 0.0625, 0.4375, 0.5, 0.125}, -- NodeBox21
{-0.4375, -0.5, 0.0625, -0.3125, 0.5, 0.125}, -- NodeBox22
{-0.5, 0.0625, 0, 0.5, 0.1875, 0.0625}, -- NodeBox23
{-0.5, -0.125, 0, 0.5, 0, 0.0625}, -- NodeBox24
}
},
})
minetest.register_node("scifi_nodes:plant_trap", {
description = "Hanging Trap Plant",
tiles = {
"scifi_nodes_traplant_top.png",
"scifi_nodes_traplant_side.png",
"scifi_nodes_traplant_side.png",
"scifi_nodes_traplant_side.png",
"scifi_nodes_traplant_side.png",
"scifi_nodes_traplant_side.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
light_source = 5,
walkable = false,
sunlight_propagates = false,
groups = {snappy=1, oddly_breakable_by_hand=1},
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.4375, -0.125, 0.125, 0.125, 0.125}, -- NodeBox25
{-0.1875, 0.125, -0.1875, 0.1875, 0.1875, 0.1875}, -- NodeBox26
{-0.0625, -0.5, -0.0625, 0, -0.4375, 0.375}, -- NodeBox27
{-0.0625, -0.5, 0.3125, 0, 0.5, 0.375}, -- NodeBox28
}
}
})
minetest.register_node("scifi_nodes:egg", {
description = "Alien Egg",
tiles = {
"scifi_nodes_egg_top.png",
"scifi_nodes_egg_top.png",
"scifi_nodes_egg_side.png",
"scifi_nodes_egg_side.png",
"scifi_nodes_egg_side.png",
"scifi_nodes_egg_side.png"
},
sunlight_propagates = false,
drawtype = "nodebox",
paramtype = "light",
groups = {cracky=1, oddly_breakable_by_hand=1, dig_immediate=2, falling_node=1},
light_source = 5,
node_box = {
type = "fixed",
fixed = {
{-0.25, -0.5, -0.25, 0.25, -0.4375, 0.25}, -- NodeBox1
{-0.375, -0.4375, -0.375, 0.375, -0.3125, 0.375}, -- NodeBox2
{-0.4375, -0.3125, -0.375, 0.4375, 0.3125, 0.375}, -- NodeBox3
{-0.375, 0.3125, -0.375, 0.375, 0.4375, 0.375}, -- NodeBox4
{-0.3125, 0.4375, -0.3125, 0.3125, 0.5625, 0.3125}, -- NodeBox5
{-0.25, 0.5625, -0.25, 0.25, 0.6875, 0.25}, -- NodeBox6
{-0.1875, 0.6875, -0.1875, 0.1875, 0.75, 0.1875}, -- NodeBox7
{-0.125, 0.75, -0.125, 0.125, 0.8125, 0.125}, -- NodeBox8
{-0.375, -0.3125, -0.4375, 0.375, 0.3125, 0.4375}, -- NodeBox9
}
}
})
if minetest.get_modpath("scifi_mobs") then
minetest.register_abm({
nodenames = {"scifi_nodes:egg"},
interval = 30, chance = 10,
action = function(pos, node, _, _)
minetest.env:add_entity(pos, "scifi_mobs:xenomorph")
minetest.env:remove_node(pos)
end
})
end
minetest.register_node("scifi_nodes:pad", {
description = "teleport pad",
tiles = {
"scifi_nodes_pad.png",
"scifi_nodes_pad.png",
"scifi_nodes_pad.png",
"scifi_nodes_pad.png",
"scifi_nodes_pad.png",
"scifi_nodes_pad.png"
},
drawtype = "nodebox",
paramtype = "light",
groups = {cracky=1, oddly_breakable_by_hand=1},
light_source = 5,
on_construct = function(pos, node, placer)
local meta = minetest.get_meta(pos)
if position1 == nil then
position1 = pos
meta:set_int("type", 1)
elseif position2 == nil then
position2 = pos
meta:set_int("type", 2)
else
minetest.chat_send_all("There can only be two teleportation pads at a time!")
end
end,
on_rightclick = function(pos, node, clicker)
local meta = minetest.get_meta(pos)
if meta:get_int("type") == 1 and position2 ~= nil and position1 ~= nil then
minetest.add_particlespawner(
25, --amount
1.5, --time
{x=pos.x-0.9, y=pos.y-0.3, z=pos.z-0.9}, --minpos
{x=pos.x+0.9, y=pos.y-0.3, z=pos.z+0.9}, --maxpos
{x=0, y=0, z=0}, --minvel
{x=0, y=0, z=0}, --maxvel
{x=-0,y=1,z=-0}, --minacc
{x=0,y=2,z=0}, --maxacc
0.5, --minexptime
1, --maxexptime
2, --minsize
5, --maxsize
false, --collisiondetection
"scifi_nodes_tp_part.png" --texture
)
minetest.after(1, function()
local ppos = clicker:getpos()
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
clicker:setpos(position2)
else
--minetest.chat_send_all("Nothing to teleport!")
end
local objs = minetest.env:get_objects_inside_radius(pos, 3)
for _, obj in pairs(objs) do
if obj:get_luaentity() and not obj:is_player() then
if obj:get_luaentity().name == "__builtin:item" then
local item1 = obj:get_luaentity().itemstring
local obj2 = minetest.env:add_entity(position2, "__builtin:item")
obj2:get_luaentity():set_item(item1)
obj:remove()
end
end
end
end)
elseif meta:get_int("type") == 2 and position1 ~= nil and position2 ~= nil then
minetest.add_particlespawner(
25, --amount
1.5, --time
{x=pos.x-0.9, y=pos.y-0.3, z=pos.z-0.9}, --minpos
{x=pos.x+0.9, y=pos.y-0.3, z=pos.z+0.9}, --maxpos
{x=0, y=0, z=0}, --minvel
{x=0, y=0, z=0}, --maxvel
{x=-0,y=1,z=-0}, --minacc
{x=0,y=2,z=0}, --maxacc
0.5, --minexptime
1, --maxexptime
2, --minsize
5, --maxsize
false, --collisiondetection
"scifi_nodes_tp_part.png" --texture
)
minetest.after(1, function()
local ppos = clicker:getpos()
if minetest.get_node({x=ppos.x, y=ppos.y, z=ppos.z}).name == "scifi_nodes:pad" then
clicker:setpos(position1)
else
--minetest.chat_send_all("No-one to teleport!")
end
local objs = minetest.env:get_objects_inside_radius(pos, 3)
for _, obj in pairs(objs) do
if obj:get_luaentity() and not obj:is_player() then
if obj:get_luaentity().name == "__builtin:item" then
local item1 = obj:get_luaentity().itemstring
local obj2 = minetest.env:add_entity(position1, "__builtin:item")
obj2:get_luaentity():set_item(item1)
obj:remove()
end
end
end
end)
elseif position1 == nil and meta:get_int("type") ~= 2 then
position1 = pos
meta:set_int("type", 1)
minetest.chat_send_all("Teleporter 1 connected at "..minetest.pos_to_string(pos))
elseif position2 == nil and meta:get_int("type") ~= 1 then
position2 = pos
meta:set_int("type", 2)
minetest.chat_send_all("Teleporter 2 connected at "..minetest.pos_to_string(pos))
else minetest.chat_send_all("Teleporter error!")
end
end,
on_destruct = function(pos, oldnode, placer)
local meta = minetest.get_meta(pos)
if meta:get_int("type") == 1 then
position1 = nil
meta:set_int("type", 0)
elseif meta:get_int("type") == 2 then
position2 = nil
meta:set_int("type", 0)
end
end,
node_box = {
type = "fixed",
fixed = {
{-0.9375, -0.5, -0.75, 0.875, -0.375, 0.75}, -- NodeBox1
{-0.8125, -0.5, -0.875, 0.75, -0.375, 0.875}, -- NodeBox2
{-0.875, -0.5, -0.8125, 0.8125, -0.375, 0.8125}, -- NodeBox3
{-0.8125, -0.5, -0.75, 0.75, -0.3125, 0.75}, -- NodeBox4
}
}
})
minetest.register_node("scifi_nodes:pplwndw", {
description = "Purple Window",

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B