Closed pchote closed 6 years ago
But note that i'm still not sure on what our base badge size should be. 16 is a little tight, so 24 may be better. This will only be clear once we have enough of the system working to be able to properly test the ingame UI.
Short update on badges:
Currently the ACP module for adding/editing/viewing badges does not check the image size. Badges will need to be added manually to ./images/badges, the only check it does is to check if the file ends on .png (replicated from acp_ranks.php which the module mode is based on.)
The module mode for associating badges to users is not ready yet so this will need to be done manually in the openra_user_badges
table, i.e. the user_id and badge_id from openra_badges
(primary key) will need to be inserted there. The badge data, badge_title
, badge_icon_16
(that is just the filename) will be inserted in openra_badges
by adding badges via the form in the working "Manage badges" module mode. The input for "Set to default badge" will insert true/false but this data is not used anywhere yet.
The controller will loop over all badges that are associated with the fingerprint (which is associated to the user_id and so on) and output the data just like in your example above.
This is done.
In the future I would like to add HiDPI glyph support to the UI, so we should design this in from the start.
The
openra_badges
table should renamebadge_icon
→badge_icon16
The profile yaml for badges should be formatted as: