This commit is contained in:
Milan2018 2021-06-20 08:41:45 +02:00
parent af64af9c78
commit 171898f275
21 changed files with 597 additions and 0 deletions

21
quartz/LICENSE.txt Normal file
View file

@ -0,0 +1,21 @@
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.

82
quartz/README.txt Normal file
View file

@ -0,0 +1,82 @@
___ _ __ __ _
/ _ \ _ _ __ _ _ __| |_ ____ | \/ | ___ __| |
| | | | | | |/ _` | '__| __|_ / | |\/| |/ _ \ / _` |
| |_| | |_| | (_| | | | |_ / / | | | | (_) | (_| |
\__\_\\__,_|\__,_|_| \__/___| |_| |_|\___/ \__,_|
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 (optional, for stairsplus support)
Please report bugs at the github issue tracker:
https://github.com/minetest-mods/quartz/issues/
Crafting:
Quartz Block:
c = quartz crystal x = nothing
x|x|x
-----
c|c|x
-----
c|c|x
Quartz Pillar:
q = quartz block x = nothing
x|x|x
-----
x|q|x
-----
x|x|x
Quartz Slab:
q = quartz block x = nothing
x|x|x
-----
x|x|x
-----
q|q|q
Quartz Stairs:
q = quartz block x = nothing
q|x|x
q|q|x
q|q|q
Quartz Pillar Slab:
q = quartz pillar x = nothing
x|x|x
-----
x|x|x
-----
q|q|q
Chiseled Quartz:
q = quartz slab x = nothing
x|x|x
-----
x|q|x
-----
x|q|x
Quartz Crystal Piece (usless as of now):
c = quartz crystal x = nothing
x|x|x
-----
x|c|x
-----
x|x|x

4
quartz/depends.txt Normal file
View file

@ -0,0 +1,4 @@
default
stairs
moreblocks?
intllib?

1
quartz/description.txt Normal file
View file

@ -0,0 +1 @@
Adds quartz ore and some decorative quartz blocks

205
quartz/init.lua Normal file
View file

@ -0,0 +1,205 @@
local settings = Settings(minetest.get_modpath("quartz").."/settings.txt")
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--
-- Item Registration
--
-- Quartz Crystal
minetest.register_craftitem("quartz:quartz_crystal", {
description = S("Quartz Crystal"),
inventory_image = "quartz_crystal_full.png",
})
minetest.register_craftitem("quartz:quartz_crystal_piece", {
description = S("Quartz Crystal Piece"),
inventory_image = "quartz_crystal_piece.png",
})
--
-- Node Registration
--
-- Ore
minetest.register_node("quartz:quartz_ore", {
description = S("Quartz Ore"),
tiles = {"default_stone.png^quartz_ore.png"},
groups = {cracky=3, stone=1},
drop = 'quartz:quartz_crystal',
sounds = default.node_sound_stone_defaults(),
})
minetest.register_ore({
ore_type = "scatter",
ore = "quartz:quartz_ore",
wherein = "default:stone",
clust_scarcity = 10*10*10,
clust_num_ores = 6,
clust_size = 5,
y_min = -31000,
y_max = -5,
})
-- Quartz Block
minetest.register_node("quartz:block", {
description = S("Quartz Block"),
tiles = {"quartz_block.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
})
-- Chiseled Quartz
minetest.register_node("quartz:chiseled", {
description = S("Chiseled Quartz"),
tiles = {"quartz_chiseled.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
})
-- Quartz Pillar
minetest.register_node("quartz:pillar", {
description = S("Quartz Pillar"),
paramtype2 = "facedir",
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())
stairs.register_stair_and_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())
--
-- Crafting
--
-- Quartz Crystal Piece
minetest.register_craft({
output = '"quartz:quartz_crystal_piece" 3',
recipe = {
{'quartz:quartz_crystal'}
}
})
-- Quartz Block
minetest.register_craft({
output = '"quartz:block" 4',
recipe = {
{'quartz:quartz_crystal', 'quartz:quartz_crystal', ''},
{'quartz:quartz_crystal', 'quartz:quartz_crystal', ''},
{'', '', ''}
}
})
-- Chiseled Quartz
minetest.register_craft({
output = 'quartz:chiseled 2',
recipe = {
{'stairs:slab_quartzblock', '', ''},
{'stairs:slab_quartzblock', '', ''},
{'', '', ''},
}
})
-- Chiseled Quartz (for stairsplus)
minetest.register_craft({
output = 'quartz:chiseled 2',
recipe = {
{'quartz:slab_block', '', ''},
{'quartz:slab_block', '', ''},
{'', '', ''},
}
})
-- Quartz Pillar
minetest.register_craft({
output = 'quartz:pillar 2',
recipe = {
{'quartz:block', '', ''},
{'quartz:block', '', ''},
{'', '', ''},
}
})
--
-- 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,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
nfdir = dirs2[fdir+1]
minetest.add_node(pos, {name = "quartz:pillar", param2 = nfdir})
end,
})
--
-- Compatibility with stairsplus
--
if minetest.get_modpath("moreblocks") and settings:get_bool("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
--
-- Deprecated
--
if settings:get_bool("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"},
paramtype2 = "facedir",
drop = 'quartz:pillar',
groups = {cracky=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
end

45
quartz/intllib.lua Normal file
View file

@ -0,0 +1,45 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

59
quartz/locale/es.po Normal file
View file

@ -0,0 +1,59 @@
# Spanish translations for PACKAGE package
# Traducciones al español para el paquete PACKAGE.
# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Diego Martínez <kaeza@users.noreply.github.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-19 21:50-0700\n"
"PO-Revision-Date: 2017-02-20 15:03-0300\n"
"Last-Translator: Diego Martínez <kaeza@users.noreply.github.com>\n"
"Language-Team: Spanish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr "Cristal de cuarzo"
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr "Trozo de cristal de cuarzo"
#: init.lua:27
msgid "Quartz Ore"
msgstr "Mineral de cuarzo"
#: init.lua:47
msgid "Quartz Block"
msgstr "Bloque de cuarzo"
#: init.lua:55
msgid "Chiseled Quartz"
msgstr "Cuarzo cincelado"
#: init.lua:63
msgid "Quartz Pillar"
msgstr "Pilar de cuarzo"
#: init.lua:75
msgid "Quartz stair"
msgstr "Escaleras de cuarzo"
#: init.lua:76
msgid "Quartz slab"
msgstr "Losa de cuarzo"
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr "Escaleras de pilar de cuarzo"
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr "Losa de pilar de cuarzo"

54
quartz/locale/fr.po Normal file
View file

@ -0,0 +1,54 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-04 07:46+0100\n"
"PO-Revision-Date: 2017-03-04 07:48+0100\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.9\n"
"Last-Translator: Peppy <peppy@twang-factory.com>\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr "Cristal de quartz"
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr "Morceau de cristal de quartz"
#: init.lua:27
msgid "Quartz Ore"
msgstr "Minerai de quartz"
#: init.lua:47
msgid "Quartz Block"
msgstr "Bloc de quartz"
#: init.lua:55
msgid "Chiseled Quartz"
msgstr "Quartz ciselé"
#: init.lua:63
msgid "Quartz Pillar"
msgstr "Pilier en quartz"
#: init.lua:75
msgid "Quartz stair"
msgstr "Escalier en quartz"
#: init.lua:76
msgid "Quartz slab"
msgstr "Dalle en quartz"
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr "Escalier en pilier en quartz"
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr "Dalle en pilier en quartz"

57
quartz/locale/pt_br.po Normal file
View file

@ -0,0 +1,57 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-19 21:50-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr "Cristal de Quartzo"
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr "Pedaço de Cristal de Quartzo"
#: init.lua:27
msgid "Quartz Ore"
msgstr "Minério de Quartzo"
#: init.lua:47
msgid "Quartz Block"
msgstr "Bloco de Quartzo"
#: init.lua:55
msgid "Chiseled Quartz"
msgstr "Quartzo Cinzelado"
#: init.lua:63
msgid "Quartz Pillar"
msgstr "Pilar de Quartzo"
#: init.lua:75
msgid "Quartz stair"
msgstr "Escada de quartzo"
#: init.lua:76
msgid "Quartz slab"
msgstr "Laje de quartzo"
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr "Escada de Pilar de Quartzo"
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr "Laje de Pilar de Quartzo"

View file

@ -0,0 +1,57 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-19 21:50-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua:13
msgid "Quartz Crystal"
msgstr ""
#: init.lua:17
msgid "Quartz Crystal Piece"
msgstr ""
#: init.lua:27
msgid "Quartz Ore"
msgstr ""
#: init.lua:47
msgid "Quartz Block"
msgstr ""
#: init.lua:55
msgid "Chiseled Quartz"
msgstr ""
#: init.lua:63
msgid "Quartz Pillar"
msgstr ""
#: init.lua:75
msgid "Quartz stair"
msgstr ""
#: init.lua:76
msgid "Quartz slab"
msgstr ""
#: init.lua:82
msgid "Quartz Pillar stair"
msgstr ""
#: init.lua:83
msgid "Quartz Pillar slab"
msgstr ""

5
quartz/mod.conf Normal file
View file

@ -0,0 +1,5 @@
name = quartz
author = Evergreen
description = Adds quartz ore and some decorative quartz blocks
release = 75
title = Quartz

BIN
quartz/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

7
quartz/settings.txt Normal file
View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB