adopt scifi_nodes
|
@ -0,0 +1,17 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
|
@ -0,0 +1,47 @@
|
|||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# =========================
|
||||
# Operating System Files
|
||||
# =========================
|
||||
|
||||
# OSX
|
||||
# =========================
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
|
@ -0,0 +1,3 @@
|
|||
Minetest mod that adds scifi themed nodes by https://github.com/D00Med/scifi_nodes
|
||||
|
||||
you should definitly check out the original mod
|
|
@ -0,0 +1,8 @@
|
|||
default
|
||||
xpanes?
|
||||
moreblocks?
|
||||
mesecons?
|
||||
mesecons_microcontroller?
|
||||
mesecons_button?
|
||||
mesecons_torch?
|
||||
dye?
|
|
@ -0,0 +1,259 @@
|
|||
-- mydoors mod by don
|
||||
-- DO WHAT YOU WANT TO PUBLIC LICENSE
|
||||
-- or abbreviated DWYWPL
|
||||
|
||||
-- December 2nd 2015
|
||||
-- License Copyright (C) 2015 Michael Tomaino (PlatinumArts@gmail.com)
|
||||
-- www.sandboxgamemaker.com/DWYWPL/
|
||||
|
||||
-- DO WHAT YOU WANT TO PUBLIC LICENSE
|
||||
-- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
-- 1. You are allowed to do whatever you want to with what content is using this license.
|
||||
-- 2. This content is provided 'as-is', without any express or implied warranty. In no event
|
||||
-- will the authors be held liable for any damages arising from the use of this content.
|
||||
|
||||
-- sliding door sound from marssurvive mod
|
||||
|
||||
local doors = {
|
||||
{"scifi_nodes:door2a","scifi_nodes:door2b","scifi_nodes:door2c","scifi_nodes:door2d","2","black"},
|
||||
{"scifi_nodes:door3a","scifi_nodes:door3b","scifi_nodes:door3c","scifi_nodes:door3d","3","white"},
|
||||
{"scifi_nodes:door4a","scifi_nodes:door4b","scifi_nodes:door4c","scifi_nodes:door4d","4","green"},
|
||||
{"scifi_nodes:door1a","scifi_nodes:door1b","scifi_nodes:door1c","scifi_nodes:door1d","1","Doom"},}
|
||||
|
||||
for i in ipairs (doors) do
|
||||
local doora = doors[i][1]
|
||||
local doorb = doors[i][2]
|
||||
local doorc = doors[i][3]
|
||||
local doord = doors[i][4]
|
||||
local num = doors[i][5]
|
||||
local des = doors[i][6]
|
||||
|
||||
function onplace(itemstack, placer, pointed_thing)
|
||||
local pos1 = pointed_thing.above
|
||||
local pos2 = {x=pos1.x, y=pos1.y, z=pos1.z}
|
||||
pos2.y = pos2.y+1
|
||||
if
|
||||
not minetest.registered_nodes[minetest.get_node(pos1).name].buildable_to or
|
||||
not minetest.registered_nodes[minetest.get_node(pos2).name].buildable_to or
|
||||
not placer or
|
||||
not placer:is_player() then
|
||||
return
|
||||
end
|
||||
local pt = pointed_thing.above
|
||||
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
|
||||
pt2.y = pt2.y+1
|
||||
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pt3 = {x=pt.x, y=pt.y, z=pt.z}
|
||||
local p4 = 0
|
||||
if p2 == 0 then
|
||||
pt3.x = pt3.x-1
|
||||
p4 = 2
|
||||
elseif p2 == 1 then
|
||||
pt3.z = pt3.z+1
|
||||
p4 = 3
|
||||
elseif p2 == 2 then
|
||||
pt3.x = pt3.x+1
|
||||
p4 = 0
|
||||
elseif p2 == 3 then
|
||||
pt3.z = pt3.z-1
|
||||
p4 = 1
|
||||
end
|
||||
if minetest.get_node(pt3).name == doora then
|
||||
minetest.set_node(pt, {name=doora, param2=p4})
|
||||
minetest.set_node(pt2, {name=doorb, param2=p4})
|
||||
else
|
||||
minetest.set_node(pt, {name=doora, param2=p2})
|
||||
minetest.set_node(pt2, {name=doorb, param2=p2})
|
||||
end
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end
|
||||
|
||||
function afterdestruct(pos, oldnode)
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name="air"})
|
||||
end
|
||||
|
||||
function rightclick(pos, node, player, itemstack, pointed_thing)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local a = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
local b = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
local c = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z})
|
||||
local d = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z})
|
||||
minetest.set_node(pos, {name=doorc, param2=node.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name=doord, param2=node.param2})
|
||||
|
||||
if a.name == doora then
|
||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name=doorc, param2=a.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z-1}, {name=doord, param2=a.param2})
|
||||
end
|
||||
if b.name == doora then
|
||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name=doorc, param2=b.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z+1}, {name=doord, param2=b.param2})
|
||||
end
|
||||
if c.name == doora then
|
||||
minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name=doorc, param2=c.param2})
|
||||
minetest.set_node({x=pos.x+1,y=pos.y+1,z=pos.z}, {name=doord, param2=c.param2})
|
||||
end
|
||||
if d.name == doora then
|
||||
minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name=doorc, param2=d.param2})
|
||||
minetest.set_node({x=pos.x-1,y=pos.y+1,z=pos.z}, {name=doord, param2=d.param2})
|
||||
end
|
||||
|
||||
timer:start(3)
|
||||
|
||||
minetest.sound_play("slidingdoor", {pos=pos, gain = 1, max_hear_distance = 5})
|
||||
|
||||
end
|
||||
|
||||
function afterplace(pos, placer, itemstack, pointed_thing)
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z},{name=doord,param2=nodeu.param2})
|
||||
end
|
||||
|
||||
function ontimer(pos, elapsed)
|
||||
local node = minetest.get_node(pos)
|
||||
local a = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
local b = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1})
|
||||
local c = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z})
|
||||
local d = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z})
|
||||
minetest.set_node(pos, {name=doora, param2=node.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z}, {name=doorb, param2=node.param2})
|
||||
|
||||
if a.name == doorc then
|
||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name=doora, param2=a.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z-1}, {name=doorb, param2=a.param2})
|
||||
end
|
||||
if b.name == doorc then
|
||||
minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name=doora, param2=b.param2})
|
||||
minetest.set_node({x=pos.x,y=pos.y+1,z=pos.z+1}, {name=doorb, param2=b.param2})
|
||||
end
|
||||
if c.name == doorc then
|
||||
minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name=doora, param2=c.param2})
|
||||
minetest.set_node({x=pos.x+1,y=pos.y+1,z=pos.z}, {name=doorb, param2=c.param2})
|
||||
end
|
||||
if d.name == doorc then
|
||||
minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name=doora, param2=d.param2})
|
||||
minetest.set_node({x=pos.x-1,y=pos.y+1,z=pos.z}, {name=doorb, param2=d.param2})
|
||||
end
|
||||
|
||||
minetest.sound_play("slidingdoor", {pos=pos, gain = 1, max_hear_distance = 5})
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node(doora, {
|
||||
description = des.." Sliding Door",
|
||||
inventory_image = "scifi_nodes_door"..num.."a_inv.png",
|
||||
wield_image = "scifi_nodes_door"..num.."a_inv.png",
|
||||
tiles = {
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_rbottom.png",
|
||||
"scifi_nodes_door"..num.."a_bottom.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 3},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.0625, 0.5, 1.5, 0.0625}
|
||||
}
|
||||
},
|
||||
|
||||
on_place = onplace,
|
||||
|
||||
after_destruct = afterdestruct,
|
||||
|
||||
on_rightclick = rightclick,
|
||||
})
|
||||
minetest.register_node(doorb, {
|
||||
tiles = {
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_rtop.png",
|
||||
"scifi_nodes_door"..num.."a_top.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.0625, 0.5, 0.5, 0.0625}
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
})minetest.register_node(doorc, {
|
||||
tiles = {
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_rbottom0.png",
|
||||
"scifi_nodes_door"..num.."a_bottom0.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = doora,
|
||||
groups = {cracky = 1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.0625, -0.25, 0.5, 0.0625},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.0625, -0.25, 1.5, 0.0625},
|
||||
}
|
||||
},
|
||||
after_place_node = afterplace,
|
||||
after_destruct = afterdestruct,
|
||||
on_timer = ontimer,
|
||||
})
|
||||
minetest.register_node(doord, {
|
||||
tiles = {
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_edge.png",
|
||||
"scifi_nodes_door"..num.."a_rtopo.png",
|
||||
"scifi_nodes_door"..num.."a_topo.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.0625, -0.25, 0.5, 0.0625},
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{0, 0, 0, 0, 0, 0},
|
||||
}
|
||||
},
|
||||
})
|
||||
end
|
|
@ -0,0 +1,894 @@
|
|||
|
||||
--sounds added by Mahal
|
||||
|
||||
local sound_wood = default.node_sound_wood_defaults()
|
||||
local sound_stone = default.node_sound_stone_defaults()
|
||||
local sound_metal = default.node_sound_metal_defaults()
|
||||
local sound_glass = default.node_sound_glass_defaults()
|
||||
local sound_dirt = default.node_sound_dirt_defaults()
|
||||
|
||||
local sound_hard = default.node_sound_stone_defaults()
|
||||
local sound_soft = default.node_sound_dirt_defaults()
|
||||
|
||||
|
||||
--scifi_nodes by D00Med
|
||||
|
||||
--the builder node
|
||||
|
||||
local builder_formspec =
|
||||
"size[8,9]" ..
|
||||
default.gui_bg ..
|
||||
default.gui_bg_img ..
|
||||
default.gui_slots ..
|
||||
"list[current_name;input;1,1;1,1;]" ..
|
||||
"list[current_name;output;3,0;4,3;]" ..
|
||||
"list[current_player;main;0,4.85;8,1;]" ..
|
||||
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||
"listring[current_name;input]" ..
|
||||
"listring[current_name;output]" ..
|
||||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
|
||||
local input_items = {
|
||||
{"default:steel_ingot 1", "scifi_nodes:black", "scifi_nodes:blue", "scifi_nodes:rough", "scifi_nodes:rust", "scifi_nodes:white", "scifi_nodes:grey", "scifi_nodes:pplwll", "scifi_nodes:greenmetal", "scifi_nodes:wall", "scifi_nodes:blue_square", "scifi_nodes:mesh", "scifi_nodes:greytile"}
|
||||
}
|
||||
|
||||
minetest.register_node("scifi_nodes:builder", {
|
||||
description = "Sci-fi Node Builder",
|
||||
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)")
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", builder_formspec)
|
||||
meta:set_string("infotext", "Node Builder")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("output", 4 * 3)
|
||||
inv:set_size("input", 1 * 1)
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local player_inv = player:get_inventory()
|
||||
if listname == "output" then
|
||||
player_inv:add_item("main", stack)
|
||||
inv:set_stack("output", index, "")
|
||||
end
|
||||
if listname == "input" then
|
||||
for _, row in ipairs(input_items) do
|
||||
local item = row[1]
|
||||
if inv:contains_item("input", item) then
|
||||
inv:set_stack("output", 1, row[2])
|
||||
inv:set_stack("output", 2, row[3])
|
||||
inv:set_stack("output", 3, row[4])
|
||||
inv:set_stack("output", 4, row[5])
|
||||
inv:set_stack("output", 5, row[6])
|
||||
inv:set_stack("output", 6, row[7])
|
||||
inv:set_stack("output", 7, row[8])
|
||||
inv:set_stack("output", 8, row[9])
|
||||
inv:set_stack("output", 9, row[10])
|
||||
inv:set_stack("output", 10, row[11])
|
||||
inv:set_stack("output", 11, row[12])
|
||||
inv:set_stack("output", 12, row[13])
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stack = inv:get_stack("input", 1)
|
||||
local stack_name = stack:get_name()
|
||||
inv:remove_item("input", stack_name.." 1")
|
||||
|
||||
inv:set_stack("output", 1, "")
|
||||
inv:set_stack("output", 2, "")
|
||||
inv:set_stack("output", 3, "")
|
||||
inv:set_stack("output", 4, "")
|
||||
inv:set_stack("output", 5, "")
|
||||
inv:set_stack("output", 6, "")
|
||||
inv:set_stack("output", 7, "")
|
||||
inv:set_stack("output", 8, "")
|
||||
inv:set_stack("output", 9, "")
|
||||
inv:set_stack("output", 10, "")
|
||||
inv:set_stack("output", 11, "")
|
||||
inv:set_stack("output", 12, "")
|
||||
end,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1, oddly_breakable_by_hand=1},
|
||||
sound = sound_metal
|
||||
})
|
||||
|
||||
--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},
|
||||
sounds = sound_dirt,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:light", {
|
||||
description = "blue lightbox",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_lighttop.png",
|
||||
"scifi_nodes_lighttop.png",
|
||||
"scifi_nodes_light.png",
|
||||
"scifi_nodes_light.png",
|
||||
"scifi_nodes_light.png",
|
||||
"scifi_nodes_light.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:rfloor", {
|
||||
description = "rusty floor",
|
||||
tiles = {
|
||||
"scifi_nodes_rustfloor.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = 10,
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:bfloor", {
|
||||
description = "blue floor",
|
||||
tiles = {
|
||||
"scifi_nodes_bluefloor.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = 10,
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("scifi_nodes:stripes2", {
|
||||
description = "hazard stripes2",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_stripes2top.png",
|
||||
"scifi_nodes_stripes2top.png",
|
||||
"scifi_nodes_stripes2.png",
|
||||
"scifi_nodes_stripes2.png",
|
||||
"scifi_nodes_stripes2.png",
|
||||
"scifi_nodes_stripes2.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_hard,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:gblock", {
|
||||
description = "Green metal block",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:gblock2", {
|
||||
description = "Green metal block 2",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_gblock2_top.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock2.png",
|
||||
"scifi_nodes_gblock2_fx.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock2_front1.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:gblock3", {
|
||||
description = "Green metal block 3",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_gblock2_top.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock2.png",
|
||||
"scifi_nodes_gblock2_fx.png",
|
||||
"scifi_nodes_gblock.png",
|
||||
"scifi_nodes_gblock2_screen.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("scifi_nodes:green_light", {
|
||||
description = "green lightbox",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_lighttop.png",
|
||||
"scifi_nodes_lighttop.png",
|
||||
"scifi_nodes_greenlight.png",
|
||||
"scifi_nodes_greenlight.png",
|
||||
"scifi_nodes_greenlight.png",
|
||||
"scifi_nodes_greenlight.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:red_light", {
|
||||
description = "red lightbox",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_lighttop.png",
|
||||
"scifi_nodes_lighttop.png",
|
||||
"scifi_nodes_redlight.png",
|
||||
"scifi_nodes_redlight.png",
|
||||
"scifi_nodes_redlight.png",
|
||||
"scifi_nodes_redlight.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:discs", {
|
||||
description = "disc shelves",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_box_top.png",
|
||||
"scifi_nodes_box_top.png",
|
||||
"scifi_nodes_discs.png",
|
||||
"scifi_nodes_discs.png",
|
||||
"scifi_nodes_discs.png",
|
||||
"scifi_nodes_discs.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:disc", {
|
||||
description = "disc",
|
||||
drawtype = "torchlike",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_disc.png"
|
||||
},
|
||||
inventory_image = "scifi_nodes_disc.png",
|
||||
wield_image = "scifi_nodes_disc.png",
|
||||
paramtype = "light",
|
||||
groups = {cracky=1}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("scifi_nodes:blink", {
|
||||
description = "blinking light",
|
||||
sunlight_propagates = false,
|
||||
tiles = {{
|
||||
name="scifi_nodes_lightbox.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.00},
|
||||
}},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
light_source = 5,
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:black_lights", {
|
||||
description = "black wallpanel",
|
||||
sunlight_propagates = false,
|
||||
tiles = {{
|
||||
name="scifi_nodes_black_lights.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.50},
|
||||
}},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:black_screen", {
|
||||
description = "black wall screen",
|
||||
sunlight_propagates = false,
|
||||
tiles = {{
|
||||
name="scifi_nodes_black_screen.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.00},
|
||||
}},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
light_source = 1,
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:screen", {
|
||||
description = "electronic screen",
|
||||
sunlight_propagates = false,
|
||||
tiles = {{
|
||||
name="scifi_nodes_screen.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.50},
|
||||
}},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
light_source = 5,
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:screen2", {
|
||||
description = "electronic screen 2",
|
||||
sunlight_propagates = false,
|
||||
tiles = {{
|
||||
name="scifi_nodes_screen2.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.50},
|
||||
}},
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
light_source = 5,
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("scifi_nodes:white_pad", {
|
||||
description = "white keypad",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white_pad.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_hard,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:white_base", {
|
||||
description = "white wall base",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white2.png",
|
||||
"scifi_nodes_white_side.png",
|
||||
"scifi_nodes_white_side.png",
|
||||
"scifi_nodes_white_side.png",
|
||||
"scifi_nodes_white_side.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_hard,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:grnpipe", {
|
||||
description = "green pipe",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_greenpipe_front.png",
|
||||
"scifi_nodes_greenpipe_front.png",
|
||||
"scifi_nodes_greenpipe_top.png",
|
||||
"scifi_nodes_greenpipe_top.png",
|
||||
"scifi_nodes_greenpipe_top.png",
|
||||
"scifi_nodes_greenpipe_top.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
on_place = minetest.rotate_node,
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("scifi_nodes:grnpipe2", {
|
||||
description = "broken green pipe",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_greenpipe_front.png",
|
||||
"scifi_nodes_greenpipe_front.png",
|
||||
"scifi_nodes_greenpipe2_top.png",
|
||||
"scifi_nodes_greenpipe2_top.png",
|
||||
"scifi_nodes_greenpipe2_top.png",
|
||||
"scifi_nodes_greenpipe2_top.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=1},
|
||||
on_place = minetest.rotate_node,
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octrng", {
|
||||
description = "Orange Octagon Glass",
|
||||
sunlight_propagates = false,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octrng.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
light_source = 10,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octgrn", {
|
||||
description = "Green Octagon Glass",
|
||||
sunlight_propagates = false,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octgrn.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
light_source = 10,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octbl", {
|
||||
description = "Blue Octagon Glass",
|
||||
sunlight_propagates = false,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octbl.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
light_source = 10,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octppl", {
|
||||
description = "Purple Octagon Glass",
|
||||
sunlight_propagates = false,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octppl.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = true,
|
||||
light_source = 10,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:tower", {
|
||||
description = "Wind tower",
|
||||
sunlight_propagates = false,
|
||||
drawtype = "plantlike",
|
||||
tiles = {{
|
||||
name = "scifi_nodes_tower_anim.png",
|
||||
animation = {type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 1.00},
|
||||
}},
|
||||
visual_scale = 2,
|
||||
inventory_image = "scifi_nodes_tower.png",
|
||||
paramtype = "light",
|
||||
groups = {cracky=2},
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:junk", {
|
||||
description = "Junk",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
liquid_viscosity = 8,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "scifi_nodes:junk",
|
||||
liquid_alternative_source = "scifi_nodes:junk",
|
||||
liquid_renewable = false,
|
||||
liquid_range = 0,
|
||||
walkable = false,
|
||||
tiles = {
|
||||
"scifi_nodes_junk.png"
|
||||
},
|
||||
groups = {snappy=1, oddly_breakable_by_hand=1, liquid=3, dig_immediate=1},
|
||||
sounds = sound_dirt,
|
||||
})
|
||||
|
||||
--edited wool code (Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>)
|
||||
|
||||
local node = {}
|
||||
-- This uses a trick: you can first define the recipes using all of the base
|
||||
-- colors, and then some recipes using more specific colors for a few non-base
|
||||
-- colors available. When crafting, the last recipes will be checked first.
|
||||
--add new block using texture name(without "scifi_nodes_" prefix) then the description, and then the name of the block
|
||||
node.types = {
|
||||
{"blue", "blue lines", "blue"},
|
||||
{"holes", "metal with holes","holes"},
|
||||
{"white2", "plastic", "white2"},
|
||||
{"engine", "engine", "engine"},
|
||||
{"wall", "metal wall", "wall"},
|
||||
{"white", "plastic wall", "white"},
|
||||
{"stripes2top", "dirty metal block","metal2"},
|
||||
{"rough", "rough metal", "rough"},
|
||||
{"lighttop", "metal block", "metal"},
|
||||
{"red", "red lines", "red"},
|
||||
{"green", "green lines", "green"},
|
||||
{"vent2", "vent", "vent"},
|
||||
{"stripes", "hazard stripes", "stripes"},
|
||||
{"rust", "rusty metal", "rust"},
|
||||
{"mesh", "metal mesh", "mesh"},
|
||||
{"black", "black wall", "black"},
|
||||
{"blackoct", "black octagon", "blackoct"},
|
||||
{"blackpipe", "black pipe", "blackpipe"},
|
||||
{"blacktile", "black tile", "blktl"},
|
||||
{"blacktile2", "black tile 2", "blktl2"},
|
||||
{"blackvent", "black vent", "blkvnt"},
|
||||
{"bluebars", "blue bars", "bluebars"},
|
||||
{"bluemetal", "blue metal", "blumtl"},
|
||||
{"bluetile", "blue tile", "blutl"},
|
||||
{"greytile", "grey tile", "grytl"},
|
||||
{"mesh2", "metal floormesh", "mesh2"},
|
||||
{"white", "plastic wall", "white"},
|
||||
{"pipe", "wall pipe", "pipe2"},
|
||||
{"pipeside", "side pipe", "pipe3"},
|
||||
{"tile", "white tile", "tile"},
|
||||
{"whiteoct", "white octagon", "whiteoct"},
|
||||
{"whitetile", "white tile2", "whttl"},
|
||||
{"black_detail", "black detail", "blckdtl"},
|
||||
{"green_square", "green metal block", "grnblck"},
|
||||
{"red_square", "red metal block", "redblck"},
|
||||
{"grey_square", "grey metal block", "greyblck"},
|
||||
{"blue_square", "blue metal block", "blublck"},
|
||||
{"black_mesh", "black vent block", "blckmsh"},
|
||||
{"dent", "dented metal block", "dent"},
|
||||
{"greenmetal", "green metal wall", "grnmetl"},
|
||||
{"greenmetal2", "green metal wall2", "grnmetl2"},
|
||||
{"greenlights", "green wall lights", "grnlt", 10},
|
||||
{"greenlights2", "green wall lights2", "grnlt2", 10},
|
||||
{"greenbar", "green light bar", "grnlghtbr", 10},
|
||||
{"green2", "green wall panel", "grn2"},
|
||||
{"greentubes", "green pipes", "grntubes"},
|
||||
{"grey", "grey wall", "gry"},
|
||||
{"greybolts", "grey wall bolts", "gryblts"},
|
||||
{"greybars", "grey bars", "grybrs"},
|
||||
{"greydots", "grey wall dots", "grydts"},
|
||||
{"greygreenbar", "gray power pipe", "grygrnbr", 10},
|
||||
{"octofloor", "Doom floor", "octofloor"},
|
||||
{"octofloor2", "Brown Doom floor", "octofloor2"},
|
||||
{"doomwall1", "Doom wall 1", "doomwall1"},
|
||||
{"doomwall2", "Doom wall 2", "doomwall2"},
|
||||
{"doomwall3", "Doom wall 3", "doomwall3"},
|
||||
{"doomwall4", "Doom wall 4", "doomwall4"},
|
||||
{"doomwall41", "Doom wall 4.1", "doomwall4.1"},
|
||||
{"doomwall42", "Doom wall 4.2", "doomwall4.2"},
|
||||
{"doomwall43", "Doom wall 4.3", "doomwall4.3"},
|
||||
{"doomwall431", "Doom wall 4.3.1", "doomwall4.3.1"},
|
||||
{"doomwall44", "Doom wall 4.4", "doomwall4.4"},
|
||||
{"blackdmg", "Damaged black wall", "blckdmg"},
|
||||
{"blackdmgstripe", "Damaged black wall(stripes)", "blckdmgstripe"},
|
||||
{"doomengine", "Doom engine wall", "doomengine"},
|
||||
{"monitorwall", "Wall monitors", "monitorwall"},
|
||||
{"screen3", "Wall monitor", "screen3"},
|
||||
{"doomlight", "Doom light", "doomlight", 12},
|
||||
{"bluwllight", "Blue wall light", "capsule3", 20},
|
||||
{"bluegrid", "Blue Grid", "bluegrid", 5},
|
||||
{"fan", "Fan", "fan"},
|
||||
{"ppllght", "Purple wall light", "", 50},
|
||||
{"pplwll", "Purple wall", "", 0},
|
||||
{"pplwll2", "Purple wall2", "", 0},
|
||||
{"pplwll3", "Purple wall3", "", 0},
|
||||
{"pplwll4", "Purple wall4", "", 0},
|
||||
{"pplblk", "Purple tile", "", 0},
|
||||
{"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
|
||||
local name = row[1]
|
||||
local desc = row[2]
|
||||
local light = row[4]
|
||||
-- Node Definition
|
||||
minetest.register_node("scifi_nodes:"..name, {
|
||||
description = desc,
|
||||
tiles = {"scifi_nodes_"..name..".png"},
|
||||
groups = {cracky=1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = light,
|
||||
sounds = sound_hard,
|
||||
})
|
||||
end
|
||||
|
||||
node.plants = {
|
||||
{"flower1", "Glow Flower", 1,0, 50},
|
||||
{"flower2", "Pink Flower", 1.5,0, 10},
|
||||
{"flower3", "Triffid", 2,5, 0},
|
||||
{"flower4", "Weeping flower", 1.5,0, 0},
|
||||
{"plant1", "Bulb Plant", 1,0, 0},
|
||||
{"plant2", "Trap Plant", 1.5,0, 30},
|
||||
{"plant3", "Blue Jelly Plant", 1.2,0, 10},
|
||||
{"plant4", "Green Jelly Plant", 1.2,0, 10},
|
||||
{"plant5", "Fern Plant", 1.7,0, 0},
|
||||
{"plant6", "Curly Plant", 1,0, 10},
|
||||
{"plant7", "Egg weed", 1,0, 0},
|
||||
{"plant8", "Slug weed", 1,0, 10},
|
||||
{"plant9", "Prickly Plant", 1,0, 0},
|
||||
{"plant10", "Umbrella weed", 1,0, 10},
|
||||
{"eyetree", "Eye Tree", 2.5,0, 0},
|
||||
{"grass", "Alien Grass", 1,0, 0},
|
||||
}
|
||||
|
||||
for _, row in ipairs(node.plants) do
|
||||
local name = row[1]
|
||||
local desc = row[2]
|
||||
local size = row[3]
|
||||
local dmg = row[4]
|
||||
local light = row[5]
|
||||
-- Node Definition
|
||||
minetest.register_node("scifi_nodes:"..name, {
|
||||
description = desc,
|
||||
tiles = {"scifi_nodes_"..name..".png"},
|
||||
drawtype = "plantlike",
|
||||
inventory_image = {"scifi_nodes_"..name..".png"},
|
||||
groups = {snappy=1, oddly_breakable_by_hand=1, dig_immediate=3, flora=1},
|
||||
paramtype = "light",
|
||||
visual_scale = size,
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
damage_per_second = dmg,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||
}
|
||||
},
|
||||
is_ground_content = false,
|
||||
light_source = light,
|
||||
})
|
||||
end
|
||||
|
||||
--chest code from default(Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>)
|
||||
|
||||
local chest_formspec =
|
||||
"size[8,9]" ..
|
||||
default.gui_bg ..
|
||||
default.gui_bg_img ..
|
||||
default.gui_slots ..
|
||||
"list[current_name;main;0,0.3;8,4;]" ..
|
||||
"list[current_player;main;0,4.85;8,1;]" ..
|
||||
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||
"listring[current_name;main]" ..
|
||||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
|
||||
local function get_locked_chest_formspec(pos)
|
||||
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
|
||||
local formspec =
|
||||
"size[8,9]" ..
|
||||
default.gui_bg ..
|
||||
default.gui_bg_img ..
|
||||
default.gui_slots ..
|
||||
"list[nodemeta:" .. spos .. ";main;0,0.3;8,4;]" ..
|
||||
"list[current_player;main;0,4.85;8,1;]" ..
|
||||
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||
"listring[nodemeta:" .. spos .. ";main]" ..
|
||||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85)
|
||||
return formspec
|
||||
end
|
||||
|
||||
|
||||
-- Helper functions
|
||||
|
||||
local function drop_chest_stuff()
|
||||
return function(pos, oldnode, oldmetadata, digger)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:from_table(oldmetadata)
|
||||
local inv = meta:get_inventory()
|
||||
for i = 1, inv:get_size("main") do
|
||||
local stack = inv:get_stack("main", i)
|
||||
if not stack:is_empty() then
|
||||
local p = {
|
||||
x = pos.x + math.random(0, 5)/5 - 0.5,
|
||||
y = pos.y,
|
||||
z = pos.z + math.random(0, 5)/5 - 0.5}
|
||||
minetest.add_item(p, stack)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--chest code Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
minetest.register_node("scifi_nodes:crate", {
|
||||
description = "Crate",
|
||||
tiles = {"scifi_nodes_crate.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 1, oddly_breakable_by_hand = 2, fuel = 8},
|
||||
legacy_facedir_simple = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
|
||||
after_dig_node = drop_chest_stuff(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", chest_formspec)
|
||||
meta:set_string("infotext", "Crate")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8 * 4)
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff in chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff to chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" takes stuff from chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:box", {
|
||||
description = "Storage box",
|
||||
tiles = {
|
||||
"scifi_nodes_box_top.png",
|
||||
"scifi_nodes_box_top.png",
|
||||
"scifi_nodes_box.png",
|
||||
"scifi_nodes_box.png",
|
||||
"scifi_nodes_box.png",
|
||||
"scifi_nodes_box.png"
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 1},
|
||||
legacy_facedir_simple = true,
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
|
||||
after_dig_node = drop_chest_stuff(),
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", chest_formspec)
|
||||
meta:set_string("infotext", "Box")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8 * 4)
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff in chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff to chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" takes stuff from chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
})
|
||||
--end of chest code
|
||||
|
||||
minetest.register_node("scifi_nodes:blumetlight", {
|
||||
description = "blue metal light",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_bluemetal.png",
|
||||
"scifi_nodes_bluemetal.png",
|
||||
"scifi_nodes_blue_metal_light.png",
|
||||
"scifi_nodes_blue_metal_light.png",
|
||||
"scifi_nodes_blue_metal_light.png",
|
||||
"scifi_nodes_blue_metal_light.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("scifi_nodes:lightstp", {
|
||||
description = "twin lights",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_lightstripe.png"
|
||||
},
|
||||
light_source = 14,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:blklt2", {
|
||||
description = "black stripe light",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_black_light2.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:blumetstr", {
|
||||
description = "blue stripe light",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_blue_metal_stripes2.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_metal,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:glass", {
|
||||
description = "dark glass",
|
||||
drawtype = "glasslike",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_glass.png"
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:whtlightbnd", {
|
||||
description = "white light stripe",
|
||||
sunlight_propagates = false,
|
||||
tiles = {
|
||||
"scifi_nodes_lightband.png"
|
||||
},
|
||||
light_source = 10,
|
||||
paramtype = "light",
|
||||
groups = {cracky=1},
|
||||
sounds = sound_glass,
|
||||
})
|
||||
|
||||
--extra stuff
|
||||
local xpane = minetest.get_modnames()
|
||||
if xpane == xpane then
|
||||
dofile(minetest.get_modpath("scifi_nodes").."/panes.lua")
|
||||
end
|
||||
dofile(minetest.get_modpath("scifi_nodes").."/doors.lua")
|
||||
dofile(minetest.get_modpath("scifi_nodes").."/nodeboxes.lua")
|
||||
dofile(minetest.get_modpath("scifi_nodes").."/models.lua")
|
||||
dofile(minetest.get_modpath("scifi_nodes").."/crafts.lua")
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
License for Code
|
||||
----------------
|
||||
|
||||
Copyright (C) 2016 DOOMED <heiselong@gmx.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
License for Textures, Models and Sounds
|
||||
---------------------------------------
|
||||
|
||||
CC-BY-SA 3.0 UNPORTED. Created by DOOMED
|
||||
|
||||
Code from Minetest_game (chests and furnace):
|
||||
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
LGPL2.1(as shown above)
|
||||
|
||||
With code from(doors.lua):
|
||||
mydoors mod by don
|
||||
license:
|
||||
DO WHAT YOU WANT TO PUBLIC LICENSE
|
||||
or abbreviated DWYWPL
|
||||
|
||||
December 2nd 2015
|
||||
License Copyright (C) 2015 Michael Tomaino (PlatinumArts@gmail.com)
|
||||
www.sandboxgamemaker.com/DWYWPL/
|
||||
|
||||
DO WHAT YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
1. You are allowed to do whatever you want to with what content is using this license.
|
||||
2. This content is provided 'as-is', without any express or implied warranty. In no event
|
||||
will the authors be held liable for any damages arising from the use of this content.
|
||||
|
||||
|
||||
For moreblocks_slope.obj:
|
||||
|
||||
zlib license
|
||||
============
|
||||
|
||||
Copyright (c) 2011-2015 Calinou and contributors
|
||||
|
||||
**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.**
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
**Forum topic:** <https://forum.minetest.net/viewtopic.php?f=11&t=509>
|
|
@ -0,0 +1,65 @@
|
|||
--some code taken from moreblocks(the collision and selection boxes), license below:
|
||||
--Copyright (c) 2011-2015 Calinou and contributors.
|
||||
--Licensed under the zlib license.
|
||||
|
||||
scifi_nodes = {}
|
||||
|
||||
function scifi_nodes.register_slope(name, desc, texture, light)
|
||||
minetest.register_node("scifi_nodes:slope_"..name, {
|
||||
description = desc.." Slope",
|
||||
sunlight_propagates = false,
|
||||
drawtype = "mesh",
|
||||
mesh = "moreblocks_slope.obj",
|
||||
tiles = texture,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
||||
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = light,
|
||||
groups = {cracky=1},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
end
|
||||
|
||||
scifi_nodes.register_slope("white2", "Plastic", {"scifi_nodes_white2.png",}, 0)
|
||||
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("bluebars", "Blue bars", {"scifi_nodes_bluebars.png",}, 0)
|
||||
scifi_nodes.register_slope("mesh2", "Metal floormesh", {"scifi_nodes_mesh2.png",}, 0)
|
||||
scifi_nodes.register_slope("mesh", "Metal mesh", {"scifi_nodes_mesh.png",}, 0)
|
||||
scifi_nodes.register_slope("vent", "Vent", {"scifi_nodes_vent2.png",}, 0)
|
||||
scifi_nodes.register_slope("rlight", "Red light", {"scifi_nodes_redlight.png",}, 10)
|
||||
scifi_nodes.register_slope("blight", "Blue light", {"scifi_nodes_light.png",}, 10)
|
||||
scifi_nodes.register_slope("glight", "Green light", {"scifi_nodes_greenlight.png",}, 10)
|
||||
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_purple.png",}, 0)
|
||||
scifi_nodes.register_slope("gblock", "Gblock", {"scifi_nodes_gblock2_front1.png",}, 0)
|
||||
scifi_nodes.register_slope("greenmetal", "Green metal", {"scifi_nodes_greenmetal.png",}, 0)
|
||||
scifi_nodes.register_slope("bluemetal", "Blue metal", {"scifi_nodes_bluemetal.png",}, 0)
|
||||
scifi_nodes.register_slope("wall", "Metal wall", {"scifi_nodes_wall.png",}, 0)
|
||||
scifi_nodes.register_slope("rough", "Rough metal", {"scifi_nodes_rough.png",}, 0)
|
||||
scifi_nodes.register_slope("blklt2", "Black stripe light", {"scifi_nodes_black_light2.png",}, 10)
|
|
@ -0,0 +1,21 @@
|
|||
# Blender v2.69 (sub 0) OBJ File: 'slope_test_slope_onetexture.blend'
|
||||
# www.blender.org
|
||||
mtllib slope_test_slope_onetexture.mtl
|
||||
o Cube_Cube.002
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1 2/2 3/3 4/4
|
||||
f 4/3 3/4 5/1 6/2
|
||||
f 2/1 5/3 3/4
|
||||
f 1/2 4/3 6/4
|
||||
f 2/1 1/2 6/3 5/4
|
|
@ -0,0 +1,22 @@
|
|||
xpanes.register_pane("doompane", {
|
||||
description = "Doom pane",
|
||||
tiles = {"xpanes_space.png"},
|
||||
drawtype = "airlike",
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
air_equivalent = true,
|
||||
textures = {"scifi_nodes_doompane.png","scifi_nodes_doompane.png","default_wood.png"},
|
||||
inventory_image = "scifi_nodes_doompane.png",
|
||||
wield_image = "scifi_nodes_doompane.png",
|
||||
groups = {cracky=1, pane=1},
|
||||
recipe = {
|
||||
{"default:iron_lump", "default:iron_lump", ""},
|
||||
{"default:iron_lump", "", "default:iron_lump"},
|
||||
{"", "default:iron_lump", "default:iron_lump"}
|
||||
}
|
||||
})
|
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 155 B |
After Width: | Height: | Size: 323 B |
After Width: | Height: | Size: 86 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 836 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 170 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 491 B |
After Width: | Height: | Size: 575 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 108 B |
After Width: | Height: | Size: 157 B |
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 132 B |
After Width: | Height: | Size: 131 B |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 483 B |
After Width: | Height: | Size: 791 B |
After Width: | Height: | Size: 605 B |
After Width: | Height: | Size: 168 B |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 268 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 107 B |
After Width: | Height: | Size: 154 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 240 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 567 B |
After Width: | Height: | Size: 608 B |
After Width: | Height: | Size: 243 B |
After Width: | Height: | Size: 219 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 289 B |
After Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 603 B |
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 419 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 347 B |
After Width: | Height: | Size: 716 B |
After Width: | Height: | Size: 791 B |
After Width: | Height: | Size: 730 B |
After Width: | Height: | Size: 768 B |
After Width: | Height: | Size: 787 B |
After Width: | Height: | Size: 731 B |
After Width: | Height: | Size: 754 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 91 B |
After Width: | Height: | Size: 502 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 637 B |
After Width: | Height: | Size: 270 B |
After Width: | Height: | Size: 691 B |
After Width: | Height: | Size: 275 B |
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 347 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 385 B |
After Width: | Height: | Size: 250 B |
After Width: | Height: | Size: 204 B |
After Width: | Height: | Size: 138 B |
After Width: | Height: | Size: 70 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 164 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 145 B |