Add more tutorials
This commit is contained in:
parent
93d6c7e532
commit
deab844d04
Binary file not shown.
After Width: | Height: | Size: 502 KiB |
Binary file not shown.
After Width: | Height: | Size: 575 KiB |
Binary file not shown.
After Width: | Height: | Size: 776 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 }],
|
||||
|
|
|
@ -285,9 +285,6 @@ export class InGameState extends GameState {
|
|||
*/
|
||||
stage7Warmup() {
|
||||
if (this.switchStage(stages.s7_warmup)) {
|
||||
if (G_IS_DEV && globalConfig.debug.noArtificialDelays) {
|
||||
this.warmupTimeSeconds = 0.05;
|
||||
} else {
|
||||
if (this.creationPayload.fastEnter) {
|
||||
this.warmupTimeSeconds = globalConfig.warmupTimeSecondsFast;
|
||||
} else {
|
||||
|
@ -295,7 +292,6 @@ export class InGameState extends GameState {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The final stage where this game is running and updating regulary.
|
||||
|
|
|
@ -414,6 +414,22 @@ ingame:
|
|||
1_3_expand: >-
|
||||
This is <strong>NOT</strong> an idle game! Build more extractors and belts to finish the goal quicker.<br><br>Tip: Hold <strong>SHIFT</strong> to place multiple extractors, and use <strong>R</strong> to rotate them.
|
||||
|
||||
2_1_place_cutter: >-
|
||||
Now place a <strong>Cutter</strong> to cut the circles in two halves!<br><br>
|
||||
PS: The cutter always cuts from <strong>top to bottom</strong> regardless of its orientation.
|
||||
|
||||
2_2_place_trash: >-
|
||||
The cutter can <strong>clog and stall</strong>!<br><br>
|
||||
Use a <strong>trash</strong> to get rid of the currently (!) not needed waste.
|
||||
|
||||
2_3_more_cutters: >-
|
||||
Good job! Now place <strong>2 more cutters</strong> to speed up this slow process!<br><br>
|
||||
PS: Use the <strong>0-9 hotkeys</strong> to access buildings faster!
|
||||
|
||||
3_1_rectangles: >-
|
||||
Now let's extract some rectangles! <strong>Build 4 extractors</strong> and connect them to the hub.<br><br>
|
||||
PS: Hold <strong>SHIFT</strong> while dragging a belt to activate the belt planner!
|
||||
|
||||
# Connected miners
|
||||
connectedMiners:
|
||||
one_miner: 1 Extractor
|
||||
|
|
Loading…
Reference in New Issue