1 Commits

Author SHA1 Message Date
51a8f46e1c Version MFF. 2018-09-08 15:23:58 +02:00
19 changed files with 131 additions and 231 deletions

View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 EvergreenTree
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

21
README.txt Normal file → Executable file
View File

@ -4,18 +4,9 @@
| |_| | |_| | (_| | | | |_ / / | | | | (_) | (_| |
\__\_\\__,_|\__,_|_| \__/___| |_| |_|\___/ \__,_|
This mod adds quartz ore and some decorative blocks to minetest.
Version: 1.0.0
License: MIT (see LICENSE.txt)
Dependencies:
default (found in minetest_game)
stairs (found in minetest_game)
moreblocks or stairsplus (optional, for stairsplus support)
Please report bugs at the GitHub issue tracker:
https://github.com/minetest-mods/quartz/issues/
Crafting:
@ -81,5 +72,11 @@ x|c|x
-----
x|x|x
If you have stairsplus (or moreblocks) installed, you will be able to use
circular saws to cut quartz blocks.
License:
CC BY-SA 3.0
More info at http://creativecommons.org/licenses/by-sa/3.0/

3
depends.txt Executable file
View File

@ -0,0 +1,3 @@
default,
stairs,
moreblocks?

171
init.lua Normal file → Executable file
View File

@ -1,28 +1,20 @@
local settings = Settings(minetest.get_modpath("quartz").."/settings.txt")
dofile(minetest.get_modpath("quartz").."/settings.txt")
local S = minetest.get_translator("quartz")
--
-- Item Registration
--
--Node Registration
--Quartz Crystal
minetest.register_craftitem("quartz:quartz_crystal", {
description = S("Quartz Crystal"),
description = "Quartz Crystal",
inventory_image = "quartz_crystal_full.png",
})
minetest.register_craftitem("quartz:quartz_crystal_piece", {
description = S("Quartz Crystal Piece"),
description = "Quartz Crystal Piece",
inventory_image = "quartz_crystal_piece.png",
})
--
-- Node Registration
--
--Ore
minetest.register_node("quartz:quartz_ore", {
description = S("Quartz Ore"),
description = "Quartz Ore",
tiles = {"default_stone.png^quartz_ore.png"},
groups = {cracky=3, stone=1},
drop = 'quartz:quartz_crystal',
@ -40,9 +32,20 @@ minetest.register_ore({
y_max = -5,
})
minetest.register_ore({
ore_type = "scatter",
ore = "quartz:quartz_ore",
wherein = "default:stone",
clust_scarcity = 30*30*30,
clust_num_ores = 64,
clust_size = 5,
y_min = -10240,
y_max = -8192,
})
--Quartz Block
minetest.register_node("quartz:block", {
description = S("Quartz Block"),
description = "Quartz Block",
tiles = {"quartz_block.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
@ -50,7 +53,7 @@ minetest.register_node("quartz:block", {
--Chiseled Quartz
minetest.register_node("quartz:chiseled", {
description = S("Chiseled Quartz"),
description = "Chiseled Quartz",
tiles = {"quartz_chiseled.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
@ -58,46 +61,41 @@ minetest.register_node("quartz:chiseled", {
--Quartz Pillar
minetest.register_node("quartz:pillar", {
description = S("Quartz Pillar"),
description = "Quartz Pillar",
paramtype2 = "facedir",
tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png",
"quartz_pillar_side.png"},
tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
on_place = minetest.rotate_node
})
--Stairs & Slabs
stairs.register_stair_and_slab("quartzblock", "quartz:block",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_block.png"},
S("Quartz Stair"),
S("Quartz Slab"),
default.node_sound_glass_defaults(),
nil,
S("Inner Quartz Stair"),
S("Outer Quartz Stair")
)
"Quartz stair",
"Quartz slab",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("quartzstair", "quartz:pillar",
stairs.register_slab("quartzstair", "quartz:pillar",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_pillar_top.png", "quartz_pillar_top.png",
"quartz_pillar_side.png"},
S("Quartz Pillar Stair"),
S("Quartz Pillar Slab"),
default.node_sound_glass_defaults(),
nil,
S("Inner Quartz Pillar Stair"),
S("Outer Quartz Pillar Stair")
)
{"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
"Quartz Pillar stair",
"Quartz Pillar slab",
default.node_sound_glass_defaults())
--
--Crafting
--
--Quartz Crystal Piece
minetest.register_craft({
output = '"quartz:quartz_crystal_piece" 3',
output = "quartz:quartz_crystal_piece 3",
recipe = {
{'quartz:quartz_crystal'}
}
@ -105,7 +103,7 @@ minetest.register_craft({
--Quartz Block
minetest.register_craft({
output = '"quartz:block" 4',
output = "quartz:block 4",
recipe = {
{'quartz:quartz_crystal', 'quartz:quartz_crystal', ''},
{'quartz:quartz_crystal', 'quartz:quartz_crystal', ''},
@ -115,14 +113,24 @@ minetest.register_craft({
--Chiseled Quartz
minetest.register_craft({
output = 'quartz:chiseled 4',
output = "quartz:chiseled 2",
recipe = {
{'quartz:block', 'quartz:block', ''},
{'quartz:block', 'quartz:block', ''},
{'stairs:slab_quartzblock', '', ''},
{'stairs:slab_quartzblock', '', ''},
{'', '', ''},
}
})
--Chiseled Quartz(for stairsplus)
--[[minetest.register_craft({
output = 'quartz:chiseled 2',
recipe = {
{'quartz:slab_block', '', ''},
{'quartz:slab_block', '', ''},
{'', '', ''},
}
}) ]]-- Disabled. Item "quartz:slab_block" is unknown //MFF(Mg|08/09/15)
--Quartz Pillar
minetest.register_craft({
output = 'quartz:pillar 2',
@ -133,13 +141,9 @@ minetest.register_craft({
}
})
--
-- ABMS
--
--abms
local dirs2 = { 12, 9, 18, 7, 12 }
-- Replace all instances of the horizontal quartz pillar with the
minetest.register_abm({
nodenames = { "quartz:pillar_horizontal" },
interval = 1,
@ -151,50 +155,47 @@ minetest.register_abm({
end,
})
--
-- Compatibility with stairsplus
--
--These are deprecated, don't use them
if minetest.global_exists("stairsplus") then
stairsplus:register_all("quartz", "block", "quartz:block", {
description = "Quartz Block",
tiles = {"quartz_block.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults()
})
stairsplus:register_all("quartz", "chiseled", "quartz:chiseled", {
description = "Chiseled Quartz",
tiles = {"quartz_chiseled.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults()
})
stairsplus:register_all("quartz", "pillar", "quartz:pillar", {
description = "Quartz Pillar",
tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png",
"quartz_pillar_side.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults()
})
end
--
-- Deprecated
--
if settings:get_bool("ENABLE_HORIZONTAL_PILLAR") then
if enable_horizontal_pillar then
--Quartz Pillar (horizontal)
minetest.register_node("quartz:pillar_horizontal", {
description = "Quartz Pillar Horizontal",
tiles = {"quartz_pillar_side.png", "quartz_pillar_side.png",
"quartz_pillar_side.png^[transformR90",
"quartz_pillar_side.png^[transformR90", "quartz_pillar_top.png",
"quartz_pillar_top.png"},
tiles = {"quartz_pillar_side.png", "quartz_pillar_side.png", "quartz_pillar_side.png^[transformR90",
"quartz_pillar_side.png^[transformR90", "quartz_pillar_top.png", "quartz_pillar_top.png"},
paramtype2 = "facedir",
drop = 'quartz:pillar',
groups = {cracky=3, oddly_breakable_by_hand=1,
not_in_creative_inventory=1},
groups = {cracky=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
end
--Compatibility with stairsplus
if minetest.get_modpath("moreblocks") and enable_stairsplus then
register_stair_slab_panel_micro("quartz", "block", "quartz:block",
{cracky=3},
{"quartz_block.png"},
"Quartz Block",
"block",
0)
register_stair_slab_panel_micro("quartz", "chiseled", "quartz:chiseled",
{cracky=3},
{"quartz_chiseled.png"},
"Chiseled Quartz",
"chiseled",
0)
register_stair_slab_panel_micro("quartz", "pillar", "quartz:pillar",
{cracky=3},
{"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
"Quartz Pillar",
"pillar",
0)
table.insert(circular_saw.known_stairs, "quartz:block")
table.insert(circular_saw.known_stairs, "quartz:chiseled")
table.insert(circular_saw.known_stairs, "quartz:pillar")
end

View File

@ -1,19 +0,0 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=Cuarzo cincelado
Inner Quartz Pillar Stair=
Inner Quartz Stair=
Outer Quartz Pillar Stair=
Outer Quartz Stair=
Quartz Block=Bloque de cuarzo
Quartz Crystal=Cristal de cuarzo
Quartz Crystal Piece=Trozo de cristal de cuarzo
Quartz Ore=Mineral de cuarzo
Quartz Pillar=Pilar de cuarzo
Quartz Pillar Slab=Losa de pilar de cuarzo
Quartz Pillar Stair=Escaleras de pilar de cuarzo
Quartz Slab=Losa de cuarzo
Quartz Stair=Escaleras de cuarzo

View File

@ -1,19 +0,0 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=Quartz ciselé
Inner Quartz Pillar Stair=Escalier intérieur en pilier en quartz
Inner Quartz Stair=Escalier intérieur en quartz
Outer Quartz Pillar Stair=Escalier extérieur en pilier de quartz
Outer Quartz Stair=Escalier extérieur en quartz
Quartz Block=Bloc de quartz
Quartz Crystal=Cristal de quartz
Quartz Crystal Piece=Morceau de cristal de quartz
Quartz Ore=Minerai de quartz
Quartz Pillar=Pilier en quartz
Quartz Pillar Slab=Dalle en pilier en quartz
Quartz Pillar Stair=Escalier en pilier en quartz
Quartz Slab=Dalle en quartz
Quartz Stair=Escalier en quartz

View File

@ -1,19 +0,0 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=Quartzo Cinzelado
Inner Quartz Pillar Stair=
Inner Quartz Stair=
Outer Quartz Pillar Stair=
Outer Quartz Stair=
Quartz Block=Bloco de Quartzo
Quartz Crystal=Cristal de Quartzo
Quartz Crystal Piece=Pedaço de Cristal de Quartzo
Quartz Ore=Minério de Quartzo
Quartz Pillar=Pilar de Quartzo
Quartz Pillar Slab=Laje de Pilar de Quartzo
Quartz Pillar Stair=Escada de Pilar de Quartzo
Quartz Slab=Laje de quartzo
Quartz Stair=Escada de quartzo

View File

@ -1,19 +0,0 @@
# textdomain: quartz
### init.lua ###
Chiseled Quartz=
Inner Quartz Pillar Stair=
Inner Quartz Stair=
Outer Quartz Pillar Stair=
Outer Quartz Stair=
Quartz Block=
Quartz Crystal=
Quartz Crystal Piece=
Quartz Ore=
Quartz Pillar=
Quartz Pillar Slab=
Quartz Pillar Stair=
Quartz Slab=
Quartz Stair=

View File

@ -1,4 +0,0 @@
name = quartz
description = Adds quartz ore and some decorative quartz blocks.
depends = default,stairs
optional_depends = moreblocks,stairsplus

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

8
settings.txt Normal file → Executable file
View File

@ -1,7 +1,7 @@
# Set this to true to allow usage of the stairsplus mod in moreblocks
-- Set this to true to allow usage of the stairsplus mod in moreblocks
ENABLE_STAIRSPLUS = false
enable_stairsplus = false
# This enables the old horizontal pillar block(deprecated, be sure to convert them back to normal pillars)
-- This enables the old horizontal pillar block(deprecated, be sure to convert them back to normal pillars)
ENABLE_HORIZONTAL_PILLAR = true
enable_horizontal_pillar = true

BIN
textures/quartz_block.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 264 B

BIN
textures/quartz_chiseled.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 361 B

BIN
textures/quartz_crystal_full.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 193 B

BIN
textures/quartz_crystal_piece.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 166 B

BIN
textures/quartz_pillar_side.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 384 B

BIN
textures/quartz_pillar_side_horizontal.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 261 B

BIN
textures/quartz_pillar_top.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 369 B