Praytic / youtd2

Classic community-driven session-based Tower Defense game with RPG elements.
https://youtd2.com/
MIT License
77 stars 15 forks source link

Allow one open menu at a time and add UnitStatusCard to the right panel #350

Closed Praytic closed 5 months ago

Praytic commented 5 months ago

giphy (2)

Kvel2D commented 5 months ago

Unit should be deselected if unit menu is hidden. This is a bad, confusing state for the player: 2024-01-14 12_53_00-Window

Kvel2D commented 5 months ago

Fix error:

E 0:00:12:0185   UnitStatusCard.gd:19 @ _on_selected_unit_changed(): Signal 'level_changed' is already connected to given callable 'PanelContainer(UnitStatusCard.gd)::_update_level_panel' in that object.
  <C++ Error>    Method/function failed. Returning: ERR_INVALID_PARAMETER
  <C++ Source>   core/object/object.cpp:1294 @ connect()
  <Stack Trace>  UnitStatusCard.gd:19 @ _on_selected_unit_changed()
                 SelectUnit.gd:56 @ set_selected_unit()
                 SelectUnit.gd:29 @ _unhandled_input()
Kvel2D commented 5 months ago

Got the following error by doing these steps:

  1. Start game.
  2. Open tower menu.
  3. Build a tower.
  4. Select tower.
E 0:00:08:0554   HUD.gd:87 @ _on_right_side_menu_visibility_changed(): Unexpected state of right side menus.
  <C++ Source>   ./core/variant/variant_utility.cpp:905 @ push_error()
  <Stack Trace>  HUD.gd:87 @ _on_right_side_menu_visibility_changed()
                 UnitMenu.gd:317 @ _on_selected_unit_changed()
                 SelectUnit.gd:56 @ set_selected_unit()
                 SelectUnit.gd:29 @ _unhandled_input()
Kvel2D commented 5 months ago

Closing tower stash and item stash by clicking "x" button stopped working.