brave-frontier-godot icon indicating copy to clipboard operation
brave-frontier-godot copied to clipboard

Display Real Units on Units Page

Open aMytho opened this issue 1 year ago • 4 comments

Now that the database has real units/teams, we need to display them on the unit page. This should be fairly easy to implement.

The relevant files are res://Menu/SubMenu/Unit/Display/view_units.gd and its scene. We currently preload vargas and selena and display them.

Instead, we will need to use the Database class to select all units that have an account id that matches the current account. The current account info can be gained via Account.get_account_info(). The id is in the returned array. Once we have the units, we will need to use ResourceLookups.get_unit_by_unit_number(id) to get the unit info and associated thumbnail. create_thumbnail(unit) can be used to create the scene. Add it to the $Unitlist. The current implementation provides an example of this.

Having res://Menu/SubMenu/Unit/Display/unit_display.tscn display the unit that was just selected would be nice, but isn't a requirement yet.

aMytho avatar Apr 15 '23 02:04 aMytho