ajout de la traduction #70
* Fix de l'inspection de l'inventaire * Suppression des assets d'objectifs
This commit is contained in:
@@ -159,12 +159,12 @@ func card_info() -> CardInfo:
|
||||
info.texture = plant_type.mature_texture
|
||||
info.type_icon = PLANT_TYPE_ICON
|
||||
|
||||
var state_text = "Mature"
|
||||
var state_text = tr("MATURE")
|
||||
if state != State.MATURE:
|
||||
state_text = "Growing"
|
||||
state_text = tr("GROWING")
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
"Day [b]%d[/b]" % day,
|
||||
tr("DAY_%d") % day,
|
||||
LIFETIME_ICON
|
||||
))
|
||||
|
||||
@@ -175,12 +175,12 @@ func card_info() -> CardInfo:
|
||||
|
||||
if state != State.MATURE:
|
||||
info.stats.append(CardStatInfo.new(
|
||||
"Mature on day [b]%d[/b]" % calculate_grow_time(),
|
||||
tr("MATURE_ON_DAY_%d") % calculate_grow_time(),
|
||||
GROWING_ICON
|
||||
))
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
"[b]%d[/b] score when mature" % calculate_plant_score(State.MATURE),
|
||||
tr("%d_SCORE_WHEN_MATURE") % calculate_plant_score(State.MATURE),
|
||||
PLANT_POINT_ICON
|
||||
))
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@ static func card_effect_sections(
|
||||
cyclic_effects
|
||||
]
|
||||
var effects_category_labels : Array[String] = [
|
||||
"On mature",
|
||||
"When harvested",
|
||||
"Each day when mature",
|
||||
"ON_MATURE",
|
||||
"WHEN_HARVESTED",
|
||||
"EACH_DAY_WHEN_MATURE",
|
||||
]
|
||||
var effects_category_icon : Array[Texture] = [
|
||||
MATURE_EFFECT_ICON,
|
||||
|
||||
@@ -5,10 +5,10 @@ func get_decontamination_radius():
|
||||
return 50 + 50 * level
|
||||
|
||||
func get_effect_name() -> String:
|
||||
return "Decontaminate"
|
||||
return tr("DECONTAMINATE")
|
||||
|
||||
func get_effect_description() -> String:
|
||||
var ret = "Decontaminate %d unit around it" % [get_decontamination_radius()]
|
||||
var ret = tr("DECONTAMINATE_%d_UNIT_AROUND_IT") % [get_decontamination_radius()]
|
||||
return ret
|
||||
|
||||
func effect(plant):
|
||||
|
||||
@@ -5,7 +5,7 @@ func get_produce_number():
|
||||
return [level - 1, level]
|
||||
|
||||
func get_effect_name() -> String:
|
||||
return "Seed Production"
|
||||
return tr("SEED_PRODUCTION")
|
||||
|
||||
func get_effect_description() -> String:
|
||||
var number_str = ""
|
||||
@@ -13,12 +13,12 @@ func get_effect_description() -> String:
|
||||
for i in range(len(get_produce_number())):
|
||||
if i != 0:
|
||||
if i == len(get_produce_number()) - 1:
|
||||
number_str += " or "
|
||||
number_str += tr("OR")
|
||||
else :
|
||||
number_str += ", "
|
||||
number_str += tr("COMMA")
|
||||
number_str += str(get_produce_number()[i])
|
||||
|
||||
return "Produce %s seeds" % [number_str]
|
||||
return tr("PRODUCE_%s_SEEDS") % [number_str]
|
||||
|
||||
func effect(plant):
|
||||
for _i in range(get_produce_number().pick_random()):
|
||||
|
||||
@@ -38,7 +38,7 @@ func get_rarity() -> int:
|
||||
func card_section() -> CardSectionInfo:
|
||||
var section = CardSectionInfo.new(
|
||||
get_mutation_name() + (" %d" % level if level > 1 else ""),
|
||||
"[b]%s[/b] %s" % [PlantMutation.get_rarity_text(get_rarity()), get_mutation_description()]
|
||||
"[b]%s[/b] %s" % [tr(PlantMutation.get_rarity_text(get_rarity())), get_mutation_description()]
|
||||
)
|
||||
|
||||
section.title_color = PlantMutation.get_rarity_color(get_rarity())
|
||||
@@ -49,11 +49,11 @@ func card_section() -> CardSectionInfo:
|
||||
|
||||
static func get_rarity_text(rarity) -> String:
|
||||
var rarity_text : Array[String] = [
|
||||
"Common",
|
||||
"Rare",
|
||||
"Very rare",
|
||||
"Impossible",
|
||||
"[rainbow]Absurd[/rainbow]",
|
||||
"COMMON",
|
||||
"RARE",
|
||||
"VERY_RARE",
|
||||
"IMPOSSIBLE",
|
||||
"ABSURD",
|
||||
]
|
||||
|
||||
if rarity < len(rarity_text):
|
||||
|
||||
@@ -10,10 +10,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Ancient"
|
||||
return tr("ANCIENT")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "When mature, add [b]1[/b] to the score for each [b]%d[/b] days passed" % get_day_factor()
|
||||
return tr("ANCIENT_EFFECT_TEXT_LEVEL_%d") % get_day_factor()
|
||||
|
||||
func get_day_factor():
|
||||
return max(1, DEFAULT_DAY_FACTOR - level + 1)
|
||||
|
||||
@@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Elitist"
|
||||
return tr("ELITIST")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "When mature, add [b]%d[/b] to the score for each plant of the same species around, but score become 0 if none is around." % level
|
||||
return tr("ELITIST_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
|
||||
if plant.influence_zone == null:
|
||||
|
||||
@@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Ermit"
|
||||
return tr("ERMIT")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Multiply the score by [b]%d[/b] if no plant is near, but set it to 0 otherwise." % get_score_multiplier()
|
||||
return tr("ERMIT_EFFECT_TEXT_LEVEL_%d") % get_score_multiplier()
|
||||
|
||||
func get_score_multiplier():
|
||||
return level + 1
|
||||
|
||||
@@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Precocious"
|
||||
return tr("PRECOCIOUS")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Add [b]%d[/b] to the score while the plant is growing" % level
|
||||
return tr("PRECOCIOUS_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_score(plant_state : Plant.State, _plant : Plant, score) -> int:
|
||||
return score + (0 if plant_state == Plant.State.MATURE else level)
|
||||
@@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Quality"
|
||||
return tr("QUALITY")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Add [b]%d[/b] to the score if the plant is mature." % level
|
||||
return tr("QUALITY_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_score(plant_state : Plant.State, _plant : Plant, score : int) -> int:
|
||||
return score + (level if plant_state == Plant.State.MATURE else 0)
|
||||
@@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Quick"
|
||||
return tr("QUICK")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Reduce the grow time by %d" % level
|
||||
return tr("QUICK_EFFECT_TEXT_LEVEL_%d") % level
|
||||
|
||||
func mutate_grow_time(_plant : Plant, grow_time : int) -> int:
|
||||
return max(grow_time - level, 0)
|
||||
@@ -10,10 +10,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Sociable"
|
||||
return tr("SOCIABLE")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "When mature, add [b]%d[/b] to the score if near %d other plants" % [get_score_bonus(), NEAR_PLANT_NEEDED]
|
||||
return tr("SOCIABLE_EFFECT_TEXT_LEVEL_%d") % [get_score_bonus(), NEAR_PLANT_NEEDED]
|
||||
|
||||
func get_score_bonus():
|
||||
return (level + 2)
|
||||
|
||||
@@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
||||
return 0
|
||||
|
||||
func get_mutation_name() -> String:
|
||||
return "Strong"
|
||||
return tr("STRONG")
|
||||
|
||||
func get_mutation_description() -> String:
|
||||
return "Plus [b]%d[/b] percent of the score" % roundi(get_score_multiplier() * 100)
|
||||
return tr("STRONG_EFFECT_TEXT_LEVEL_%d") % roundi(get_score_multiplier() * 100)
|
||||
|
||||
func get_score_multiplier():
|
||||
return float(level)/2.
|
||||
|
||||
@@ -26,12 +26,12 @@ func card_info() -> CardInfo:
|
||||
info.type_icon = Plant.PLANT_TYPE_ICON
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
"Grow in [b]%d[/b]" % default_growing_time,
|
||||
tr("GROW_IN_%d") % default_growing_time,
|
||||
Plant.GROWING_ICON
|
||||
))
|
||||
|
||||
info.stats.append(CardStatInfo.new(
|
||||
"[b]%d[/b] score when mature" % default_plant_score,
|
||||
tr("%s_SCORE_WHEN_MATURE") % default_plant_score,
|
||||
Plant.PLANT_POINT_ICON
|
||||
))
|
||||
|
||||
@@ -78,10 +78,10 @@ class Evolution:
|
||||
class ScoreEvolution extends Evolution:
|
||||
|
||||
func get_title():
|
||||
return "%s score evolution" % plant_type.name
|
||||
return tr("%s_SCORE_EVOLUTION") % plant_type.name
|
||||
|
||||
func get_description():
|
||||
return "Add [b]%s[/b] to the default score of the plant" % level
|
||||
return tr("ADD_%s_TO_THE_DEFAULT_SCORE_OF_THE_PLANT") % level
|
||||
|
||||
func evolve(pt : PlantType = plant_type):
|
||||
pt.default_plant_score += level
|
||||
@@ -103,10 +103,10 @@ class MatureEffectEvolution extends Evolution:
|
||||
return pt.mature_effects[effect_index]
|
||||
|
||||
func get_title():
|
||||
return "%s %s evolution" % [plant_type.name, get_effect().get_effect_name()]
|
||||
return tr("%s_EVOLUTION") % plant_type.name
|
||||
|
||||
func get_description():
|
||||
return "Upgrade the level of %s of %d" % [get_effect().get_effect_name(), level]
|
||||
return tr("UPGRADE_THE_LEVEL_OF_%s_EFFECT_OF_%d_LEVEL") % [get_effect().get_effect_name(), level]
|
||||
|
||||
func evolve(pt : PlantType = plant_type):
|
||||
get_effect(pt).level += level
|
||||
|
||||
Reference in New Issue
Block a user