1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Allow to disable hints, add changelog

This commit is contained in:
tobspr
2020-05-23 15:04:55 +02:00
parent 5a46ba5e31
commit f03f04caa1
15 changed files with 218 additions and 14 deletions

View File

@@ -62,8 +62,6 @@ export class GameHUD {
notifications: new HUDNotifications(this.root),
settingsMenu: new HUDSettingsMenu(this.root),
tutorialHints: new HUDPartTutorialHints(this.root),
// betaOverlay: new HUDBetaOverlay(this.root),
debugInfo: new HUDDebugInfo(this.root),
@@ -87,6 +85,9 @@ export class GameHUD {
if (IS_DEMO) {
this.parts.watermark = new HUDWatermark(this.root);
}
if (this.root.app.settings.getAllSettings().offerHints) {
this.parts.tutorialHints = new HUDPartTutorialHints(this.root);
}
const frag = document.createDocumentFragment();
for (const key in this.parts) {

View File

@@ -54,6 +54,15 @@ export class HUDPartTutorialHints extends BaseHUDPart {
this.domAttach = new DynamicDomAttach(this.root, this.element);
this.currentShownLevel = new TrackedState(this.updateVideoUrl, this);
this.root.signals.postLoadHook.add(() => {
if (this.root.hubGoals.level === 1) {
this.root.hud.parts.dialogs.showInfo(
T.dialogs.hintDescription.title,
T.dialogs.hintDescription.desc
);
}
});
}
updateVideoUrl(level) {