Version MFF.

This commit is contained in:
sys4-fr 2018-09-07 22:32:38 +02:00
parent 2d0363f3ac
commit a11527ed63
1027 changed files with 8090 additions and 37753 deletions

0
.gitignore vendored Normal file → Executable file
View File

View File

@ -1,25 +0,0 @@
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",
}

0
LICENSE Normal file → Executable file
View File

65
README Normal file → Executable file
View 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

View File

@ -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"
]
}

3
building_blocks/depends.txt Normal file → Executable file
View File

@ -1,3 +1,2 @@
default
homedecor_i18n
moreblocks?
moreblocks?

105
building_blocks/init.lua Normal file → Executable file
View File

@ -1,9 +1,6 @@
local S = homedecor_i18n.gettext
minetest.register_node("building_blocks:Adobe", {
tiles = {"building_blocks_Adobe.png"},
description = S("Adobe"),
description = "Adobe",
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_stone_defaults(),
@ -11,7 +8,7 @@ minetest.register_node("building_blocks:Adobe", {
minetest.register_node("building_blocks:Roofing", {
tiles = {"building_blocks_Roofing.png"},
is_ground_content = true,
description = S("Roof block"),
description = "Roof block",
groups = {snappy=3},
})
minetest.register_craft({
@ -116,10 +113,12 @@ else
end
minetest.register_craft({
output = 'default:stick 4',
output = 'building_blocks:sticks',
recipe = {
{'building_blocks:sticks'},
}
{'group:stick', '', 'group:stick'},
{'', 'group:stick', ''},
{'group:stick', '', 'group:stick'},
} -- MODIFICATION MADE FOR MFF ^
})
minetest.register_craft({
@ -131,7 +130,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'building_blocks:tar_base 4',
output = 'building_blocks:tar_base 2',
recipe = {
{"default:coal_lump", "default:gravel"},
{"default:gravel", "default:coal_lump"}
@ -139,7 +138,7 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'building_blocks:tar_base 4',
output = 'building_blocks:tar_base 2',
recipe = {
{"default:gravel", "default:coal_lump"},
{"default:coal_lump", "default:gravel"}
@ -153,7 +152,7 @@ minetest.register_craft({
})
minetest.register_node("building_blocks:smoothglass", {
drawtype = "glasslike",
description = S("Streak Free Glass"),
description = "Streak Free Glass",
tiles = {"building_blocks_sglass.png"},
inventory_image = minetest.inventorycube("building_blocks_sglass.png"),
paramtype = "light",
@ -164,7 +163,7 @@ minetest.register_node("building_blocks:smoothglass", {
})
minetest.register_node("building_blocks:grate", {
drawtype = "glasslike",
description = S("Grate"),
description = "Grate",
tiles = {"building_blocks_grate.png"},
inventory_image = minetest.inventorycube("building_blocks_grate.png"),
paramtype = "light",
@ -174,7 +173,7 @@ minetest.register_node("building_blocks:grate", {
})
minetest.register_node("building_blocks:Fireplace", {
description = S("Fireplace"),
description = "Fireplace",
tiles = {
"building_blocks_cast_iron.png",
"building_blocks_cast_iron.png",
@ -191,7 +190,7 @@ minetest.register_node("building_blocks:Fireplace", {
minetest.register_node("building_blocks:woodglass", {
drawtype = "glasslike",
description = S("Wood Framed Glass"),
description = "Wood Framed Glass",
tiles = {"building_blocks_wglass.png"},
inventory_image = minetest.inventorycube("building_blocks_wglass.png"),
paramtype = "light",
@ -202,7 +201,7 @@ minetest.register_node("building_blocks:woodglass", {
})
minetest.register_node("building_blocks:terrycloth_towel", {
drawtype = "raillike",
description = S("Terrycloth towel"),
description = "Terrycloth towel",
tiles = {"building_blocks_towel.png"},
inventory_image = "building_blocks_towel_inv.png",
paramtype = "light",
@ -218,7 +217,7 @@ minetest.register_node("building_blocks:terrycloth_towel", {
})
minetest.register_node("building_blocks:Tarmac_spread", {
drawtype = "raillike",
description = S("Tarmac Spread"),
description = "Tarmac Spread",
tiles = {"building_blocks_tar.png"},
inventory_image = "building_blocks_tar_spread_inv.png",
paramtype = "light",
@ -235,7 +234,7 @@ minetest.register_node("building_blocks:Tarmac_spread", {
})
minetest.register_node("building_blocks:BWtile", {
drawtype = "raillike",
description = S("Chess board tiling"),
description = "Chess board tiling",
tiles = {"building_blocks_BWtile.png"},
inventory_image = "building_blocks_bwtile_inv.png",
paramtype = "light",
@ -251,9 +250,7 @@ minetest.register_node("building_blocks:BWtile", {
})
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"),
description = "Brobble Spread",
tiles = {"building_blocks_brobble.png"},
inventory_image = "building_blocks_brobble_spread_inv.png",
paramtype = "light",
@ -269,7 +266,7 @@ minetest.register_node("building_blocks:brobble_spread", {
})
minetest.register_node("building_blocks:gravel_spread", {
drawtype = "raillike",
description = S("Gravel Spread"),
description = "Gravel Spread",
tiles = {"default_gravel.png"},
inventory_image = "building_blocks_gravel_spread_inv.png",
paramtype = "light",
@ -290,7 +287,7 @@ minetest.register_node("building_blocks:gravel_spread", {
minetest.register_node("building_blocks:hardwood", {
tiles = {"building_blocks_hardwood.png"},
is_ground_content = true,
description = S("Hardwood"),
description = "Hardwood",
groups = {choppy=1,flammable=1},
sounds = default.node_sound_wood_defaults(),
})
@ -332,17 +329,6 @@ 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",
@ -354,7 +340,6 @@ if minetest.get_modpath("moreblocks") then
sounds = default.node_sound_stone_defaults(),
}
)
stairsplus:register_all(
"building_blocks",
"grate",
@ -465,44 +450,44 @@ else
bb_stairs.register_stair_and_slab("marble","building_blocks:Marble",
{cracky=3},
{"building_blocks_marble.png"},
S("Marble stair"),
S("Marble slab")
"Marble stair",
"Marble slab"
)
bb_stairs.register_stair_and_slab("hardwood","building_blocks:hardwood",
{choppy=1,flammable=1},
{"building_blocks_hardwood.png"},
S("Hardwood stair"),
S("Hardwood slab")
"Hardwood stair",
"Hardwood slab"
)
bb_stairs.register_stair_and_slab("fakegrass","building_blocks:fakegrass",
{crumbly=3},
{"default_grass.png"},
S("Grass stair"),
S("Grass slab")
"Grass stair",
"Grass slab"
)
bb_stairs.register_stair_and_slab("tar","building_blocks:Tar",
{crumbly=1},
{"building_blocks_tar.png"},
S("Tar stair"),
S("Tar slab")
"Tar stair",
"Tar slab"
)
bb_stairs.register_stair_and_slab("grate","building_blocks:grate",
{cracky=1},
{"building_blocks_grate.png"},
S("Grate Stair"),
S("Grate Slab")
"Grate Stair",
"Grate Slab"
)
bb_stairs.register_stair_and_slab("Adobe", "building_blocks:Adobe",
{crumbly=3},
{"building_blocks_Adobe.png"},
S("Adobe stair"),
S("Adobe slab")
"Adobe stair",
"Adobe slab"
)
bb_stairs.register_stair_and_slab("Roofing", "building_blocks:Roofing",
{snappy=3},
{"building_blocks_Roofing.png"},
S("Roofing stair"),
S("Roofing slab")
"Roofing stair",
"Roofing slab"
)
end
@ -515,7 +500,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 = S("Fake Grass"),
description = "Fake Grass",
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
@ -524,25 +509,25 @@ minetest.register_node("building_blocks:fakegrass", {
})
minetest.register_craftitem("building_blocks:sticks", {
description = S("Small bundle of 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 = S("Tar base"),
description = "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")
@ -554,14 +539,14 @@ minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
minetest.register_alias("marble", "building_blocks:Marble")
minetest.register_node("building_blocks:Tar", {
description = S("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 = S("Marble"),
description = "Marble",
tiles = {"building_blocks_marble.png"},
is_ground_content = true,
groups = {cracky=3, marble = 1},
@ -585,13 +570,13 @@ minetest.register_craft({
})
minetest.register_tool("building_blocks:knife", {
description = S("Tar 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}
choppy={times={[2]=7.50, [3]=2.80}, uses = 100, maxlevel=1},
fleshy={times={[2]=5.50, [3]=2.80}, uses = 100, maxlevel=1}
}
},
})
@ -607,7 +592,7 @@ minetest.register_craft({
if not minetest.get_modpath("technic") then
minetest.register_node( ":technic:granite", {
description = S("Granite"),
description = "Granite",
tiles = { "technic_granite.png" },
is_ground_content = true,
groups = {cracky=1},
@ -625,7 +610,7 @@ if not minetest.get_modpath("technic") then
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("technic", "granite", "technic:granite", {
description=S("Granite"),
description="Granite",
groups={cracky=1, not_in_creative_inventory=1},
tiles={"technic_granite.png"},
})

0
building_blocks/textures/building_blocks_Adobe.png Normal file → Executable file
View 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
View 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
View 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
View File

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

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

Binary file not shown.

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
View File

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

View 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
View 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
View File

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

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
View 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
View 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
View 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
View 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
View 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
View 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
View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View 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
View 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

Binary file not shown.

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
View File

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

0
building_blocks/textures/technic_granite.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

3
chains/depends.txt Normal file → Executable file
View File

@ -1,2 +1 @@
default
homedecor
default

17
chains/init.lua Normal file → Executable file
View File

@ -1,6 +1,3 @@
local S = homedecor_i18n.gettext
local chains_sbox = {
type = "fixed",
fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
@ -15,7 +12,7 @@ local topchains_sbox = {
}
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 = 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 = 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
View File

0
chains/models/chains_chandelier.obj Normal file → Executable file
View File

0
chains/models/top_chains.obj Normal file → Executable file
View File

0
chains/textures/chain_brass_inv.png Normal file → Executable file
View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

0
chains/textures/chains_brass.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

0
chains/textures/chains_candle.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

BIN
chains/textures/chains_candle_flame.png Normal file → Executable file

Binary file not shown.

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
View 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

Binary file not shown.

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
computer/CHANGES.txt Normal file → Executable file
View File

0
computer/README.txt Normal file → Executable file
View File

0
computer/TODO.txt Normal file → Executable file
View File

41
computer/computers.lua Normal file → Executable file
View 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
View File

@ -1,2 +1,3 @@
default
homedecor_i18n
intllib?

43
computer/init.lua Normal file → Executable file
View 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,

0
computer/locale/es.txt Normal file → Executable file
View File

3
computer/miscitems.lua Normal file → Executable file
View 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
View File

0
computer/models/computer_laptop_closed.obj Normal file → Executable file
View File

0
computer/models/computer_monitor.obj Normal file → Executable file
View File

0
computer/models/computer_tower.obj Normal file → Executable file
View File

0
computer/models/tetris_arcade.obj Normal file → Executable file
View File

0
computer/recipes.lua Normal file → Executable file
View File

23
computer/tetris.lua Normal file → Executable file
View File

@ -1,6 +1,3 @@
local S = homedecor_i18n.gettext
local shapes = {
{ { x = {0, 1, 0, 1}, y = {0, 0, 1, 1} } },
@ -38,7 +35,7 @@ local buttons = "button[3,4.5;0.6,0.6;left;<]"
.."button[4.2,5.3;0.6,0.6;drop;V]"
.."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
@ -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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 115 B

BIN
computer/textures/computer_admiral128_bt.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 115 B

0
computer/textures/computer_admiral128_ft.png Normal file → Executable file
View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 117 B

BIN
computer/textures/computer_admiral128_rt.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 117 B

BIN
computer/textures/computer_admiral128_tp.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 247 B

BIN
computer/textures/computer_admiral64_bk.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 123 B

BIN
computer/textures/computer_admiral64_bt.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 115 B

BIN
computer/textures/computer_admiral64_ft.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

After

Width:  |  Height:  |  Size: 212 B

BIN
computer/textures/computer_admiral64_lt.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 133 B

BIN
computer/textures/computer_admiral64_rt.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 117 B

BIN
computer/textures/computer_admiral64_tp.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 B

After

Width:  |  Height:  |  Size: 236 B

0
computer/textures/computer_black.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 82 B

After

Width:  |  Height:  |  Size: 82 B

BIN
computer/textures/computer_blue.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 113 B

0
computer/textures/computer_computer_front_old.png Normal file → Executable file
View 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
View File

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 129 B

BIN
computer/textures/computer_cyan.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 113 B

BIN
computer/textures/computer_green.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

BIN
computer/textures/computer_laptop.png Normal file → Executable file

Binary file not shown.

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
computer/textures/computer_magenta.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 113 B

BIN
computer/textures/computer_monitor_inv.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
computer/textures/computer_orange.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 113 B

0
computer/textures/computer_piepad_inv.png Normal file → Executable file
View 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
View File

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 136 B

0
computer/textures/computer_printer_b.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

0
computer/textures/computer_printer_bt.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 154 B

0
computer/textures/computer_printer_f.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

0
computer/textures/computer_printer_inv.png Normal file → Executable file
View 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
View File

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 183 B

0
computer/textures/computer_printer_r.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 182 B

0
computer/textures/computer_printer_t.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

BIN
computer/textures/computer_ps1_inv.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
computer/textures/computer_ps2_inv.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Some files were not shown because too many files have changed in this diff Show More