intllib support, add 5 random reskinned trader caravans
This commit is contained in:
parent
3984b625a9
commit
7aa0f4501b
@ -1,17 +1,24 @@
|
||||
local default_modpath = minetest.get_modpath("default")
|
||||
if not default_modpath then return end
|
||||
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
local gold_coins_required = false
|
||||
|
||||
local default_items = {"default:axe_bronze","default:axe_diamond","default:axe_mese","default:axe_steel","default:axe_steel","default:axe_stone","default:axe_wood","default:pick_bronze","default:pick_diamond","default:pick_mese","default:pick_steel","default:pick_stone","default:pick_wood","default:shovel_bronze","default:shovel_diamond","default:shovel_mese","default:shovel_steel","default:shovel_stone","default:shovel_wood","default:sword_bronze","default:sword_diamond","default:sword_mese","default:sword_steel","default:sword_stone","default:sword_wood", "default:blueberries", "default:book", "default:bronze_ingot", "default:clay_brick", "default:clay_lump", "default:coal_lump", "default:copper_ingot", "default:copper_lump", "default:diamond", "default:flint", "default:gold_ingot", "default:gold_lump", "default:iron_lump", "default:mese_crystal", "default:mese_crystal_fragment", "default:obsidian_shard", "default:paper", "default:steel_ingot", "default:stick", "default:tin_ingot", "default:tin_lump", "default:acacia_tree", "default:acacia_wood", "default:apple", "default:aspen_tree", "default:aspen_wood", "default:blueberry_bush_sapling", "default:bookshelf", "default:brick", "default:bronzeblock", "default:bush_sapling", "default:cactus", "default:clay", "default:coalblock", "default:cobble", "default:copperblock", "default:desert_cobble", "default:desert_sand", "default:desert_sandstone", "default:desert_sandstone_block", "default:desert_sandstone_brick", "default:desert_stone", "default:desert_stone_block", "default:desert_stonebrick", "default:diamondblock", "default:dirt", "default:glass", "default:goldblock", "default:gravel", "default:ice", "default:junglegrass", "default:junglesapling", "default:jungletree", "default:junglewood", "default:ladder_steel", "default:ladder_wood", "default:large_cactus_seedling", "default:mese", "default:mese_post_light", "default:meselamp", "default:mossycobble", "default:obsidian", "default:obsidian_block", "default:obsidian_glass", "default:obsidianbrick", "default:papyrus", "default:pine_sapling", "default:pine_tree", "default:pine_wood", "default:sand", "default:sandstone", "default:sandstone_block", "default:sandstonebrick", "default:sapling", "default:silver_sand", "default:silver_sandstone", "default:silver_sandstone_block", "default:silver_sandstone_brick", "default:snow", "default:snowblock", "default:steelblock", "default:stone", "default:stone_block", "default:stonebrick", "default:tinblock", "default:tree", "default:wood",}
|
||||
|
||||
local usage_help = S("Right-click on this to open the market interface.")
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- King's Market
|
||||
|
||||
if minetest.settings:get_bool("commoditymarket_enable_kings_market") then
|
||||
|
||||
local kings_def = {
|
||||
description = "King's Market",
|
||||
long_description = "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.",
|
||||
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."),
|
||||
currency = {
|
||||
["default:gold_ingot"] = 1000,
|
||||
["commoditymarket:gold_coins"] = 1
|
||||
@ -33,8 +40,9 @@ gold_coins_required = true
|
||||
commoditymarket.register_market("kings", kings_def)
|
||||
|
||||
minetest.register_node("commoditymarket:kings_market", {
|
||||
description = "King's Market",
|
||||
_doc_items_longdesc = "",
|
||||
description = kings_def.description,
|
||||
_doc_items_longdesc = kings_def.long_description,
|
||||
_doc_items_usagehelp = usage_help,
|
||||
tiles = {"default_chest_top.png","default_chest_top.png",
|
||||
"default_chest_side.png","default_chest_side.png",
|
||||
"commoditymarket_empty_shelf.png","default_chest_side.png^commoditymarket_crown.png",},
|
||||
@ -47,7 +55,7 @@ minetest.register_node("commoditymarket:kings_market", {
|
||||
if timeofday > 0.2 and timeofday < 0.8 then
|
||||
commoditymarket.show_market("kings", clicker:get_player_name())
|
||||
else
|
||||
minetest.chat_send_player(clicker:get_player_name(), "At this time of day the King's Market is closed.")
|
||||
minetest.chat_send_player(clicker:get_player_name(), S("At this time of day the King's Market is closed."))
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -57,7 +65,7 @@ end
|
||||
|
||||
if minetest.settings:get_bool("commoditymarket_enable_night_market") then
|
||||
local night_def = {
|
||||
description = "Night Market",
|
||||
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.",
|
||||
currency = {
|
||||
["default:gold_ingot"] = 1000,
|
||||
@ -77,6 +85,7 @@ commoditymarket.register_market("night", night_def)
|
||||
minetest.register_node("commoditymarket:night_market", {
|
||||
description = night_def.description,
|
||||
_doc_items_longdesc = night_def.long_description,
|
||||
_doc_items_usagehelp = usage_help,
|
||||
tiles = {"default_chest_top.png","default_chest_top.png",
|
||||
"default_chest_side.png","default_chest_side.png",
|
||||
"commoditymarket_empty_shelf.png","default_chest_side.png^commoditymarket_moon.png",},
|
||||
@ -89,7 +98,7 @@ minetest.register_node("commoditymarket:night_market", {
|
||||
if timeofday < 0.2 or timeofday > 0.8 then
|
||||
commoditymarket.show_market("night", clicker:get_player_name())
|
||||
else
|
||||
minetest.chat_send_player(clicker:get_player_name(), "At this time of day the Night Market is closed.")
|
||||
minetest.chat_send_player(clicker:get_player_name(), S("At this time of day the Night Market is closed."))
|
||||
end
|
||||
end,
|
||||
})
|
||||
@ -103,8 +112,8 @@ local time_until_caravan = 120 -- caravan arrives in two minutes
|
||||
local dwell_time = 600 -- caravan leaves ten minutes after last usage
|
||||
|
||||
local caravan_def = {
|
||||
description = "Trader's Caravan",
|
||||
long_description = "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.",
|
||||
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."),
|
||||
currency = {
|
||||
["default:gold_ingot"] = 1000,
|
||||
["commoditymarket:gold_coins"] = 1
|
||||
@ -128,67 +137,118 @@ minetest.register_craft({
|
||||
|
||||
commoditymarket.register_market("caravan", caravan_def)
|
||||
|
||||
minetest.register_node("commoditymarket:caravan_market", {
|
||||
description = "Trader's Caravan",
|
||||
_doc_items_longdesc = caravan_def.long_description,
|
||||
|
||||
drawtype = "mesh",
|
||||
mesh = "commoditymarket_wagon.obj",
|
||||
tiles = {
|
||||
{ name = "commoditymarket_door_wood.png", backface_culling = true }, -- door
|
||||
{ name = "default_wood.png", backface_culling = true }, -- base wood
|
||||
{ name = "default_fence_rail_wood.png", backface_culling = true }, -- wheel sides
|
||||
{ name = "default_coal_block.png", backface_culling = true }, -- wheel tyre
|
||||
{ name = "commoditymarket_shingles_wood.png", backface_culling = true }, -- roof
|
||||
{ name = "default_junglewood.png", backface_culling = true }, -- corner wood
|
||||
local create_caravan_def = function(override_table)
|
||||
local def = {
|
||||
description = caravan_def.description,
|
||||
_doc_items_longdesc = caravan_def.long_description,
|
||||
_doc_items_usagehelp = usage_help,
|
||||
drawtype = "mesh",
|
||||
mesh = "commoditymarket_wagon.obj",
|
||||
tiles = {
|
||||
{ name = "commoditymarket_door_wood.png", backface_culling = true }, -- door
|
||||
{ name = "default_wood.png", backface_culling = true }, -- base wood
|
||||
{ name = "default_fence_rail_wood.png", backface_culling = true }, -- wheel sides
|
||||
{ name = "default_coal_block.png", backface_culling = true }, -- wheel tyre
|
||||
{ name = "commoditymarket_shingles_wood.png", backface_culling = true }, -- roof
|
||||
{ name = "default_junglewood.png", backface_culling = true }, -- corner wood
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.75, -0.5, -1.25, 0.75, 1.5, 1.25},
|
||||
},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.75, -0.5, -1.25, 0.75, 1.5, 1.25},
|
||||
},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.75, -0.5, -1.25, 0.75, 1.5, 1.25},
|
||||
},
|
||||
},
|
||||
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
commoditymarket.show_market("caravan", clicker:get_player_name())
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(dwell_time)
|
||||
end,
|
||||
after_destruct = function(pos, oldnode)
|
||||
local facedir = oldnode.param2
|
||||
local dir = minetest.facedir_to_dir(facedir)
|
||||
local target = vector.add(pos, vector.multiply(dir,-3))
|
||||
local target_node = minetest.get_node(target)
|
||||
if target_node.name == "commoditymarket:caravan_post" then
|
||||
local meta = minetest.get_meta(target)
|
||||
meta:set_string("infotext", "Right-click to summon another caravan")
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.75, -0.5, -1.25, 0.75, 1.5, 1.25},
|
||||
},
|
||||
},
|
||||
|
||||
paramtype2 = "facedir",
|
||||
drop = "",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
commoditymarket.show_market("caravan", clicker:get_player_name())
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(dwell_time)
|
||||
end,
|
||||
after_destruct = function(pos, oldnode)
|
||||
local facedir = oldnode.param2
|
||||
local dir = minetest.facedir_to_dir(facedir)
|
||||
local target = vector.add(pos, vector.multiply(dir,-3))
|
||||
local target_node = minetest.get_node(target)
|
||||
if target_node.name == "commoditymarket:caravan_post" then
|
||||
local meta = minetest.get_meta(target)
|
||||
meta:set_string("infotext", S("Right-click to summon a trader's caravan"))
|
||||
end
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
minetest.set_node(pos, {name="air"})
|
||||
minetest.sound_play("commoditymarket_register_closed", {
|
||||
pos = pos,
|
||||
gain = 1.0, -- default
|
||||
max_hear_distance = 32, -- default, uses an euclidean metric
|
||||
})
|
||||
end,
|
||||
}
|
||||
if override_table then
|
||||
for k, v in pairs(override_table) do
|
||||
def[k] = v
|
||||
end
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
minetest.set_node(pos, {name="air"})
|
||||
minetest.sound_play("commoditymarket_register_closed", {
|
||||
pos = pos,
|
||||
gain = 1.0, -- default
|
||||
max_hear_distance = 32, -- default, uses an euclidean metric
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
return def
|
||||
end
|
||||
|
||||
-- Create five caravans with different textures, randomly pick which one shows up.
|
||||
minetest.register_node("commoditymarket:caravan_market_1", create_caravan_def())
|
||||
minetest.register_node("commoditymarket:caravan_market_2", create_caravan_def({
|
||||
tiles = {
|
||||
{ name = "commoditymarket_door_wood.png^[multiply:#CCCCFF", backface_culling = true }, -- door
|
||||
{ name = "default_acacia_wood.png", backface_culling = true }, -- base wood
|
||||
{ name = "default_fence_rail_wood.png", backface_culling = true }, -- wheel sides
|
||||
{ name = "default_copper_block.png", backface_culling = true }, -- wheel tyre
|
||||
{ name = "commoditymarket_shingles_wood.png^[multiply:#CC8888", backface_culling = true }, -- roof
|
||||
{ name = "default_wood.png", backface_culling = true }, -- corner wood
|
||||
}
|
||||
}))
|
||||
minetest.register_node("commoditymarket:caravan_market_3", create_caravan_def({
|
||||
tiles = {
|
||||
{ name = "commoditymarket_door_wood.png", backface_culling = true }, -- door
|
||||
{ name = "default_aspen_wood.png", backface_culling = true }, -- base wood
|
||||
{ name = "default_fence_aspen_wood.png", backface_culling = true }, -- wheel sides
|
||||
{ name = "default_cobble.png", backface_culling = true }, -- wheel tyre
|
||||
{ name = "default_stone_brick.png", backface_culling = true }, -- roof
|
||||
{ name = "default_pine_tree.png", backface_culling = true }, -- corner wood
|
||||
}
|
||||
}))
|
||||
minetest.register_node("commoditymarket:caravan_market_4", create_caravan_def({
|
||||
tiles = {
|
||||
{ name = "commoditymarket_door_wood.png", backface_culling = true }, -- door
|
||||
{ name = "default_junglewood.png", backface_culling = true }, -- base wood
|
||||
{ name = "default_fence_rail_junglewood.png", backface_culling = true }, -- wheel sides
|
||||
{ name = "default_obsidian.png", backface_culling = true }, -- wheel tyre
|
||||
{ name = "commoditymarket_shingles_wood.png^[multiply:#88FF88", backface_culling = true }, -- roof
|
||||
{ name = "default_tree.png", backface_culling = true }, -- corner wood
|
||||
}
|
||||
}))
|
||||
minetest.register_node("commoditymarket:caravan_market_5", create_caravan_def({
|
||||
tiles = {
|
||||
{ name = "commoditymarket_door_wood.png", backface_culling = true }, -- door
|
||||
{ name = "default_pine_wood.png", backface_culling = true }, -- base wood
|
||||
{ name = "default_chest_lock.png", backface_culling = true }, -- wheel sides
|
||||
{ name = "default_chest_top.png", backface_culling = true }, -- wheel tyre
|
||||
{ name = "default_furnace_top.png", backface_culling = true }, -- roof
|
||||
{ name = "default_wood.png", backface_culling = true }, -- corner wood
|
||||
}
|
||||
}))
|
||||
|
||||
-- This one doesn't delete itself, server admins can place a permanent instance of it that way. Maybe inside towns next to bigger stationary markets.
|
||||
minetest.register_node("commoditymarket:caravan_market_permanent", {
|
||||
description = "Trader's Caravan",
|
||||
description = caravan_def.description,
|
||||
_doc_items_longdesc = caravan_def.long_description,
|
||||
|
||||
_doc_items_usagehelp = usage_help,
|
||||
drawtype = "mesh",
|
||||
mesh = "commoditymarket_wagon.obj",
|
||||
tiles = {
|
||||
@ -253,8 +313,9 @@ local is_suitable_caravan_space = function(pos, facedir)
|
||||
end
|
||||
|
||||
minetest.register_node("commoditymarket:caravan_post", {
|
||||
description = "Trading Post",
|
||||
_long_items_longdesc = "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.",
|
||||
description = S("Trading Post"),
|
||||
_long_items_longdesc = S("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."),
|
||||
_doc_items_usagehelp = S("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."),
|
||||
tiles = {"commoditymarket_sign.png^[transformR90", "commoditymarket_sign.png^[transformR270",
|
||||
"commoditymarket_sign.png^commoditymarket_caravan_sign.png", "commoditymarket_sign.png^commoditymarket_caravan_sign.png^[transformFX",
|
||||
"commoditymarket_sign_post.png", "commoditymarket_sign_post.png"},
|
||||
@ -290,7 +351,8 @@ minetest.register_node("commoditymarket:caravan_post", {
|
||||
local target = vector.add(pos, vector.multiply(dir,3))
|
||||
|
||||
local target_node = minetest.get_node(target)
|
||||
if target_node.name == "commoditymarket:caravan_market" then
|
||||
|
||||
if target_node.name:sub(1,string.len("commoditymarket:caravan_market")) == "commoditymarket:caravan_market" then
|
||||
-- It's already here somehow, shut down timer.
|
||||
meta:set_string("infotext", "")
|
||||
meta:set_float("wait_time", 0)
|
||||
@ -300,7 +362,7 @@ minetest.register_node("commoditymarket:caravan_post", {
|
||||
local is_suitable_space = is_suitable_caravan_space(target, facedir)
|
||||
|
||||
if not is_suitable_space then
|
||||
meta:set_string("infotext", "Indicated parking area isn't suitable.\nA 5x3 open space with solid ground\nis required for a caravan.")
|
||||
meta:set_string("infotext", S("Indicated parking area isn't suitable.\nA 5x3 open space with solid ground\nis required for a caravan."))
|
||||
meta:set_float("wait_time", 0)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(1.0)
|
||||
@ -310,14 +372,14 @@ minetest.register_node("commoditymarket:caravan_post", {
|
||||
local wait_time = (meta:get_float("wait_time") or 0) + elapsed
|
||||
meta:set_float("wait_time", wait_time)
|
||||
if wait_time < time_until_caravan then
|
||||
meta:set_string("infotext", "Caravan summoned\nETA: " .. math.floor(time_until_caravan - wait_time) .. " seconds.")
|
||||
meta:set_string("infotext", S("Caravan summoned\nETA: @1 seconds.", math.floor(time_until_caravan - wait_time)))
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
timer:start(1.0)
|
||||
return
|
||||
end
|
||||
|
||||
-- spawn the caravan. We've already established that the target pos is clear.
|
||||
minetest.set_node(target, {name="commoditymarket:caravan_market", param2=facedir})
|
||||
minetest.set_node(target, {name="commoditymarket:caravan_market_"..math.random(1,5), param2=facedir})
|
||||
minetest.sound_play("commoditymarket_register_opened", {
|
||||
pos = target,
|
||||
gain = 1.0, -- default
|
||||
@ -336,8 +398,8 @@ end
|
||||
if minetest.settings:get_bool("commoditymarket_enable_goblin_market") then
|
||||
|
||||
local goblin_def = {
|
||||
description = "Goblin Exchange",
|
||||
long_description = "One does not usually associate Goblins with the sort of sophistication that running a market requires. Usually one just associates Goblins with savagery and violence. But they understand the principle of tit-for-tat exchange, and if approached correctly they actually respect the concepts of ownership and debt. However, for some peculiar reason they understand this concept in the context of coal lumps. Goblins deal in the standard coal lump as their form of currency, conceptually divided into 100 coal centilumps (though Goblin brokers prefer to \"keep the change\" when giving back actual coal lumps).",
|
||||
description = S("Goblin Exchange"),
|
||||
long_description = S("One does not usually associate Goblins with the sort of sophistication that running a market requires. Usually one just associates Goblins with savagery and violence. But they understand the principle of tit-for-tat exchange, and if approached correctly they actually respect the concepts of ownership and debt. However, for some peculiar reason they understand this concept in the context of coal lumps. Goblins deal in the standard coal lump as their form of currency, conceptually divided into 100 coal centilumps (though Goblin brokers prefer to \"keep the change\" when giving back actual coal lumps)."),
|
||||
currency = {
|
||||
["default:coal_lump"] = 100
|
||||
},
|
||||
@ -351,6 +413,7 @@ commoditymarket.register_market("goblin", goblin_def)
|
||||
minetest.register_node("commoditymarket:goblin_market", {
|
||||
description = goblin_def.description,
|
||||
_doc_items_longdesc = goblin_def.long_description,
|
||||
_doc_items_usagehelp = usage_help,
|
||||
tiles = {"default_chest_top.png^(default_coal_block.png^[opacity:128)","default_chest_top.png^(default_coal_block.png^[opacity:128)",
|
||||
"default_chest_side.png^(default_coal_block.png^[opacity:128)","default_chest_side.png^(default_coal_block.png^[opacity:128)",
|
||||
"commoditymarket_empty_shelf.png^(default_coal_block.png^[opacity:128)","default_chest_side.png^(default_coal_block.png^[opacity:128)^commoditymarket_goblin.png",},
|
||||
@ -367,8 +430,8 @@ end
|
||||
|
||||
if minetest.settings:get_bool("commoditymarket_enable_under_market") then
|
||||
local undermarket_def = {
|
||||
description = "Undermarket",
|
||||
long_description = "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 few still linger to this day, and facilitate barter for those brave souls willing to travel in their lost realms. The Undermarket uses Mese chips ('₥') as a currency - twenty chips to the Mese fragment. Though traders are loathe to physically break Mese crystals up into units that small, as it renders it useless for other purposes.",
|
||||
description = S("Undermarket"),
|
||||
long_description = S("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 few still linger to this day, and facilitate barter for those brave souls willing to travel in their lost realms. The Undermarket uses Mese chips ('₥') as a currency - twenty chips to the Mese fragment. Though traders are loathe to physically break Mese crystals up into units that small, as it renders it useless for other purposes."),
|
||||
currency = {
|
||||
["default:mese"] = 9*9*20,
|
||||
["default:mese_crystal"] = 9*20,
|
||||
@ -384,6 +447,7 @@ commoditymarket.register_market("under", undermarket_def)
|
||||
minetest.register_node("commoditymarket:under_market", {
|
||||
description = undermarket_def.description,
|
||||
_doc_items_longdesc = undermarket_def.long_description,
|
||||
_doc_items_usagehelp = usage_help,
|
||||
tiles = {"commoditymarket_under_top.png","commoditymarket_under_top.png",
|
||||
"commoditymarket_under.png","commoditymarket_under.png","commoditymarket_under.png","commoditymarket_under.png"},
|
||||
paramtype2 = "facedir",
|
||||
@ -399,7 +463,9 @@ end
|
||||
|
||||
if gold_coins_required then
|
||||
minetest.register_craftitem("commoditymarket:gold_coins", {
|
||||
description = "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."),
|
||||
inventory_image = "commoditymarket_gold_coins.png",
|
||||
stack_max = 1000,
|
||||
})
|
||||
|
@ -1 +1,2 @@
|
||||
default?
|
||||
default?
|
||||
doc?
|
121
formspecs.lua
121
formspecs.lua
@ -1,3 +1,7 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
local get_icon = function(item)
|
||||
local def = minetest.registered_items[item]
|
||||
local returnstring = "unknown_item.png"
|
||||
@ -64,7 +68,7 @@ local get_account_formspec = function(market, account)
|
||||
|
||||
local formspec = {
|
||||
"size[10,10]"
|
||||
.."tabheader[0,0;tabs;"..market_def.description..",Your Inventory,Market Orders;2;false;true]"
|
||||
.."tabheader[0,0;tabs;"..market_def.description..","..S("Your Inventory")..","..S("Market Orders")..";2;false;true]"
|
||||
}
|
||||
formspec[#formspec+1] = "tablecolumns[image"
|
||||
for i=1, #inventory, 2 do
|
||||
@ -81,16 +85,16 @@ local get_account_formspec = function(market, account)
|
||||
formspec[#formspec+1] = ";text"
|
||||
end
|
||||
formspec[#formspec+1] = ";text;text,align=center]"
|
||||
.."tooltip[inventory;All the items you've transfered to the market to sell and the items you've\npurchased with buy orders. Double-click on an item to bring it back into your\npersonal inventory.]"
|
||||
.."tooltip[inventory;"..S("All the items you've transfered to the market to sell and the items you've\npurchased with buy orders. Double-click on an item to bring it back into your\npersonal inventory.").."]"
|
||||
.."table[0,0;9.9,4;inventory;0"
|
||||
if show_itemnames then
|
||||
formspec[#formspec+1] = ",Item"
|
||||
formspec[#formspec+1] = ","..S("Item")
|
||||
end
|
||||
formspec[#formspec+1] = ",Description,Quantity,0"
|
||||
formspec[#formspec+1] = ","..S("Description")..","..S("Quantity")..",0"
|
||||
if show_itemnames then
|
||||
formspec[#formspec+1] = ",Item"
|
||||
formspec[#formspec+1] = ","..S("Item")
|
||||
end
|
||||
formspec[#formspec+1] = ",Description,Quantity"
|
||||
formspec[#formspec+1] = ","..S("Description")..","..S("Quantity")
|
||||
|
||||
for i, entry in ipairs(inventory) do
|
||||
formspec[#formspec+1] = "," .. i
|
||||
@ -101,18 +105,18 @@ local get_account_formspec = function(market, account)
|
||||
end
|
||||
|
||||
formspec[#formspec+1] = "]container[1.1,4.5]list[detached:commoditymarket:" .. market.name .. ";add;0,0;1,1;]"
|
||||
.."label[1,0;Drop items here to\nadd to your account]"
|
||||
.."label[1,0;"..S("Drop items here to\nadd to your account").."]"
|
||||
.."listring[current_player;main]listring[detached:commoditymarket:" .. market.name .. ";add]"
|
||||
|
||||
if market_def.inventory_limit then
|
||||
formspec[#formspec+1] = "label[3,0;Inventory limit:\n" .. inventory_count.."/" .. market_def.inventory_limit .. "]"
|
||||
.. "tooltip[3,0;1.5,1;You can still receive purchased items if you've exceeded your inventory limit,\nbut you won't be able to transfer items from your personal inventory into\nthe market until you've emptied it back down below the limit again.]"
|
||||
formspec[#formspec+1] = "label[3,0;"..S("Inventory limit:").."\n" .. inventory_count.."/" .. market_def.inventory_limit .. "]"
|
||||
.. "tooltip[3,0;1.5,1;"..S("You can still receive purchased items if you've exceeded your inventory limit,\nbut you won't be able to transfer items from your personal inventory into\nthe market until you've emptied it back down below the limit again.").."]"
|
||||
end
|
||||
formspec[#formspec+1] = "label[4.9,0;Balance:\n" .. market_def.currency_symbol .. account.balance .. "]"
|
||||
.."field[6.1,0.25;1,1;withdrawamount;;]"
|
||||
.."field_close_on_enter[withdrawamount;false]"
|
||||
.."button[6.7,0;1.2,1;withdraw;Withdraw]"
|
||||
.."tooltip[4.9,0;3.5,1;Enter the amount of currency you'd like to withdraw then click the 'Withdraw'\nbutton to convert it into items and transfer it to your personal inventory.]"
|
||||
.."button[6.7,0;1.2,1;withdraw;"..S("Withdraw").."]"
|
||||
.."tooltip[4.9,0;3.5,1;"..S("Enter the amount of currency you'd like to withdraw then click the 'Withdraw'\nbutton to convert it into items and transfer it to your personal inventory.").."]"
|
||||
.."container_end[]"
|
||||
.."container[1.1,5.75]list[current_player;main;0,0;8,1;]"
|
||||
.."list[current_player;main;0,1.25;8,3;8]container_end[]"
|
||||
@ -129,7 +133,7 @@ local compare_market_item = function(mkt1, mkt2) return mkt1.item < mkt2.item en
|
||||
local compare_market_desc = function(mkt1, mkt2)
|
||||
local def1 = minetest.registered_items[mkt1.item] or {}
|
||||
local def2 = minetest.registered_items[mkt2.item] or {}
|
||||
return (def1.description or "Unknown Item") < (def2.description or "Unknown Item")
|
||||
return (def1.description or S("Unknown Item")) < (def2.description or S("Unknown Item"))
|
||||
end
|
||||
local compare_buy_volume = function(mkt1, mkt2) return mkt1.buy_volume > mkt2.buy_volume end
|
||||
local compare_buy_max = function(mkt1, mkt2)
|
||||
@ -218,7 +222,7 @@ local get_market_formspec = function(market, account)
|
||||
|
||||
local formspec = {
|
||||
"size[10,10]"
|
||||
.."tabheader[0,0;tabs;"..market_def.description..",Your Inventory,Market Orders;3;false;true]"
|
||||
.."tabheader[0,0;tabs;"..market_def.description..","..S("Your Inventory")..","..S("Market Orders")..";3;false;true]"
|
||||
.."tablecolumns[image" -- icon
|
||||
}
|
||||
|
||||
@ -232,13 +236,13 @@ local get_market_formspec = function(market, account)
|
||||
end
|
||||
formspec[#formspec+1] = "text;" -- description
|
||||
.."color,span=2;"
|
||||
.."text,align=right,tooltip=Number of items there's demand for in the market;"
|
||||
.."text,align=right,tooltip=Maximum price being offered to buy one of these;"
|
||||
.."text,align=right,tooltip="..S("Number of items there's demand for in the market.")..";"
|
||||
.."text,align=right,tooltip="..S("Maximum price being offered to buy one of these.")..";"
|
||||
.."color,span=2;"
|
||||
.."text,align=right,tooltip=Number of items available for sale in the market;"
|
||||
.."text,align=right,tooltip=Minimum price being demanded to sell one of these;"
|
||||
.."text,align=right,tooltip=Price paid for one of these the last time one was sold;"
|
||||
.."text,align=right,tooltip=Quantity of this item that you have in your inventory ready to sell]"
|
||||
.."text,align=right,tooltip="..S("Number of items available for sale in the market.")..";"
|
||||
.."text,align=right,tooltip="..S("Minimum price being demanded to sell one of these.")..";"
|
||||
.."text,align=right,tooltip="..S("Price paid for one of these the last time one was sold.")..";"
|
||||
.."text,align=right,tooltip="..S("Quantity of this item that you have in your inventory ready to sell.").."]"
|
||||
.."table[0,0;9.9,5;summary;"
|
||||
.."0"-- icon
|
||||
|
||||
@ -246,7 +250,8 @@ local get_market_formspec = function(market, account)
|
||||
if show_itemnames then
|
||||
formspec[#formspec+1] = ",Item" -- itemname
|
||||
end
|
||||
formspec[#formspec+1] = ",Description,#00FF00,Buy Vol,Buy Max,#FF0000,Sell Vol,Sell Min,Last Price,Inventory"
|
||||
formspec[#formspec+1] = ","..S("Description")..",#00FF00,"..S("Buy Vol")..","..S("Buy Max")
|
||||
..",#FF0000,"..S("Sell Vol")..","..S("Sell Min")..","..S("Last Price")..","..S("Inventory")
|
||||
|
||||
local selected_idx
|
||||
local selected_row
|
||||
@ -267,7 +272,7 @@ local get_market_formspec = function(market, account)
|
||||
formspec[#formspec+1] = "," .. item_display
|
||||
end
|
||||
|
||||
local def = minetest.registered_items[row.item] or {description = "Unknown Item"}
|
||||
local def = minetest.registered_items[row.item] or {description = S("Unknown Item")}
|
||||
local desc_display = def.description:gsub("\n", " ")
|
||||
if desc_display:len() > truncate_length then
|
||||
desc_display = desc_display:sub(1,truncate_length-2).."..."
|
||||
@ -300,11 +305,11 @@ local get_market_formspec = function(market, account)
|
||||
.."field[0,0.85;2.5,1;search_filter;;"..minetest.formspec_escape(account.search or "").."]"
|
||||
.."image_button[2.05,0.65;0.8,0.8;commoditymarket_search.png;apply_search;]"
|
||||
.."image_button[2.7,0.65;0.8,0.8;commoditymarket_clear.png;clear_search;]"
|
||||
.."checkbox[1.77,0;filter_participating;My orders;".. account.filter_participating .."]"
|
||||
.."tooltip[filter_participating;Select this to show only the markets where you have either a buy or a sell order pending.]"
|
||||
.."tooltip[search_filter;Enter substring to search item identifiers for]"
|
||||
.."tooltip[apply_search;Apply search to outputs]"
|
||||
.."tooltip[clear_search;Clear search]"
|
||||
.."checkbox[1.77,0;filter_participating;"..S("My orders")..";".. account.filter_participating .."]"
|
||||
.."tooltip[filter_participating;"..S("Select this to show only the markets where you have either a buy or a sell order pending.").."]"
|
||||
.."tooltip[search_filter;"..S("Enter substring to search item identifiers for.").."]"
|
||||
.."tooltip[apply_search;"..S("Apply search to outputs.").."]"
|
||||
.."tooltip[clear_search;"..S("Clear search.").."]"
|
||||
.."container_end[]"
|
||||
|
||||
-- if a visible item market is selected, show the orders for it in detail
|
||||
@ -315,13 +320,13 @@ local get_market_formspec = function(market, account)
|
||||
if show_itemnames then
|
||||
desc_display = selected
|
||||
else
|
||||
local def = minetest.registered_items[selected_row.item] or {description="Unknown Item"}
|
||||
local def = minetest.registered_items[selected_row.item] or {description=S("Unknown Item")}
|
||||
desc_display = def.description:gsub("\n", " ")
|
||||
end
|
||||
|
||||
-- player inventory for this item and for currency
|
||||
formspec[#formspec+1] = "label[0.1,5.1;"..desc_display.."\nIn inventory: "
|
||||
.. tostring(account.inventory[selected] or 0) .."\nBalance: "..market_def.currency_symbol..account.balance .."]"
|
||||
formspec[#formspec+1] = "label[0.1,5.1;"..desc_display.."\n"..S("In inventory:").." "
|
||||
.. tostring(account.inventory[selected] or 0) .."\n"..S("Balance:").." "..market_def.currency_symbol..account.balance .."]"
|
||||
-- buy/sell controls
|
||||
.. "container[6,5]"
|
||||
local sell_limit = market_def.sell_limit
|
||||
@ -334,28 +339,27 @@ local get_market_formspec = function(market, account)
|
||||
end
|
||||
end
|
||||
end
|
||||
formspec[#formspec+1] = "label[0,0;Sell limit: ".. total_sell .. "/" .. sell_limit .."]"
|
||||
.."tooltip[0,0;2,0.25;This market limits the total number of items a given seller can have for sale at a time.\nYou have "
|
||||
..sell_limit-total_sell.." items remaining. Cancel old sell orders to free up space.]"
|
||||
formspec[#formspec+1] = "label[0,0;"..S("Sell limit:").." ".. total_sell .. "/" .. sell_limit .."]"
|
||||
.."tooltip[0,0;2,0.25;"..S("This market limits the total number of items a given seller can have for sale at a time.\nYou have @1 items remaining. Cancel old sell orders to free up space.", sell_limit-total_sell).."]"
|
||||
end
|
||||
formspec[#formspec+1] = "button[0,0.5;1,1;buy;Buy]field[1.3,0.85;1,1;quantity;Quantity;]"
|
||||
.."field[2.3,0.85;1,1;price;Price per;]button[3,0.5;1,1;sell;Sell]"
|
||||
formspec[#formspec+1] = "button[0,0.5;1,1;buy;"..S("Buy").."]field[1.3,0.85;1,1;quantity;"..S("Quantity")..";]"
|
||||
.."field[2.3,0.85;1,1;price;"..S("Price per")..";]button[3,0.5;1,1;sell;Sell]"
|
||||
.."field_close_on_enter[quantity;false]field_close_on_enter[price;false]"
|
||||
.."tooltip[0,0.25;3.75,1;Use these fields to enter buy and sell orders for the selected item]"
|
||||
.."tooltip[0,0.25;3.75,1;"..S("Use these fields to enter buy and sell orders for the selected item.").."]"
|
||||
.."container_end[]"
|
||||
-- table of buy and sell orders
|
||||
.."tablecolumns[color;text;"
|
||||
.."text,align=right,tooltip=The price per item in this order;"
|
||||
.."text,align=right,tooltip=The total amount of items in this particular order;"
|
||||
.."text,align=right,tooltip=The total amount of items available at this price accounting for the other orders also currently being offered;"
|
||||
.."text,tooltip=The name of the player who placed this order;"
|
||||
.."text,align=right,tooltip=How many days ago this order was placed]"
|
||||
.."text,align=right,tooltip="..S("The price per item in this order.")..";"
|
||||
.."text,align=right,tooltip="..S("The total amount of items in this particular order.")..";"
|
||||
.."text,align=right,tooltip="..S("The total amount of items available at this price accounting for the other orders also currently being offered.")..";"
|
||||
.."text,tooltip="..S("The name of the player who placed this order.\nDouble-click your own orders to cancel them.")..";"
|
||||
.."text,align=right,tooltip="..S("How many days ago this order was placed.").."]"
|
||||
|
||||
.."table[0,6.5;9.9,3.5;orders;#FFFFFF,Order,Price,Quantity,Total Volume,Player,Days Old"
|
||||
.."table[0,6.5;9.9,3.5;orders;#FFFFFF,"..S("Order")..","..S("Price")..","..S("Quantity")..","..S("Total Volume")..","..S("Player")..","..S("Days Old")
|
||||
|
||||
local sell_volume = selected_row.sell_volume
|
||||
for i, sell in ipairs(selected_row.sell_orders) do
|
||||
formspec[#formspec+1] = ",#FF0000,Sell,"
|
||||
formspec[#formspec+1] = ",#FF0000,"..S("Sell")..","
|
||||
..sell.price..","
|
||||
..sell.quantity..","
|
||||
..sell_volume..","
|
||||
@ -370,7 +374,7 @@ local get_market_formspec = function(market, account)
|
||||
for i = buy_count, 1, -1 do
|
||||
buy = buy_orders[i]
|
||||
buy_volume = buy_volume + buy.quantity
|
||||
formspec[#formspec+1] = ",#00FF00,Buy,"
|
||||
formspec[#formspec+1] = ",#00FF00,"..S("Buy")..","
|
||||
..buy.price..","
|
||||
..buy.quantity..","
|
||||
..buy_volume..","
|
||||
@ -379,7 +383,7 @@ local get_market_formspec = function(market, account)
|
||||
end
|
||||
formspec[#formspec+1] = "]"
|
||||
else
|
||||
formspec[#formspec+1] = "label[0.1,5.1;Select an item to view or place orders]"
|
||||
formspec[#formspec+1] = "label[0.1,5.1;"..S("Select an item to view or place orders.").."]"
|
||||
end
|
||||
return table.concat(formspec)
|
||||
end
|
||||
@ -394,19 +398,19 @@ local log_to_string = function(market, log_entry, account)
|
||||
local seller = log_entry.seller
|
||||
local purchaser_name
|
||||
if purchaser == seller then
|
||||
purchaser_name = "yourself"
|
||||
purchaser_name = S("yourself")
|
||||
elseif anonymous and purchaser ~= account then
|
||||
purchaser_name = "someone"
|
||||
purchaser_name = S("someone")
|
||||
elseif purchaser == account then
|
||||
purchaser_name = "you"
|
||||
purchaser_name = S("you")
|
||||
else
|
||||
purchaser_name = purchaser.name
|
||||
end
|
||||
local seller_name
|
||||
if anonymous and seller ~= account then
|
||||
seller_name = "someone"
|
||||
seller_name = S("someone")
|
||||
elseif seller == account then
|
||||
seller_name = "you"
|
||||
seller_name = S("you")
|
||||
else
|
||||
seller_name = seller.name
|
||||
end
|
||||
@ -422,17 +426,18 @@ local log_to_string = function(market, log_entry, account)
|
||||
new = false
|
||||
end
|
||||
|
||||
return colour .. "On day " .. math.ceil(log_entry.timestamp/86400) .. " " .. seller_name .. " sold " .. log_entry.quantity .. " "
|
||||
.. log_entry.item .. " to " .. purchaser_name .. " at " .. market.def.currency_symbol .. log_entry.price .. " each.", new
|
||||
return colour .. S("On day @1 @2 sold @3 @4 to @5 at @6@7 each.",
|
||||
math.ceil(log_entry.timestamp/86400), seller_name, log_entry.quantity, log_entry.item,
|
||||
purchaser_name, market.def.currency_symbol, log_entry.price), new
|
||||
end
|
||||
|
||||
|
||||
local get_info_formspec = function(market, account)
|
||||
local formspec = {
|
||||
"size[10,10]"
|
||||
.."tabheader[0,0;tabs;"..market.def.description..",Your Inventory,Market Orders;1;false;true]"
|
||||
.."textarea[0.5,0.5;9.5,1.5;;Description:;"..market.def.long_description.."]"
|
||||
.."label[0.5,2.2;Your Recent Purchases and Sales:]"
|
||||
.."tabheader[0,0;tabs;"..market.def.description..","..S("Your Inventory")..","..S("Market Orders")..";1;false;true]"
|
||||
.."textarea[0.5,0.5;9.5,1.5;;"..S("Description:")..";"..market.def.long_description.."]"
|
||||
.."label[0.5,2.2;"..S("Your Recent Purchases and Sales:").."]"
|
||||
.."textlist[0.5,2.6;8.5,4;log_entries;"
|
||||
}
|
||||
if next(account.log) then
|
||||
@ -445,16 +450,16 @@ local get_info_formspec = function(market, account)
|
||||
end
|
||||
formspec[#formspec] = "]" -- Note: there's no +1 here deliberately, that way the "]" overwrites the last comma added by the loop above.
|
||||
if new then
|
||||
formspec[#formspec+1] = "button[7.1,6.9;2,0.5;acknowledge_log;Mark logs as read]" ..
|
||||
"tooltip[acknowledge_log;Log entries in yellow are new since last time you marked your log as read]"
|
||||
formspec[#formspec+1] = "button[7.1,6.9;2,0.5;acknowledge_log;"..S("Mark logs as read").."]" ..
|
||||
"tooltip[acknowledge_log;"..S("Log entries in yellow are new since last time you marked your log as read.").."]"
|
||||
end
|
||||
else
|
||||
formspec[#formspec+1] = "#CCCCCCNo logged activites in this market yet]"
|
||||
formspec[#formspec+1] = "#CCCCCC"..S("No logged activites in this market yet.").."]"
|
||||
end
|
||||
|
||||
local show_itemnames = account.show_itemnames or "false"
|
||||
|
||||
formspec[#formspec+1] = "]container[0.5, 7.5]label[0,0;Settings:]checkbox[0,0.25;show_itemnames;Show Itemnames;"
|
||||
formspec[#formspec+1] = "]container[0.5, 7.5]label[0,0;Settings:]checkbox[0,0.25;show_itemnames;"..S("Show Itemnames")..";"
|
||||
..show_itemnames.."]container_end[]"
|
||||
|
||||
return table.concat(formspec)
|
||||
|
45
intllib.lua
Normal file
45
intllib.lua
Normal 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
|
417
locale/template.pot
Normal file
417
locale/template.pot
Normal file
@ -0,0 +1,417 @@
|
||||
# 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: 2019-08-16 00:40-0600\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"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: commoditymarket\default_markets.lua:12
|
||||
msgid "Right-click on this to open the market interface."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:20
|
||||
msgid "King's Market"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:21
|
||||
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 "
|
||||
"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\default_markets.lua:58
|
||||
msgid "At this time of day the King's Market is closed."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:68
|
||||
msgid "Night Market"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:101
|
||||
msgid "At this time of day the Night Market is closed."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:115
|
||||
msgid "Trader's Caravan"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:116
|
||||
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."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:184
|
||||
msgid "Right-click to summon a trader's caravan"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:316
|
||||
msgid "Trading Post"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:317
|
||||
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\default_markets.lua:318
|
||||
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\default_markets.lua:365
|
||||
msgid ""
|
||||
"Indicated parking area isn't suitable.\n"
|
||||
"A 5x3 open space with solid ground\n"
|
||||
"is required for a caravan."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:375
|
||||
msgid ""
|
||||
"Caravan summoned\n"
|
||||
"ETA: @1 seconds."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:401
|
||||
msgid "Goblin Exchange"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:402
|
||||
msgid ""
|
||||
"One does not usually associate Goblins with the sort of sophistication that "
|
||||
"running a market requires. Usually one just associates Goblins with savagery "
|
||||
"and violence. But they understand the principle of tit-for-tat exchange, and "
|
||||
"if approached correctly they actually respect the concepts of ownership and "
|
||||
"debt. However, for some peculiar reason they understand this concept in the "
|
||||
"context of coal lumps. Goblins deal in the standard coal lump as their form "
|
||||
"of currency, conceptually divided into 100 coal centilumps (though Goblin "
|
||||
"brokers prefer to \"keep the change\" when giving back actual coal lumps)."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:433
|
||||
msgid "Undermarket"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:434
|
||||
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 "
|
||||
"few still linger to this day, and facilitate barter for those brave souls "
|
||||
"willing to travel in their lost realms. The Undermarket uses Mese chips "
|
||||
"('₥') as a currency - twenty chips to the Mese fragment. Though traders are "
|
||||
"loathe to physically break Mese crystals up into units that small, as it "
|
||||
"renders it useless for other purposes."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:466
|
||||
msgid "Gold Coins"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:467
|
||||
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."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\default_markets.lua:468
|
||||
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."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:71
|
||||
#: commoditymarket\formspecs.lua:225
|
||||
#: commoditymarket\formspecs.lua:438
|
||||
msgid "Your Inventory"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:71
|
||||
#: commoditymarket\formspecs.lua:225
|
||||
#: commoditymarket\formspecs.lua:438
|
||||
msgid "Market Orders"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:88
|
||||
msgid ""
|
||||
"All the items you've transfered to the market to sell and the items you've\n"
|
||||
"purchased with buy orders. Double-click on an item to bring it back into "
|
||||
"your\n"
|
||||
"personal inventory."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:91
|
||||
#: commoditymarket\formspecs.lua:95
|
||||
msgid "Item"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:93
|
||||
#: commoditymarket\formspecs.lua:97
|
||||
#: commoditymarket\formspecs.lua:253
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:93
|
||||
#: commoditymarket\formspecs.lua:97
|
||||
#: commoditymarket\formspecs.lua:345
|
||||
#: commoditymarket\formspecs.lua:358
|
||||
msgid "Quantity"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:108
|
||||
msgid ""
|
||||
"Drop items here to\n"
|
||||
"add to your account"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:112
|
||||
msgid "Inventory limit:"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:113
|
||||
msgid ""
|
||||
"You can still receive purchased items if you've exceeded your inventory "
|
||||
"limit,\n"
|
||||
"but you won't be able to transfer items from your personal inventory into\n"
|
||||
"the market until you've emptied it back down below the limit again."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:118
|
||||
msgid "Withdraw"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:119
|
||||
msgid ""
|
||||
"Enter the amount of currency you'd like to withdraw then click the "
|
||||
"'Withdraw'\n"
|
||||
"button to convert it into items and transfer it to your personal inventory."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:136
|
||||
#: commoditymarket\formspecs.lua:275
|
||||
#: commoditymarket\formspecs.lua:323
|
||||
msgid "Unknown Item"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:239
|
||||
msgid "Number of items there's demand for in the market."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:240
|
||||
msgid "Maximum price being offered to buy one of these."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:242
|
||||
msgid "Number of items available for sale in the market."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:243
|
||||
msgid "Minimum price being demanded to sell one of these."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:244
|
||||
msgid "Price paid for one of these the last time one was sold."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:245
|
||||
msgid "Quantity of this item that you have in your inventory ready to sell."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:253
|
||||
msgid "Buy Vol"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:253
|
||||
msgid "Buy Max"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:254
|
||||
msgid "Sell Vol"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:254
|
||||
msgid "Sell Min"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:254
|
||||
msgid "Last Price"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:254
|
||||
msgid "Inventory"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:308
|
||||
msgid "My orders"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:309
|
||||
msgid ""
|
||||
"Select this to show only the markets where you have either a buy or a sell "
|
||||
"order pending."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:310
|
||||
msgid "Enter substring to search item identifiers for."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:311
|
||||
msgid "Apply search to outputs."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:312
|
||||
msgid "Clear search."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:328
|
||||
msgid "In inventory:"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:329
|
||||
msgid "Balance:"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:342
|
||||
msgid "Sell limit:"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:343
|
||||
msgid ""
|
||||
"This market limits the total number of items a given seller can have for "
|
||||
"sale at a time.\n"
|
||||
"You have @1 items remaining. Cancel old sell orders to free up space."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:345
|
||||
#: commoditymarket\formspecs.lua:377
|
||||
msgid "Buy"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:346
|
||||
msgid "Price per"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:348
|
||||
msgid "Use these fields to enter buy and sell orders for the selected item."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:352
|
||||
msgid "The price per item in this order."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:353
|
||||
msgid "The total amount of items in this particular order."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:354
|
||||
msgid ""
|
||||
"The total amount of items available at this price accounting for the other "
|
||||
"orders also currently being offered."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:355
|
||||
msgid ""
|
||||
"The name of the player who placed this order.\n"
|
||||
"Double-click your own orders to cancel them."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:356
|
||||
msgid "How many days ago this order was placed."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:358
|
||||
msgid "Order"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:358
|
||||
msgid "Price"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:358
|
||||
msgid "Total Volume"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:358
|
||||
msgid "Player"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:358
|
||||
msgid "Days Old"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:362
|
||||
msgid "Sell"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:386
|
||||
msgid "Select an item to view or place orders."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:401
|
||||
msgid "yourself"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:403
|
||||
#: commoditymarket\formspecs.lua:411
|
||||
msgid "someone"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:405
|
||||
#: commoditymarket\formspecs.lua:413
|
||||
msgid "you"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:429
|
||||
msgid "On day @1 @2 sold @3 @4 to @5 at @6@7 each."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:439
|
||||
msgid "Description:"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:440
|
||||
msgid "Your Recent Purchases and Sales:"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:453
|
||||
msgid "Mark logs as read"
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:454
|
||||
msgid ""
|
||||
"Log entries in yellow are new since last time you marked your log as read."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:457
|
||||
msgid "No logged activites in this market yet."
|
||||
msgstr ""
|
||||
|
||||
#: commoditymarket\formspecs.lua:462
|
||||
msgid "Show Itemnames"
|
||||
msgstr ""
|
6
locale/update.bat
Normal file
6
locale/update.bat
Normal file
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||
cd ..
|
||||
set LIST=
|
||||
for /r %%X in (*.lua) do set LIST=!LIST! %%X
|
||||
..\intllib\tools\xgettext.bat %LIST%
|
Loading…
x
Reference in New Issue
Block a user