Compare commits
32 Commits
master
...
stable-201
Author | SHA1 | Date | |
---|---|---|---|
2c5be0735a | |||
36e5e319e3 | |||
57b988c185 | |||
d6f660b72a | |||
7b4db2fc5a | |||
b45ace825d | |||
9d2704c0c2 | |||
d7a4054dda | |||
f03e71397a | |||
6349c53824 | |||
c60607aa0d | |||
78ec2119f6 | |||
c247318dd8 | |||
9693d9dd46 | |||
23d1365939 | |||
f391bc59b0 | |||
790557f6ce | |||
c9c4214bff | |||
914aee41fe | |||
ec83040d10 | |||
9bb4222aa5 | |||
67ddc87d2c | |||
970636571e | |||
4ee5b6b87f | |||
1f2676b8f6 | |||
ad4790f74c | |||
7925897748 | |||
459c02548e | |||
1eb1e87f08 | |||
27eae09d93 | |||
761b18c17e | |||
763bcb2e95 |
0
.gitignore
vendored
Executable file → Normal file
25
.luacheckrc
Normal file
@ -0,0 +1,25 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest", "core",
|
||||
"dump",
|
||||
"vector", "nodeupdate",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "ItemStack",
|
||||
"intllib",
|
||||
"default",
|
||||
"stairsplus",
|
||||
"signs_lib",
|
||||
"beds",
|
||||
"technic",
|
||||
"mesecon",
|
||||
"unifieddyes",
|
||||
"creative",
|
||||
}
|
||||
|
||||
globals = {
|
||||
"armor",
|
||||
}
|
||||
|
65
README
Executable file → Normal file
@ -1,61 +1,8 @@
|
||||
This is what I consider to be a fairly feature-filled home decor
|
||||
modpack. As such, it comes in multiple parts:
|
||||
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.
|
||||
|
||||
* 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).
|
||||
Dependencies: unifieddyes and a Minetest engine build newer than 2017-01-23.
|
||||
|
||||
* 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
|
||||
Recommends: signs_lib, windmill, moreblocks, unified_inventory.
|
||||
|
19
bower.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"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"
|
||||
]
|
||||
}
|
3
building_blocks/depends.txt
Executable file → Normal file
@ -1,2 +1,3 @@
|
||||
default
|
||||
moreblocks?
|
||||
homedecor_i18n
|
||||
moreblocks?
|
||||
|
135
building_blocks/init.lua
Executable file → Normal file
@ -1,6 +1,9 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
minetest.register_node("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
description = "Adobe",
|
||||
description = S("Adobe"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -8,7 +11,7 @@ minetest.register_node("building_blocks:Adobe", {
|
||||
minetest.register_node("building_blocks:Roofing", {
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
is_ground_content = true,
|
||||
description = "Roof block",
|
||||
description = S("Roof block"),
|
||||
groups = {snappy=3},
|
||||
})
|
||||
minetest.register_craft({
|
||||
@ -113,12 +116,10 @@ else
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:sticks',
|
||||
output = 'default:stick 4',
|
||||
recipe = {
|
||||
{'group:stick', '', 'group:stick'},
|
||||
{'', 'group:stick', ''},
|
||||
{'group:stick', '', 'group:stick'},
|
||||
} -- MODIFICATION MADE FOR MFF ^
|
||||
{'building_blocks:sticks'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
@ -130,7 +131,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 2',
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:coal_lump", "default:gravel"},
|
||||
{"default:gravel", "default:coal_lump"}
|
||||
@ -138,7 +139,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'building_blocks:tar_base 2',
|
||||
output = 'building_blocks:tar_base 4',
|
||||
recipe = {
|
||||
{"default:gravel", "default:coal_lump"},
|
||||
{"default:coal_lump", "default:gravel"}
|
||||
@ -152,7 +153,7 @@ minetest.register_craft({
|
||||
})
|
||||
minetest.register_node("building_blocks:smoothglass", {
|
||||
drawtype = "glasslike",
|
||||
description = "Streak Free Glass",
|
||||
description = S("Streak Free Glass"),
|
||||
tiles = {"building_blocks_sglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_sglass.png"),
|
||||
paramtype = "light",
|
||||
@ -163,7 +164,7 @@ minetest.register_node("building_blocks:smoothglass", {
|
||||
})
|
||||
minetest.register_node("building_blocks:grate", {
|
||||
drawtype = "glasslike",
|
||||
description = "Grate",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_grate.png"),
|
||||
paramtype = "light",
|
||||
@ -173,7 +174,7 @@ minetest.register_node("building_blocks:grate", {
|
||||
})
|
||||
|
||||
minetest.register_node("building_blocks:Fireplace", {
|
||||
description = "Fireplace",
|
||||
description = S("Fireplace"),
|
||||
tiles = {
|
||||
"building_blocks_cast_iron.png",
|
||||
"building_blocks_cast_iron.png",
|
||||
@ -190,7 +191,7 @@ minetest.register_node("building_blocks:Fireplace", {
|
||||
|
||||
minetest.register_node("building_blocks:woodglass", {
|
||||
drawtype = "glasslike",
|
||||
description = "Wood Framed Glass",
|
||||
description = S("Wood Framed Glass"),
|
||||
tiles = {"building_blocks_wglass.png"},
|
||||
inventory_image = minetest.inventorycube("building_blocks_wglass.png"),
|
||||
paramtype = "light",
|
||||
@ -201,7 +202,7 @@ minetest.register_node("building_blocks:woodglass", {
|
||||
})
|
||||
minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
drawtype = "raillike",
|
||||
description = "Terrycloth towel",
|
||||
description = S("Terrycloth towel"),
|
||||
tiles = {"building_blocks_towel.png"},
|
||||
inventory_image = "building_blocks_towel_inv.png",
|
||||
paramtype = "light",
|
||||
@ -217,7 +218,7 @@ minetest.register_node("building_blocks:terrycloth_towel", {
|
||||
})
|
||||
minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
drawtype = "raillike",
|
||||
description = "Tarmac Spread",
|
||||
description = S("Tarmac Spread"),
|
||||
tiles = {"building_blocks_tar.png"},
|
||||
inventory_image = "building_blocks_tar_spread_inv.png",
|
||||
paramtype = "light",
|
||||
@ -233,16 +234,22 @@ minetest.register_node("building_blocks:Tarmac_spread", {
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
minetest.register_node("building_blocks:BWtile", {
|
||||
drawtype = "raillike",
|
||||
description = "Chess board tiling",
|
||||
tiles = {"building_blocks_BWtile.png"},
|
||||
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,
|
||||
selection_box = {
|
||||
node_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},
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = true,
|
||||
@ -250,7 +257,9 @@ minetest.register_node("building_blocks:BWtile", {
|
||||
})
|
||||
minetest.register_node("building_blocks:brobble_spread", {
|
||||
drawtype = "raillike",
|
||||
description = "Brobble Spread",
|
||||
-- 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",
|
||||
@ -266,7 +275,7 @@ minetest.register_node("building_blocks:brobble_spread", {
|
||||
})
|
||||
minetest.register_node("building_blocks:gravel_spread", {
|
||||
drawtype = "raillike",
|
||||
description = "Gravel Spread",
|
||||
description = S("Gravel Spread"),
|
||||
tiles = {"default_gravel.png"},
|
||||
inventory_image = "building_blocks_gravel_spread_inv.png",
|
||||
paramtype = "light",
|
||||
@ -287,7 +296,7 @@ minetest.register_node("building_blocks:gravel_spread", {
|
||||
minetest.register_node("building_blocks:hardwood", {
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
is_ground_content = true,
|
||||
description = "Hardwood",
|
||||
description = S("Hardwood"),
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
@ -299,7 +308,7 @@ if minetest.get_modpath("moreblocks") then
|
||||
"marble",
|
||||
"building_blocks:Marble",
|
||||
{
|
||||
description = "Marble",
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -310,7 +319,7 @@ if minetest.get_modpath("moreblocks") then
|
||||
"hardwood",
|
||||
"building_blocks:hardwood",
|
||||
{
|
||||
description = "Hardwood",
|
||||
description = S("Hardwood"),
|
||||
tiles = {"building_blocks_hardwood.png"},
|
||||
groups = {choppy=1,flammable=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -321,7 +330,7 @@ if minetest.get_modpath("moreblocks") then
|
||||
"fakegrass",
|
||||
"building_blocks:fakegrass",
|
||||
{
|
||||
description = "Grass",
|
||||
description = S("Grass"),
|
||||
tiles = {"default_grass.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
@ -329,23 +338,35 @@ if minetest.get_modpath("moreblocks") then
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
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_all(
|
||||
"building_blocks",
|
||||
"tar",
|
||||
"building_blocks:Tar",
|
||||
{
|
||||
description = "Tar",
|
||||
description = S("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",
|
||||
description = S("Grate"),
|
||||
tiles = {"building_blocks_grate.png"},
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -356,7 +377,7 @@ if minetest.get_modpath("moreblocks") then
|
||||
"Adobe",
|
||||
"building_blocks:Adobe",
|
||||
{
|
||||
description = "Adobe",
|
||||
description = S("Adobe"),
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -367,7 +388,7 @@ if minetest.get_modpath("moreblocks") then
|
||||
"Roofing",
|
||||
"building_blocks:Roofing",
|
||||
{
|
||||
description = "Roofing",
|
||||
description = S("Roofing"),
|
||||
tiles = {"building_blocks_Roofing.png"},
|
||||
groups = {snappy=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
@ -450,44 +471,44 @@ else
|
||||
bb_stairs.register_stair_and_slab("marble","building_blocks:Marble",
|
||||
{cracky=3},
|
||||
{"building_blocks_marble.png"},
|
||||
"Marble stair",
|
||||
"Marble slab"
|
||||
S("Marble stair"),
|
||||
S("Marble slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("hardwood","building_blocks:hardwood",
|
||||
{choppy=1,flammable=1},
|
||||
{"building_blocks_hardwood.png"},
|
||||
"Hardwood stair",
|
||||
"Hardwood slab"
|
||||
S("Hardwood stair"),
|
||||
S("Hardwood slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("fakegrass","building_blocks:fakegrass",
|
||||
{crumbly=3},
|
||||
{"default_grass.png"},
|
||||
"Grass stair",
|
||||
"Grass slab"
|
||||
S("Grass stair"),
|
||||
S("Grass slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("tar","building_blocks:Tar",
|
||||
{crumbly=1},
|
||||
{"building_blocks_tar.png"},
|
||||
"Tar stair",
|
||||
"Tar slab"
|
||||
S("Tar stair"),
|
||||
S("Tar slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("grate","building_blocks:grate",
|
||||
{cracky=1},
|
||||
{"building_blocks_grate.png"},
|
||||
"Grate Stair",
|
||||
"Grate Slab"
|
||||
S("Grate Stair"),
|
||||
S("Grate Slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Adobe", "building_blocks:Adobe",
|
||||
{crumbly=3},
|
||||
{"building_blocks_Adobe.png"},
|
||||
"Adobe stair",
|
||||
"Adobe slab"
|
||||
S("Adobe stair"),
|
||||
S("Adobe slab")
|
||||
)
|
||||
bb_stairs.register_stair_and_slab("Roofing", "building_blocks:Roofing",
|
||||
{snappy=3},
|
||||
{"building_blocks_Roofing.png"},
|
||||
"Roofing stair",
|
||||
"Roofing slab"
|
||||
S("Roofing stair"),
|
||||
S("Roofing slab")
|
||||
)
|
||||
end
|
||||
|
||||
@ -500,7 +521,7 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_node("building_blocks:fakegrass", {
|
||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||
description = "Fake Grass",
|
||||
description = S("Fake Grass"),
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
@ -509,25 +530,25 @@ minetest.register_node("building_blocks:fakegrass", {
|
||||
})
|
||||
|
||||
minetest.register_craftitem("building_blocks:sticks", {
|
||||
description = "Small bundle of 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 = "Tar base",
|
||||
description = S("Tar base"),
|
||||
image = "building_blocks_tar_base.png",
|
||||
})
|
||||
|
||||
--Tar
|
||||
--[[minetest.register_craft({
|
||||
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")
|
||||
@ -539,14 +560,14 @@ minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
|
||||
minetest.register_node("building_blocks:Tar", {
|
||||
description = "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(),
|
||||
})
|
||||
minetest.register_node("building_blocks:Marble", {
|
||||
description = "Marble",
|
||||
description = S("Marble"),
|
||||
tiles = {"building_blocks_marble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, marble = 1},
|
||||
@ -570,13 +591,13 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_tool("building_blocks:knife", {
|
||||
description = "Tar 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}
|
||||
choppy={times={[2]=7.50, [3]=2.80}, uses=100, maxlevel=1},
|
||||
fleshy={times={[2]=5.50, [3]=2.80}, uses=100, maxlevel=1}
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -592,7 +613,7 @@ minetest.register_craft({
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = "Granite",
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
@ -610,7 +631,7 @@ if not minetest.get_modpath("technic") then
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description="Granite",
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
|
0
building_blocks/textures/building_blocks_Adobe.png
Executable file → Normal file
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
0
building_blocks/textures/building_blocks_BWtile.png
Executable file → Normal file
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
0
building_blocks/textures/building_blocks_Roofing.png
Executable file → Normal file
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
0
building_blocks/textures/building_blocks_brobble.png
Executable file → Normal file
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
BIN
building_blocks/textures/building_blocks_brobble_spread_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
building_blocks/textures/building_blocks_bwtile_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.6 KiB |
0
building_blocks/textures/building_blocks_cast_iron.png
Executable file → Normal file
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
0
building_blocks/textures/building_blocks_cast_iron_fireplace.png
Executable file → Normal file
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
0
building_blocks/textures/building_blocks_grate.png
Executable file → Normal file
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
0
building_blocks/textures/building_blocks_grate2.png
Executable file → Normal file
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 302 B |
BIN
building_blocks/textures/building_blocks_gravel_spread_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.6 KiB |
0
building_blocks/textures/building_blocks_hardwood.png
Executable file → Normal file
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
0
building_blocks/textures/building_blocks_knife.png
Executable file → Normal file
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
0
building_blocks/textures/building_blocks_marble.png
Executable file → Normal file
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
0
building_blocks/textures/building_blocks_sglass.png
Executable file → Normal file
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
0
building_blocks/textures/building_blocks_sticks.png
Executable file → Normal file
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
0
building_blocks/textures/building_blocks_tar.png
Executable file → Normal file
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
0
building_blocks/textures/building_blocks_tar_base.png
Executable file → Normal 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
Executable file → Normal file
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
0
building_blocks/textures/building_blocks_towel.png
Executable file → Normal file
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 409 B |
BIN
building_blocks/textures/building_blocks_towel_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.5 KiB |
0
building_blocks/textures/building_blocks_wglass.png
Executable file → Normal file
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
0
building_blocks/textures/technic_granite.png
Executable file → Normal file
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
3
chains/depends.txt
Executable file → Normal file
@ -1 +1,2 @@
|
||||
default
|
||||
default
|
||||
homedecor
|
||||
|
17
chains/init.lua
Executable file → Normal file
@ -1,3 +1,6 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local chains_sbox = {
|
||||
type = "fixed",
|
||||
fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
|
||||
@ -12,7 +15,7 @@ local topchains_sbox = {
|
||||
}
|
||||
|
||||
minetest.register_node("chains:chain", {
|
||||
description = "Hanging chain (wrought iron)",
|
||||
description = S("Hanging chain (wrought iron)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "chains.obj",
|
||||
tiles = {"chains_wrought_iron.png"},
|
||||
@ -26,7 +29,7 @@ minetest.register_node("chains:chain", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_brass", {
|
||||
description = "Hanging chain (brass)",
|
||||
description = S("Hanging chain (brass)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "chains.obj",
|
||||
tiles = {"chains_brass.png"},
|
||||
@ -40,7 +43,7 @@ minetest.register_node("chains:chain_brass", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_top", {
|
||||
description = "Hanging chain (ceiling mount, wrought iron)",
|
||||
description = S("Hanging chain (ceiling mount, wrought iron)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "top_chains.obj",
|
||||
tiles = {"chains_wrought_iron.png"},
|
||||
@ -54,7 +57,7 @@ minetest.register_node("chains:chain_top", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chain_top_brass", {
|
||||
description = "Hanging chain (ceiling mount, brass)",
|
||||
description = S("Hanging chain (ceiling mount, brass)"),
|
||||
drawtype = "mesh",
|
||||
mesh = "top_chains.obj",
|
||||
tiles = {"chains_brass.png"},
|
||||
@ -68,13 +71,12 @@ minetest.register_node("chains:chain_top_brass", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chandelier", {
|
||||
description = "Chandelier (wrought iron)",
|
||||
description = S("Chandelier (wrought iron)"),
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX-2,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
"chains_wrought_iron.png",
|
||||
"chains_candle.png",
|
||||
@ -95,13 +97,12 @@ minetest.register_node("chains:chandelier", {
|
||||
})
|
||||
|
||||
minetest.register_node("chains:chandelier_brass", {
|
||||
description = "Chandelier (brass)",
|
||||
description = S("Chandelier (brass)"),
|
||||
paramtype = "light",
|
||||
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
Executable file → Normal file
0
chains/models/chains_chandelier.obj
Executable file → Normal file
0
chains/models/top_chains.obj
Executable file → Normal file
0
chains/textures/chain_brass_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
chains/textures/chain_wrought_iron_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
chains/textures/chains_brass.png
Executable file → Normal file
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
0
chains/textures/chains_candle.png
Executable file → Normal file
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
BIN
chains/textures/chains_candle_flame.png
Executable file → Normal file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
0
chains/textures/chains_wrought_iron.png
Executable file → Normal file
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 386 B |
BIN
chains/textures/top_chain_brass_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
chains/textures/top_chain_wrought_iron_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
0
computer/CHANGES.txt
Executable file → Normal file
0
computer/README.txt
Executable file → Normal file
0
computer/TODO.txt
Executable file → Normal file
41
computer/computers.lua
Executable file → Normal file
@ -1,3 +1,6 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
-- Amiga 500 lookalike
|
||||
computer.register("computer:shefriendSOO", {
|
||||
description = "SheFriendSOO",
|
||||
@ -29,6 +32,7 @@ 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
|
||||
})
|
||||
|
||||
@ -48,6 +52,7 @@ 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
|
||||
})
|
||||
|
||||
@ -148,6 +153,19 @@ 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",
|
||||
@ -155,7 +173,7 @@ local mo_sbox = {
|
||||
}
|
||||
|
||||
minetest.register_node("computer:monitor", {
|
||||
description = "Monitor and keyboard",
|
||||
description = S("Monitor and keyboard"),
|
||||
inventory_image = "computer_monitor_inv.png",
|
||||
drawtype = "mesh",
|
||||
mesh = "computer_monitor.obj",
|
||||
@ -168,11 +186,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"},
|
||||
@ -186,6 +204,7 @@ 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
|
||||
})
|
||||
|
||||
@ -196,7 +215,7 @@ minetest.register_alias("computer:monitor_desktop", "computer:monitor")
|
||||
|
||||
--WIFI Router (linksys look-a-like)
|
||||
minetest.register_node("computer:router", {
|
||||
description = "WIFI Router",
|
||||
description = S("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"},
|
||||
@ -224,7 +243,7 @@ local pct_cbox = {
|
||||
|
||||
--Modern PC Tower
|
||||
minetest.register_node("computer:tower", {
|
||||
description = "Computer Tower",
|
||||
description = S("Computer Tower"),
|
||||
inventory_image = "computer_tower_inv.png",
|
||||
drawtype = "mesh",
|
||||
mesh = "computer_tower.obj",
|
||||
@ -241,7 +260,7 @@ minetest.register_alias("computer:tower_on", "computer:tower")
|
||||
|
||||
-- Printer/scaner combo
|
||||
minetest.register_node("computer:printer", {
|
||||
description = "Printer Scaner Combo",
|
||||
description = S("Printer-Scanner 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"},
|
||||
@ -269,7 +288,7 @@ minetest.register_node("computer:printer", {
|
||||
--Rack Server
|
||||
minetest.register_node("computer:server", {
|
||||
drawtype = "nodebox",
|
||||
description = "Rack Server",
|
||||
description = S("Rack Server"),
|
||||
tiles = {
|
||||
'computer_server_t.png',
|
||||
'computer_server_bt.png',
|
||||
@ -294,12 +313,14 @@ 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(), "Not enough vertical space to place a server!" )
|
||||
return
|
||||
minetest.chat_send_player( placer:get_player_name(),
|
||||
S("Not enough vertical space to place a server!" ))
|
||||
return itemstack
|
||||
end
|
||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||
end
|
||||
@ -307,12 +328,11 @@ 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_r.png',
|
||||
'computer_server_l.png',
|
||||
'computer_server_r.png',
|
||||
'computer_server_bt.png',
|
||||
'computer_server_f_on.png',
|
||||
},
|
||||
@ -333,5 +353,6 @@ 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
Executable file → Normal file
@ -1,3 +1,2 @@
|
||||
default
|
||||
intllib?
|
||||
|
||||
homedecor_i18n
|
||||
|
43
computer/init.lua
Executable file → Normal file
@ -2,19 +2,18 @@ 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 def = def
|
||||
local cdef = table.copy(def)
|
||||
minetest.register_node(ONSTATE, {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
description = def.description,
|
||||
inventory_image = def.inventory_image,
|
||||
description = cdef.description,
|
||||
inventory_image = cdef.inventory_image,
|
||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
|
||||
tiles = {
|
||||
TEXPFX.."tp.png",
|
||||
@ -24,14 +23,15 @@ computer.register = function (name, def)
|
||||
TEXPFX.."bk.png",
|
||||
TEXPFX.."ft.png"
|
||||
},
|
||||
node_box = def.node_box,
|
||||
selection_box = def.node_box,
|
||||
node_box = cdef.node_box,
|
||||
selection_box = cdef.node_box,
|
||||
on_rightclick = function (pos, node, clicker, itemstack)
|
||||
if (def.on_turn_off) then
|
||||
if (def.on_turn_off(pos, node, clicker, itemstack)) then return end
|
||||
if cdef.on_turn_off and cdef.on_turn_off(pos, node, clicker, itemstack) then
|
||||
return itemstack
|
||||
end
|
||||
node.name = OFFSTATE
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
minetest.register_node(OFFSTATE, {
|
||||
@ -40,34 +40,32 @@ 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"..(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")
|
||||
(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")
|
||||
},
|
||||
node_box = def.node_box_off or def.node_box,
|
||||
selection_box = def.node_box_off or def.node_box,
|
||||
node_box = cdef.node_box_off or cdef.node_box,
|
||||
selection_box = cdef.node_box_off or cdef.node_box,
|
||||
on_rightclick = function (pos, node, clicker, itemstack)
|
||||
if (def.on_turn_on) then
|
||||
if (def.on_turn_on(pos, node, clicker, itemstack)) then return end
|
||||
if cdef.on_turn_on and cdef.on_turn_on(pos, node, clicker, itemstack) then
|
||||
return itemstack
|
||||
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",
|
||||
@ -77,8 +75,7 @@ end
|
||||
|
||||
computer.pixelnodebox = function (size, boxes)
|
||||
local fixed = { }
|
||||
local i, box
|
||||
for i, box in ipairs(boxes) do
|
||||
for _, box in ipairs(boxes) do
|
||||
local x, y, z, w, h, l = unpack(box)
|
||||
fixed[#fixed + 1] = {
|
||||
(x / size) - 0.5,
|
||||
|
0
computer/locale/es.txt
Executable file → Normal file
6
computer/locale/ru.txt
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
# Language: Russian
|
||||
# Author: inpos <inpos@yandex.ru>
|
||||
|
||||
Plastic sheet = Лист пластика
|
||||
Unprocessed Plastic base = Необработанная пластиковая основа
|
3
computer/miscitems.lua
Executable file → Normal file
@ -4,8 +4,7 @@
|
||||
|
||||
-- This file defines some items in order to not have to depend on other mods.
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if (not minetest.get_modpath("homedecor")) then
|
||||
|
||||
|
0
computer/models/computer_laptop.obj
Executable file → Normal file
0
computer/models/computer_laptop_closed.obj
Executable file → Normal file
0
computer/models/computer_monitor.obj
Executable file → Normal file
0
computer/models/computer_tower.obj
Executable file → Normal file
0
computer/models/tetris_arcade.obj
Executable file → Normal file
0
computer/recipes.lua
Executable file → Normal file
29
computer/tetris.lua
Executable file → Normal file
@ -1,3 +1,6 @@
|
||||
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
local shapes = {
|
||||
{ { x = {0, 1, 0, 1}, y = {0, 0, 1, 1} } },
|
||||
|
||||
@ -30,12 +33,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;L]"
|
||||
.."button[3.6,4.5;0.6,0.6;rotateleft;"..minetest.formspec_escape(S("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;R]"
|
||||
.."button[4.8,4.5;0.6,0.6;rotateright;"..minetest.formspec_escape(S("R")).."]"
|
||||
.."button[5.4,4.5;0.6,0.6;right;>]"
|
||||
.."button[3.5,3;2,2;new;New Game]"
|
||||
.."button[3.5,3;2,2;new;"..minetest.formspec_escape(S("New Game")).."]"
|
||||
|
||||
local formsize = "size[5.9,5.7]"
|
||||
local boardx, boardy = 0, 0
|
||||
@ -71,7 +74,7 @@ local function step(pos, fields)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local t = minetest.deserialize(meta:get_string("tetris"))
|
||||
|
||||
local function new_game(pos)
|
||||
local function new_game(p)
|
||||
local nex = math.random(7)
|
||||
|
||||
t = {
|
||||
@ -84,7 +87,7 @@ local function step(pos, fields)
|
||||
x=4, y=0, rot=1
|
||||
}
|
||||
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local timer = minetest.get_node_timer(p)
|
||||
timer:set(0.3, 0)
|
||||
end
|
||||
|
||||
@ -228,7 +231,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;Next...]label[3.8,2.7;Score: ",
|
||||
"label[3.8,0.1;"..S("Next...").."]label[3.8,2.7;"..S("Score: "),
|
||||
t.score, close, buttons }
|
||||
|
||||
|
||||
@ -241,7 +244,7 @@ local function step(pos, fields)
|
||||
end
|
||||
|
||||
minetest.register_node("computer:tetris_arcade", {
|
||||
description="Tetris Arcade",
|
||||
description=S("Tetris Arcade"),
|
||||
drawtype = "mesh",
|
||||
mesh = "tetris_arcade.obj",
|
||||
tiles = {"tetris_arcade.png"},
|
||||
@ -259,7 +262,8 @@ 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;New Game]"
|
||||
meta:set_string("formspec", formsize
|
||||
.."button[2,2.5;2,2;new;"..minetest.formspec_escape(S("New Game")).."]"
|
||||
..default.gui_bg..default.gui_bg_img..default.gui_slots)
|
||||
end,
|
||||
on_timer = function(pos)
|
||||
@ -270,9 +274,14 @@ 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(), "No room for place the Arcade!")
|
||||
return end
|
||||
minetest.chat_send_player(placer:get_player_name(), S("No room for place the Arcade!"))
|
||||
return itemstack
|
||||
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
Executable file → Normal file
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
computer/textures/computer_ad64_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
computer/textures/computer_admiral128_bk.png
Executable file → Normal file
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 313 B |
BIN
computer/textures/computer_admiral128_bt.png
Executable file → Normal file
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 313 B |
0
computer/textures/computer_admiral128_ft.png
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
computer/textures/computer_admiral128_lt.png
Executable file → Normal file
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 315 B |
BIN
computer/textures/computer_admiral128_rt.png
Executable file → Normal file
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 315 B |
BIN
computer/textures/computer_admiral128_tp.png
Executable file → Normal file
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 483 B |
BIN
computer/textures/computer_admiral64_bk.png
Executable file → Normal file
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 321 B |
BIN
computer/textures/computer_admiral64_bt.png
Executable file → Normal file
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 313 B |
BIN
computer/textures/computer_admiral64_ft.png
Executable file → Normal file
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 415 B |
BIN
computer/textures/computer_admiral64_lt.png
Executable file → Normal file
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 331 B |
BIN
computer/textures/computer_admiral64_rt.png
Executable file → Normal file
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 315 B |
BIN
computer/textures/computer_admiral64_tp.png
Executable file → Normal file
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 461 B |
0
computer/textures/computer_black.png
Executable file → Normal file
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
BIN
computer/textures/computer_blue.png
Executable file → Normal file
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 114 B |
0
computer/textures/computer_computer_front_old.png
Executable file → Normal file
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
0
computer/textures/computer_computer_top_old.png
Executable file → Normal file
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
BIN
computer/textures/computer_cyan.png
Executable file → Normal file
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 114 B |
BIN
computer/textures/computer_green.png
Executable file → Normal file
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 114 B |
BIN
computer/textures/computer_hueg_box_bk.png
Normal file
After Width: | Height: | Size: 88 B |
BIN
computer/textures/computer_hueg_box_bt.png
Normal file
After Width: | Height: | Size: 108 B |
BIN
computer/textures/computer_hueg_box_ft.png
Normal file
After Width: | Height: | Size: 130 B |
BIN
computer/textures/computer_hueg_box_lt.png
Normal file
After Width: | Height: | Size: 100 B |
BIN
computer/textures/computer_hueg_box_rt.png
Normal file
After Width: | Height: | Size: 97 B |
BIN
computer/textures/computer_hueg_box_tp.png
Normal file
After Width: | Height: | Size: 220 B |
BIN
computer/textures/computer_laptop.png
Executable file → Normal file
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.5 KiB |
BIN
computer/textures/computer_laptop_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
computer/textures/computer_magenta.png
Executable file → Normal file
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 114 B |
BIN
computer/textures/computer_monitor_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
computer/textures/computer_orange.png
Executable file → Normal file
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 114 B |
0
computer/textures/computer_piepad_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
0
computer/textures/computer_piepad_inv_off.png
Executable file → Normal file
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
0
computer/textures/computer_printer_b.png
Executable file → Normal file
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
0
computer/textures/computer_printer_bt.png
Executable file → Normal file
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
0
computer/textures/computer_printer_f.png
Executable file → Normal file
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
0
computer/textures/computer_printer_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
computer/textures/computer_printer_l.png
Executable file → Normal file
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 183 B |
0
computer/textures/computer_printer_r.png
Executable file → Normal file
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
0
computer/textures/computer_printer_t.png
Executable file → Normal file
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 204 B |
BIN
computer/textures/computer_ps1_inv.png
Executable file → Normal file
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |