I also changed how medals work. Now medals exist as an in-game thing. If you want to also award them on the hub you can set the hub_name on the /Medal object and it'll be awarded on the BYOND hub too. Medals are now stored per-character, so even though the BYOND hub medals are per-client it's possible to earn the same medals over again on a new character. The on-screen display of the medal being awarded is shown when the medal is new to the character. This also means that you can award medals when the hub can't be reached. If you call the mob's sync_medals proc it'll award them any medals on the hub that are missing.
I also fixed up the way party members are displayed. It now receives events to add/remove party members and to update their health or mana as they change. It's enabled by default. In the sample game, click on a mob to make it join your party. Click on it again to make it leave.
There were some other minor changes and bug fixes. Here's the full list:
- Checked for zero values in the health/mana meters to remove a runtime error that could occur.
- Made the health/mana meters show one bubble even if your maximum value is zero. If you've got 0/0 health or mana it'll show as one empty bubble.
- Checked for a null quests list in hud-quests.dm to avoid a runtime error that would occur when you pressed Q without having any quests.
- Added the player bank which is shared across all characters the player has.
- When banking, use the arrow keys to move the cursor and the space bar to move items between your inventory and bank. When you're done, press escape to close the interface.
- Added an NPC to the sample game that you interact with to access the banking interface.
- Added the mob.item_prompt() proc which can be used to ask the user to select an item from their inventory.
- Changed how medals work. Medals are now an in-game thing that can be awarded to each character. If you give them a hub_name they'll also be awarded on the BYOND hub, but you don't need a hub to give in-game medals. Each character keeps track of the medals they've been awarded. This also means that medals can be awarded to a player even if they're playing offline.
- Added the mob.sync_medals() proc which checks what medals the player has earned and updates the BYOND hub accordingly. Since medals can be awarded even when the BYOND hub can't be reached, you can call this proc to update the hub's record of what medals the player has.
- Fixed a bug with the consume_item and remove_item procs. Now they will properly delete stacks when their quantity is reduced to zero.
- I also changed the way that has_item and remove_item compare item types. They used to use istype(), which meant that consume_item(/item/potion) might delete an instance of /item/potion/super_potion. Now it uses the == operator so it has to be an exact match.
- Adjusted the health and mana meter bubbles so the images are centered in the icons.
- Updated the party display and made it enabled by default. Party members are shown in the top-right corner of the screen. The list is updated as party members come and go and their health/mana displays are updated as they change.
- You can press the P key to hide or show the party display.
- In the sample game you can click on a mob to add or remove them from your party. This is done just so you can test out the party display.
- Added "layer" as a named parameter to the atom.effect() proc, its default value is the atom's layer plus five.
- Added a trail behind the fireball ability in the sample game. The trail is purely visual, touching it doesn't inflict damage.
- Added the KEY_QUESTS constant which is "q" by default. This is the key you can press to set focus to the quest tracker.