Skip to content

Commit f2911d4

Browse files
Merge pull request #73 from HuyTheKiller/main
Properly localize all operations of Mult
2 parents 4f4f987 + 6d3a8a5 commit f2911d4

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

lovely.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -879,27 +879,27 @@ elseif eval_type == 'hyper_chips' then
879879
elseif eval_type == 'e_mult' then
880880
sound = 'talisman_emult'
881881
amt = amt
882-
text = '^' .. amt .. ' Mult'
882+
text = '^' .. amt .. ' ' .. localize('k_mult')
883883
colour = G.C.MULT
884884
config.type = 'fade'
885885
config.scale = 0.7
886886
elseif eval_type == 'ee_mult' then
887887
sound = 'talisman_eemult'
888888
amt = amt
889-
text = '^^' .. amt .. ' Mult'
889+
text = '^^' .. amt .. ' ' .. localize('k_mult')
890890
colour = G.C.MULT
891891
config.type = 'fade'
892892
config.scale = 0.7
893893
elseif eval_type == 'eee_mult' then
894894
sound = 'talisman_eeemult'
895895
amt = amt
896-
text = '^^^' .. amt .. ' Mult'
896+
text = '^^^' .. amt .. ' ' .. localize('k_mult')
897897
colour = G.C.MULT
898898
config.type = 'fade'
899899
config.scale = 0.7
900900
elseif eval_type == 'hyper_mult' then
901901
sound = 'talisman_eeemult'
902-
text = (amt[1] > 5 and ('{' .. tostring(amt[1]) .. '}') or string.rep('^', amt[1])) .. tostring(amt[2]) .. ' Mult'
902+
text = (amt[1] > 5 and ('{' .. tostring(amt[1]) .. '}') or string.rep('^', amt[1])) .. tostring(amt[2]) .. ' ' .. localize('k_mult')
903903
amt = amt[2]
904904
colour = G.C.MULT
905905
config.type = 'fade'
@@ -1108,31 +1108,31 @@ if scoring_hand and scoring_hand[i] and scoring_hand[i].edition then
11081108
mult = mod_mult(mult ^ edi.e_mult)
11091109
update_hand_text({delay = 0}, {mult = mult})
11101110
card_eval_status_text(trg, 'extra', nil, percent, nil,
1111-
{message = '^'.. edi.e_mult ..' Mult',
1111+
{message = '^'.. edi.e_mult ..' ' .. localize('k_mult'),
11121112
edition = true,
11131113
e_mult = true})
11141114
end
11151115
if edi.ee_mult then
11161116
mult = mod_mult(mult:arrow(2, edi.ee_mult))
11171117
update_hand_text({delay = 0}, {mult = mult})
11181118
card_eval_status_text(trg, 'extra', nil, percent, nil,
1119-
{message = '^^'.. edi.ee_mult ..' Mult',
1119+
{message = '^^'.. edi.ee_mult ..' ' .. localize('k_mult'),
11201120
edition = true,
11211121
ee_mult = true})
11221122
end
11231123
if edi.eee_mult then
11241124
mult = mod_mult(mult:arrow(3, edi.eee_mult))
11251125
update_hand_text({delay = 0}, {mult = mult})
11261126
card_eval_status_text(trg, 'extra', nil, percent, nil,
1127-
{message = '^^^'.. edi.eee_mult ..' Mult',
1127+
{message = '^^^'.. edi.eee_mult ..' ' .. localize('k_mult'),
11281128
edition = true,
11291129
eee_mult = true})
11301130
end
11311131
if edi.hyper_mult and type(edi.hyper_mult) == 'table' then
11321132
mult = mod_mult(mult:arrow(edi.hyper_mult[1], edi.hyper_mult[2]))
11331133
update_hand_text({delay = 0}, {mult = mult})
11341134
card_eval_status_text(trg, 'extra', nil, percent, nil,
1135-
{message = (edi.hyper_mult[1] > 5 and ('{' .. edi.hyper_mult[1] .. '}') or string.rep('^', edi.hyper_mult[1])) .. edi.hyper_mult[2] ..' Mult',
1135+
{message = (edi.hyper_mult[1] > 5 and ('{' .. edi.hyper_mult[1] .. '}') or string.rep('^', edi.hyper_mult[1])) .. edi.hyper_mult[2] ..' ' .. localize('k_mult'),
11361136
edition = true,
11371137
hyper_mult = true})
11381138
end
@@ -1203,31 +1203,31 @@ if G.jokers.cards and G.jokers.cards[i] and G.jokers.cards[i].edition then
12031203
mult = mod_mult(mult ^ edi.e_mult)
12041204
update_hand_text({delay = 0}, {mult = mult})
12051205
card_eval_status_text(trg, 'extra', nil, percent, nil,
1206-
{message = '^'.. edi.e_mult ..' Mult',
1206+
{message = '^'.. edi.e_mult ..' ' .. localize('k_mult'),
12071207
edition = true,
12081208
e_mult = true})
12091209
end
12101210
if edi.ee_mult then
12111211
mult = mod_mult(mult:arrow(2, edi.ee_mult))
12121212
update_hand_text({delay = 0}, {mult = mult})
12131213
card_eval_status_text(trg, 'extra', nil, percent, nil,
1214-
{message = '^^'.. edi.ee_mult ..' Mult',
1214+
{message = '^^'.. edi.ee_mult ..' ' .. localize('k_mult'),
12151215
edition = true,
12161216
ee_mult = true})
12171217
end
12181218
if edi.eee_mult then
12191219
mult = mod_mult(mult:arrow(3, edi.eee_mult))
12201220
update_hand_text({delay = 0}, {mult = mult})
12211221
card_eval_status_text(trg, 'extra', nil, percent, nil,
1222-
{message = '^^^'.. edi.eee_mult ..' Mult',
1222+
{message = '^^^'.. edi.eee_mult ..' ' .. localize('k_mult'),
12231223
edition = true,
12241224
eee_mult = true})
12251225
end
12261226
if edi.hyper_mult and type(edi.hyper_mult) == 'table' then
12271227
mult = mod_mult(mult:arrow(edi.hyper_mult[1], edi.hyper_mult[2]))
12281228
update_hand_text({delay = 0}, {mult = mult})
12291229
card_eval_status_text(trg, 'extra', nil, percent, nil,
1230-
{message = (edi.hyper_mult[1] > 5 and ('{' .. edi.hyper_mult[1] .. '}') or string.rep('^', edi.hyper_mult[1])) .. edi.hyper_mult[2] ..' Mult',
1230+
{message = (edi.hyper_mult[1] > 5 and ('{' .. edi.hyper_mult[1] .. '}') or string.rep('^', edi.hyper_mult[1])) .. edi.hyper_mult[2] ..' ' .. localize('k_mult'),
12311231
edition = true,
12321232
hyper_mult = true})
12331233
end

steamodded_metadata.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ if SMODS.current_mod then
5757
SMODS.current_mod.debug_info = {
5858
["Break Infinity"] = Talisman.config_file.break_infinity
5959
}
60+
SMODS.current_mod.description_loc_vars = function()
61+
return { background_colour = G.C.CLEAR, text_colour = G.C.WHITE, scale = 1.2 }
62+
end
6063
end
6164
--[[SMODS.Joker{
6265
key = "test",

talisman.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ if SMODS and SMODS.calculate_individual_effect then
983983
update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})
984984
if not effect.remove_default_message then
985985
if from_edition then
986-
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = "^"..amount.." Mult", colour = G.C.EDITION, edition = true})
986+
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = "^"..amount.." "..localize("k_mult"), colour = G.C.EDITION, edition = true})
987987
elseif key ~= 'Emult_mod' then
988988
if effect.emult_message then
989989
card_eval_status_text(scored_card or effect.card or effect.focus, 'extra', nil, percent, nil, effect.emult_message)
@@ -1001,7 +1001,7 @@ if SMODS and SMODS.calculate_individual_effect then
10011001
update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})
10021002
if not effect.remove_default_message then
10031003
if from_edition then
1004-
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = "^^"..amount.." Mult", colour = G.C.EDITION, edition = true})
1004+
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = "^^"..amount.." "..localize("k_mult"), colour = G.C.EDITION, edition = true})
10051005
elseif key ~= 'EEmult_mod' then
10061006
if effect.eemult_message then
10071007
card_eval_status_text(scored_card or effect.card or effect.focus, 'extra', nil, percent, nil, effect.eemult_message)
@@ -1019,7 +1019,7 @@ if SMODS and SMODS.calculate_individual_effect then
10191019
update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})
10201020
if not effect.remove_default_message then
10211021
if from_edition then
1022-
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = "^^^"..amount.." Mult", colour = G.C.EDITION, edition = true})
1022+
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = "^^^"..amount.." "..localize("k_mult"), colour = G.C.EDITION, edition = true})
10231023
elseif key ~= 'EEEmult_mod' then
10241024
if effect.eeemult_message then
10251025
card_eval_status_text(scored_card or effect.card or effect.focus, 'extra', nil, percent, nil, effect.eeemult_message)
@@ -1037,7 +1037,7 @@ if SMODS and SMODS.calculate_individual_effect then
10371037
update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})
10381038
if not effect.remove_default_message then
10391039
if from_edition then
1040-
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = ((amount[1] > 5 and ('{' .. amount[1] .. '}') or string.rep('^', amount[1])) .. amount[2]).." Mult", colour = G.C.EDITION, edition = true})
1040+
card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {message = ((amount[1] > 5 and ('{' .. amount[1] .. '}') or string.rep('^', amount[1])) .. amount[2]).." "..localize("k_mult"), colour = G.C.EDITION, edition = true})
10411041
elseif key ~= 'hypermult_mod' then
10421042
if effect.hypermult_message then
10431043
card_eval_status_text(scored_card or effect.card or effect.focus, 'extra', nil, percent, nil, effect.hypermult_message)

0 commit comments

Comments
 (0)