mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-25 02:10:37 +01:00
12919e9a16
* cave pearls and spindleshrooms (name subject to change) now are things. Not in mapgen yet. * add the wandering "gas wisp" to light up some of the gas-filled caverns * make wisps rarely spawned by gas explosions * revamp spindlestems into a sort of mineral detector, add glowing extract bottles * optimize pngs * add gas wisps to mapgen * add spindlestems to cavern level 1, most level 1 warrens are now lit up * update internal names, adjust mineral detection range * add cave pearls to some level 2 warrens and tunnels * switch experimental simplecrafting_lib support to crafting mod * Pearls don't grow on falling nodes * put spindlestems with goblin caps, make them always grow red when near those * bunch of documentation * add castle coral to replace cave coral, which has been repurposed into column decoration * documentation for cave coral, update some locale text * add a recipe for cooking oil into paraffin * add old bones to the underworld * MIT license for bones_loot * also cook black cap gills into paraffin, they're oily * add salt crystals to the bloodthorn caverns, illuminating the floor * documentation for salt crystals * auto-generate minetestmapper colors. need to update the spindlestem colours manually * add spindlestem to fungiwood caverns too, and increase warren coverage * in anticipation of eventually adding stuff below the Slade, making glowing pit erosion self-limiting. * add a bit of displacement to the underside of the slade layer * Unique images and names for cooking recipes. * revamp bones loot * add softer footsteps for some fungus types * update mapgen_helper * update cave coral screenshot * mention glowing salts in bloodthorn caverns
46 lines
1.1 KiB
Lua
46 lines
1.1 KiB
Lua
|
|
-- 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
|