Compare commits
1 Commits
2018-09-13
...
master
Author | SHA1 | Date | |
---|---|---|---|
a11527ed63 |
0
.gitignore
vendored
Normal file → Executable file
28
.luacheckrc
@ -1,28 +0,0 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"unpack",
|
||||
"dump",
|
||||
table = { fields = { "copy", "getn" } },
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
"intllib",
|
||||
"default",
|
||||
"stairsplus",
|
||||
"signs_lib",
|
||||
"beds",
|
||||
"technic",
|
||||
"mesecon",
|
||||
"unifieddyes",
|
||||
"creative",
|
||||
"homedecor_i18n",
|
||||
}
|
||||
|
||||
globals = {
|
||||
"armor",
|
||||
}
|
||||
|
65
README
Normal file → Executable file
@ -1,8 +1,61 @@
|
||||
This is what I consider to be a fairly feature-filled home decor modpack.
|
||||
See the forum thread at
|
||||
https://forum.minetest.net/viewtopic.php?f=11&t=2041 for details about
|
||||
this modpack.
|
||||
This is what I consider to be a fairly feature-filled home decor
|
||||
modpack. As such, it comes in multiple parts:
|
||||
|
||||
Dependencies: unifieddyes and a Minetest engine build newer than 2017-01-23.
|
||||
* The actual homedecor mod, which supplies a bunch of stuff found in
|
||||
most homes (like flower pots, home electronics, brass and wrought-iron
|
||||
tables, and a bunch of other things).
|
||||
|
||||
Recommends: signs_lib, windmill, moreblocks, unified_inventory.
|
||||
* A "3d extras" mod, which supplies things that re-define something in
|
||||
some other mod (or in the default game) so that those objects become
|
||||
fully 3d (instead of a flat cube), as well as things which are directly
|
||||
related. This mod, for example, provides 3d bookshelves and their empty
|
||||
and half-depth "open frame" counterparts.
|
||||
|
||||
* A signs library forked from the one that thexyz and PilzAdam first
|
||||
made, which produces visible text on signs (and which has been extended
|
||||
to put signs on fences, including the brass and wrought iron ones here
|
||||
in homedecor).
|
||||
|
||||
* Sdzen's building_blocks mod, which is here to supply not only a few
|
||||
blocks to build with, obviously, :-) but also to supply a number of
|
||||
materials to craft other things in Homedecor with.
|
||||
|
||||
All items can be accessed either by crafting various other items
|
||||
together, or with the usual /give commands. To get a list of the actual
|
||||
node names, just go into the homedecor/ folder and run the listnodes.sh
|
||||
Bash script. Note that a few of the listed nodes are kinda useless by
|
||||
themselves (like the various parts of the folding doors).
|
||||
|
||||
All of the images used for the recipes in the forum post tracking this
|
||||
mod are included in the crafting-guide/ folder.
|
||||
|
||||
Most stuff can be made from materials found through a game world. Some
|
||||
stuff can only be crafted by using materials from another mod (look for
|
||||
the orange highlights). Currently, this mod can use materials from
|
||||
moreores, mesecons, wool, and unifieddyes if present. You can still use
|
||||
the usual /give commands to get the items that depend on these mods if
|
||||
you don't use them installed.
|
||||
|
||||
This mod is still a work-in-progress, but should be complete enough not
|
||||
to irritate anyone. :-) Namely, many items can be used as fuel but the
|
||||
burn times need tuning and I need to tune the cook time and fuel usage
|
||||
on the four smelted items.
|
||||
|
||||
Much of the code (especially for the doors) plus the bucket were taken
|
||||
from the files which come with Minetest and altered to suit. Many
|
||||
thanks to Jeija for coming up with an elegant cylinder using nodeboxes;
|
||||
see his 'irregular' mods). His code is used herein (you can guess where
|
||||
:-) ).
|
||||
|
||||
Dependencies: none (just the game's default stuff)
|
||||
|
||||
Recommends: buckets, flowers, unifieddyes, junglegrass, moreores,
|
||||
mesecons, wool
|
||||
|
||||
Skin credits:
|
||||
|
||||
Mammu by hansuke123
|
||||
http://minetest.fensta.bplaced.net/#name=Mammu
|
||||
|
||||
BrightGirl by Malarif
|
||||
http://minetest.fensta.bplaced.net/#name=BrightGirl
|
||||
|
19
bower.json
@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "homedecor_modpack",
|
||||
"description": "This mod adds a whole bunch of new items to Minetest suitable for decorating inside and outside a home.",
|
||||
"keywords": [
|
||||
"building",
|
||||
"cosmetic",
|
||||
"homedecor modpack",
|
||||
"homedecor_modpack"
|
||||
],
|
||||
"homepage": "http://daconcepts.com/vanessa/hobbies/minetest/homedecor-crafting-guide/homedecor-craft-guide.html",
|
||||
"project": "https://github.com/minetest-mods/homedecor_modpack",
|
||||
"forum": "http://forum.minetest.net/viewtopic.php?f=11&t=2041",
|
||||
"screenshots": [
|
||||
"http://daconcepts.com/vanessa/hobbies/minetest/screenshots/homedecor1.png"
|
||||
],
|
||||
"authors": [
|
||||
"VanessaE"
|
||||
]
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
minetest.register_alias("building_blocks:stair_tar", "stairs:stair_Tar")
|
||||
minetest.register_alias("building_blocks:slab_marble", "stairs:slab_Marble")
|
||||
minetest.register_alias("building_blocks:stair_marble", "stairs:stair_Marble")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
stairsplus:register_alias_all("moreblocks", "tar", "building_blocks", "Tar")
|
||||
end
|
||||
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
4
building_blocks/depends.txt
Normal file → Executable file
@ -1,4 +1,2 @@
|
||||
default
|
||||
homedecor_i18n
|
||||
moreblocks?
|
||||
stairs?
|
||||
moreblocks?
|
623
building_blocks/init.lua
Normal file → Executable file
@ -1,7 +1,618 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local modpath = minetest.get_modpath("building_blocks")
|
||||
minetest.register_node("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = "Adobe",
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = "Roof block",
|
||||
groups = {snappy=3},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:terrycloth_towel 2',
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Tarmac_spread 4',
|
||||
recipe = {
|
||||
{"group:tar_block", "group:tar_block"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:gravel_spread 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:gravel", "default:gravel"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:brobble_spread 4',
|
||||
recipe = {
|
||||
{"default:brick", "default:cobble", "default:brick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Fireplace 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Adobe 3',
|
||||
recipe = {
|
||||
{"default:sand"},
|
||||
{"default:clay"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
dofile(modpath.."/node_stairs.lua")
|
||||
dofile(modpath.."/others.lua")
|
||||
dofile(modpath.."/recipes.lua")
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Roofing 10',
|
||||
recipe = {
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:BWtile 10',
|
||||
recipe = {
|
||||
{"group:marble", "group:tar_block"},
|
||||
{"group:tar_block", "group:marble"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:grate 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:glass", "default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:woodglass 1',
|
||||
recipe = {
|
||||
{"default:wood"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:wood", "default:junglewood"},
|
||||
{"default:junglewood", "default:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:junglewood", "default:wood"},
|
||||
{"default:wood", "default:junglewood"},
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks 2',
|
||||
recipe = {
|
||||
{'group:stick', '' , 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', '', 'group:stick'},
|
||||
{'', 'group:stick', ''},
|
||||
{'group:stick', '', 'group:stick'},
|
||||
} -- MODIFICATION MADE FOR MFF ^
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:fakegrass 2',
|
||||
recipe = {
|
||||
{'default:leaves'},
|
||||
{"default:dirt"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 2',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 2',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:smoothglass",
|
||||
recipe = "default:glass"
|
||||
})
|
||||
minetest.register_node("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = "Streak Free Glass",
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_sglass.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = "Grate",
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_grate.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = "Fireplace",
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron_fireplace.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = "Wood Framed Glass",
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_wglass.png"),
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = "Terrycloth towel",
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = "Tarmac Spread",
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "raillike",
|
||||
description = "Chess board tiling",
|
||||
tiles = {"building_blocks_BWtile.png"},
|
||||
inventory_image = "building_blocks_bwtile_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
description = "Brobble Spread",
|
||||
tiles = {"building_blocks_brobble.png"},
|
||||
inventory_image = "building_blocks_brobble_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = "Gravel Spread",
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_gravel_footstep", gain=0.5},
|
||||
dug = {name="default_gravel_footstep", gain=1.0},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = "Hardwood",
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"marble",
|
||||
"building_blocks:Marble",
|
||||
{
|
||||
description = "Marble",
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"hardwood",
|
||||
"building_blocks:hardwood",
|
||||
{
|
||||
description = "Hardwood",
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"fakegrass",
|
||||
"building_blocks:fakegrass",
|
||||
{
|
||||
description = "Grass",
|
||||
tiles = {"default_grass.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"tar",
|
||||
"building_blocks:Tar",
|
||||
{
|
||||
description = "Tar",
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
groups = {crumbly=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"grate",
|
||||
"building_blocks:grate",
|
||||
{
|
||||
description = "Grate",
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"Adobe",
|
||||
"building_blocks:Adobe",
|
||||
{
|
||||
description = "Adobe",
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
stairsplus:register_all(
|
||||
"building_blocks",
|
||||
"Roofing",
|
||||
"building_blocks:Roofing",
|
||||
{
|
||||
description = "Roofing",
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}
|
||||
)
|
||||
else
|
||||
bb_stairs = {}
|
||||
|
||||
-- Node will be called stairs:stair_<subname>
|
||||
function bb_stairs.register_stair(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("building_blocks:stair_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
-- Flipped recipe for the silly minecrafters
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{"", "", recipeitem},
|
||||
{"", recipeitem, recipeitem},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Node will be called stairs:slab_<subname>
|
||||
function bb_stairs.register_slab(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("building_blocks:slab_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tiles = images,
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:slab_' .. subname .. ' 3',
|
||||
recipe = {
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Nodes will be called stairs:{stair,slab}_<subname>
|
||||
function bb_stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
||||
bb_stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
||||
bb_stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
||||
end
|
||||
bb_stairs.register_stair_and_slab("marble","building_blocks:Marble",
|
||||
{cracky=3},
|
||||
{"building_blocks_marble.png"},
|
||||
"Marble stair",
|
||||
"Marble slab"
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("hardwood","building_blocks:hardwood",
|
||||
{choppy=1,flammable=1},
|
||||
{"building_blocks_hardwood.png"},
|
||||
"Hardwood stair",
|
||||
"Hardwood slab"
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("fakegrass","building_blocks:fakegrass",
|
||||
{crumbly=3},
|
||||
{"default_grass.png"},
|
||||
"Grass stair",
|
||||
"Grass slab"
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("tar","building_blocks:Tar",
|
||||
{crumbly=1},
|
||||
{"building_blocks_tar.png"},
|
||||
"Tar stair",
|
||||
"Tar slab"
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("grate","building_blocks:grate",
|
||||
{cracky=1},
|
||||
{"building_blocks_grate.png"},
|
||||
"Grate Stair",
|
||||
"Grate Slab"
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Adobe", "building_blocks:Adobe",
|
||||
{crumbly=3},
|
||||
{"building_blocks_Adobe.png"},
|
||||
"Adobe stair",
|
||||
"Adobe slab"
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Roofing", "building_blocks:Roofing",
|
||||
{snappy=3},
|
||||
{"building_blocks_Roofing.png"},
|
||||
"Roofing stair",
|
||||
"Roofing slab"
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:hardwood",
|
||||
burntime = 28,
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = "Fake Grass",
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = "Small bundle of sticks",
|
||||
image = "building_blocks_sticks.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:tar_base", {
|
||||
description = "Tar base",
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
--Tar
|
||||
--[[minetest.register_craft({
|
||||
output = 'building_blocks:knife 1',
|
||||
recipe = {
|
||||
{"group:tar_block"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
--]] -- Modif MFF, remove this useless tool
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
|
||||
minetest.register_node("building_blocks:Tar", {
|
||||
description = "Tar",
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, tar_block = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Marble", {
|
||||
description = "Marble",
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:sticks",
|
||||
burntime = 5,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:Tar",
|
||||
burntime = 40,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:Tar",
|
||||
recipe = "building_blocks:tar_base",
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = "Tar Knife",
|
||||
inventory_image = "building_blocks_knife.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses = 100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses = 100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "building_blocks:Marble 9",
|
||||
recipe = {
|
||||
{"default:clay", "group:tar_block", "default:clay"},
|
||||
{"group:tar_block","default:clay", "group:tar_block"},
|
||||
{"default:clay", "group:tar_block","default:clay"},
|
||||
}
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = "Granite",
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description="Granite",
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -1,226 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local stairs_groups_names = {"cracky","choppy","flammable","crumbly","snappy"}
|
||||
|
||||
local function building_blocks_stairs(nodename, def)
|
||||
minetest.register_node(nodename, def)
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
local mod, name = nodename:match("(.*):(.*)")
|
||||
minetest.register_alias(mod .. ":slab_" .. name, "stairs:slab_" .. name)
|
||||
minetest.register_alias(mod .. ":stair_" .. name, "stairs:stair_" .. name)
|
||||
local stairs_groups = {}
|
||||
for _, groupname in ipairs(stairs_groups_names) do
|
||||
stairs_groups[groupname] = def.groups[groupname]
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all(
|
||||
mod,
|
||||
name,
|
||||
nodename,
|
||||
{
|
||||
description = def.description,
|
||||
tiles = def.tiles,
|
||||
groups = stairs_groups,
|
||||
sounds = def.sounds,
|
||||
}
|
||||
)
|
||||
else
|
||||
stairs.register_stair_and_slab(name,nodename,
|
||||
stairs_groups,
|
||||
def.tiles,
|
||||
("%s Stair"):format(def.description),
|
||||
("%s Slab"):format(def.description),
|
||||
def.sounds
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
building_blocks_stairs("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Streak Free Glass"),
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = S("Wood Framed Glass"),
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {snappy=3,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
building_blocks_stairs("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = S("Adobe"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = S("Fake Grass"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_grass_footstep", gain=0.4},
|
||||
}),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Hardwood"),
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = S("Roof block"),
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Tar", {
|
||||
description = S("Tar"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=1, tar_block = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
building_blocks_stairs("building_blocks:Marble", {
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
-- Translators: "Brobble" is a portmanteau of "Brick" and "Cobble".
|
||||
-- Translate however you see fit.
|
||||
description = S("Brobble Spread"),
|
||||
tiles = {"building_blocks_brobble.png"},
|
||||
inventory_image = "building_blocks_brobble_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Gravel Spread"),
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=2},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name="default_gravel_footstep", gain=0.5},
|
||||
dug = {name="default_gravel_footstep", gain=1.0},
|
||||
}),
|
||||
})
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = S("Tarmac Spread"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = S("Terrycloth towel"),
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Chess board tiling"),
|
||||
tiles = {
|
||||
"building_blocks_BWtile.png",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png^[transformR90",
|
||||
"building_blocks_BWtile.png",
|
||||
"building_blocks_BWtile.png"
|
||||
},
|
||||
inventory_image = "building_blocks_bwtile_inv.png",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = S("Fireplace"),
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron_fireplace.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
@ -1,23 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = S("Small bundle of sticks"),
|
||||
image = "building_blocks_sticks.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
minetest.register_craftitem("building_blocks:tar_base", {
|
||||
description = S("Tar base"),
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = S("Tar Knife"),
|
||||
inventory_image = "building_blocks_knife.png",
|
||||
tool_capabilities = {
|
||||
max_drop_level=0,
|
||||
groupcaps={
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses=100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
@ -1,170 +0,0 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks 2',
|
||||
recipe = {
|
||||
{'group:stick', '' , 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', 'group:stick'},
|
||||
{'group:stick', 'group:stick'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Adobe 3',
|
||||
recipe = {
|
||||
{"default:sand"},
|
||||
{"default:clay"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:brobble_spread 4',
|
||||
recipe = {
|
||||
{"default:brick", "default:cobble", "default:brick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:BWtile 10',
|
||||
recipe = {
|
||||
{"group:marble", "group:tar_block"},
|
||||
{"group:tar_block", "group:marble"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:fakegrass 2',
|
||||
recipe = {
|
||||
{'default:leaves'},
|
||||
{"default:dirt"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Fireplace 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "building_blocks:sticks", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:grate 1',
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:glass", "default:glass"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:gravel_spread 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:gravel", "default:gravel"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:wood", "default:junglewood"},
|
||||
{"default:junglewood", "default:wood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:hardwood 2',
|
||||
recipe = {
|
||||
{"default:junglewood", "default:wood"},
|
||||
{"default:wood", "default:junglewood"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:knife 1',
|
||||
recipe = {
|
||||
{"group:tar_block"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "building_blocks:Marble 9",
|
||||
recipe = {
|
||||
{"default:clay", "group:tar_block", "default:clay"},
|
||||
{"group:tar_block","default:clay", "group:tar_block"},
|
||||
{"default:clay", "group:tar_block","default:clay"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Roofing 10',
|
||||
recipe = {
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
{"building_blocks:Adobe", "building_blocks:Adobe"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'building_blocks:sticks'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:Tarmac_spread 4',
|
||||
recipe = {
|
||||
{"group:tar_block", "group:tar_block"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:terrycloth_towel 2',
|
||||
recipe = {
|
||||
{"farming:string", "farming:string", "farming:string"},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:woodglass 1',
|
||||
recipe = {
|
||||
{"default:wood"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:smoothglass",
|
||||
recipe = "default:glass"
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "building_blocks:Tar",
|
||||
recipe = "building_blocks:tar_base",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:hardwood",
|
||||
burntime = 28,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:sticks",
|
||||
burntime = 5,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "building_blocks:Tar",
|
||||
burntime = 40,
|
||||
})
|
0
building_blocks/textures/building_blocks_Adobe.png
Normal file → Executable file
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
0
building_blocks/textures/building_blocks_BWtile.png
Normal file → Executable file
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
0
building_blocks/textures/building_blocks_Roofing.png
Normal file → Executable file
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
0
building_blocks/textures/building_blocks_brobble.png
Normal file → Executable file
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
BIN
building_blocks/textures/building_blocks_brobble_spread_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 8.6 KiB |
BIN
building_blocks/textures/building_blocks_bwtile_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.3 KiB |
0
building_blocks/textures/building_blocks_cast_iron.png
Normal file → Executable file
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
0
building_blocks/textures/building_blocks_cast_iron_fireplace.png
Normal file → Executable file
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
0
building_blocks/textures/building_blocks_grate.png
Normal file → Executable file
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
0
building_blocks/textures/building_blocks_grate2.png
Normal file → Executable file
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
BIN
building_blocks/textures/building_blocks_gravel_spread_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.3 KiB |
0
building_blocks/textures/building_blocks_hardwood.png
Normal file → Executable file
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
0
building_blocks/textures/building_blocks_knife.png
Normal file → Executable file
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
0
building_blocks/textures/building_blocks_marble.png
Normal file → Executable file
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
0
building_blocks/textures/building_blocks_sglass.png
Normal file → Executable file
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
0
building_blocks/textures/building_blocks_sticks.png
Normal file → Executable file
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
0
building_blocks/textures/building_blocks_tar.png
Normal file → Executable file
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
0
building_blocks/textures/building_blocks_tar_base.png
Normal file → Executable file
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
0
building_blocks/textures/building_blocks_tar_spread_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
0
building_blocks/textures/building_blocks_towel.png
Normal file → Executable file
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 409 B |
BIN
building_blocks/textures/building_blocks_towel_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.0 KiB |
0
building_blocks/textures/building_blocks_wglass.png
Normal file → Executable file
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
0
building_blocks/textures/technic_granite.png
Normal file → Executable file
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
3
chains/depends.txt
Normal file → Executable file
@ -1,2 +1 @@
|
||||
default
|
||||
homedecor
|
||||
default
|
25
chains/init.lua
Normal file → Executable file
@ -1,21 +1,18 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local chains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
|
||||
fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
|
||||
}
|
||||
|
||||
local topchains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{ -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
|
||||
{ -0.1, -0.5, -0.1, 0.1, 0.4, 0.1 }
|
||||
{ -0.1, -0.625, -0.1, 0.1, 0.4, 0.1 }
|
||||
}
|
||||
}
|
||||
|
||||
minetest.register_node("chains:chain", {
|
||||
description = S("Hanging chain (wrought iron)"),
|
||||
description = "Hanging chain (wrought iron)",
|
||||
drawtype = "mesh",
|
||||
mesh = "chains.obj",
|
||||
tiles = {"chains_wrought_iron.png"},
|
||||
@ -29,7 +26,7 @@ minetest.register_node("chains:chain", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_brass", {
|
||||
description = S("Hanging chain (brass)"),
|
||||
description = "Hanging chain (brass)",
|
||||
drawtype = "mesh",
|
||||
mesh = "chains.obj",
|
||||
tiles = {"chains_brass.png"},
|
||||
@ -43,7 +40,7 @@ minetest.register_node("chains:chain_brass", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_top", {
|
||||
description = S("Hanging chain (ceiling mount, wrought iron)"),
|
||||
description = "Hanging chain (ceiling mount, wrought iron)",
|
||||
drawtype = "mesh",
|
||||
mesh = "top_chains.obj",
|
||||
tiles = {"chains_wrought_iron.png"},
|
||||
@ -57,7 +54,7 @@ minetest.register_node("chains:chain_top", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_top_brass", {
|
||||
description = S("Hanging chain (ceiling mount, brass)"),
|
||||
description = "Hanging chain (ceiling mount, brass)",
|
||||
drawtype = "mesh",
|
||||
mesh = "top_chains.obj",
|
||||
tiles = {"chains_brass.png"},
|
||||
@ -71,12 +68,13 @@ minetest.register_node("chains:chain_top_brass", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chandelier", {
|
||||
description = S("Chandelier (wrought iron)"),
|
||||
description = "Chandelier (wrought iron)",
|
||||
paramtype = "light",
|
||||
light_source = 12,
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
"chains_wrought_iron.png",
|
||||
"chains_candle.png",
|
||||
@ -97,12 +95,13 @@ minetest.register_node("chains:chandelier", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chandelier_brass", {
|
||||
description = S("Chandelier (brass)"),
|
||||
description = "Chandelier (brass)",
|
||||
paramtype = "light",
|
||||
light_source = 12,
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
"chains_brass.png",
|
||||
"chains_candle.png",
|
||||
|
0
chains/models/chains.obj
Normal file → Executable file
0
chains/models/chains_chandelier.obj
Normal file → Executable file
0
chains/models/top_chains.obj
Normal file → Executable file
0
chains/textures/chain_brass_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
chains/textures/chain_wrought_iron_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
chains/textures/chains_brass.png
Normal file → Executable file
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
0
chains/textures/chains_candle.png
Normal file → Executable file
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
BIN
chains/textures/chains_candle_flame.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
0
chains/textures/chains_wrought_iron.png
Normal file → Executable file
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 386 B |
BIN
chains/textures/top_chain_brass_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
chains/textures/top_chain_wrought_iron_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
0
computer/CHANGES.txt
Normal file → Executable file
0
computer/README.txt
Normal file → Executable file
0
computer/TODO.txt
Normal file → Executable file
41
computer/computers.lua
Normal file → Executable file
@ -1,6 +1,3 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
-- Amiga 500 lookalike
|
||||
computer.register("computer:shefriendSOO", {
|
||||
description = "SheFriendSOO",
|
||||
@ -32,7 +29,6 @@ minetest.register_node("computer:vanio", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
node.name = "computer:vanio_off"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
@ -52,7 +48,6 @@ minetest.register_node("computer:vanio_off", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
node.name = "computer:vanio"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
@ -153,19 +148,6 @@ computer.register("computer:admiral128", {
|
||||
})
|
||||
})
|
||||
|
||||
-- XBox lookalike
|
||||
computer.register("computer:hueg_box", {
|
||||
description = "HUEG Box",
|
||||
tiles_off = { },
|
||||
node_box = computer.pixelnodebox(16, {
|
||||
-- X Y Z W H L
|
||||
{ 0, 0, 7, 16, 6, 9 }, -- Console
|
||||
{ 2, 0, 1, 11, 3, 6 }, -- Controller
|
||||
{ 2, 0, 0, 2, 3, 1 },
|
||||
{ 11, 0, 0, 2, 3, 1 },
|
||||
})
|
||||
})
|
||||
|
||||
-- Generic Flat Screen LCD (16x9) with keyboard
|
||||
local mo_sbox = {
|
||||
type = "fixed",
|
||||
@ -173,7 +155,7 @@ local mo_sbox = {
|
||||
}
|
||||
|
||||
minetest.register_node("computer:monitor", {
|
||||
description = S("Monitor and keyboard"),
|
||||
description = "Monitor and keyboard",
|
||||
inventory_image = "computer_monitor_inv.png",
|
||||
drawtype = "mesh",
|
||||
mesh = "computer_monitor.obj",
|
||||
@ -186,11 +168,11 @@ minetest.register_node("computer:monitor", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
node.name = "computer:monitor_on"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("computer:monitor_on", {
|
||||
description = "Monitor and keyboard",
|
||||
drawtype = "mesh",
|
||||
mesh = "computer_monitor.obj",
|
||||
tiles = {"monitor_display.png^[transformFX", "monitor_plastic.png", "computer_black.png", "monitor_plastic.png"},
|
||||
@ -204,7 +186,6 @@ minetest.register_node("computer:monitor_on", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
node.name = "computer:monitor"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
@ -215,7 +196,7 @@ minetest.register_alias("computer:monitor_desktop", "computer:monitor")
|
||||
|
||||
--WIFI Router (linksys look-a-like)
|
||||
minetest.register_node("computer:router", {
|
||||
description = S("WIFI Router"),
|
||||
description = "WIFI Router",
|
||||
inventory_image = "computer_router_inv.png",
|
||||
tiles = {"computer_router_t.png","computer_router_bt.png","computer_router_l.png","computer_router_r.png","computer_router_b.png",
|
||||
{name="computer_router_f_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.0}},}, --"computer_router_f.png"},
|
||||
@ -243,7 +224,7 @@ local pct_cbox = {
|
||||
|
||||
--Modern PC Tower
|
||||
minetest.register_node("computer:tower", {
|
||||
description = S("Computer Tower"),
|
||||
description = "Computer Tower",
|
||||
inventory_image = "computer_tower_inv.png",
|
||||
drawtype = "mesh",
|
||||
mesh = "computer_tower.obj",
|
||||
@ -260,7 +241,7 @@ minetest.register_alias("computer:tower_on", "computer:tower")
|
||||
|
||||
-- Printer/scaner combo
|
||||
minetest.register_node("computer:printer", {
|
||||
description = S("Printer-Scanner Combo"),
|
||||
description = "Printer Scaner Combo",
|
||||
inventory_image = "computer_printer_inv.png",
|
||||
tiles = {"computer_printer_t.png","computer_printer_bt.png","computer_printer_l.png",
|
||||
"computer_printer_r.png","computer_printer_b.png","computer_printer_f.png"},
|
||||
@ -288,7 +269,7 @@ minetest.register_node("computer:printer", {
|
||||
--Rack Server
|
||||
minetest.register_node("computer:server", {
|
||||
drawtype = "nodebox",
|
||||
description = S("Rack Server"),
|
||||
description = "Rack Server",
|
||||
tiles = {
|
||||
'computer_server_t.png',
|
||||
'computer_server_bt.png',
|
||||
@ -313,14 +294,12 @@ minetest.register_node("computer:server", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
node.name = "computer:server_on"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
|
||||
minetest.chat_send_player( placer:get_player_name(),
|
||||
S("Not enough vertical space to place a server!" ))
|
||||
return itemstack
|
||||
minetest.chat_send_player( placer:get_player_name(), "Not enough vertical space to place a server!" )
|
||||
return
|
||||
end
|
||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||
end
|
||||
@ -328,11 +307,12 @@ minetest.register_node("computer:server", {
|
||||
|
||||
minetest.register_node("computer:server_on", {
|
||||
drawtype = "nodebox",
|
||||
description = "Rack Server",
|
||||
tiles = {
|
||||
'computer_server_t.png',
|
||||
'computer_server_bt.png',
|
||||
'computer_server_l.png',
|
||||
'computer_server_r.png',
|
||||
'computer_server_l.png',
|
||||
'computer_server_bt.png',
|
||||
'computer_server_f_on.png',
|
||||
},
|
||||
@ -353,6 +333,5 @@ minetest.register_node("computer:server_on", {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
node.name = "computer:server"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
3
computer/depends.txt
Normal file → Executable file
@ -1,2 +1,3 @@
|
||||
default
|
||||
homedecor_i18n
|
||||
intllib?
|
||||
|
||||
|
43
computer/init.lua
Normal file → Executable file
@ -2,18 +2,19 @@ computer = {}
|
||||
screwdriver = screwdriver or {}
|
||||
|
||||
computer.register = function (name, def)
|
||||
local nodename = name
|
||||
if (name:sub(1, 1) == ":") then name = name:sub(2) end
|
||||
local modname, basename = name:match("^([^:]+):(.*)")
|
||||
local TEXPFX = modname.."_"..basename.."_"
|
||||
local ONSTATE = modname..":"..basename
|
||||
local OFFSTATE = modname..":"..basename.."_off"
|
||||
local cdef = table.copy(def)
|
||||
local def = def
|
||||
minetest.register_node(ONSTATE, {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
description = cdef.description,
|
||||
inventory_image = cdef.inventory_image,
|
||||
description = def.description,
|
||||
inventory_image = def.inventory_image,
|
||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
|
||||
tiles = {
|
||||
TEXPFX.."tp.png",
|
||||
@ -23,15 +24,14 @@ computer.register = function (name, def)
|
||||
TEXPFX.."bk.png",
|
||||
TEXPFX.."ft.png"
|
||||
},
|
||||
node_box = cdef.node_box,
|
||||
selection_box = cdef.node_box,
|
||||
node_box = def.node_box,
|
||||
selection_box = def.node_box,
|
||||
on_rightclick = function (pos, node, clicker, itemstack)
|
||||
if cdef.on_turn_off and cdef.on_turn_off(pos, node, clicker, itemstack) then
|
||||
return itemstack
|
||||
if (def.on_turn_off) then
|
||||
if (def.on_turn_off(pos, node, clicker, itemstack)) then return end
|
||||
end
|
||||
node.name = OFFSTATE
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
minetest.register_node(OFFSTATE, {
|
||||
@ -40,32 +40,34 @@ computer.register = function (name, def)
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
tiles = {
|
||||
(TEXPFX.."tp"..(cdef.tiles_off.top and "_off" or "")..".png"),
|
||||
(TEXPFX.."bt"..(cdef.tiles_off.bottom and "_off" or "")..".png"),
|
||||
(TEXPFX.."rt"..(cdef.tiles_off.right and "_off" or "")..".png"),
|
||||
(TEXPFX.."lt"..(cdef.tiles_off.left and "_off" or "")..".png"),
|
||||
(TEXPFX.."bk"..(cdef.tiles_off.back and "_off" or "")..".png"),
|
||||
(TEXPFX.."ft"..(cdef.tiles_off.front and "_off" or "")..".png")
|
||||
(TEXPFX.."tp"..(def.tiles_off.top and "_off" or "")..".png"),
|
||||
(TEXPFX.."bt"..(def.tiles_off.bottom and "_off" or "")..".png"),
|
||||
(TEXPFX.."rt"..(def.tiles_off.right and "_off" or "")..".png"),
|
||||
(TEXPFX.."lt"..(def.tiles_off.left and "_off" or "")..".png"),
|
||||
(TEXPFX.."bk"..(def.tiles_off.back and "_off" or "")..".png"),
|
||||
(TEXPFX.."ft"..(def.tiles_off.front and "_off" or "")..".png")
|
||||
},
|
||||
node_box = cdef.node_box_off or cdef.node_box,
|
||||
selection_box = cdef.node_box_off or cdef.node_box,
|
||||
node_box = def.node_box_off or def.node_box,
|
||||
selection_box = def.node_box_off or def.node_box,
|
||||
on_rightclick = function (pos, node, clicker, itemstack)
|
||||
if cdef.on_turn_on and cdef.on_turn_on(pos, node, clicker, itemstack) then
|
||||
return itemstack
|
||||
if (def.on_turn_on) then
|
||||
if (def.on_turn_on(pos, node, clicker, itemstack)) then return end
|
||||
end
|
||||
node.name = ONSTATE
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end,
|
||||
drop = ONSTATE
|
||||
})
|
||||
end
|
||||
|
||||
computer.register_handheld = function (name, def)
|
||||
local nodename = name
|
||||
if (name:sub(1, 1) == ":") then name = name:sub(2) end
|
||||
local modname, basename = name:match("^([^:]+):(.*)")
|
||||
local TEXPFX = modname.."_"..basename.."_inv"
|
||||
local ONSTATE = modname..":"..basename
|
||||
local OFFSTATE = modname..":"..basename.."_off"
|
||||
local on_use = def.on_use
|
||||
minetest.register_craftitem(ONSTATE, {
|
||||
description = def.description,
|
||||
inventory_image = TEXPFX..".png",
|
||||
@ -75,7 +77,8 @@ end
|
||||
|
||||
computer.pixelnodebox = function (size, boxes)
|
||||
local fixed = { }
|
||||
for _, box in ipairs(boxes) do
|
||||
local i, box
|
||||
for i, box in ipairs(boxes) do
|
||||
local x, y, z, w, h, l = unpack(box)
|
||||
fixed[#fixed + 1] = {
|
||||
(x / size) - 0.5,
|
||||
|
6
computer/locale/es.txt
Executable file
@ -0,0 +1,6 @@
|
||||
|
||||
# Language: Español
|
||||
# Author: Diego Martínez <lkaezadl3@gmail.com>
|
||||
|
||||
Plastic sheet = Placa de Plastico
|
||||
Unprocessed Plastic base = Base de Plastico No Procesada
|
3
computer/miscitems.lua
Normal file → Executable file
@ -4,7 +4,8 @@
|
||||
|
||||
-- This file defines some items in order to not have to depend on other mods.
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
|
||||
|
||||
if (not minetest.get_modpath("homedecor")) then
|
||||
|
||||
|
0
computer/models/computer_laptop.obj
Normal file → Executable file
0
computer/models/computer_laptop_closed.obj
Normal file → Executable file
0
computer/models/computer_monitor.obj
Normal file → Executable file
0
computer/models/computer_tower.obj
Normal file → Executable file
0
computer/models/tetris_arcade.obj
Normal file → Executable file
0
computer/recipes.lua
Normal file → Executable file
29
computer/tetris.lua
Normal file → Executable file
@ -1,6 +1,3 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local shapes = {
|
||||
{ { x = {0, 1, 0, 1}, y = {0, 0, 1, 1} } },
|
||||
|
||||
@ -33,12 +30,12 @@ local colors = { "computer_cyan.png", "computer_magenta.png", "computer_red.png"
|
||||
|
||||
local background = "image[0,0;3.55,6.66;computer_black.png]"
|
||||
local buttons = "button[3,4.5;0.6,0.6;left;<]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;"..minetest.formspec_escape(S("L")).."]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;L]"
|
||||
.."button[4.2,4.5;0.6,0.6;down;v]"
|
||||
.."button[4.2,5.3;0.6,0.6;drop;V]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;"..minetest.formspec_escape(S("R")).."]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;R]"
|
||||
.."button[5.4,4.5;0.6,0.6;right;>]"
|
||||
.."button[3.5,3;2,2;new;"..minetest.formspec_escape(S("New Game")).."]"
|
||||
.."button[3.5,3;2,2;new;New Game]"
|
||||
|
||||
local formsize = "size[5.9,5.7]"
|
||||
local boardx, boardy = 0, 0
|
||||
@ -74,7 +71,7 @@ local function step(pos, fields)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local t = minetest.deserialize(meta:get_string("tetris"))
|
||||
|
||||
local function new_game(p)
|
||||
local function new_game(pos)
|
||||
local nex = math.random(7)
|
||||
|
||||
t = {
|
||||
@ -87,7 +84,7 @@ local function step(pos, fields)
|
||||
x=4, y=0, rot=1
|
||||
}
|
||||
|
||||
local timer = minetest.get_node_timer(p)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:set(0.3, 0)
|
||||
end
|
||||
|
||||
@ -231,7 +228,7 @@ local function step(pos, fields)
|
||||
local scr = { formsize, background,
|
||||
t.boardstring, t.previewstring,
|
||||
draw_shape(t.cur, t.x, t.y, t.rot, boardx, boardy),
|
||||
"label[3.8,0.1;"..S("Next...").."]label[3.8,2.7;"..S("Score: "),
|
||||
"label[3.8,0.1;Next...]label[3.8,2.7;Score: ",
|
||||
t.score, close, buttons }
|
||||
|
||||
|
||||
@ -244,7 +241,7 @@ local function step(pos, fields)
|
||||
end
|
||||
|
||||
minetest.register_node("computer:tetris_arcade", {
|
||||
description=S("Tetris Arcade"),
|
||||
description="Tetris Arcade",
|
||||
drawtype = "mesh",
|
||||
mesh = "tetris_arcade.obj",
|
||||
tiles = {"tetris_arcade.png"},
|
||||
@ -262,8 +259,7 @@ minetest.register_node("computer:tetris_arcade", {
|
||||
},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", formsize
|
||||
.."button[2,2.5;2,2;new;"..minetest.formspec_escape(S("New Game")).."]"
|
||||
meta:set_string("formspec", formsize.."button[2,2.5;2,2;new;New Game]"
|
||||
..default.gui_bg..default.gui_bg_img..default.gui_slots)
|
||||
end,
|
||||
on_timer = function(pos)
|
||||
@ -274,14 +270,9 @@ minetest.register_node("computer:tetris_arcade", {
|
||||
end,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
if minetest.is_protected(pos, placer:get_player_name()) or
|
||||
minetest.is_protected({x=pos.x, y=pos.y+1, z=pos.z}, placer:get_player_name()) then
|
||||
return itemstack
|
||||
end
|
||||
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" then
|
||||
minetest.chat_send_player(placer:get_player_name(), S("No room for place the Arcade!"))
|
||||
return itemstack
|
||||
end
|
||||
minetest.chat_send_player(placer:get_player_name(), "No room for place the Arcade!")
|
||||
return end
|
||||
local dir = placer:get_look_dir()
|
||||
local node = {name="computer:tetris_arcade", param1=0, param2 = minetest.dir_to_facedir(dir)}
|
||||
minetest.set_node(pos, node)
|
||||
|
BIN
computer/textures/computer_ad128_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
computer/textures/computer_ad64_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
computer/textures/computer_admiral128_bk.png
Normal file → Executable file
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 115 B |
BIN
computer/textures/computer_admiral128_bt.png
Normal file → Executable file
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 115 B |
0
computer/textures/computer_admiral128_ft.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
computer/textures/computer_admiral128_lt.png
Normal file → Executable file
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 117 B |
BIN
computer/textures/computer_admiral128_rt.png
Normal file → Executable file
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 117 B |
BIN
computer/textures/computer_admiral128_tp.png
Normal file → Executable file
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 247 B |
BIN
computer/textures/computer_admiral64_bk.png
Normal file → Executable file
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 123 B |
BIN
computer/textures/computer_admiral64_bt.png
Normal file → Executable file
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 115 B |
BIN
computer/textures/computer_admiral64_ft.png
Normal file → Executable file
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 212 B |
BIN
computer/textures/computer_admiral64_lt.png
Normal file → Executable file
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 133 B |
BIN
computer/textures/computer_admiral64_rt.png
Normal file → Executable file
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 117 B |
BIN
computer/textures/computer_admiral64_tp.png
Normal file → Executable file
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 236 B |
0
computer/textures/computer_black.png
Normal file → Executable file
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
BIN
computer/textures/computer_blue.png
Normal file → Executable file
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 113 B |
0
computer/textures/computer_computer_front_old.png
Normal file → Executable file
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
0
computer/textures/computer_computer_top_old.png
Normal file → Executable file
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
BIN
computer/textures/computer_cyan.png
Normal file → Executable file
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 113 B |
BIN
computer/textures/computer_green.png
Normal file → Executable file
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 220 B |
BIN
computer/textures/computer_laptop.png
Normal file → Executable file
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
computer/textures/computer_laptop_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
computer/textures/computer_magenta.png
Normal file → Executable file
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 113 B |
BIN
computer/textures/computer_monitor_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
computer/textures/computer_orange.png
Normal file → Executable file
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 113 B |
0
computer/textures/computer_piepad_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
0
computer/textures/computer_piepad_inv_off.png
Normal file → Executable file
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
0
computer/textures/computer_printer_b.png
Normal file → Executable file
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
0
computer/textures/computer_printer_bt.png
Normal file → Executable file
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
0
computer/textures/computer_printer_f.png
Normal file → Executable file
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
0
computer/textures/computer_printer_inv.png
Normal file → Executable file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
computer/textures/computer_printer_l.png
Normal file → Executable file
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |