Localize according to setting
This commit is contained in:
parent
a466a8f032
commit
e0e1e4c889
2 changed files with 8 additions and 13 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
"author": [
|
"author": [
|
||||||
"Emik"
|
"Emik"
|
||||||
],
|
],
|
||||||
"version": "2.0.5",
|
"version": "2.0.6",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ local function level_up(hand, by, card)
|
||||||
|
|
||||||
if hand == true then
|
if hand == true then
|
||||||
update(localize "k_all_hands", "...", "...", "")
|
update(localize "k_all_hands", "...", "...", "")
|
||||||
|
delay(2)
|
||||||
|
|
||||||
f(G.GAME.hands):where "visible":keys():each(function(k)
|
f(G.GAME.hands):where "visible":keys():each(function(k)
|
||||||
level_up_hand(card, k, true, by)
|
level_up_hand(card, k, true, by)
|
||||||
|
|
@ -93,14 +94,12 @@ joker {
|
||||||
eternal_compat = true,
|
eternal_compat = true,
|
||||||
blueprint_compat = false,
|
blueprint_compat = false,
|
||||||
perishable_compat = true,
|
perishable_compat = true,
|
||||||
loc_vars = function(_, _, card)
|
loc_vars = function(self, _, card)
|
||||||
local sinister = (_G["Jen"] or _G["pwx"] or {}).sinister or G.escapey_sinister
|
local sinister = (_G["Jen"] or _G["pwx"] or {}).sinister or G.escapey_sinister
|
||||||
local loc = G.localization.descriptions.Joker.j_Roland_escapey
|
local loc = G.localization.descriptions.Joker.j_Roland_escapey
|
||||||
|
local merge = self.fusable(card) and loc.merge or {}
|
||||||
local quotes = loc.quotes
|
local quotes = loc.quotes
|
||||||
|
|
||||||
local merge = (G.jokers and f(G.jokers.cards):any(is_mergeable_with(card)))
|
|
||||||
and loc.merge or {}
|
|
||||||
|
|
||||||
local normal = (merge[1] or sinister) and "" or
|
local normal = (merge[1] or sinister) and "" or
|
||||||
pseudorandom_element(quotes.normal, pseudoseed "EscapeyQuotes") or ""
|
pseudorandom_element(quotes.normal, pseudoseed "EscapeyQuotes") or ""
|
||||||
|
|
||||||
|
|
@ -121,20 +120,16 @@ joker {
|
||||||
Bakery_can_use = function(self, card)
|
Bakery_can_use = function(self, card)
|
||||||
return not card.debuff and u() and (self.exchangable() or self.fusable(card))
|
return not card.debuff and u() and (self.exchangable() or self.fusable(card))
|
||||||
end,
|
end,
|
||||||
Bakery_use_button_text = function(_, card)
|
Bakery_use_button_text = function(self, card)
|
||||||
return localize {
|
return localize {
|
||||||
type = "variable",
|
type = "variable",
|
||||||
key = card.debuff and "b_Roland_debuffed" or
|
key = card.debuff and "b_Roland_debuffed" or
|
||||||
(#G.GAME.tags == 0 and not
|
((not self.exchangable() and self.fusable(card)) and
|
||||||
f(G.consumeables.cards):any(destructible) and
|
|
||||||
f(G.jokers.cards):any(is_mergeable_with(card)) and
|
|
||||||
"b_Roland_fuse" or "b_Roland_escape"),
|
"b_Roland_fuse" or "b_Roland_escape"),
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
calculate = function(self, card, context)
|
calculate = function(self, card, context)
|
||||||
if context.forcetrigger then
|
return context.forcetrigger and self.proc(card) or nil
|
||||||
return self.proc(card)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
Bakery_use_joker = function(self, card)
|
Bakery_use_joker = function(self, card)
|
||||||
if card.debuff then
|
if card.debuff then
|
||||||
|
|
@ -209,7 +204,7 @@ joker {
|
||||||
---@param card Card
|
---@param card Card
|
||||||
fusable = function(card)
|
fusable = function(card)
|
||||||
return SMODS.Mods.Roland.config.fusable_escapey and
|
return SMODS.Mods.Roland.config.fusable_escapey and
|
||||||
f(G.jokers.cards):any(is_mergeable_with(card))
|
f((G.jokers or {}).cards):any(is_mergeable_with(card))
|
||||||
end,
|
end,
|
||||||
---@param card Card
|
---@param card Card
|
||||||
---@param times? integer
|
---@param times? integer
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue