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

Show hint after unlocking level 4

This commit is contained in:
tobspr
2020-05-28 15:36:38 +02:00
parent 1582125d50
commit 955cba74aa
6 changed files with 57 additions and 4 deletions

View File

@@ -3,6 +3,8 @@ import { ClickDetector } from "../../../core/click_detector";
import { formatBigNumber, makeDiv } from "../../../core/utils";
import { ShapeDefinition } from "../../shape_definition";
import { BaseHUDPart } from "../base_hud_part";
import { blueprintShape } from "../../upgrades";
import { enumHubGoalRewards } from "../../tutorial_goals";
export class HUDPinnedShapes extends BaseHUDPart {
createElements(parent) {
@@ -46,6 +48,10 @@ export class HUDPinnedShapes extends BaseHUDPart {
if (key === this.root.hubGoals.currentGoal.definition.getHash()) {
return true;
}
if (key === blueprintShape) {
return true;
}
for (let i = 0; i < this.pinnedShapes.length; ++i) {
if (this.pinnedShapes[i].key === key) {
return true;
@@ -70,6 +76,10 @@ export class HUDPinnedShapes extends BaseHUDPart {
this.internalPinShape(currentKey, currentGoal.required, false);
if (this.root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_blueprints)) {
this.internalPinShape(blueprintShape, currentGoal.required, false);
}
for (let i = 0; i < this.pinnedShapes.length; ++i) {
const key = this.pinnedShapes[i].key;
if (key !== currentKey) {
@@ -150,6 +160,11 @@ export class HUDPinnedShapes extends BaseHUDPart {
// Can not pin current goal
return;
}
if (key === blueprintShape) {
return;
}
for (let i = 0; i < this.pinnedShapes.length; ++i) {
if (this.pinnedShapes[i].key === key) {
// Already pinned

View File

@@ -115,6 +115,15 @@ export class HUDUnlockNotification extends BaseHUDPart {
);
showUpgrades.add(() => this.root.hud.parts.shop.show());
}
if (this.root.hubGoals.level === 5) {
const { showKeybindings } = this.root.hud.parts.dialogs.showInfo(
T.dialogs.keybindingsIntroduction.title,
T.dialogs.keybindingsIntroduction.desc,
["showKeybindings:misc", "ok:good:timeout"]
);
showKeybindings.add(() => this.root.gameState.goToKeybindings());
}
});
}