Skip to content

Commit b4e5eb8

Browse files
committed
Merge branch 'main' of github.com:TrashPandaCode/dumpster
2 parents 0e57095 + 4abfb1b commit b4e5eb8

4 files changed

Lines changed: 24 additions & 6 deletions

File tree

app/assets/videos/nodesexport.mp4

169 KB
Binary file not shown.
113 KB
Binary file not shown.

app/lib/game/components/Tutorial.tsx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import Joyride, {
66
type TooltipRenderProps,
77
} from "react-joyride";
88

9+
import exportVideo from "~/assets/videos/nodesexport.mp4";
10+
import rightclickVideo from "~/assets/videos/nodesrightclick.mp4";
11+
912
/*
1013
* This component provides a tutorial for the game, guiding users through the main features.
1114
* It uses react-joyride to create a step-by-step walkthrough.
@@ -36,8 +39,15 @@ export default function Tutorial({ onClose }: { onClose: () => void }) {
3639
},
3740
{
3841
title: "Add Nodes!",
39-
content:
40-
"You can add nodes to the editor by right-clicking on the canvas. Each node represents a specific action or condition in your game logic.",
42+
content: (
43+
<>
44+
You can add nodes to the editor by right-clicking on the canvas. Each
45+
node represents a specific action or condition in your game logic.
46+
<video autoPlay loop className="mt-4 rounded-md">
47+
<source src={rightclickVideo} type="video/mp4" />
48+
</video>
49+
</>
50+
),
4151
target: "#nodes-panel",
4252
disableBeacon: true,
4353
},
@@ -51,8 +61,16 @@ export default function Tutorial({ onClose }: { onClose: () => void }) {
5161
// Step 4: Export Flow
5262
{
5363
title: "Export Flow!",
54-
content:
55-
"Once you have created your game logic, you can export it to the game window by connecting your node tree(s) to the export node(s). This will allow you to test your logic in the game.",
64+
content: (
65+
<>
66+
Once you have created your game logic, you can export it to the game
67+
window by connecting your node tree(s) to the export node(s). This
68+
will allow you to test your logic in the game.
69+
<video autoPlay loop className="mt-4 rounded-md">
70+
<source src={exportVideo} type="video/mp4" />
71+
</video>
72+
</>
73+
),
5674
target: "#nodes-panel",
5775
placement: "center",
5876
disableBeacon: true,

app/lib/zustand/data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ export const useDataStore = create<DataState>((set, get) => ({
132132
initData: true,
133133
gameObjects: new Map(),
134134
setData: (gameObject, label, value) => {
135-
get().gameObjects.get(gameObject)!.get(label)!.setValue(value);
135+
get().gameObjects.get(gameObject)?.get(label)?.setValue(value);
136136
},
137137
getData: (gameObject, label) => {
138-
return get().gameObjects.get(gameObject)!.get(label)!.getValue();
138+
return get().gameObjects.get(gameObject)?.get(label)?.getValue() ?? 0;
139139
},
140140
addHandle: (gameObject, label) =>
141141
set((state) => {

0 commit comments

Comments
 (0)