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:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user