Effect icons and tooltip !

This commit is contained in:
2026-10-02 13:16:50 -03:00
parent e560cb3928
commit f749f6be79
22 changed files with 131 additions and 19 deletions
+8
View File
@@ -1552,6 +1552,14 @@ export class GameServer {
);
const attack_speed = player.attribute(ATTRIBUTES.attack_speed);
sync("attack_speed", attack_speed, () => ({ type: "attack_speed", value: attack_speed }));
const effects = [...player.effects.values()]
.filter((effect) => effect.show_icon)
.map(({ type, amplifier, duration }) => ({ id: type.id, amplifier, duration }));
// by when they end, which stays the same while they count down
const ends = effects.map((
{ id, amplifier, duration },
) => [id, amplifier, duration < 0 ? -1 : this.#tick + duration]);
sync("effects", ends, () => ({ type: "effects", effects }));
const menu = player.menu;
if (menu) {