Compare commits
3
Commits
v1.0.0
...
4a46362df8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a46362df8 | ||
|
|
b5878df34a | ||
|
|
3199679355 |
No files matched your search
@@ -0,0 +1,25 @@
|
||||
mod_trading_name = Comercio
|
||||
mod_trading_desc = Tiendas de mercaderes: qué venden, qué compran y a qué precio (datos "Kind": "shop"), y una ventana de comercio con dos inventarios: los artículos del mercader y la bolsa del jugador. El dinero es un objeto corriente, la moneda de oro.
|
||||
trading/item/coin/name = Moneda de oro
|
||||
trading/item/coin/desc = Moneda corriente. Los mercaderes no aceptan ni pagan otra cosa.
|
||||
trading/ui/merchant_goods = Artículos del mercader
|
||||
trading/ui/your_bag = Tu bolsa
|
||||
trading/ui/hint = Elige artículos a la izquierda para comprar o un objeto a la derecha para vender. Esc cierra.
|
||||
trading/ui/select = Elige un artículo del mercader o un objeto de tu bolsa.
|
||||
trading/ui/badge_merchant = Del mercader
|
||||
trading/ui/badge_yours = Tuyo
|
||||
trading/ui/unit_price = Precio
|
||||
trading/ui/wallet = Monedero
|
||||
trading/ui/you_have = Tienes
|
||||
trading/ui/not_bought = El mercader no compra esto.
|
||||
trading/ui/no_money = No tienes suficientes monedas.
|
||||
trading/ui/nothing_to_sell = Nada que vender.
|
||||
trading/ui/quantity = Cantidad
|
||||
trading/ui/all = Todo
|
||||
trading/ui/total = Total: {0} monedas
|
||||
trading/ui/buy = Comprar
|
||||
trading/ui/sell = Vender
|
||||
trading/ui/bought = Comprado: {0} ×{1} por {2} monedas
|
||||
trading/ui/sold = Vendido: {0} ×{1} por {2} monedas
|
||||
trading/ui/deal_failed = El trato no se ha cerrado.
|
||||
trading/ui/price_tag = {0} m
|
||||
@@ -0,0 +1,25 @@
|
||||
mod_trading_name = 交易
|
||||
mod_trading_desc = 商人の店:何を売り、何を買い取り、いくらなのか("Kind": "shop" のデータ)と、2 つのインベントリ——商人の品物とプレイヤーのかばん——からなる取引ウィンドウ。お金は普通のアイテム、金貨。
|
||||
trading/item/coin/name = 金貨
|
||||
trading/item/coin/desc = 一般的な貨幣。商人はこれ以外を受け取りも支払いもしない。
|
||||
trading/ui/merchant_goods = 商人の品物
|
||||
trading/ui/your_bag = あなたのかばん
|
||||
trading/ui/hint = 左で買う品物を、右で売るアイテムを選ぶ。Esc で閉じる。
|
||||
trading/ui/select = 商人の品物か、かばんのアイテムを選んでください。
|
||||
trading/ui/badge_merchant = 商人の
|
||||
trading/ui/badge_yours = あなたの
|
||||
trading/ui/unit_price = 価格
|
||||
trading/ui/wallet = 財布
|
||||
trading/ui/you_have = 所持
|
||||
trading/ui/not_bought = 商人はこれを買い取らない。
|
||||
trading/ui/no_money = 硬貨が足りない。
|
||||
trading/ui/nothing_to_sell = 売るものがない。
|
||||
trading/ui/quantity = 数量
|
||||
trading/ui/all = すべて
|
||||
trading/ui/total = 合計:{0} 枚
|
||||
trading/ui/buy = 買う
|
||||
trading/ui/sell = 売る
|
||||
trading/ui/bought = 購入:{0} ×{1}、{2} 枚で
|
||||
trading/ui/sold = 売却:{0} ×{1}、{2} 枚で
|
||||
trading/ui/deal_failed = 取引は成立しなかった。
|
||||
trading/ui/price_tag = {0} 枚
|
||||
@@ -0,0 +1,25 @@
|
||||
mod_trading_name = 거래
|
||||
mod_trading_desc = 상인의 가게: 무엇을 팔고, 무엇을 사들이며, 얼마인지("Kind": "shop" 데이터)와, 상인의 물건과 플레이어의 가방이라는 두 인벤토리로 된 거래 창. 돈은 평범한 아이템인 금화다.
|
||||
trading/item/coin/name = 금화
|
||||
trading/item/coin/desc = 통용 화폐. 상인들은 이것 말고는 받지도 주지도 않는다.
|
||||
trading/ui/merchant_goods = 상인의 물건
|
||||
trading/ui/your_bag = 내 가방
|
||||
trading/ui/hint = 왼쪽에서 살 물건을, 오른쪽에서 팔 아이템을 고르세요. Esc로 닫습니다.
|
||||
trading/ui/select = 상인의 물건이나 가방의 아이템을 고르세요.
|
||||
trading/ui/badge_merchant = 상인
|
||||
trading/ui/badge_yours = 내 것
|
||||
trading/ui/unit_price = 가격
|
||||
trading/ui/wallet = 지갑
|
||||
trading/ui/you_have = 보유
|
||||
trading/ui/not_bought = 상인이 이것은 사지 않는다.
|
||||
trading/ui/no_money = 동전이 부족하다.
|
||||
trading/ui/nothing_to_sell = 팔 것이 없다.
|
||||
trading/ui/quantity = 수량
|
||||
trading/ui/all = 전부
|
||||
trading/ui/total = 합계: 금화 {0}
|
||||
trading/ui/buy = 사기
|
||||
trading/ui/sell = 팔기
|
||||
trading/ui/bought = 구매: {0} ×{1}, 금화 {2}
|
||||
trading/ui/sold = 판매: {0} ×{1}, 금화 {2}
|
||||
trading/ui/deal_failed = 거래가 성사되지 않았다.
|
||||
trading/ui/price_tag = {0}닢
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = Open a shop
|
||||
trading/schema/builtin/trade_open_desc = The trade window with the merchant
|
||||
trading/schema/field/shop = Shop
|
||||
trading/schema/kind/shop = Shops
|
||||
trading/schema/kind/shop_desc = What merchants sell and buy
|
||||
trading/schema/field/name = Name
|
||||
trading/schema/field/currency = Currency
|
||||
trading/schema/field/sells = Sells
|
||||
trading/schema/field/item = Item
|
||||
trading/schema/field/price = Price
|
||||
trading/schema/field/buys = Buys
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = Abrir una tienda
|
||||
trading/schema/builtin/trade_open_desc = La ventana de comercio con el mercader
|
||||
trading/schema/field/shop = Tienda
|
||||
trading/schema/kind/shop = Tiendas
|
||||
trading/schema/kind/shop_desc = Lo que venden y compran los mercaderes
|
||||
trading/schema/field/name = Nombre
|
||||
trading/schema/field/currency = Moneda
|
||||
trading/schema/field/sells = Vende
|
||||
trading/schema/field/item = Objeto
|
||||
trading/schema/field/price = Precio
|
||||
trading/schema/field/buys = Compra
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = 店を開く
|
||||
trading/schema/builtin/trade_open_desc = その商人との交易ウィンドウ
|
||||
trading/schema/field/shop = 店
|
||||
trading/schema/kind/shop = 店
|
||||
trading/schema/kind/shop_desc = 商人が売るもの・買うもの
|
||||
trading/schema/field/name = 名前
|
||||
trading/schema/field/currency = 通貨
|
||||
trading/schema/field/sells = 売る品
|
||||
trading/schema/field/item = アイテム
|
||||
trading/schema/field/price = 価格
|
||||
trading/schema/field/buys = 買う品
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = 상점 열기
|
||||
trading/schema/builtin/trade_open_desc = 그 상인과의 거래 창
|
||||
trading/schema/field/shop = 상점
|
||||
trading/schema/kind/shop = 상점
|
||||
trading/schema/kind/shop_desc = 상인이 팔고 사는 것
|
||||
trading/schema/field/name = 이름
|
||||
trading/schema/field/currency = 화폐
|
||||
trading/schema/field/sells = 판매
|
||||
trading/schema/field/item = 아이템
|
||||
trading/schema/field/price = 가격
|
||||
trading/schema/field/buys = 구매
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = Открыть лавку
|
||||
trading/schema/builtin/trade_open_desc = Окно торговли с выбранным торговцем
|
||||
trading/schema/field/shop = Лавка
|
||||
trading/schema/kind/shop = Лавки
|
||||
trading/schema/kind/shop_desc = Что продают и скупают торговцы
|
||||
trading/schema/field/name = Название
|
||||
trading/schema/field/currency = Валюта
|
||||
trading/schema/field/sells = Продаёт
|
||||
trading/schema/field/item = Предмет
|
||||
trading/schema/field/price = Цена
|
||||
trading/schema/field/buys = Покупает
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = Mở cửa hàng
|
||||
trading/schema/builtin/trade_open_desc = Cửa sổ giao dịch với thương nhân
|
||||
trading/schema/field/shop = Cửa hàng
|
||||
trading/schema/kind/shop = Cửa hàng
|
||||
trading/schema/kind/shop_desc = Thương nhân bán gì, mua gì
|
||||
trading/schema/field/name = Tên
|
||||
trading/schema/field/currency = Tiền tệ
|
||||
trading/schema/field/sells = Bán
|
||||
trading/schema/field/item = Vật phẩm
|
||||
trading/schema/field/price = Giá
|
||||
trading/schema/field/buys = Mua
|
||||
@@ -0,0 +1,11 @@
|
||||
trading/schema/builtin/trade_open = 打开商店
|
||||
trading/schema/builtin/trade_open_desc = 与该商人的交易窗口
|
||||
trading/schema/field/shop = 商店
|
||||
trading/schema/kind/shop = 商店
|
||||
trading/schema/kind/shop_desc = 商人卖什么、收什么
|
||||
trading/schema/field/name = 名称
|
||||
trading/schema/field/currency = 货币
|
||||
trading/schema/field/sells = 出售
|
||||
trading/schema/field/item = 物品
|
||||
trading/schema/field/price = 价格
|
||||
trading/schema/field/buys = 收购
|
||||
@@ -0,0 +1,25 @@
|
||||
mod_trading_name = Giao dịch
|
||||
mod_trading_desc = Cửa hàng của thương nhân: bán gì, mua lại gì và với giá nào (dữ liệu "Kind": "shop"), cùng một cửa sổ giao dịch gồm hai túi đồ: hàng của thương nhân và túi của người chơi. Tiền là một vật phẩm bình thường, đồng vàng.
|
||||
trading/item/coin/name = Đồng vàng
|
||||
trading/item/coin/desc = Tiền thông dụng. Thương nhân không nhận cũng không trả thứ gì khác.
|
||||
trading/ui/merchant_goods = Hàng của thương nhân
|
||||
trading/ui/your_bag = Túi của bạn
|
||||
trading/ui/hint = Chọn hàng bên trái để mua hoặc một vật phẩm bên phải để bán. Esc để đóng.
|
||||
trading/ui/select = Chọn hàng của thương nhân hoặc một vật phẩm trong túi của bạn.
|
||||
trading/ui/badge_merchant = Của thương nhân
|
||||
trading/ui/badge_yours = Của bạn
|
||||
trading/ui/unit_price = Giá
|
||||
trading/ui/wallet = Ví
|
||||
trading/ui/you_have = Bạn có
|
||||
trading/ui/not_bought = Thương nhân không mua thứ này.
|
||||
trading/ui/no_money = Không đủ tiền.
|
||||
trading/ui/nothing_to_sell = Không có gì để bán.
|
||||
trading/ui/quantity = Số lượng
|
||||
trading/ui/all = Tất cả
|
||||
trading/ui/total = Tổng: {0} đồng
|
||||
trading/ui/buy = Mua
|
||||
trading/ui/sell = Bán
|
||||
trading/ui/bought = Đã mua: {0} ×{1} với giá {2} đồng
|
||||
trading/ui/sold = Đã bán: {0} ×{1} được {2} đồng
|
||||
trading/ui/deal_failed = Giao dịch không thành.
|
||||
trading/ui/price_tag = {0} đ
|
||||
@@ -0,0 +1,25 @@
|
||||
mod_trading_name = 交易
|
||||
mod_trading_desc = 商人的商店:卖什么、回收什么以及价格("Kind": "shop" 数据),以及一个由两个背包组成的交易窗口:商人的货物和玩家的背包。钱是一种普通物品——金币。
|
||||
trading/item/coin/name = 金币
|
||||
trading/item/coin/desc = 通用货币。商人只收、只付这个。
|
||||
trading/ui/merchant_goods = 商人的货物
|
||||
trading/ui/your_bag = 你的背包
|
||||
trading/ui/hint = 在左边选择要买的货物,或在右边选择要卖的物品。按 Esc 关闭。
|
||||
trading/ui/select = 选择商人的货物或你背包里的物品。
|
||||
trading/ui/badge_merchant = 商人的
|
||||
trading/ui/badge_yours = 你的
|
||||
trading/ui/unit_price = 价格
|
||||
trading/ui/wallet = 钱包
|
||||
trading/ui/you_have = 你有
|
||||
trading/ui/not_bought = 商人不收这个。
|
||||
trading/ui/no_money = 金币不够。
|
||||
trading/ui/nothing_to_sell = 没有可卖的东西。
|
||||
trading/ui/quantity = 数量
|
||||
trading/ui/all = 全部
|
||||
trading/ui/total = 合计:{0} 金币
|
||||
trading/ui/buy = 购买
|
||||
trading/ui/sell = 出售
|
||||
trading/ui/bought = 已购买:{0} ×{1},花费 {2} 金币
|
||||
trading/ui/sold = 已出售:{0} ×{1},获得 {2} 金币
|
||||
trading/ui/deal_failed = 交易没有成功。
|
||||
trading/ui/price_tag = {0} 币
|
||||
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"Actions": [
|
||||
{
|
||||
"Id": "trade.open",
|
||||
"Name": "trading/schema/builtin/trade_open",
|
||||
"Description": "trading/schema/builtin/trade_open_desc",
|
||||
"Category": "items",
|
||||
"Params": [
|
||||
{
|
||||
"Key": "shop",
|
||||
"Type": "ref",
|
||||
"Kind": "shop",
|
||||
"Required": true,
|
||||
"Name": "trading/schema/field/shop"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Kinds": [
|
||||
{
|
||||
"Kind": "shop",
|
||||
"Name": "trading/schema/kind/shop",
|
||||
"Description": "trading/schema/kind/shop_desc",
|
||||
"Folder": "shops",
|
||||
"NewId": "{mod}/new_shop",
|
||||
"Order": 13,
|
||||
"Fields": [
|
||||
{
|
||||
"Key": "Name",
|
||||
"Type": "locale",
|
||||
"KeyPattern": "{mod}/shop/{id}",
|
||||
"Name": "trading/schema/field/name"
|
||||
},
|
||||
{
|
||||
"Key": "Currency",
|
||||
"Type": "ref",
|
||||
"Kind": "item",
|
||||
"Name": "trading/schema/field/currency"
|
||||
},
|
||||
{
|
||||
"Key": "Sells",
|
||||
"Type": "list",
|
||||
"Name": "trading/schema/field/sells",
|
||||
"Of": [
|
||||
{
|
||||
"Key": "Item",
|
||||
"Type": "ref",
|
||||
"Kind": "item",
|
||||
"Required": true,
|
||||
"Name": "trading/schema/field/item"
|
||||
},
|
||||
{
|
||||
"Key": "Price",
|
||||
"Type": "int",
|
||||
"Required": true,
|
||||
"Name": "trading/schema/field/price"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Key": "Buys",
|
||||
"Type": "list",
|
||||
"Name": "trading/schema/field/buys",
|
||||
"Of": [
|
||||
{
|
||||
"Key": "Item",
|
||||
"Type": "ref",
|
||||
"Kind": "item",
|
||||
"Required": true,
|
||||
"Name": "trading/schema/field/item"
|
||||
},
|
||||
{
|
||||
"Key": "Price",
|
||||
"Type": "int",
|
||||
"Required": true,
|
||||
"Name": "trading/schema/field/price"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Trade Test",
|
||||
"description": "Integration test of trading on the rpg_demo game: gathers brushwood, stones and a mushroom in the forest by walking onto them, heals the hero with the mushroom, talks to the village merchant whose dialog opens the trade window, sells the junk and buys an elixir by clicking the two inventories, checks that walking is blocked while the window is open and that Esc closes it. Activated by --itest=trade with --game=rpg_demo --new; --shots=<dir> saves screenshots (windowed runs only).",
|
||||
"description": "Integration test of trading on the rpg_plus game (its rpg_demo_game world): gathers brushwood, stones and a mushroom in the forest by walking onto them, heals the hero with the mushroom, talks to the village merchant whose dialog opens the trade window, sells the junk and buys an elixir by clicking the two inventories, checks that walking is blocked while the window is open and that Esc closes it. Activated by --itest=trade with --game=rpg_plus --new (the prologue is clicked through first); --shots=<dir> saves screenshots (windowed runs only).",
|
||||
"sources": [
|
||||
"src/*.cs"
|
||||
],
|
||||
|
||||
@@ -88,13 +88,18 @@ namespace Cthangover.Mods.Trading.Tests
|
||||
switch (step)
|
||||
{
|
||||
case 0:
|
||||
if (Boot.IsReady && SkipPrologue())
|
||||
return;
|
||||
if (Boot.IsReady && View?.Map?.ID == Village)
|
||||
Next();
|
||||
return;
|
||||
case 1:
|
||||
if (AdvanceDialog())
|
||||
return;
|
||||
Check(Inventory.CheckCount(Coin) == 0, "a new game starts without money");
|
||||
// The prologue gives a purse; the deals below count from an empty one.
|
||||
if (Inventory.CheckCount(Coin) > 0)
|
||||
Inventory.Remove(Coin, Inventory.CheckCount(Coin));
|
||||
Check(Inventory.CheckCount(Coin) == 0, "the purse is emptied for the test");
|
||||
RpgWorldHost.Teleport(new RpgTeleport { Map = Forest, X = 6, Y = 4, Dir = RpgDirection.Down });
|
||||
Next();
|
||||
return;
|
||||
@@ -292,6 +297,26 @@ namespace Cthangover.Mods.Trading.Tests
|
||||
}
|
||||
|
||||
/// <summary>Advances a running dialog with the action key; true while it is still running.</summary>
|
||||
/// <summary>
|
||||
/// The game opens with a novel-style prologue (no map yet): its lines are clicked
|
||||
/// through and every choice takes the first answer. True while it runs.
|
||||
/// </summary>
|
||||
private static bool SkipPrologue()
|
||||
{
|
||||
// Asking for the dialog box before the first scene is up caches the wrong node.
|
||||
var scene = ((SceneTree)Engine.GetMainLoop()).Root.GetNodeOrNull<SceneManager>("SceneManager")?.CurrentSceneName;
|
||||
if (string.IsNullOrEmpty(scene) || RpgWorldHost.Current?.View?.Map != null)
|
||||
return false;
|
||||
var box = RpgInput.FindDialogBox();
|
||||
if (box == null || !box.IsRunning)
|
||||
return false;
|
||||
if (box.IsWaitingAnswer)
|
||||
box.TrySelectVariant(0);
|
||||
else
|
||||
box.NextAction();
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool AdvanceDialog()
|
||||
{
|
||||
var box = RpgInput.FindDialogBox();
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Cthangover.Mods.Trading.Tests
|
||||
.Select(a => a.Substring("--shots=".Length))
|
||||
.FirstOrDefault();
|
||||
GameLogger.Log("TEST", $"TradeTestInitializer: activating trade, shots={shots ?? "off"}");
|
||||
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new TradeTestDriver(shots));
|
||||
ModRoot.AddDeferred(new TradeTestDriver(shots));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user