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

Preparations for the trailer

This commit is contained in:
tobspr
2020-05-30 17:50:29 +02:00
parent 88a1c733bd
commit ffd011ac45
20 changed files with 320 additions and 26 deletions

View File

@@ -7,6 +7,7 @@ import { GameRoot } from "../../root";
import { findNiceIntegerValue } from "../../../core/utils";
import { Math_pow } from "../../../core/builtins";
import { blueprintShape } from "../../upgrades";
import { globalConfig } from "../../../core/config";
const logger = createLogger("blueprint");
@@ -54,6 +55,9 @@ export class Blueprint {
* Returns the cost of this blueprint in shapes
*/
getCost() {
if (G_IS_DEV && globalConfig.debug.blueprintsNoCost) {
return 0;
}
return findNiceIntegerValue(4 * Math_pow(this.entities.length, 1.1));
}

View File

@@ -90,10 +90,15 @@ export class HUDUnlockNotification extends BaseHUDPart {
}
this.element.querySelector("button.close").classList.remove("unlocked");
this.buttonShowTimeout = setTimeout(
() => this.element.querySelector("button.close").classList.add("unlocked"),
G_IS_DEV ? 100 : 10000
);
if (this.root.app.settings.getAllSettings().offerHints) {
this.buttonShowTimeout = setTimeout(
() => this.element.querySelector("button.close").classList.add("unlocked"),
G_IS_DEV ? 100 : 5000
);
} else {
this.element.querySelector("button.close").classList.add("unlocked");
}
}
cleanup() {