New translation lines
This commit is contained in:
parent
53e5dd38b2
commit
b68215a710
8 changed files with 41 additions and 7 deletions
|
|
@ -5,12 +5,14 @@ class_name MessageSenderAction
|
|||
var dialogue
|
||||
## Message which will be send on click
|
||||
var msg: Message
|
||||
## Additional formatting which can be applied by menu
|
||||
var format = {}
|
||||
|
||||
## Gets message and translates it on display.
|
||||
## Shown message should end with _LOCAL
|
||||
func _ready():
|
||||
var item_id = get_parent().menu.item_ids[id]
|
||||
msg = Message.create(item_id, tr(item_id + "_LOCAL"))
|
||||
msg = Message.create(item_id, tr(item_id + "_LOCAL").format(format))
|
||||
text = msg.shown
|
||||
super._ready()
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ func load_menu():
|
|||
format["item_id"] = i + buy_sell_tab * 6
|
||||
format["item_name"] = tr(list[i - 1 + buy_sell_tab * 6].name)
|
||||
menu.item_ids[i] = BUY_SELL_ITEM
|
||||
|
||||
# disconnect previous action
|
||||
if actions[i] is TransitButton:
|
||||
actions[i].button_up.disconnect(transit_menu)
|
||||
|
|
@ -69,6 +68,8 @@ func load_menu():
|
|||
actions[i].set_script(menu.item_data[i].load_script())
|
||||
Menu.Action.ComboAction:
|
||||
actions[i].set_script(menu.item_data[i].load_script())
|
||||
if "format" in actions[i]:
|
||||
actions[i].format = format
|
||||
if "id" in actions[i]:
|
||||
actions[i].id = i
|
||||
if "dialogue" in actions[i]:
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ var money: float = 1000.0
|
|||
## Base which was requested to dock last
|
||||
var docking_base: Base = null
|
||||
|
||||
var cargo = {}
|
||||
|
||||
func destroy():
|
||||
super.destroy()
|
||||
if docking_base != null:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue