make gold coin denomination configurable with a single setting
This commit is contained in:
parent
6d8c8a6582
commit
d0d4d7b0e4
20
init.lua
20
init.lua
@ -18,16 +18,18 @@ local S, NS = dofile(modpath.."/intllib.lua")
|
||||
|
||||
dofile(modpath.."/mapgen_dungeon_markets.lua")
|
||||
|
||||
local coins_per_ingot = math.floor(tonumber(minetest.settings:get("commoditymarket_coins_per_ingot")) or 1000)
|
||||
|
||||
-- Only register gold coins once, if required
|
||||
local gold_coins_registered = false
|
||||
local register_gold_coins = function()
|
||||
if not gold_coins_registered then
|
||||
minetest.register_craftitem("commoditymarket_fantasy:gold_coins", {
|
||||
description = S("Gold Coins"),
|
||||
_doc_items_longdesc = S("A gold ingot is far too valuable to use as a basic unit of value, so it has become common practice to divide the standard gold bar into one thousand small disks to make trade easier."),
|
||||
_doc_items_usagehelp = S("Gold coins can be deposited and withdrawn from markets that accept them as currency. These markets can make change if you have a thousand coins and would like them back in ingot form again."),
|
||||
_doc_items_longdesc = S("A gold ingot is far too valuable to use as a basic unit of value, so it has become common practice to divide the standard gold bar into @1 small disks to make trade easier.", coins_per_ingot),
|
||||
_doc_items_usagehelp = S("Gold coins can be deposited and withdrawn from markets that accept them as currency. These markets can make change if you have @1 coins and would like them back in ingot form again.", coins_per_ingot),
|
||||
inventory_image = "commoditymarket_gold_coins.png",
|
||||
stack_max = 1000,
|
||||
stack_max = coins_per_ingot,
|
||||
})
|
||||
gold_coins_registered = true
|
||||
end
|
||||
@ -44,9 +46,9 @@ if minetest.settings:get_bool("commoditymarket_enable_kings_market", true) then
|
||||
|
||||
local kings_def = {
|
||||
description = S("King's Market"),
|
||||
long_description = S("The largest and most accessible market for the common man, the King's Market uses gold coins as its medium of exchange (or the equivalent in gold ingots - 1000 coins to the ingot). However, as a respectable institution of the surface world, the King's Market operates only during the hours of daylight. The purchase and sale of swords and explosives is prohibited in the King's Market. Gold coins are represented by a '☼' symbol."),
|
||||
long_description = S("The largest and most accessible market for the common man, the King's Market uses gold coins as its medium of exchange (or the equivalent in gold ingots - @1 coins to the ingot). However, as a respectable institution of the surface world, the King's Market operates only during the hours of daylight. The purchase and sale of swords and explosives is prohibited in the King's Market. Gold coins are represented by a '☼' symbol.", coins_per_ingot),
|
||||
currency = {
|
||||
["default:gold_ingot"] = 1000,
|
||||
["default:gold_ingot"] = coins_per_ingot,
|
||||
["commoditymarket_fantasy:gold_coins"] = 1
|
||||
},
|
||||
currency_symbol = "☼", -- "\u{263C}" Alchemical symbol for gold
|
||||
@ -103,9 +105,9 @@ end
|
||||
if minetest.settings:get_bool("commoditymarket_enable_night_market", true) then
|
||||
local night_def = {
|
||||
description = S("Night Market"),
|
||||
long_description = "When the sun sets and the stalls of the King's Market close, other vendors are just waking up to share their wares. The Night Market is not as voluminous as the King's Market but accepts a wider range of wares. It accepts the same gold coinage of the realm, one thousand coins to the gold ingot.",
|
||||
long_description = S("When the sun sets and the stalls of the King's Market close, other vendors are just waking up to share their wares. The Night Market is not as voluminous as the King's Market but accepts a wider range of wares. It accepts the same gold coinage of the realm, @1 coins to the gold ingot.", coins_per_ingot),
|
||||
currency = {
|
||||
["default:gold_ingot"] = 1000,
|
||||
["default:gold_ingot"] = coins_per_ingot,
|
||||
["commoditymarket_fantasy:gold_coins"] = 1
|
||||
},
|
||||
currency_symbol = "☼", --"\u{263C}"
|
||||
@ -161,9 +163,9 @@ local dwell_time = 600 -- caravan leaves ten minutes after last usage
|
||||
|
||||
local caravan_def = {
|
||||
description = S("Trader's Caravan"),
|
||||
long_description = S("Unlike most markets that have well-known fixed locations that travelers congregate to, the network of Trader's Caravans is fluid and dynamic in their locations. A Trader's Caravan can show up anywhere, make modest trades, and then be gone the next time you visit them. These caravans accept gold and gold coins as a currency (one gold ingot to one thousand gold coins exchange rate). Any reasonably-wealthy person can create a signpost marking a location where Trader's Caravans will make a stop."),
|
||||
long_description = S("Unlike most markets that have well-known fixed locations that travelers congregate to, the network of Trader's Caravans is fluid and dynamic in their locations. A Trader's Caravan can show up anywhere, make modest trades, and then be gone the next time you visit them. These caravans accept gold and gold coins as a currency (one gold ingot to @1 gold coins exchange rate). Any reasonably-wealthy person can create a signpost marking a location where Trader's Caravans will make a stop.", coins_per_ingot),
|
||||
currency = {
|
||||
["default:gold_ingot"] = 1000,
|
||||
["default:gold_ingot"] = coins_per_ingot,
|
||||
["commoditymarket_fantasy:gold_coins"] = 1
|
||||
},
|
||||
currency_symbol = "☼", --"\u{263C}"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-01-18 16:58-0700\n"
|
||||
"POT-Creation-Date: 2020-02-13 22:14-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"
|
||||
@ -17,109 +17,117 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:26
|
||||
#: commoditymarket_fantasy\init.lua:28
|
||||
msgid "Gold Coins"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:27
|
||||
#: commoditymarket_fantasy\init.lua:29
|
||||
msgid ""
|
||||
"A gold ingot is far too valuable to use as a basic unit of value, so it has "
|
||||
"become common practice to divide the standard gold bar into one thousand "
|
||||
"small disks to make trade easier."
|
||||
"become common practice to divide the standard gold bar into @1 small disks "
|
||||
"to make trade easier."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:28
|
||||
#: commoditymarket_fantasy\init.lua:30
|
||||
msgid ""
|
||||
"Gold coins can be deposited and withdrawn from markets that accept them as "
|
||||
"currency. These markets can make change if you have a thousand coins and "
|
||||
"would like them back in ingot form again."
|
||||
"currency. These markets can make change if you have @1 coins and would like "
|
||||
"them back in ingot form again."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:38
|
||||
#: commoditymarket_fantasy\init.lua:40
|
||||
msgid "Right-click on this to open the market interface."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:46
|
||||
#: commoditymarket_fantasy\init.lua:48
|
||||
msgid "King's Market"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:47
|
||||
#: commoditymarket_fantasy\init.lua:49
|
||||
msgid ""
|
||||
"The largest and most accessible market for the common man, the King's Market "
|
||||
"uses gold coins as its medium of exchange (or the equivalent in gold ingots "
|
||||
"- 1000 coins to the ingot). However, as a respectable institution of the "
|
||||
"- @1 coins to the ingot). However, as a respectable institution of the "
|
||||
"surface world, the King's Market operates only during the hours of daylight. "
|
||||
"The purchase and sale of swords and explosives is prohibited in the King's "
|
||||
"Market. Gold coins are represented by a '☼' symbol."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:90
|
||||
#: commoditymarket_fantasy\init.lua:92
|
||||
msgid "At this time of day the King's Market is closed."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:105
|
||||
#: commoditymarket_fantasy\init.lua:107
|
||||
msgid "Night Market"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:144
|
||||
#: commoditymarket_fantasy\init.lua:108
|
||||
msgid ""
|
||||
"When the sun sets and the stalls of the King's Market close, other vendors "
|
||||
"are just waking up to share their wares. The Night Market is not as "
|
||||
"voluminous as the King's Market but accepts a wider range of wares. It "
|
||||
"accepts the same gold coinage of the realm, @1 coins to the gold ingot."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:146
|
||||
msgid "At this time of day the Night Market is closed."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:163
|
||||
#: commoditymarket_fantasy\init.lua:165
|
||||
msgid "Trader's Caravan"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:164
|
||||
#: commoditymarket_fantasy\init.lua:166
|
||||
msgid ""
|
||||
"Unlike most markets that have well-known fixed locations that travelers "
|
||||
"congregate to, the network of Trader's Caravans is fluid and dynamic in "
|
||||
"their locations. A Trader's Caravan can show up anywhere, make modest "
|
||||
"trades, and then be gone the next time you visit them. These caravans accept "
|
||||
"gold and gold coins as a currency (one gold ingot to one thousand gold coins "
|
||||
"exchange rate). Any reasonably-wealthy person can create a signpost marking "
|
||||
"a location where Trader's Caravans will make a stop."
|
||||
"gold and gold coins as a currency (one gold ingot to @1 gold coins exchange "
|
||||
"rate). Any reasonably-wealthy person can create a signpost marking a "
|
||||
"location where Trader's Caravans will make a stop."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:232
|
||||
#: commoditymarket_fantasy\init.lua:236
|
||||
msgid "Right-click to summon a trader's caravan"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:375
|
||||
#: commoditymarket_fantasy\init.lua:379
|
||||
msgid "Trading Post"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:376
|
||||
#: commoditymarket_fantasy\init.lua:380
|
||||
msgid ""
|
||||
"This post signals passing caravan traders that customers can be found here, "
|
||||
"and signals to customers that caravan traders can be found here. If no "
|
||||
"caravan is present, right-click to summon one."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:377
|
||||
#: commoditymarket_fantasy\init.lua:381
|
||||
msgid ""
|
||||
"The trader's caravan requires a suitable open space next to the trading post "
|
||||
"for it to arrive, and takes some time to arrive after being summoned. The "
|
||||
"post gives a countdown to the caravan's arrival when moused over."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:424
|
||||
#: commoditymarket_fantasy\init.lua:428
|
||||
msgid ""
|
||||
"Indicated parking area isn't suitable.\n"
|
||||
"A 5x3 open space with solid ground\n"
|
||||
"is required for a caravan."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:434
|
||||
#: commoditymarket_fantasy\init.lua:438
|
||||
msgid ""
|
||||
"Caravan summoned\n"
|
||||
"ETA: @1 seconds."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:460
|
||||
#: commoditymarket_fantasy\init.lua:464
|
||||
msgid "Goblin Exchange"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:461
|
||||
#: commoditymarket_fantasy\init.lua:465
|
||||
msgid ""
|
||||
"One does not usually associate Goblins with the sort of sophistication that "
|
||||
"running a market requires. Usually one just associates Goblins with savagery "
|
||||
@ -131,11 +139,11 @@ msgid ""
|
||||
"brokers prefer to \"keep the change\" when giving back actual coal lumps)."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:502
|
||||
#: commoditymarket_fantasy\init.lua:506
|
||||
msgid "Undermarket"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket_fantasy\init.lua:503
|
||||
#: commoditymarket_fantasy\init.lua:507
|
||||
msgid ""
|
||||
"Deep in the bowels of the world, below even the goblin-infested warrens and "
|
||||
"ancient delvings of the dwarves, dark and mysterious beings once dwelled. A "
|
||||
|
@ -12,6 +12,9 @@ commoditymarket_protect_caravan_market (Protect permanent Caravan node) bool tru
|
||||
commoditymarket_protect_goblin_market (Protect Goblin Market node) bool true
|
||||
commoditymarket_protect_under_market (Protect Undermarket node) bool true
|
||||
|
||||
[Currency denominations]
|
||||
commoditymarket_coins_per_ingot (Coins per ingot) int 1000
|
||||
|
||||
[Dungeon market generation]
|
||||
commoditymarket_goblin_market_dungeon_prob (Goblin market probability per dungeon mapblock) float 0.25 0 1
|
||||
commoditymarket_goblin_market_dungeon_max (Upper y limit of goblin markets) int 100
|
||||
|
Loading…
x
Reference in New Issue
Block a user