diff --git a/Locales/en.mo b/Locales/en.mo index 562728c..29a2f0b 100644 Binary files a/Locales/en.mo and b/Locales/en.mo differ diff --git a/Locales/en.po b/Locales/en.po index f9e2211..86d952f 100644 --- a/Locales/en.po +++ b/Locales/en.po @@ -123,12 +123,13 @@ msgstr "Lock all content" msgid "BUTTON_ACHIEVEMENTS" msgstr "Achievements" -#: Scenes/Menus/MainMenu/main_menu.tscn +#: Scenes/Menus/MainMenu/main_menu.tscn Scenes/Menus/options_menu.tscn msgid "BUTTON_CANCEL" msgstr "Cancel" #: Scenes/Menus/MainMenu/main_menu.tscn #: Scenes/Menus/CharacterSelect/character_select.tscn +#: Scenes/Menus/options_menu.tscn msgid "BUTTON_CONFIRM" msgstr "Confirm" @@ -177,14 +178,6 @@ msgstr "Total Games:" msgid "BUTTON_RESTART" msgstr "Play Again" -#: Scenes/Menus/CharacterSelect/character_select.tscn -msgid "character name" -msgstr "" - -#: Scenes/Menus/CharacterSelect/character_select.tscn -msgid "------------------------" -msgstr "" - #: Scenes/Menus/CharacterSelect/character_select.tscn msgid "BUTTON_PREVIOUS" msgstr "Prev" @@ -297,18 +290,305 @@ msgstr "Borderless Windowed" msgid "OPTION_FULLSCREEN" msgstr "Fullscreen" -#: Scenes/Menus/keybind_options.tscn -msgid "Action" -msgstr "" - -#: Scenes/Menus/keybind_options.tscn -msgid "Primary Bind" -msgstr "" - -#: Scenes/Menus/keybind_options.tscn -msgid "Secondary Bind" -msgstr "" - #: Scenes/UI/keybind_popup.tscn msgid "LABEL_BIND_KEY" msgstr "Press a key to bind action" + +#: choose_card_screen.tscn +msgid "LABEL_CHOOSE_CARD" +msgstr "Currently Playing..." + +#: choose_card_screen.tscn +msgid "BUTTON_VIEW_TOWER" +msgstr "Side A" + +#: choose_card_screen.tscn +msgid "BUTTON_VIEW_WEAPON" +msgstr "Side B" + +#: choose_card_screen.tscn +msgid "BUTTON_FINALIZE_CARD_CHOICE" +msgstr "Record" + +#: choose_card_screen.tscn +msgid "LABEL_CARD_DESCRIPTION" +msgstr "Description" + +#: choose_card_screen.tscn +msgid "LABEL_CARD_FEATURES" +msgstr "Features" + +#: choose_card_screen.tscn +msgid "LABEL_TARGET_LIST" +msgstr "Can Target" + +#: Classes/Engineer/class.tres +msgid "CLASS_NAME_ENGINEER" +msgstr "Engineer" + +#: Classes/Mage/class.tres +msgid "CLASS_NAME_MAGE" +msgstr "Mage" + +#: Cards/ascension.tres +msgid "CARD_NAME_PLATFORM_DASH" +msgstr "Ascension" + +#: Towers/Ascension/tower_stats.tres +msgid "DESC_TOWER_PLATFORM_DASH" +msgstr "Grants access to a stable high canopy" + +#: Weapons/Ascension/weapon_stats.tres +msgid "DESC_WEAPON_PLATFORM_DASH" +msgstr "Send yourself flying" + +#: Cards/assault.tres +msgid "CARD_NAME_BASIC_GUN" +msgstr "Pipe Rifle" + +#: Towers/Assault/tower_stats.tres +msgid "DESC_TOWER_BASIC_GUN" +msgstr "" +"Fires a shot every %Fire Delay% seconds dealing %Damage% damage at a range " +"of %Range%m" + +#: Weapons/Assault/weapon_stats.tres +msgid "DESC_WEAPON_BASIC_GUN" +msgstr "" +"Fires a shot every %Fire Delay% seconds dealing %Damage% damage at a range " +"of %Range%m" + +#: Cards/blowdart.tres +msgid "CARD_NAME_POISON" +msgstr "Blowdart" + +#: Towers/Blowdart/tower_stats.tres +msgid "DESC_TOWER_POISON" +msgstr "" +"Fires every %Fire Delay%s, applying one stack of Poison at a range of " +"%Range%m" + +#: Weapon/Blowdart/weapon_stats.tres +msgid "DESC_WEAPON_POISON" +msgstr "" +"Fires every %Fire Delay%s, applying one stack of Poison at a range of " +"%Range%m" + +#: Cards/bomb_launcher.tres +msgid "CARD_NAME_BOMB" +msgstr "Bomb Launcher" + +#: Towers/BombLauncher/tower_stats.tres +msgid "DESC_TOWER_BOMB" +msgstr "Launch a bomb that deals %Damage% damage every %Fire Delay% seconds" + +#: Weapon/BombLauncher/weapon_stats.tres +msgid "DESC_WEAPON_BOMB" +msgstr "Launch a bomb that deals %Damage% damage every %Fire Delay% seconds" + +#: Cards/fireball.tres +msgid "CARD_NAME_FIREBALL" +msgstr "Fireball" + +#: Towers/Fireball/tower_stats.tres +msgid "DESC_TOWER_FIREBALL" +msgstr "" +"Conjures a fireball every %Fire Delay%s that deals %Damage% and apply " +"Burning to enemies caught in its blast" + +#: Weapon/Fireball/weapon_stats.tres +msgid "DESC_WEAPON_FIREBALL" +msgstr "" +"Conjure a fireball every %Fire Delay%s that can be thrown to deal %Damage% " +"and apply Burning to enemies caught in its blast" + +#: Cards/flamethrower.tres +msgid "CARD_NAME_FLAMETHROWER" +msgstr "Flamethrower" + +#: Towers/Flamethrower/tower_stats.tres +msgid "DESC_TOWER_FLAMETHROWER" +msgstr "Applies burning to enemies in front of it" + +#: Weapons/Flamethrower/weapon_stats.tres +msgid "DESC_WEAPON_FLAMETHROWER" +msgstr "Hold to apply Burning to enemies in front of you" + +#: Cards/gatling.tres +msgid "CARD_NAME_ACCEL" +msgstr "Gatling" + +#: Towers/Gatling/tower_stats.tres +msgid "DESC_TOWER_ACCEL" +msgstr "" +"Fires a shot every %Fire Delay% seconds dealing %Damage% damage at a range " +"of %Range%m\n" +"\n" +"While attacking the same target, gradually accelerates to %Speed " +"Multiplier%x the fire rate over %Speed Time%s" + +#: Weapons/Gatling/weapon_stats.tres +msgid "DESC_WEAPON_ACCEL" +msgstr "" +"Fires a shot every %Fire Delay% seconds dealing %Damage% damage at a range " +"of %Range%m\n" +"\n" +"While held, gradually accelerates to %Speed Multiplier%x the fire rate over " +"%Speed Time%s" + +#: Cards/glue_launcher.tres +msgid "CARD_NAME_GLUE" +msgstr "Glue Launcher" + +#: Towers/GlueLauncher/tower_stats.tres +msgid "DESC_TOWER_GLUE" +msgstr "" +"Fires every %Fire Delay%s, making the target Sticky at a range of %Range%m" + +#: Weapons/GlueLauncher/weapon_stats.tres +msgid "DESC_WEAPON_GLUE" +msgstr "" +"Fires every %Fire Delay%s, making the target Sticky at a range of %Range%m" + +#: Cards/icicle.tres +msgid "CARD_NAME_ICE_SPIKE" +msgstr "Icicle" + +#: Towers/Icicle/tower_stats.tres +msgid "DESC_TOWER_ICE_SPIKE" +msgstr "" +"Conjures an icicle every %Fire Delay%s that deals %Damage% and applies Cold " +"to enemies caught in its blast" + +#: Weapons/Icicle/weapon_stats.tres +msgid "DESC_WEAPON_ICE_SPIKE" +msgstr "" +"Conjure an icicle every %Fire Delay%s that can be thrown to deal %Damage% " +"and apply Cold to enemies caught in its blast" + +#: Cards/overclock.tres +msgid "CARD_NAME_SPEED_INCREASER" +msgstr "Overclock" + +#: Towers/Overclock/tower_stats.tres +msgid "DESC_TOWER_SPEED_INCREASER" +msgstr "Speeds up the fire rate of towers within %Range%m by 10%" + +#: Weapons/Overclock/weapon_stats.tres +msgid "DESC_WEAPON_SPEED_INCREASER" +msgstr "" +"Fire a machine-energizing pellet every %Fire Delay% seconds that speeds up " +"tower fire rate by 35% for %EffectDuration% seconds at a range of %Range%m" + +#: Cards/reactor.tres +msgid "CARD_NAME_RADIATION" +msgstr "Reactor" + +#: Towers/Reactor/tower_stats.tres +msgid "DESC_TOWER_RADIATION" +msgstr "" +"Slowly applies Radioactive to enemies around itself at a range of %Range%m" + +#: Weapons/Reactor/weapon_stats.tres +msgid "DESC_WEAPON_RADIATION" +msgstr "Hold to apply Radioactive to enemies in front of you" + +#: Cards/refrigerator.tres +msgid "CARD_NAME_FREEZER" +msgstr "Refrigerator" + +#: Towers/Refrigerator/tower_stats.tres +msgid "DESC_TOWER_FREEZER" +msgstr "Applies Cold to enemies around itself" + +#: Weapons/Refrigerator/weapon_stats.tres +msgid "DESC_WEAPON_FREEZER" +msgstr "Hold to apply Cold to enemies in front of you" + +#: Cards/rocket_launcher.tres +msgid "CARD_NAME_ROCKET" +msgstr "Fireworks" + +#: Towers/RocketLauncher/tower_stats.tres +msgid "DESC_TOWER_ROCKET" +msgstr "" +"Every %Fire Delay%s, fires a homing rocket at up to %Target Limit% flying " +"enemies up to %Range%m away that deal %Damage% damage" + +#: Weapons/RocketLauncher/weapon_stats.tres +msgid "DESC_WEAPON_ROCKET" +msgstr "" +"Every %Fire Delay%s, hold to target up to %Target Limit% enemies and release " +"to fire homing rockets that deal %Damage% damage" + +#: Cards/sniper.tres +msgid "CARD_NAME_SNIPER" +msgstr "Sniper" + +#: Towers/Sniper/tower_stats.tres +msgid "DESC_TOWER_SNIPER" +msgstr "" +"Fires a shot every %Fire Delay% seconds dealing %Damage%damage at a range of " +"%Range%m" + +#: Weapons/Sniper/weapon_stats.tres +msgid "DESC_WEAPON_SNIPER" +msgstr "" +"Fires a shot every %Fire Delay% seconds dealing %Damage% damage at a range " +"of %Range%m" + +#: Scripts/options_menu.gd +msgid "OPTIONS_TAB_GAMEPLAY" +msgstr "Gameplay" + +#: Scripts/options_menu.gd +msgid "OPTIONS_TAB_GRAPHICS" +msgstr "Graphics" + +#: Scripts/options_menu.gd +msgid "OPTIONS_TAB_KEYBINDS" +msgstr "Keybinds" + +#: Scripts/options_menu.gd +msgid "OPTIONS_TAB_AUDIO" +msgstr "Audio" + +#: PCs/hud.gd +msgid "PROMPT_START_WAVE" +msgstr "Press %Ready% to start wave" + +#: Enemies/BabyEyeDog/baby_eye_dog.tres +msgid "ENEMY_FAST_BABY" +msgstr "Baby Eye Dog" + +#: Enemies/Crystalisk/crystalisk.tres +msgid "ENEMY_FLYING_CRYSTAL" +msgstr "Crystalisk" + +#: Enemies/ElderEyeDog/elder_eye_dog.tres +msgid "ENEMY_HEAVY_WALKER" +msgstr "Heavy Eye Dog" + +#: Enemies/EyeDog/eye_dog.tres +msgid "ENEMY_DOG" +msgstr "Eye Dog" + +#: Scenes/CardPrinter/card_printer.gd +msgid "PROMPT_RADIO_INTERACT" +msgstr "%Interact% Insert blank cassette" + +#: Scenes/ShopStand/shop_stand.gd +msgid "PROMPT_BUY_BLANK" +msgstr "%Interact% Buy blank cassette for ${Blank_Cost}" + +msgid "PROMPT_BUY_CARD" +msgstr "%Interact% Buy {Card_Name} for ${Card_Cost}" + +#: UI/enemybox.gd +msgid "LABEL_WAVE" +msgstr "Wave {Wave_Number}:" + +#, fuzzy +#~| msgid "LABEL_DISPLAY_NAME" +#~ msgid "LABEL_CARD_NAME" +#~ msgstr "Display Name:" diff --git a/Locales/translation_template.pot b/Locales/translation_template.pot index fea1f10..e76fd28 100644 --- a/Locales/translation_template.pot +++ b/Locales/translation_template.pot @@ -301,10 +301,6 @@ msgstr "" msgid "LABEL_CHOOSE_CARD" msgstr "" -#: choose_card_screen.tscn -msgid "LABEL_CARD_NAME" -msgstr "" - #: choose_card_screen.tscn msgid "BUTTON_VIEW_TOWER" msgstr "" @@ -329,22 +325,6 @@ msgstr "" msgid "LABEL_TARGET_LIST" msgstr "" -#: Scenes/Menus/options_menu.tscn -msgid "Gameplay" -msgstr "" - -#: Scenes/Menus/options_menu.tscn -msgid "Graphics" -msgstr "" - -#: Scenes/Menus/options_menu.tscn -msgid "Keybinds" -msgstr "" - -#: Scenes/Menus/options_menu.tscn -msgid "Audio" -msgstr "" - #: Classes/Engineer/class.tres msgid "CLASS_NAME_ENGINEER" msgstr "" @@ -558,5 +538,16 @@ msgid "ENEMY_DOG" msgstr "" #: Scenes/CardPrinter/card_printer.gd -msgid "BUTTON_RADIO_INTERACT" +msgid "PROMPT_RADIO_INTERACT" +msgstr "" + +#: Scenes/ShopStand/shop_stand.gd +msgid "PROMPT_BUY_BLANK" +msgstr "" + +msgid "PROMPT_BUY_CARD" +msgstr "" + +#: UI/enemybox.gd +msgid "LABEL_WAVE" msgstr "" diff --git a/PCs/hero.tscn b/PCs/hero.tscn index e118d67..56a1334 100644 --- a/PCs/hero.tscn +++ b/PCs/hero.tscn @@ -379,7 +379,7 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 bbcode_enabled = true -text = "#Primary Fire#" +text = "%Primary Fire%" scroll_active = false horizontal_alignment = 1 vertical_alignment = 1 @@ -409,7 +409,7 @@ grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 bbcode_enabled = true -text = "#Secondary Fire#" +text = "%Secondary Fire%" scroll_active = false horizontal_alignment = 1 vertical_alignment = 1 diff --git a/PCs/hud.gd b/PCs/hud.gd index 0123da3..27f061a 100644 --- a/PCs/hud.gd +++ b/PCs/hud.gd @@ -82,9 +82,9 @@ func set_energy_visible(value: bool) -> void: func _process(_delta: float) -> void: fps_label.text = "FPS: " + str(Engine.get_frames_per_second()) - wave_start_label.text = tr(parse_action_tag("PROMPT_START_WAVE")) - place_text.text = parse_action_tag("[center]#Primary Fire#") - swap_text.text = parse_action_tag("[center]#Secondary Fire#") + wave_start_label.text = parse_action_tag(tr("PROMPT_START_WAVE")) + place_text.text = parse_action_tag("[center]%Primary Fire%") + swap_text.text = parse_action_tag("[center]%Secondary Fire%") func grow_wave_start_label() -> void: @@ -215,7 +215,7 @@ func pickup(card: Card) -> void: func parse_action_tag(text: String) -> String: - var string_array: PackedStringArray = text.split("#") + var string_array: PackedStringArray = text.split("%") var output: Array[String] = [] if string_array.size() > 1: for i: int in InputMap.action_get_events(string_array[1]).size(): diff --git a/Scenes/CardPrinter/card_printer.gd b/Scenes/CardPrinter/card_printer.gd index c81c5f0..359ff78 100644 --- a/Scenes/CardPrinter/card_printer.gd +++ b/Scenes/CardPrinter/card_printer.gd @@ -12,7 +12,7 @@ var spawned_cards: Array[CardItem] = [] func _ready() -> void: - button.hover_text = tr("BUTTON_RADIO_INTERACT") + button.hover_text = tr("PROMPT_RADIO_INTERACT") func get_faction_cards(faction: Card.Faction) -> Array[Card]: @@ -76,9 +76,20 @@ func find_cards(faction: Card.Faction) -> void: var decided_rarity: int = generate_rarity() var card_choices: Array[Card] = get_faction_cards(faction) var cards: Array[Card] = [] - for card: Card in card_choices: - if card.rarity == decided_rarity: - cards.append(card) + var valid_cards_found: bool = false + var testing_rarity: int = decided_rarity + while !valid_cards_found: + for card: Card in card_choices: + if card.rarity == testing_rarity: + cards.append(card) + if cards.size() != 0: + valid_cards_found = true + testing_rarity -= 1 + if testing_rarity < 0: + testing_rarity = 4 + if testing_rarity == decided_rarity: + print("This character doesn't have any cards!") + return var menu: ChooseCardScreen = card_selection_menu.instantiate() as ChooseCardScreen menu.add_cards(cards) menu.card_chosen.connect(output_card) diff --git a/Scenes/Menus/GameEndScreen/game_end_screen.gd b/Scenes/Menus/GameEndScreen/game_end_screen.gd index dd7e0c2..74a688b 100644 --- a/Scenes/Menus/GameEndScreen/game_end_screen.gd +++ b/Scenes/Menus/GameEndScreen/game_end_screen.gd @@ -13,10 +13,10 @@ var game_manager: GameManager func _ready() -> void: - winrate_label.text = "Your 20-game winrate is now: " + str(Data.save_data.winrate) + "%!" - total_games_label.text = "Total games: " + str(Data.save_data.wins + Data.save_data.losses) - total_wins_label.text = "Total wins: " + str(Data.save_data.wins) - total_losses_label.text = "Total losses: " + str(Data.save_data.losses) + winrate_label.text = str(Data.save_data.winrate) + "%" + total_games_label.text = str(Data.save_data.wins + Data.save_data.losses) + total_wins_label.text = str(Data.save_data.wins) + total_losses_label.text = str(Data.save_data.losses) for wave_key: int in game_manager.stats.enemies_undefeated: var spawned_box: EnemyBox = box.instantiate() as EnemyBox undefeated_enemies.add_child(spawned_box) diff --git a/Scenes/Menus/GameEndScreen/game_end_screen.tscn b/Scenes/Menus/GameEndScreen/game_end_screen.tscn index 974ee86..b987019 100644 --- a/Scenes/Menus/GameEndScreen/game_end_screen.tscn +++ b/Scenes/Menus/GameEndScreen/game_end_screen.tscn @@ -22,10 +22,10 @@ grow_vertical = 2 script = ExtResource("1_oa7nq") box = ExtResource("2_xm8em") outcome_label = NodePath("VBoxContainer/Labels/OutcomeLabel") -winrate_label = NodePath("VBoxContainer/Labels/WinRateLabel") -total_games_label = NodePath("VBoxContainer/Labels/TotalGamesLabel") -total_wins_label = NodePath("VBoxContainer/Labels/TotalWinsLabel") -total_losses_label = NodePath("VBoxContainer/Labels/TotalLossesLabel") +winrate_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer/WinRateLabel2") +total_games_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer2/WinRateLabel3") +total_wins_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer3/WinRateLabel4") +total_losses_label = NodePath("VBoxContainer/Labels/VBoxContainer/HBoxContainer4/WinRateLabel5") undefeated_enemies = NodePath("VBoxContainer/UndefeatedEnemies") [node name="VBoxContainer" type="VBoxContainer" parent="."] @@ -42,28 +42,76 @@ text = "LABEL_WIN_MESSAGE" horizontal_alignment = 1 vertical_alignment = 1 -[node name="WinRateLabel" type="Label" parent="VBoxContainer/Labels"] +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/Labels"] layout_mode = 2 +size_flags_horizontal = 4 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer"] +layout_mode = 2 + +[node name="WinRateLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 text = "LABEL_WINRATE" -horizontal_alignment = 1 vertical_alignment = 1 -[node name="TotalGamesLabel" type="Label" parent="VBoxContainer/Labels"] +[node name="WinRateLabel2" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer"] +auto_translate_mode = 2 layout_mode = 2 +size_flags_horizontal = 3 +text = "0" +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer"] +layout_mode = 2 + +[node name="TotalGamesLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 3 text = "LABEL_GAMES" -horizontal_alignment = 1 vertical_alignment = 1 -[node name="TotalWinsLabel" type="Label" parent="VBoxContainer/Labels"] +[node name="WinRateLabel3" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer2"] +auto_translate_mode = 2 layout_mode = 2 +size_flags_horizontal = 3 +text = "0" +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer"] +layout_mode = 2 + +[node name="TotalWinsLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer3"] +layout_mode = 2 +size_flags_horizontal = 3 text = "LABEL_WINS" -horizontal_alignment = 1 vertical_alignment = 1 -[node name="TotalLossesLabel" type="Label" parent="VBoxContainer/Labels"] +[node name="WinRateLabel4" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer3"] +auto_translate_mode = 2 layout_mode = 2 +size_flags_horizontal = 3 +text = "0" +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/Labels/VBoxContainer"] +layout_mode = 2 + +[node name="TotalLossesLabel" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer4"] +layout_mode = 2 +size_flags_horizontal = 3 text = "LABEL_LOSSES" -horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="WinRateLabel5" type="Label" parent="VBoxContainer/Labels/VBoxContainer/HBoxContainer4"] +auto_translate_mode = 2 +layout_mode = 2 +size_flags_horizontal = 3 +text = "0" +horizontal_alignment = 2 vertical_alignment = 1 [node name="UndefeatedEnemies" type="VBoxContainer" parent="VBoxContainer"] diff --git a/Scenes/Menus/MainMenu/main_menu.gd b/Scenes/Menus/MainMenu/main_menu.gd index 88c3dd1..37a0f7f 100644 --- a/Scenes/Menus/MainMenu/main_menu.gd +++ b/Scenes/Menus/MainMenu/main_menu.gd @@ -145,9 +145,10 @@ func _on_changelog_button_pressed() -> void: func load_stats(stats: SaveData) -> void: - $ProfileManager/VBoxContainer/Stats/Wins/Label2.text = str(stats.wins) - $ProfileManager/VBoxContainer/Stats/Losses/Label2.text = str(stats.losses) - $ProfileManager/VBoxContainer/Stats/Winrate/Label2.text = str(stats.winrate) + "%" + $ProfileManager/VBoxContainer/Stats/Games/Label2.text = str(Data.save_data.wins + Data.save_data.losses) + $ProfileManager/VBoxContainer/Stats/Wins/Label2.text = str(Data.save_data.wins) + $ProfileManager/VBoxContainer/Stats/Losses/Label2.text = str(Data.save_data.losses) + $ProfileManager/VBoxContainer/Stats/Winrate/Label2.text = str(Data.save_data.winrate) + "%" $ProfileManager/VBoxContainer/Stats/EngineerCardsBought/Label2.text = str(stats.engineer_cards_bought) $ProfileManager/VBoxContainer/Stats/MageCardsBought/Label2.text = str(stats.mage_cards_bought) diff --git a/Scenes/Menus/MainMenu/main_menu.tscn b/Scenes/Menus/MainMenu/main_menu.tscn index d2b0bd1..55aed38 100644 --- a/Scenes/Menus/MainMenu/main_menu.tscn +++ b/Scenes/Menus/MainMenu/main_menu.tscn @@ -243,6 +243,23 @@ text = "LABEL_STATS" horizontal_alignment = 1 vertical_alignment = 1 +[node name="Games" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats"] +layout_mode = 2 + +[node name="Label" type="Label" parent="ProfileManager/VBoxContainer/Stats/Games"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "LABEL_GAMES" +vertical_alignment = 1 + +[node name="Label2" type="Label" parent="ProfileManager/VBoxContainer/Stats/Games"] +auto_translate_mode = 2 +layout_mode = 2 +size_flags_horizontal = 3 +text = "0" +horizontal_alignment = 2 +vertical_alignment = 1 + [node name="Wins" type="HBoxContainer" parent="ProfileManager/VBoxContainer/Stats"] layout_mode = 2 diff --git a/Scenes/ShopStand/shop_stand.gd b/Scenes/ShopStand/shop_stand.gd index 74438cf..371fda6 100644 --- a/Scenes/ShopStand/shop_stand.gd +++ b/Scenes/ShopStand/shop_stand.gd @@ -19,6 +19,8 @@ var price_dict: Dictionary = { var cards_generated: int = 0 var blanks_available: int = 5 var blank_cost: int = 20 +var buy_blank_prompt: String = "PROMPT_BUY_BLANK" +var buy_card_prompt: String = "PROMPT_BUY_CARD" func close() -> void: @@ -56,7 +58,7 @@ func randomize_cards() -> void: cards[x].set_card(chosen_card) cards[x].view_tower() choice_buttons[x].press_cost = price_dict[chosen_card.rarity] - choice_buttons[x].hover_text = "#Interact# Spend $" + str(choice_buttons[x].press_cost) + " to acquire " + chosen_card.display_name + choice_buttons[x].hover_text = tr(buy_card_prompt).format({Card_Name = tr(chosen_card.display_name), Card_Cost = str(price_dict[chosen_card.rarity])}) if chosen_card.faction == Card.Faction.MAGE: Data.save_data.saw_mage_card_in_shop() for x: int in 2: @@ -69,7 +71,7 @@ func randomize_cards() -> void: cards[x+3].set_card(chosen_card) cards[x+3].view_tower() choice_buttons[x+3].press_cost = price_dict[chosen_card.rarity] - choice_buttons[x+3].hover_text = "#Interact# Spend $" + str(choice_buttons[x+3].press_cost) + " to acquire " + chosen_card.display_name + choice_buttons[x+3].hover_text = tr(buy_card_prompt).format({Card_Name = tr(chosen_card.display_name), Card_Cost = str(price_dict[chosen_card.rarity])}) if chosen_card.faction == Card.Faction.MAGE: Data.save_data.saw_mage_card_in_shop() for x: int in 1: @@ -84,7 +86,7 @@ func randomize_cards() -> void: cards[x+5].set_card(chosen_card) cards[x+5].view_tower() choice_buttons[x+5].press_cost = price_dict[chosen_card.rarity] - choice_buttons[x+5].hover_text = "#Interact# Spend $" + str(choice_buttons[x+5].press_cost) + " to acquire " + chosen_card.display_name + choice_buttons[x+5].hover_text = tr(buy_card_prompt).format({Card_Name = tr(chosen_card.display_name), Card_Cost = str(price_dict[chosen_card.rarity])}) if chosen_card.faction == Card.Faction.MAGE: Data.save_data.saw_mage_card_in_shop() for x: CollisionShape3D in choice_colliders: @@ -93,29 +95,24 @@ func randomize_cards() -> void: x.visible = true for x: CSGBox3D in blank_models: x.visible = true - blank_button_collider.disabled = false - blank_button.hover_text = "#Interact# Spend $" + str(blank_cost) + " to acquire a blank cassette" + blank_button_collider.set_deferred("disabled", false) + blank_button.hover_text = tr(buy_blank_prompt).format({Blank_Cost = str(blank_cost)}) func retrieve_card(i: int, callback: Hero) -> void: - #close() - choice_colliders[i].disabled = true - choice_sprites[i].set_visible(false) - var card: Card = cards[i].stats - if card.faction == Card.Faction.ENGINEER: - Data.save_data.bought_engineer_card() - if card.faction == Card.Faction.MAGE: - Data.save_data.bought_mage_card() - callback.add_card(card) - #var item: ItemCard = item_card_scene.instantiate() as ItemCard - #item.card = card - #item.position = Vector3(2.128, 0, 0) - #add_child(item) - #button_collider.disabled = false - #button_box.position = Vector3(0,0,0) + if callback.currency >= price_dict[cards[i].stats.rarity]: + choice_colliders[i].disabled = true + choice_sprites[i].set_visible(false) + var card: Card = cards[i].stats + if card.faction == Card.Faction.ENGINEER: + Data.save_data.bought_engineer_card() + if card.faction == Card.Faction.MAGE: + Data.save_data.bought_mage_card() + callback.currency -= price_dict[cards[i].stats.rarity] + callback.add_card(card) -func retrieve_blank(i: int, callback: Hero) -> void: +func retrieve_blank(_i: int, callback: Hero) -> void: if callback.currency >= blank_cost: blank_models[5 - blanks_available].visible = false blanks_available -= 1 diff --git a/Scenes/UI/card_hand.tscn b/Scenes/UI/card_hand.tscn index 112fb4e..a3ab9fc 100644 --- a/Scenes/UI/card_hand.tscn +++ b/Scenes/UI/card_hand.tscn @@ -4,14 +4,13 @@ [ext_resource type="Texture2D" uid="uid://dlqnhs8or4ik2" path="res://Assets/Textures/cardhand.png" id="1_d5oo3"] [ext_resource type="Texture2D" uid="uid://buf8t5gc7iw3a" path="res://Assets/TextureAtlases/rarityborders.tres" id="3_pclfx"] -[node name="Node2D" type="Node2D" node_paths=PackedStringArray("rarity_sprite", "title_text", "description", "target_label", "energy_cost", "duration")] +[node name="Node2D" type="Node2D" node_paths=PackedStringArray("rarity_sprite", "title_text", "description", "target_label", "energy_cost")] script = ExtResource("1_2cfmh") rarity_sprite = NodePath("Sprite2D2") title_text = NodePath("Title") description = NodePath("Description") target_label = NodePath("Title2") energy_cost = NodePath("EnergyCost") -duration = NodePath("") [node name="Sprite2D" type="Sprite2D" parent="."] texture_filter = 1 diff --git a/Scripts/Resources/card_text.gd b/Scripts/Resources/card_text.gd index 2dfd063..3f32293 100644 --- a/Scripts/Resources/card_text.gd +++ b/Scripts/Resources/card_text.gd @@ -1,7 +1,7 @@ class_name CardText extends Resource -@export var target_type: Data.TargetType +@export var target_type: Array[Data.TargetType] @export var energy_type: Data.EnergyType @export var attributes: Array[StatAttribute] @export_multiline var text: String diff --git a/Scripts/card_hand.gd b/Scripts/card_hand.gd index 391501d..91a14d1 100644 --- a/Scripts/card_hand.gd +++ b/Scripts/card_hand.gd @@ -13,7 +13,7 @@ var stats: Card func set_card(value: Card) -> void: stats = value title_text.text = stats.display_name - target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type]) + target_label.text = "replace me" rarity_sprite.region_rect = Rect2(64 * stats.rarity, 0, 64, 64) energy_cost.text = str(value.cost) @@ -22,8 +22,7 @@ func process_card_text(card_text: CardText) -> String: var processed_string: String = card_text.text for stat: StatAttribute in card_text.attributes: processed_string = processed_string.replace(stat.key, str(stat.value)) - processed_string = processed_string.replace("/", "[color=red]") - processed_string = processed_string.replace("\\", "[color=black]") + processed_string = processed_string.replace("%", "") return processed_string @@ -34,4 +33,4 @@ func view_weapon() -> void: func view_tower() -> void: description.text = process_card_text(stats.tower_stats) - target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type]) + target_label.text = str("go fuck yourself") diff --git a/Scripts/data.gd b/Scripts/data.gd index 36f2b66..0049f7f 100644 --- a/Scripts/data.gd +++ b/Scripts/data.gd @@ -14,7 +14,7 @@ var keymap_data: KeymapData const DEFAULT_SERVER_PORT: int = 58008 enum DamageIndicationType {PLAYER = 0, TOWER = 1, OTHER_PLAYER = 2, STATUS = 3} enum EnergyType {UNDEFINED = 0, DISCRETE = 1, CONTINUOUS = 2} -enum TargetType {UNDEFINED = 0, LAND = 1, AIR = 2, BOTH = 3} +enum TargetType {UNDEFINED = 0, LAND = 1, AIR = 2} enum EnemyType {UNDEFINED = 0, LAND = 1, AIR = 2} enum Rarity {COMMON = 0, UNCOMMON = 1, RARE = 2, EPIC = 3, LEGENDARY = 4} enum CardTags {DAMAGE = 0, UTILITY = 1, TARGETS_FLYING = 2} diff --git a/Scripts/game.gd b/Scripts/game.gd index c6cf253..452cf27 100644 --- a/Scripts/game.gd +++ b/Scripts/game.gd @@ -22,7 +22,7 @@ var gamemode: GameMode = null var level: Level var enemies: int = 0 var objective_health: int = 120 -var wave: int = 0 +var wave: int var pot: float var UILayer: CanvasLayer var chatbox: Chatbox @@ -161,7 +161,7 @@ func ready_player(player_ready_true: bool) -> void: func spawn_enemy_wave() -> void: level.shop.close() - wave += 1 + #wave += 1 level.disable_all_tower_frames() level.flow_field.calculate() for spawn: EnemySpawner in level.enemy_spawns: @@ -174,10 +174,10 @@ func spawn_enemy_wave() -> void: func set_upcoming_wave() -> void: if is_multiplayer_authority(): - var spawn_power: int = WaveManager.calculate_spawn_power(wave + 1, connected_players_nodes.size()) + var spawn_power: int = WaveManager.calculate_spawn_power(wave, connected_players_nodes.size()) #var new_wave: Dictionary = WaveManager.generate_wave(spawn_power, level.enemy_pool) var new_wave: Wave = WaveManager.generate_wave(spawn_power, level.enemy_pool, level.enemy_spawns) - temp_set_upcoming_wave(new_wave, WaveManager.calculate_pot(wave + 1, connected_players_nodes.size())) + temp_set_upcoming_wave(new_wave, WaveManager.calculate_pot(wave, connected_players_nodes.size())) #networked_set_upcoming_wave.rpc(new_wave, 6 + floori(spawn_power / 70.0)) @@ -238,12 +238,14 @@ func damage_goal(enemy: Enemy, penalty: int) -> void: func end_wave() -> void: + wave += 1 for peer_id: int in connected_players_nodes: var player: Hero = connected_players_nodes[peer_id] as Hero player.hud.set_wave_count(wave) player.currency += ceili(pot / connected_players_nodes.size()) player.energy = Data.player_energy - player.blank_cassettes += 1 + if wave % 2 == 0: + player.blank_cassettes += 1 if card_gameplay: player.iterate_duration() player.draw_to_hand_size() @@ -291,7 +293,7 @@ func setup() -> void: game_active = false enemies = 0 objective_health = 120 - wave = 0 + wave = 1 stats = RoundStats.new() game_setup.emit() diff --git a/Scripts/target_finder.gd b/Scripts/target_finder.gd index 82b4290..b6ee2ee 100644 --- a/Scripts/target_finder.gd +++ b/Scripts/target_finder.gd @@ -49,7 +49,7 @@ func find_multiple_targets() -> Array[EnemyController]: continue if tower.global_position.distance_to(enemy.global_position) > tower.target_range: continue - if !(enemy.stats.target_type & tower.stats.target_type): + if !tower.stats.target_type.has(enemy.stats.target_type): continue #if multiple_targets_cache.has(enemy): # continue diff --git a/Towers/Ascension/tower_stats.tres b/Towers/Ascension/tower_stats.tres index 9c8f96c..41f4201 100644 --- a/Towers/Ascension/tower_stats.tres +++ b/Towers/Ascension/tower_stats.tres @@ -23,7 +23,7 @@ metadata/_custom_type_script = "uid://yjb0uv6og430" [resource] script = ExtResource("2_bpl71") -target_type = 2 +target_type = Array[int]([]) energy_type = 0 attributes = Array[ExtResource("1_tiqmf")]([SubResource("Resource_tiqmf"), SubResource("Resource_bpl71"), SubResource("Resource_imnjp")]) text = "DESC_TOWER_PLATFORM_DASH" diff --git a/Towers/Assault/tower_stats.tres b/Towers/Assault/tower_stats.tres index baa5967..464845a 100644 --- a/Towers/Assault/tower_stats.tres +++ b/Towers/Assault/tower_stats.tres @@ -20,7 +20,7 @@ value = 10.0 [resource] script = ExtResource("2_7wr4x") -target_type = 1 +target_type = Array[int]([1]) energy_type = 0 attributes = Array[ExtResource("1_qgv2j")]([SubResource("Resource_bukji"), SubResource("Resource_2e75s"), SubResource("Resource_1vpnf")]) text = "DESC_TOWER_BASIC_GUN" diff --git a/Towers/Blowdart/tower_stats.tres b/Towers/Blowdart/tower_stats.tres index 553a4b3..8c0a4a0 100644 --- a/Towers/Blowdart/tower_stats.tres +++ b/Towers/Blowdart/tower_stats.tres @@ -20,7 +20,7 @@ value = 2.0 [resource] script = ExtResource("2_2k5i0") -target_type = 3 +target_type = Array[int]([1, 2]) energy_type = 0 attributes = Array[ExtResource("1_otqsh")]([SubResource("Resource_1txa7"), SubResource("Resource_46kv2"), SubResource("Resource_gb76x")]) text = "DESC_TOWER_POISON" diff --git a/Towers/BombLauncher/tower_stats.tres b/Towers/BombLauncher/tower_stats.tres index 2368a89..9910564 100644 --- a/Towers/BombLauncher/tower_stats.tres +++ b/Towers/BombLauncher/tower_stats.tres @@ -20,7 +20,7 @@ value = 8.0 [resource] script = ExtResource("2_1vuma") -target_type = 1 +target_type = Array[int]([1]) energy_type = 0 attributes = Array[ExtResource("1_eglp5")]([SubResource("Resource_yb48y"), SubResource("Resource_ewwvw"), SubResource("Resource_qu5dv")]) text = "DESC_TOWER_BOMB" diff --git a/Towers/Fireball/tower_stats.tres b/Towers/Fireball/tower_stats.tres index 0e4c4dc..d48eddc 100644 --- a/Towers/Fireball/tower_stats.tres +++ b/Towers/Fireball/tower_stats.tres @@ -20,7 +20,7 @@ value = 15.0 [resource] script = ExtResource("2_nconk") -target_type = 3 +target_type = Array[int]([1, 2]) energy_type = 0 attributes = Array[ExtResource("1_wvk31")]([SubResource("Resource_68ba3"), SubResource("Resource_gogvm"), SubResource("Resource_pswb4")]) text = "DESC_TOWER_FIREBALL" diff --git a/Towers/Flamethrower/tower_stats.tres b/Towers/Flamethrower/tower_stats.tres index 8a06433..e1e05a0 100644 --- a/Towers/Flamethrower/tower_stats.tres +++ b/Towers/Flamethrower/tower_stats.tres @@ -20,7 +20,7 @@ value = 3.0 [resource] script = ExtResource("2_wptab") -target_type = 1 +target_type = Array[int]([1]) energy_type = 0 attributes = Array[ExtResource("1_ikp33")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")]) text = "DESC_TOWER_FLAMETHROWER" diff --git a/Towers/Gatling/tower_stats.tres b/Towers/Gatling/tower_stats.tres index 9be74bf..30eff3b 100644 --- a/Towers/Gatling/tower_stats.tres +++ b/Towers/Gatling/tower_stats.tres @@ -30,7 +30,7 @@ value = 3.0 [resource] script = ExtResource("2_ky46y") -target_type = 1 +target_type = Array[int]([1]) energy_type = 0 attributes = Array[ExtResource("1_w20qq")]([SubResource("Resource_oayfg"), SubResource("Resource_fekle"), SubResource("Resource_ud8xi"), SubResource("Resource_cvkxf"), SubResource("Resource_pivwn")]) text = "DESC_TOWER_ACCEL" diff --git a/Towers/GlueLauncher/tower_stats.tres b/Towers/GlueLauncher/tower_stats.tres index 2d932d1..b8fd300 100644 --- a/Towers/GlueLauncher/tower_stats.tres +++ b/Towers/GlueLauncher/tower_stats.tres @@ -20,7 +20,7 @@ value = 2.0 [resource] script = ExtResource("2_226sm") -target_type = 1 +target_type = Array[int]([1]) energy_type = 0 attributes = Array[ExtResource("1_ytycf")]([SubResource("Resource_gbocu"), SubResource("Resource_6a2im"), SubResource("Resource_7npe0")]) text = "DESC_TOWER_GLUE" diff --git a/Towers/Icicle/tower_stats.tres b/Towers/Icicle/tower_stats.tres index 7ba1b1b..07ba935 100644 --- a/Towers/Icicle/tower_stats.tres +++ b/Towers/Icicle/tower_stats.tres @@ -20,7 +20,7 @@ value = 15.0 [resource] script = ExtResource("2_dorn5") -target_type = 3 +target_type = Array[int]([1, 2]) energy_type = 0 attributes = Array[ExtResource("1_wgjcy")]([SubResource("Resource_68ba3"), SubResource("Resource_gogvm"), SubResource("Resource_pswb4")]) text = "DESC_TOWER_ICE_SPIKE" diff --git a/Towers/Overclock/tower_stats.tres b/Towers/Overclock/tower_stats.tres index 10b337f..af24b57 100644 --- a/Towers/Overclock/tower_stats.tres +++ b/Towers/Overclock/tower_stats.tres @@ -23,7 +23,7 @@ metadata/_custom_type_script = "uid://yjb0uv6og430" [resource] script = ExtResource("2_fax6y") -target_type = 1 +target_type = Array[int]([]) energy_type = 0 attributes = Array[ExtResource("1_0swcp")]([SubResource("Resource_0swcp"), SubResource("Resource_fax6y"), SubResource("Resource_v0e26")]) text = "DESC_TOWER_SPEED_INCREASER" diff --git a/Towers/Reactor/tower_stats.tres b/Towers/Reactor/tower_stats.tres index e373699..e4ccdab 100644 --- a/Towers/Reactor/tower_stats.tres +++ b/Towers/Reactor/tower_stats.tres @@ -20,7 +20,7 @@ value = 30.0 [resource] script = ExtResource("2_8w61k") -target_type = 3 +target_type = Array[int]([1, 2]) energy_type = 0 attributes = Array[ExtResource("1_peekg")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")]) text = "DESC_TOWER_RADIATION" diff --git a/Towers/Refrigerator/tower_stats.tres b/Towers/Refrigerator/tower_stats.tres index 9bbaff3..c5e7595 100644 --- a/Towers/Refrigerator/tower_stats.tres +++ b/Towers/Refrigerator/tower_stats.tres @@ -20,7 +20,7 @@ value = 3.0 [resource] script = ExtResource("2_w4q6a") -target_type = 1 +target_type = Array[int]([1]) energy_type = 0 attributes = Array[ExtResource("1_wa26m")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")]) text = "DESC_TOWER_FREEZER" diff --git a/Towers/RocketLauncher/tower_stats.tres b/Towers/RocketLauncher/tower_stats.tres index 0cb6249..71cd757 100644 --- a/Towers/RocketLauncher/tower_stats.tres +++ b/Towers/RocketLauncher/tower_stats.tres @@ -25,7 +25,7 @@ value = 20.0 [resource] script = ExtResource("2_lag26") -target_type = 2 +target_type = Array[int]([2]) energy_type = 0 attributes = Array[ExtResource("1_jajj0")]([SubResource("Resource_4fjm2"), SubResource("Resource_uwj4j"), SubResource("Resource_6qv5v"), SubResource("Resource_y1rtq")]) text = "DESC_TOWER_ROCKET" diff --git a/Towers/Sniper/tower_stats.tres b/Towers/Sniper/tower_stats.tres index 1fb8da3..f344fca 100644 --- a/Towers/Sniper/tower_stats.tres +++ b/Towers/Sniper/tower_stats.tres @@ -20,7 +20,7 @@ value = 50.0 [resource] script = ExtResource("2_5j62t") -target_type = 3 +target_type = Array[int]([1, 2]) energy_type = 0 attributes = Array[ExtResource("1_5wjgg")]([SubResource("Resource_1ct8q"), SubResource("Resource_erx05"), SubResource("Resource_vfpmb")]) text = "DESC_TOWER_SNIPER" diff --git a/UI/CardSelectionBox/card_selection_box.gd b/UI/CardSelectionBox/card_selection_box.gd index 7202fd6..6bc1241 100644 --- a/UI/CardSelectionBox/card_selection_box.gd +++ b/UI/CardSelectionBox/card_selection_box.gd @@ -14,8 +14,8 @@ func set_amount(num: int) -> void: amount_label.text = "x" + str(num) -func set_card(card: Card) -> void: - self.card = card +func set_card(new_card: Card) -> void: + card = new_card icon.texture = card.icon cost_label.text = str(card.cost) for i: int in tags.get_child_count(): diff --git a/UI/enemybox.gd b/UI/enemybox.gd index 68aa98c..7c59196 100644 --- a/UI/enemybox.gd +++ b/UI/enemybox.gd @@ -3,7 +3,7 @@ extends HBoxContainer func set_wave(wave: int) -> void: - $WaveLabel.text = "Wave " + str(wave) + ": " + $WaveLabel.text = tr("LABEL_WAVE").format({Wave_Number = str(wave)}) func add_enemy_tag(enemy: Enemy, num: int) -> void: diff --git a/UI/h_box_container.tscn b/UI/h_box_container.tscn index caeb602..c1000da 100644 --- a/UI/h_box_container.tscn +++ b/UI/h_box_container.tscn @@ -7,4 +7,4 @@ script = ExtResource("1_lcu0c") [node name="WaveLabel" type="Label" parent="."] layout_mode = 2 -text = "wave 1: " +text = "LABEL_WAVE" diff --git a/Weapons/Assault/weapon_stats.tres b/Weapons/Assault/weapon_stats.tres index cf5673f..82c4123 100644 --- a/Weapons/Assault/weapon_stats.tres +++ b/Weapons/Assault/weapon_stats.tres @@ -25,7 +25,7 @@ value = 20.0 [resource] script = ExtResource("2_k26ta") -target_type = 0 +target_type = Array[int]([]) energy_type = 2 attributes = Array[ExtResource("1_rbqj6")]([SubResource("Resource_bcrtt"), SubResource("Resource_llper"), SubResource("Resource_7i2dt"), SubResource("Resource_8cirl")]) text = "DESC_WEAPON_BASIC_GUN" diff --git a/choose_card_screen.gd b/choose_card_screen.gd index 39282d3..6f7255a 100644 --- a/choose_card_screen.gd +++ b/choose_card_screen.gd @@ -23,6 +23,14 @@ func add_cards(cards: Array[Card]) -> void: choose_card(0) +func process_card_text(card_text: CardText) -> String: + var processed_string: String = tr(card_text.text) + for stat: StatAttribute in card_text.attributes: + processed_string = processed_string.replace(stat.key, "[color=red]" + str(stat.value) + "[color=black]") + processed_string = processed_string.replace("%", "") + return processed_string + + func choose_card(choice: int) -> void: chosen_card = choices[choice] card_name_label.text = tr(chosen_card.display_name) @@ -31,7 +39,7 @@ func choose_card(choice: int) -> void: func choose_side(side_a_chosen: bool) -> void: side_a = side_a_chosen - card_description_label.text = tr(chosen_card.tower_stats.text) if side_a else tr(chosen_card.weapon_stats.text) + card_description_label.text = process_card_text(chosen_card.tower_stats) if side_a else process_card_text(chosen_card.weapon_stats) func _on_confirm_button_pressed() -> void: diff --git a/choose_card_screen.tscn b/choose_card_screen.tscn index 24333fe..1a779da 100644 --- a/choose_card_screen.tscn +++ b/choose_card_screen.tscn @@ -47,8 +47,8 @@ size_flags_horizontal = 3 size_flags_stretch_ratio = 2.0 [node name="NameLabel" type="Label" parent="PanelContainer/Content/HBoxContainer/VBoxContainer"] +auto_translate_mode = 2 layout_mode = 2 -text = "LABEL_CARD_NAME" horizontal_alignment = 1 vertical_alignment = 1 @@ -86,6 +86,7 @@ text = "LABEL_CARD_DESCRIPTION" auto_translate_mode = 2 layout_mode = 2 size_flags_vertical = 3 +bbcode_enabled = true text = "a long ass example description of a card that goes into honestly way too much detail but at least if we can support a lot of text at a good size then we dont have to worry about really complicated cards fucking up our UI later in developement if we end up needing to explain a lot" [node name="FeaturesLabel" type="Label" parent="PanelContainer/Content/HBoxContainer/DescriptionVBox"] diff --git a/project.godot b/project.godot index 4e86349..b0f30ae 100644 --- a/project.godot +++ b/project.godot @@ -209,7 +209,8 @@ Pause={ [internationalization] -locale/translations_pot_files=PackedStringArray("res://Scenes/Menus/MainMenu/main_menu.tscn", "res://Scenes/Menus/PauseMenu/pause_menu.tscn", "res://Scenes/Menus/GameEndScreen/game_end_screen.tscn", "res://Scenes/Menus/CharacterSelect/character_select.tscn", "res://Scenes/Menus/audio_options.tscn", "res://Scenes/Menus/gameplay_options.tscn", "res://Scenes/Menus/graphics_options.tscn", "res://Scenes/Menus/keybind_options.tscn", "res://Scenes/UI/keybind_popup.tscn", "res://choose_card_screen.tscn", "res://Scenes/Menus/options_menu.tscn") +locale/translations=PackedStringArray("res://Locales/en.mo") +locale/translations_pot_files=PackedStringArray("res://Scenes/Menus/MainMenu/main_menu.tscn", "res://Scenes/Menus/PauseMenu/pause_menu.tscn", "res://Scenes/Menus/GameEndScreen/game_end_screen.tscn", "res://Scenes/Menus/CharacterSelect/character_select.tscn", "res://Scenes/Menus/audio_options.tscn", "res://Scenes/Menus/gameplay_options.tscn", "res://Scenes/Menus/graphics_options.tscn", "res://Scenes/Menus/keybind_options.tscn", "res://Scenes/UI/keybind_popup.tscn", "res://choose_card_screen.tscn") pseudolocalization/double_vowels=true [layer_names]