[quartz] Update to Git commit 00ca4eb:

https://github.com/minetest-mods/quartz/tree/00ca4eb
master
AntumDeluge 2017-05-11 11:28:50 -07:00
parent fd3821dba2
commit 6f03ff70f4
5 changed files with 69 additions and 17 deletions

View File

@ -51,7 +51,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* walking_light ([petermalone fork][walking_light]) ([WTFPL / CC-BY-SA][lic.walking_light]) -- version: [b9de302 Git][ver.walking_light] *2016-09-09* ([patched][patch.walking_light])
* materials/
* [moreores][] ([zlib / CC-BY-SA][lic.moreores]) -- version: [0842b4f Git][ver.moreores] *2017-03-21* ([patched][patch.moreores])
* [quartz][] ([MIT](mods/materials/quartz/LICENSE.txt))
* [quartz][] ([MIT][lic.quartz]) -- version: [00ca4eb Git][ver.quartz] *2017-02-28*
* [rainbow_ore][] ([LGPL][lic.rainbow_ore]) -- version: [6e77693 Git][ver.rainbow_ore] *2015-11-02* ([patched][patch.rainbow_ore])
* [unifieddyes][] ([GPL](mods/materials/unifieddyes/LICENSE)) -- version: [df177c2 Git][ver.unifieddyes] *2017-03-18* ([patched][patch.unifieddyes])
* mobs/
@ -364,6 +364,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[lic.mywoodslopes]: mods/wood/mywoodslopes/licence.txt
[lic.playeranim]: mods/player_visuals/playeranim/license.md
[lic.privilegeareas]: mods/admin/privilegeareas/README.md
[lic.quartz]: mods/materials/quartz/LICENSE.txt
[lic.rainbow_ore]: mods/materials/rainbow_ore/README.md
[lic.simple_protection]: mods/protection/simple_protection/README.md
[lic.spawneggs]: mods/spawning/spawneggs/README.txt
@ -419,6 +420,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.mywoodslopes]: https://github.com/minetest-mods/mywoodslopes/tree/3a1b531
[ver.playeranim]: https://github.com/minetest-mods/playeranim/tree/0ca8e5a
[ver.privilegeareas]: https://github.com/minetest-mods/privilegeareas/tree/aebaa00
[ver.quartz]: https://github.com/minetest-mods/quartz/tree/00ca4eb
[ver.rainbow_ore]: https://github.com/FsxShader2012/rainbow_ore/tree/6e77693
[ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/23c024f
[ver.spawneggs]: https://github.com/thefamilygrog66/spawneggs/tree/4650370

View File

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

View File

@ -1,4 +1,8 @@
dofile(minetest.get_modpath("quartz").."/settings.txt")
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
@ -6,11 +10,11 @@ dofile(minetest.get_modpath("quartz").."/settings.txt")
-- Quartz Crystal
minetest.register_craftitem("quartz:quartz_crystal", {
description = "Quartz Crystal",
description = S("Quartz Crystal"),
inventory_image = "quartz_crystal_full.png",
})
minetest.register_craftitem("quartz:quartz_crystal_piece", {
description = "Quartz Crystal Piece",
description = S("Quartz Crystal Piece"),
inventory_image = "quartz_crystal_piece.png",
})
@ -20,7 +24,7 @@ minetest.register_craftitem("quartz:quartz_crystal_piece", {
-- Ore
minetest.register_node("quartz:quartz_ore", {
description = "Quartz Ore",
description = S("Quartz Ore"),
tiles = {"default_stone.png^quartz_ore.png"},
groups = {cracky=3, stone=1},
drop = 'quartz:quartz_crystal',
@ -40,7 +44,7 @@ minetest.register_ore({
-- Quartz Block
minetest.register_node("quartz:block", {
description = "Quartz Block",
description = S("Quartz Block"),
tiles = {"quartz_block.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
@ -48,7 +52,7 @@ minetest.register_node("quartz:block", {
-- Chiseled Quartz
minetest.register_node("quartz:chiseled", {
description = "Chiseled Quartz",
description = S("Chiseled Quartz"),
tiles = {"quartz_chiseled.png"},
groups = {cracky=3, oddly_breakable_by_hand=1},
sounds = default.node_sound_glass_defaults(),
@ -56,7 +60,7 @@ minetest.register_node("quartz:chiseled", {
-- Quartz Pillar
minetest.register_node("quartz:pillar", {
description = "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},
@ -68,15 +72,15 @@ minetest.register_node("quartz:pillar", {
stairs.register_stair_and_slab("quartzblock", "quartz:block",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_block.png"},
"Quartz stair",
"Quartz slab",
S("Quartz stair"),
S("Quartz slab"),
default.node_sound_glass_defaults())
stairs.register_slab("quartzstair", "quartz:pillar",
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"},
"Quartz Pillar stair",
"Quartz Pillar slab",
S("Quartz Pillar stair"),
S("Quartz Pillar slab"),
default.node_sound_glass_defaults())
--
@ -153,7 +157,7 @@ minetest.register_abm({
-- Compatibility with stairsplus
--
if minetest.get_modpath("moreblocks") and ENABLE_STAIRSPLUS then
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"},
@ -187,7 +191,7 @@ end
-- Deprecated
--
if ENABLE_HORIZONTAL_PILLAR then
if settings:get_bool("ENABLE_HORIZONTAL_PILLAR") then
-- Quartz Pillar (horizontal)
minetest.register_node("quartz:pillar_horizontal", {
description = "Quartz Pillar Horizontal",

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

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