Effect icons and tooltip !
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user