mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Added notifications for achievements
This commit is contained in:
parent
a61b2b0ef0
commit
5f0cd2c675
BIN
res/ui/icons/notification_achievement.png
Normal file
BIN
res/ui/icons/notification_achievement.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
@ -58,7 +58,7 @@ $buildingsAndVariants: belt, balancer, underground_belt, underground_belt-tier2,
|
||||
background-image: uiResource("res/ui/building_tutorials/virtual_processor-cutter.png") !important;
|
||||
}
|
||||
|
||||
$icons: notification_saved, notification_success, notification_upgrade;
|
||||
$icons: notification_saved, notification_success, notification_upgrade, notification_achievement;
|
||||
@each $icon in $icons {
|
||||
[data-icon="icons/#{$icon}.png"] {
|
||||
/* @load-async */
|
||||
|
@ -7,6 +7,7 @@ export const enumNotificationType = {
|
||||
saved: "saved",
|
||||
upgrade: "upgrade",
|
||||
success: "success",
|
||||
achievement: "achievement",
|
||||
};
|
||||
|
||||
const notificationDuration = 3;
|
||||
@ -26,6 +27,10 @@ export class HUDNotifications extends BaseHUDPart {
|
||||
this.root.signals.gameSaved.add(() =>
|
||||
this.onNotification(T.ingame.notifications.gameSaved, enumNotificationType.saved)
|
||||
);
|
||||
|
||||
this.root.signals.achievementCompleted.add(key =>
|
||||
this.onNotification(T.achievements[key].title, enumNotificationType.achievement)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user