{step.screens[screenIndex].name}
@@ -76,7 +76,7 @@ function TutorialModal({
{!step.screens[screenIndex].hideNext && (
diff --git a/packages/client/src/game/data/entities.ts b/packages/client/src/game/data/entities.ts
index 70f8775..1a13065 100644
--- a/packages/client/src/game/data/entities.ts
+++ b/packages/client/src/game/data/entities.ts
@@ -51,7 +51,7 @@ const EntityData = {
},
dynamo: {
entityTypeId: 102,
- name: "Whirly Dynamo",
+ name: "Dynamo",
blurb: "Generates power",
description:
"The Whirly Dynamo is an awe-inspiring, spiraled contraption, eternally spinning, twirling, and cascading in the breezy stratosphere. It contains an enormous, spiraled windmill, capturing the gentlest of breezes and the mightiest of gales.",
diff --git a/packages/client/src/game/data/tutorial.ts b/packages/client/src/game/data/tutorial.ts
index 79ab8a6..6090dd5 100644
--- a/packages/client/src/game/data/tutorial.ts
+++ b/packages/client/src/game/data/tutorial.ts
@@ -87,6 +87,13 @@ export const completeTutorial = async (tutorialName: string) => {
});
};
+export const defaultInventory = [
+ EntityData.facilities.gravityhill,
+ EntityData.facilities.dynamo,
+ EntityData.facilities.residence,
+ EntityData.facilities.scaffold,
+];
+
export const tutorialSteps = [
{
name: "intro",
@@ -150,12 +157,7 @@ export const tutorialSteps = [
{
name: "living",
text: "Make it a life worth living",
- inventory: [
- EntityData.facilities.gravityhill,
- EntityData.facilities.dynamo,
- EntityData.facilities.residence,
- EntityData.facilities.scaffold,
- ],
+ inventory: defaultInventory,
completedCondition: (player: PlayerData) => {
return hasFacility(player, EntityData.facilities.residence.entityTypeId);
},
@@ -175,12 +177,7 @@ export const tutorialSteps = [
{
name: "making money",
text: "Make it a life worth living",
- inventory: [
- EntityData.facilities.gravityhill,
- EntityData.facilities.dynamo,
- EntityData.facilities.residence,
- EntityData.facilities.scaffold,
- ],
+ inventory: defaultInventory,
completedCondition: () => {
return hasWallet();
},
@@ -215,12 +212,7 @@ export const tutorialSteps = [
{
name: "keepitsafe",
text: "Make it a life worth living",
- inventory: [
- EntityData.facilities.gravityhill,
- EntityData.facilities.dynamo,
- EntityData.facilities.residence,
- EntityData.facilities.scaffold,
- ],
+ inventory: defaultInventory,
completedCondition: () => {
return tutorialFlags.hasHadWalletExplainer;
},
@@ -241,6 +233,14 @@ export const tutorialSteps = [
},
] as TutorialStep[];
+export const getTutorialByName = (name: string) => {
+ return tutorialSteps.find((t) => t.name === name);
+};
+
+export const getActiveTutorial = (playerData: PlayerData) => {
+ return tutorialSteps.find((t) => t.name === playerData.activeTutorials[0]);
+};
+
const hasWallet = () => {
const comethWallet = window.localStorage.getItem("comethWalletAddress");
return comethWallet && comethWallet !== "";
diff --git a/packages/client/src/game/systems/gameLoop.tsx b/packages/client/src/game/systems/gameLoop.tsx
index d0bfe2f..366ac2d 100644
--- a/packages/client/src/game/systems/gameLoop.tsx
+++ b/packages/client/src/game/systems/gameLoop.tsx
@@ -162,12 +162,6 @@ function GameLoop() {
});
useMemo(() => {
- // Debug for hiding the loading screen on new world
- // const event = new Event("gameLoaded");
- // document.dispatchEvent(event);
-
- // we're going to check which entities don't exist yet and build new ones:
- // TODO: GameLoaded logic breaks when the map has zero entities [bug]
for (const facility of facilities) {
const { entity, typeId, position, yaw, color, variant, owner } = facility;
if (!getState().world.getEntityByPosition(position)) {
diff --git a/packages/client/src/mud/wallet.ts b/packages/client/src/mud/wallet.ts
index cb4b110..01d43af 100644
--- a/packages/client/src/mud/wallet.ts
+++ b/packages/client/src/mud/wallet.ts
@@ -102,6 +102,7 @@ export async function createComethWallet() {
const walletAdaptor = new ConnectAdaptor({
chainId: SupportedNetworks.MUMBAI,
apiKey,
+ userName: "LAPUTA Vault",
});
const instance = new ComethWallet({
authAdapter: walletAdaptor,
diff --git a/packages/client/src/mudExample.tsx b/packages/client/src/mudExample.tsx
index a524ba7..aaf403d 100644
--- a/packages/client/src/mudExample.tsx
+++ b/packages/client/src/mudExample.tsx
@@ -7,7 +7,7 @@ import { getState } from "./game/store";
import { useState, useEffect } from "react";
import { getTimestamp } from "./lib/utils";
-export const MudExample = () => {
+export const MudExample = ({ display = false }: { display: boolean }) => {
const {
components: { Counter, GameSetting },
systemCalls: {
@@ -118,7 +118,7 @@ export const MudExample = () => {
const delay = async (ms) => {
return new Promise((resolve) => setTimeout(resolve, ms));
};
-
+ if (!display) return null;
return (
diff --git a/packages/client/src/styles/index.css b/packages/client/src/styles/index.css
index 0195199..3da3720 100644
--- a/packages/client/src/styles/index.css
+++ b/packages/client/src/styles/index.css
@@ -4,7 +4,7 @@
html,
body {
- @apply bg-[#76ADAB] text-black;
+ @apply bg-[#76ADAB] text-black h-screen max-h-screen;
}
#mud-dev-tools button.peer::before {
@@ -35,3 +35,12 @@ img {
-o-user-select: none;
user-select: none;
}
+
+::-webkit-scrollbar {
+ width: 0;
+}
+
+/* Hide horizontal scrollbar */
+::-webkit-scrollbar-thumb {
+ background: transparent;
+}