diff --git a/res/ui/interactive_tutorial.noinline/2_1_place_cutter.gif b/res/ui/interactive_tutorial.noinline/2_1_place_cutter.gif new file mode 100644 index 00000000..1678c0b2 Binary files /dev/null and b/res/ui/interactive_tutorial.noinline/2_1_place_cutter.gif differ diff --git a/res/ui/interactive_tutorial.noinline/2_2_place_trash.gif b/res/ui/interactive_tutorial.noinline/2_2_place_trash.gif new file mode 100644 index 00000000..0d60fa9f Binary files /dev/null and b/res/ui/interactive_tutorial.noinline/2_2_place_trash.gif differ diff --git a/res/ui/interactive_tutorial.noinline/2_3_more_cutters.gif b/res/ui/interactive_tutorial.noinline/2_3_more_cutters.gif new file mode 100644 index 00000000..50ce88f9 Binary files /dev/null and b/res/ui/interactive_tutorial.noinline/2_3_more_cutters.gif differ diff --git a/res/ui/interactive_tutorial.noinline/3_1_rectangles.gif b/res/ui/interactive_tutorial.noinline/3_1_rectangles.gif new file mode 100644 index 00000000..418d3123 Binary files /dev/null and b/res/ui/interactive_tutorial.noinline/3_1_rectangles.gif differ diff --git a/src/css/main.scss b/src/css/main.scss index 5c4686e9..4f6a771e 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -73,8 +73,8 @@ ingame_HUD_KeybindingOverlay, ingame_HUD_Notifications, ingame_HUD_DebugInfo, ingame_HUD_EntityDebugger, -ingame_HUD_InteractiveTutorial, ingame_HUD_TutorialHints, +ingame_HUD_InteractiveTutorial, ingame_HUD_BuildingsToolbar, ingame_HUD_wires_toolbar, ingame_HUD_BlueprintPlacer, diff --git a/src/js/core/config.js b/src/js/core/config.js index 57224b6a..8b4c64c2 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -132,3 +132,8 @@ if (G_IS_DEV && globalConfig.debug.renderForTrailer) { if (globalConfig.debug.fastGameEnter) { globalConfig.debug.noArtificialDelays = true; } + +if (G_IS_DEV && globalConfig.debug.noArtificialDelays) { + globalConfig.warmupTimeSecondsFast = 0; + globalConfig.warmupTimeSecondsRegular = 0; +} diff --git a/src/js/game/hud/parts/interactive_tutorial.js b/src/js/game/hud/parts/interactive_tutorial.js index ffebc639..b6037eb2 100644 --- a/src/js/game/hud/parts/interactive_tutorial.js +++ b/src/js/game/hud/parts/interactive_tutorial.js @@ -6,6 +6,8 @@ import { DynamicDomAttach } from "../dynamic_dom_attach"; import { TrackedState } from "../../../core/tracked_state"; import { cachebust } from "../../../core/cachebust"; import { T } from "../../../translations"; +import { enumItemProcessorTypes, ItemProcessorComponent } from "../../components/item_processor"; +import { ShapeItem } from "../../items/shape_item"; const tutorialsByLevel = [ // Level 1 @@ -30,6 +32,68 @@ const tutorialsByLevel = [ condition: () => true, }, ], + // Level 2 + [ + // 2.1 place a cutter + { + id: "2_1_place_cutter", + condition: /** @param {GameRoot} root */ root => { + return ( + root.entityMgr + .getAllWithComponent(ItemProcessorComponent) + .filter(e => e.components.ItemProcessor.type === enumItemProcessorTypes.cutter) + .length === 0 + ); + }, + }, + // 2.2 place trash + { + id: "2_2_place_trash", + condition: /** @param {GameRoot} root */ root => { + return ( + root.entityMgr + .getAllWithComponent(ItemProcessorComponent) + .filter(e => e.components.ItemProcessor.type === enumItemProcessorTypes.trash) + .length === 0 + ); + }, + }, + // 2.3 place more cutters + { + id: "2_3_more_cutters", + condition: /** @param {GameRoot} root */ root => { + return ( + root.entityMgr + .getAllWithComponent(ItemProcessorComponent) + .filter(e => e.components.ItemProcessor.type === enumItemProcessorTypes.cutter) + .length < 3 + ); + }, + }, + ], + + // Level 2 + [ + // 3.1. rectangles + { + id: "3_1_rectangles", + condition: /** @param {GameRoot} root */ root => { + return ( + // 4 miners placed above rectangles and 10 delivered + root.hubGoals.getCurrentGoalDelivered() < 10 || + root.entityMgr.getAllWithComponent(MinerComponent).filter(entity => { + const tile = entity.components.StaticMapEntity.origin; + const below = root.map.getLowerLayerContentXY(tile.x, tile.y); + if (below && below.getItemType() === "shape") { + const shape = /** @type {ShapeItem} */ (below).definition.getHash(); + return shape === "RuRuRuRu"; + } + return false; + }).length < 4 + ); + }, + }, + ], ]; export class HUDInteractiveTutorial extends BaseHUDPart { diff --git a/src/js/game/modes/regular.js b/src/js/game/modes/regular.js index b7f84216..5dbf50ad 100644 --- a/src/js/game/modes/regular.js +++ b/src/js/game/modes/regular.js @@ -45,7 +45,7 @@ function generateUpgrades(limitedVersion = false) { const upgrades = { belt: [ { - required: [{ shape: "CuCuCuCu", amount: 60 }], + required: [{ shape: "CuCuCuCu", amount: 30 }], }, { required: [{ shape: "--CuCu--", amount: 500 }], diff --git a/src/js/states/ingame.js b/src/js/states/ingame.js index 2dd2db76..316c536c 100644 --- a/src/js/states/ingame.js +++ b/src/js/states/ingame.js @@ -285,14 +285,10 @@ export class InGameState extends GameState { */ stage7Warmup() { if (this.switchStage(stages.s7_warmup)) { - if (G_IS_DEV && globalConfig.debug.noArtificialDelays) { - this.warmupTimeSeconds = 0.05; + if (this.creationPayload.fastEnter) { + this.warmupTimeSeconds = globalConfig.warmupTimeSecondsFast; } else { - if (this.creationPayload.fastEnter) { - this.warmupTimeSeconds = globalConfig.warmupTimeSecondsFast; - } else { - this.warmupTimeSeconds = globalConfig.warmupTimeSecondsRegular; - } + this.warmupTimeSeconds = globalConfig.warmupTimeSecondsRegular; } } } diff --git a/translations/base-en.yaml b/translations/base-en.yaml index e635fc5e..a0754ba9 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -414,6 +414,22 @@ ingame: 1_3_expand: >- This is NOT an idle game! Build more extractors and belts to finish the goal quicker.

Tip: Hold SHIFT to place multiple extractors, and use R to rotate them. + 2_1_place_cutter: >- + Now place a Cutter to cut the circles in two halves!

+ PS: The cutter always cuts from top to bottom regardless of its orientation. + + 2_2_place_trash: >- + The cutter can clog and stall!

+ Use a trash to get rid of the currently (!) not needed waste. + + 2_3_more_cutters: >- + Good job! Now place 2 more cutters to speed up this slow process!

+ PS: Use the 0-9 hotkeys to access buildings faster! + + 3_1_rectangles: >- + Now let's extract some rectangles! Build 4 extractors and connect them to the hub.

+ PS: Hold SHIFT while dragging a belt to activate the belt planner! + # Connected miners connectedMiners: one_miner: 1 Extractor