@satelliteoflove/godot-mcp 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connection/websocket.d.ts.map +1 -1
- package/dist/connection/websocket.js +39 -7
- package/dist/connection/websocket.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/tilemap.d.ts +500 -0
- package/dist/tools/tilemap.d.ts.map +1 -0
- package/dist/tools/tilemap.js +326 -0
- package/dist/tools/tilemap.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/connection/websocket.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AA4BtC,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,eAAe,CAA0C;IACjE,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,YAAY,CAA+B;IACnD,OAAO,CAAC,WAAW,CAA+B;IAClD,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAU;gBAE5B,OAAO,GAAE,sBAA2B;IAOhD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAEK,OAAO,IAAI,OAAO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AO,CAAC,iBAAiB;IAazB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,OAAO;CAchB;AAmBD,wBAAgB,kBAAkB,IAAI,eAAe,CAQpD;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAwB1D"}
|
|
@@ -92,15 +92,32 @@ export class GodotConnection extends EventEmitter {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
handleMessage(data) {
|
|
95
|
-
let
|
|
95
|
+
let parsed;
|
|
96
|
+
let responseId;
|
|
96
97
|
try {
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
parsed = JSON.parse(data);
|
|
99
|
+
if (typeof parsed === 'object' && parsed !== null && 'id' in parsed) {
|
|
100
|
+
responseId = String(parsed.id);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
this.emit('error', new Error(`Invalid JSON from Godot: ${data}`));
|
|
105
|
+
return;
|
|
99
106
|
}
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
const validationResult = ResponseSchema.safeParse(parsed);
|
|
108
|
+
if (!validationResult.success) {
|
|
109
|
+
const pending = responseId ? this.pendingRequests.get(responseId) : undefined;
|
|
110
|
+
if (pending) {
|
|
111
|
+
this.pendingRequests.delete(responseId);
|
|
112
|
+
clearTimeout(pending.timeoutId);
|
|
113
|
+
pending.reject(new GodotConnectionError(`Malformed response: ${validationResult.error.message}`));
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.emit('error', new Error(`Invalid response (no matching request): ${data}`));
|
|
117
|
+
}
|
|
102
118
|
return;
|
|
103
119
|
}
|
|
120
|
+
const response = validationResult.data;
|
|
104
121
|
const pending = this.pendingRequests.get(response.id);
|
|
105
122
|
if (!pending) {
|
|
106
123
|
return;
|
|
@@ -170,11 +187,26 @@ export class GodotConnection extends EventEmitter {
|
|
|
170
187
|
}
|
|
171
188
|
}
|
|
172
189
|
let globalConnection = null;
|
|
190
|
+
function parsePortEnv(value) {
|
|
191
|
+
if (!value)
|
|
192
|
+
return undefined;
|
|
193
|
+
const port = parseInt(value, 10);
|
|
194
|
+
if (Number.isNaN(port) || port < 1 || port > 65535) {
|
|
195
|
+
console.error(`[godot-mcp] Invalid GODOT_PORT "${value}", using default`);
|
|
196
|
+
return undefined;
|
|
197
|
+
}
|
|
198
|
+
return port;
|
|
199
|
+
}
|
|
200
|
+
function parseHostEnv(value) {
|
|
201
|
+
if (!value || value.trim() === '')
|
|
202
|
+
return undefined;
|
|
203
|
+
return value.trim();
|
|
204
|
+
}
|
|
173
205
|
export function getGodotConnection() {
|
|
174
206
|
if (!globalConnection) {
|
|
175
207
|
globalConnection = new GodotConnection({
|
|
176
|
-
host: process.env.GODOT_HOST,
|
|
177
|
-
port:
|
|
208
|
+
host: parseHostEnv(process.env.GODOT_HOST),
|
|
209
|
+
port: parsePortEnv(process.env.GODOT_PORT),
|
|
178
210
|
});
|
|
179
211
|
}
|
|
180
212
|
return globalConnection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../src/connection/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,IAAI,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAGL,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,YAAY,GAAG,WAAW,CAAC;AACjC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CA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AAU,CAAC,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;QACjC,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QACnD,OAAO,CAAC,KAAK,CAAC,qCAAqC,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QAC/B,OAAO,CAAC,KAAK,CAAC,iCAAiC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,sDAAsD,KAAK,EAAE,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { editorTools } from './editor.js';
|
|
|
6
6
|
export { projectTools } from './project.js';
|
|
7
7
|
export { screenshotTools } from './screenshot.js';
|
|
8
8
|
export { animationTools } from './animation.js';
|
|
9
|
+
export { tilemapTools } from './tilemap.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAUA,wBAAgB,gBAAgB,IAAI,IAAI,CASvC;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { editorTools } from './editor.js';
|
|
|
6
6
|
import { projectTools } from './project.js';
|
|
7
7
|
import { screenshotTools } from './screenshot.js';
|
|
8
8
|
import { animationTools } from './animation.js';
|
|
9
|
+
import { tilemapTools } from './tilemap.js';
|
|
9
10
|
export function registerAllTools() {
|
|
10
11
|
registry.registerTools(sceneTools);
|
|
11
12
|
registry.registerTools(nodeTools);
|
|
@@ -14,6 +15,7 @@ export function registerAllTools() {
|
|
|
14
15
|
registry.registerTools(projectTools);
|
|
15
16
|
registry.registerTools(screenshotTools);
|
|
16
17
|
registry.registerTools(animationTools);
|
|
18
|
+
registry.registerTools(tilemapTools);
|
|
17
19
|
}
|
|
18
20
|
export { sceneTools } from './scene.js';
|
|
19
21
|
export { nodeTools } from './node.js';
|
|
@@ -22,4 +24,5 @@ export { editorTools } from './editor.js';
|
|
|
22
24
|
export { projectTools } from './project.js';
|
|
23
25
|
export { screenshotTools } from './screenshot.js';
|
|
24
26
|
export { animationTools } from './animation.js';
|
|
27
|
+
export { tilemapTools } from './tilemap.js';
|
|
25
28
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,O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C;AACvC,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AnyToolDefinition } from '../core/types.js';
|
|
3
|
+
export declare const listTilemapLayers: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
4
|
+
root_path: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
root_path?: string | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
root_path?: string | undefined;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const getTilemapLayerInfo: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
11
|
+
node_path: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
node_path: string;
|
|
14
|
+
}, {
|
|
15
|
+
node_path: string;
|
|
16
|
+
}>>;
|
|
17
|
+
export declare const getTilesetInfo: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
18
|
+
node_path: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
node_path: string;
|
|
21
|
+
}, {
|
|
22
|
+
node_path: string;
|
|
23
|
+
}>>;
|
|
24
|
+
export declare const getUsedCells: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
25
|
+
node_path: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
node_path: string;
|
|
28
|
+
}, {
|
|
29
|
+
node_path: string;
|
|
30
|
+
}>>;
|
|
31
|
+
export declare const getCell: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
32
|
+
node_path: z.ZodString;
|
|
33
|
+
coords: z.ZodObject<{
|
|
34
|
+
x: z.ZodNumber;
|
|
35
|
+
y: z.ZodNumber;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
}, {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
}>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
node_path: string;
|
|
45
|
+
coords: {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
node_path: string;
|
|
51
|
+
coords: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
};
|
|
55
|
+
}>>;
|
|
56
|
+
export declare const setCell: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
57
|
+
node_path: z.ZodString;
|
|
58
|
+
coords: z.ZodObject<{
|
|
59
|
+
x: z.ZodNumber;
|
|
60
|
+
y: z.ZodNumber;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
}, {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
}>;
|
|
68
|
+
source_id: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
atlas_coords: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
x: z.ZodNumber;
|
|
71
|
+
y: z.ZodNumber;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
}, {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
}>>;
|
|
79
|
+
alternative_tile: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
node_path: string;
|
|
82
|
+
coords: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
};
|
|
86
|
+
source_id?: number | undefined;
|
|
87
|
+
atlas_coords?: {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
} | undefined;
|
|
91
|
+
alternative_tile?: number | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
node_path: string;
|
|
94
|
+
coords: {
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
};
|
|
98
|
+
source_id?: number | undefined;
|
|
99
|
+
atlas_coords?: {
|
|
100
|
+
x: number;
|
|
101
|
+
y: number;
|
|
102
|
+
} | undefined;
|
|
103
|
+
alternative_tile?: number | undefined;
|
|
104
|
+
}>>;
|
|
105
|
+
export declare const eraseCell: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
106
|
+
node_path: z.ZodString;
|
|
107
|
+
coords: z.ZodObject<{
|
|
108
|
+
x: z.ZodNumber;
|
|
109
|
+
y: z.ZodNumber;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
}, {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
}>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
node_path: string;
|
|
119
|
+
coords: {
|
|
120
|
+
x: number;
|
|
121
|
+
y: number;
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
node_path: string;
|
|
125
|
+
coords: {
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
};
|
|
129
|
+
}>>;
|
|
130
|
+
export declare const clearLayer: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
131
|
+
node_path: z.ZodString;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
node_path: string;
|
|
134
|
+
}, {
|
|
135
|
+
node_path: string;
|
|
136
|
+
}>>;
|
|
137
|
+
export declare const getCellsInRegion: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
138
|
+
node_path: z.ZodString;
|
|
139
|
+
min_coords: z.ZodObject<{
|
|
140
|
+
x: z.ZodNumber;
|
|
141
|
+
y: z.ZodNumber;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
}, {
|
|
146
|
+
x: number;
|
|
147
|
+
y: number;
|
|
148
|
+
}>;
|
|
149
|
+
max_coords: z.ZodObject<{
|
|
150
|
+
x: z.ZodNumber;
|
|
151
|
+
y: z.ZodNumber;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
x: number;
|
|
154
|
+
y: number;
|
|
155
|
+
}, {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
}>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
node_path: string;
|
|
161
|
+
min_coords: {
|
|
162
|
+
x: number;
|
|
163
|
+
y: number;
|
|
164
|
+
};
|
|
165
|
+
max_coords: {
|
|
166
|
+
x: number;
|
|
167
|
+
y: number;
|
|
168
|
+
};
|
|
169
|
+
}, {
|
|
170
|
+
node_path: string;
|
|
171
|
+
min_coords: {
|
|
172
|
+
x: number;
|
|
173
|
+
y: number;
|
|
174
|
+
};
|
|
175
|
+
max_coords: {
|
|
176
|
+
x: number;
|
|
177
|
+
y: number;
|
|
178
|
+
};
|
|
179
|
+
}>>;
|
|
180
|
+
export declare const setCellsBatch: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
181
|
+
node_path: z.ZodString;
|
|
182
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
183
|
+
coords: z.ZodObject<{
|
|
184
|
+
x: z.ZodNumber;
|
|
185
|
+
y: z.ZodNumber;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
x: number;
|
|
188
|
+
y: number;
|
|
189
|
+
}, {
|
|
190
|
+
x: number;
|
|
191
|
+
y: number;
|
|
192
|
+
}>;
|
|
193
|
+
source_id: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
atlas_coords: z.ZodOptional<z.ZodObject<{
|
|
195
|
+
x: z.ZodNumber;
|
|
196
|
+
y: z.ZodNumber;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
x: number;
|
|
199
|
+
y: number;
|
|
200
|
+
}, {
|
|
201
|
+
x: number;
|
|
202
|
+
y: number;
|
|
203
|
+
}>>;
|
|
204
|
+
alternative_tile: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
coords: {
|
|
207
|
+
x: number;
|
|
208
|
+
y: number;
|
|
209
|
+
};
|
|
210
|
+
source_id?: number | undefined;
|
|
211
|
+
atlas_coords?: {
|
|
212
|
+
x: number;
|
|
213
|
+
y: number;
|
|
214
|
+
} | undefined;
|
|
215
|
+
alternative_tile?: number | undefined;
|
|
216
|
+
}, {
|
|
217
|
+
coords: {
|
|
218
|
+
x: number;
|
|
219
|
+
y: number;
|
|
220
|
+
};
|
|
221
|
+
source_id?: number | undefined;
|
|
222
|
+
atlas_coords?: {
|
|
223
|
+
x: number;
|
|
224
|
+
y: number;
|
|
225
|
+
} | undefined;
|
|
226
|
+
alternative_tile?: number | undefined;
|
|
227
|
+
}>, "many">;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
node_path: string;
|
|
230
|
+
cells: {
|
|
231
|
+
coords: {
|
|
232
|
+
x: number;
|
|
233
|
+
y: number;
|
|
234
|
+
};
|
|
235
|
+
source_id?: number | undefined;
|
|
236
|
+
atlas_coords?: {
|
|
237
|
+
x: number;
|
|
238
|
+
y: number;
|
|
239
|
+
} | undefined;
|
|
240
|
+
alternative_tile?: number | undefined;
|
|
241
|
+
}[];
|
|
242
|
+
}, {
|
|
243
|
+
node_path: string;
|
|
244
|
+
cells: {
|
|
245
|
+
coords: {
|
|
246
|
+
x: number;
|
|
247
|
+
y: number;
|
|
248
|
+
};
|
|
249
|
+
source_id?: number | undefined;
|
|
250
|
+
atlas_coords?: {
|
|
251
|
+
x: number;
|
|
252
|
+
y: number;
|
|
253
|
+
} | undefined;
|
|
254
|
+
alternative_tile?: number | undefined;
|
|
255
|
+
}[];
|
|
256
|
+
}>>;
|
|
257
|
+
export declare const convertCoords: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
258
|
+
node_path: z.ZodString;
|
|
259
|
+
local_position: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
x: z.ZodNumber;
|
|
261
|
+
y: z.ZodNumber;
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
263
|
+
x: number;
|
|
264
|
+
y: number;
|
|
265
|
+
}, {
|
|
266
|
+
x: number;
|
|
267
|
+
y: number;
|
|
268
|
+
}>>;
|
|
269
|
+
map_coords: z.ZodOptional<z.ZodObject<{
|
|
270
|
+
x: z.ZodNumber;
|
|
271
|
+
y: z.ZodNumber;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
x: number;
|
|
274
|
+
y: number;
|
|
275
|
+
}, {
|
|
276
|
+
x: number;
|
|
277
|
+
y: number;
|
|
278
|
+
}>>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
node_path: string;
|
|
281
|
+
local_position?: {
|
|
282
|
+
x: number;
|
|
283
|
+
y: number;
|
|
284
|
+
} | undefined;
|
|
285
|
+
map_coords?: {
|
|
286
|
+
x: number;
|
|
287
|
+
y: number;
|
|
288
|
+
} | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
node_path: string;
|
|
291
|
+
local_position?: {
|
|
292
|
+
x: number;
|
|
293
|
+
y: number;
|
|
294
|
+
} | undefined;
|
|
295
|
+
map_coords?: {
|
|
296
|
+
x: number;
|
|
297
|
+
y: number;
|
|
298
|
+
} | undefined;
|
|
299
|
+
}>>;
|
|
300
|
+
export declare const listGridmaps: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
301
|
+
root_path: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
root_path?: string | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
root_path?: string | undefined;
|
|
306
|
+
}>>;
|
|
307
|
+
export declare const getGridmapInfo: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
308
|
+
node_path: z.ZodString;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
node_path: string;
|
|
311
|
+
}, {
|
|
312
|
+
node_path: string;
|
|
313
|
+
}>>;
|
|
314
|
+
export declare const getMeshlibInfo: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
315
|
+
node_path: z.ZodString;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
node_path: string;
|
|
318
|
+
}, {
|
|
319
|
+
node_path: string;
|
|
320
|
+
}>>;
|
|
321
|
+
export declare const getGridmapUsedCells: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
322
|
+
node_path: z.ZodString;
|
|
323
|
+
}, "strip", z.ZodTypeAny, {
|
|
324
|
+
node_path: string;
|
|
325
|
+
}, {
|
|
326
|
+
node_path: string;
|
|
327
|
+
}>>;
|
|
328
|
+
export declare const getGridmapCell: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
329
|
+
node_path: z.ZodString;
|
|
330
|
+
coords: z.ZodObject<{
|
|
331
|
+
x: z.ZodNumber;
|
|
332
|
+
y: z.ZodNumber;
|
|
333
|
+
z: z.ZodNumber;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
z: number;
|
|
338
|
+
}, {
|
|
339
|
+
x: number;
|
|
340
|
+
y: number;
|
|
341
|
+
z: number;
|
|
342
|
+
}>;
|
|
343
|
+
}, "strip", z.ZodTypeAny, {
|
|
344
|
+
node_path: string;
|
|
345
|
+
coords: {
|
|
346
|
+
x: number;
|
|
347
|
+
y: number;
|
|
348
|
+
z: number;
|
|
349
|
+
};
|
|
350
|
+
}, {
|
|
351
|
+
node_path: string;
|
|
352
|
+
coords: {
|
|
353
|
+
x: number;
|
|
354
|
+
y: number;
|
|
355
|
+
z: number;
|
|
356
|
+
};
|
|
357
|
+
}>>;
|
|
358
|
+
export declare const setGridmapCell: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
359
|
+
node_path: z.ZodString;
|
|
360
|
+
coords: z.ZodObject<{
|
|
361
|
+
x: z.ZodNumber;
|
|
362
|
+
y: z.ZodNumber;
|
|
363
|
+
z: z.ZodNumber;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
x: number;
|
|
366
|
+
y: number;
|
|
367
|
+
z: number;
|
|
368
|
+
}, {
|
|
369
|
+
x: number;
|
|
370
|
+
y: number;
|
|
371
|
+
z: number;
|
|
372
|
+
}>;
|
|
373
|
+
item: z.ZodNumber;
|
|
374
|
+
orientation: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
}, "strip", z.ZodTypeAny, {
|
|
376
|
+
node_path: string;
|
|
377
|
+
coords: {
|
|
378
|
+
x: number;
|
|
379
|
+
y: number;
|
|
380
|
+
z: number;
|
|
381
|
+
};
|
|
382
|
+
item: number;
|
|
383
|
+
orientation?: number | undefined;
|
|
384
|
+
}, {
|
|
385
|
+
node_path: string;
|
|
386
|
+
coords: {
|
|
387
|
+
x: number;
|
|
388
|
+
y: number;
|
|
389
|
+
z: number;
|
|
390
|
+
};
|
|
391
|
+
item: number;
|
|
392
|
+
orientation?: number | undefined;
|
|
393
|
+
}>>;
|
|
394
|
+
export declare const clearGridmapCell: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
395
|
+
node_path: z.ZodString;
|
|
396
|
+
coords: z.ZodObject<{
|
|
397
|
+
x: z.ZodNumber;
|
|
398
|
+
y: z.ZodNumber;
|
|
399
|
+
z: z.ZodNumber;
|
|
400
|
+
}, "strip", z.ZodTypeAny, {
|
|
401
|
+
x: number;
|
|
402
|
+
y: number;
|
|
403
|
+
z: number;
|
|
404
|
+
}, {
|
|
405
|
+
x: number;
|
|
406
|
+
y: number;
|
|
407
|
+
z: number;
|
|
408
|
+
}>;
|
|
409
|
+
}, "strip", z.ZodTypeAny, {
|
|
410
|
+
node_path: string;
|
|
411
|
+
coords: {
|
|
412
|
+
x: number;
|
|
413
|
+
y: number;
|
|
414
|
+
z: number;
|
|
415
|
+
};
|
|
416
|
+
}, {
|
|
417
|
+
node_path: string;
|
|
418
|
+
coords: {
|
|
419
|
+
x: number;
|
|
420
|
+
y: number;
|
|
421
|
+
z: number;
|
|
422
|
+
};
|
|
423
|
+
}>>;
|
|
424
|
+
export declare const clearGridmap: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
425
|
+
node_path: z.ZodString;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
node_path: string;
|
|
428
|
+
}, {
|
|
429
|
+
node_path: string;
|
|
430
|
+
}>>;
|
|
431
|
+
export declare const getCellsByItem: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
432
|
+
node_path: z.ZodString;
|
|
433
|
+
item: z.ZodNumber;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
node_path: string;
|
|
436
|
+
item: number;
|
|
437
|
+
}, {
|
|
438
|
+
node_path: string;
|
|
439
|
+
item: number;
|
|
440
|
+
}>>;
|
|
441
|
+
export declare const setGridmapCellsBatch: import("../core/types.js").ToolDefinition<z.ZodObject<{
|
|
442
|
+
node_path: z.ZodString;
|
|
443
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
444
|
+
coords: z.ZodObject<{
|
|
445
|
+
x: z.ZodNumber;
|
|
446
|
+
y: z.ZodNumber;
|
|
447
|
+
z: z.ZodNumber;
|
|
448
|
+
}, "strip", z.ZodTypeAny, {
|
|
449
|
+
x: number;
|
|
450
|
+
y: number;
|
|
451
|
+
z: number;
|
|
452
|
+
}, {
|
|
453
|
+
x: number;
|
|
454
|
+
y: number;
|
|
455
|
+
z: number;
|
|
456
|
+
}>;
|
|
457
|
+
item: z.ZodNumber;
|
|
458
|
+
orientation: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
}, "strip", z.ZodTypeAny, {
|
|
460
|
+
coords: {
|
|
461
|
+
x: number;
|
|
462
|
+
y: number;
|
|
463
|
+
z: number;
|
|
464
|
+
};
|
|
465
|
+
item: number;
|
|
466
|
+
orientation?: number | undefined;
|
|
467
|
+
}, {
|
|
468
|
+
coords: {
|
|
469
|
+
x: number;
|
|
470
|
+
y: number;
|
|
471
|
+
z: number;
|
|
472
|
+
};
|
|
473
|
+
item: number;
|
|
474
|
+
orientation?: number | undefined;
|
|
475
|
+
}>, "many">;
|
|
476
|
+
}, "strip", z.ZodTypeAny, {
|
|
477
|
+
node_path: string;
|
|
478
|
+
cells: {
|
|
479
|
+
coords: {
|
|
480
|
+
x: number;
|
|
481
|
+
y: number;
|
|
482
|
+
z: number;
|
|
483
|
+
};
|
|
484
|
+
item: number;
|
|
485
|
+
orientation?: number | undefined;
|
|
486
|
+
}[];
|
|
487
|
+
}, {
|
|
488
|
+
node_path: string;
|
|
489
|
+
cells: {
|
|
490
|
+
coords: {
|
|
491
|
+
x: number;
|
|
492
|
+
y: number;
|
|
493
|
+
z: number;
|
|
494
|
+
};
|
|
495
|
+
item: number;
|
|
496
|
+
orientation?: number | undefined;
|
|
497
|
+
}[];
|
|
498
|
+
}>>;
|
|
499
|
+
export declare const tilemapTools: AnyToolDefinition[];
|
|
500
|
+
//# sourceMappingURL=tilemap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tilemap.d.ts","sourceRoot":"","sources":["../../src/tools/tilemap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iBAAiB,EA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EH,eAAO,MAAM,cAAc;;;;;;;;;GAgBzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuB/B,CAAC;AAEH,eAAO,MAAM,YAAY,EAsBpB,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineTool } from '../core/define-tool.js';
|
|
3
|
+
const Vector2iSchema = z.object({
|
|
4
|
+
x: z.number().int(),
|
|
5
|
+
y: z.number().int(),
|
|
6
|
+
});
|
|
7
|
+
const Vector3iSchema = z.object({
|
|
8
|
+
x: z.number().int(),
|
|
9
|
+
y: z.number().int(),
|
|
10
|
+
z: z.number().int(),
|
|
11
|
+
});
|
|
12
|
+
export const listTilemapLayers = defineTool({
|
|
13
|
+
name: 'list_tilemap_layers',
|
|
14
|
+
description: 'Find all TileMapLayer nodes in the scene',
|
|
15
|
+
schema: z.object({
|
|
16
|
+
root_path: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Starting node path, defaults to scene root'),
|
|
20
|
+
}),
|
|
21
|
+
async execute({ root_path }, { godot }) {
|
|
22
|
+
const result = await godot.sendCommand('list_tilemap_layers', { root_path });
|
|
23
|
+
if (result.tilemap_layers.length === 0) {
|
|
24
|
+
return 'No TileMapLayer nodes found in scene';
|
|
25
|
+
}
|
|
26
|
+
return `Found ${result.tilemap_layers.length} TileMapLayer(s):\n${result.tilemap_layers.map((l) => ` - ${l.path}`).join('\n')}`;
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
export const getTilemapLayerInfo = defineTool({
|
|
30
|
+
name: 'get_tilemap_layer_info',
|
|
31
|
+
description: 'Get TileMapLayer properties (tileset, enabled, etc.)',
|
|
32
|
+
schema: z.object({
|
|
33
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
34
|
+
}),
|
|
35
|
+
async execute({ node_path }, { godot }) {
|
|
36
|
+
const result = await godot.sendCommand('get_tilemap_layer_info', { node_path });
|
|
37
|
+
return JSON.stringify(result, null, 2);
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const getTilesetInfo = defineTool({
|
|
41
|
+
name: 'get_tileset_info',
|
|
42
|
+
description: 'Get TileSet sources and atlas information',
|
|
43
|
+
schema: z.object({
|
|
44
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
45
|
+
}),
|
|
46
|
+
async execute({ node_path }, { godot }) {
|
|
47
|
+
const result = await godot.sendCommand('get_tileset_info', { node_path });
|
|
48
|
+
return JSON.stringify(result, null, 2);
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export const getUsedCells = defineTool({
|
|
52
|
+
name: 'get_used_cells',
|
|
53
|
+
description: 'Get all non-empty cell coordinates in a TileMapLayer',
|
|
54
|
+
schema: z.object({
|
|
55
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
56
|
+
}),
|
|
57
|
+
async execute({ node_path }, { godot }) {
|
|
58
|
+
const result = await godot.sendCommand('get_used_cells', { node_path });
|
|
59
|
+
return JSON.stringify(result, null, 2);
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
export const getCell = defineTool({
|
|
63
|
+
name: 'get_cell',
|
|
64
|
+
description: 'Get cell data (source_id, atlas_coords, alternative_tile)',
|
|
65
|
+
schema: z.object({
|
|
66
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
67
|
+
coords: Vector2iSchema.describe('Cell coordinates'),
|
|
68
|
+
}),
|
|
69
|
+
async execute({ node_path, coords }, { godot }) {
|
|
70
|
+
const result = await godot.sendCommand('get_cell', { node_path, coords });
|
|
71
|
+
return JSON.stringify(result, null, 2);
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
export const setCell = defineTool({
|
|
75
|
+
name: 'set_cell',
|
|
76
|
+
description: 'Set a cell with tile data',
|
|
77
|
+
schema: z.object({
|
|
78
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
79
|
+
coords: Vector2iSchema.describe('Cell coordinates'),
|
|
80
|
+
source_id: z.number().int().optional().describe('TileSet source ID (default 0)'),
|
|
81
|
+
atlas_coords: Vector2iSchema.optional().describe('Atlas coordinates (default 0,0)'),
|
|
82
|
+
alternative_tile: z
|
|
83
|
+
.number()
|
|
84
|
+
.int()
|
|
85
|
+
.optional()
|
|
86
|
+
.describe('Alternative tile ID (default 0)'),
|
|
87
|
+
}),
|
|
88
|
+
async execute({ node_path, coords, source_id, atlas_coords, alternative_tile }, { godot }) {
|
|
89
|
+
const result = await godot.sendCommand('set_cell', {
|
|
90
|
+
node_path,
|
|
91
|
+
coords,
|
|
92
|
+
source_id,
|
|
93
|
+
atlas_coords,
|
|
94
|
+
alternative_tile,
|
|
95
|
+
});
|
|
96
|
+
return `Set cell at (${result.coords.x}, ${result.coords.y}) with source ${result.source_id}, atlas (${result.atlas_coords.x}, ${result.atlas_coords.y})`;
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
export const eraseCell = defineTool({
|
|
100
|
+
name: 'erase_cell',
|
|
101
|
+
description: 'Clear a single cell',
|
|
102
|
+
schema: z.object({
|
|
103
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
104
|
+
coords: Vector2iSchema.describe('Cell coordinates to erase'),
|
|
105
|
+
}),
|
|
106
|
+
async execute({ node_path, coords }, { godot }) {
|
|
107
|
+
const result = await godot.sendCommand('erase_cell', { node_path, coords });
|
|
108
|
+
return `Erased cell at (${result.erased.x}, ${result.erased.y})`;
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export const clearLayer = defineTool({
|
|
112
|
+
name: 'clear_layer',
|
|
113
|
+
description: 'Clear all cells in a TileMapLayer',
|
|
114
|
+
schema: z.object({
|
|
115
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
116
|
+
}),
|
|
117
|
+
async execute({ node_path }, { godot }) {
|
|
118
|
+
const result = await godot.sendCommand('clear_layer', { node_path });
|
|
119
|
+
return `Cleared layer: ${result.cells_removed} cells removed`;
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
export const getCellsInRegion = defineTool({
|
|
123
|
+
name: 'get_cells_in_region',
|
|
124
|
+
description: 'Get cells within a rectangular region',
|
|
125
|
+
schema: z.object({
|
|
126
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
127
|
+
min_coords: Vector2iSchema.describe('Minimum corner of region'),
|
|
128
|
+
max_coords: Vector2iSchema.describe('Maximum corner of region'),
|
|
129
|
+
}),
|
|
130
|
+
async execute({ node_path, min_coords, max_coords }, { godot }) {
|
|
131
|
+
const result = await godot.sendCommand('get_cells_in_region', { node_path, min_coords, max_coords });
|
|
132
|
+
return JSON.stringify(result, null, 2);
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
export const setCellsBatch = defineTool({
|
|
136
|
+
name: 'set_cells_batch',
|
|
137
|
+
description: 'Set multiple cells at once',
|
|
138
|
+
schema: z.object({
|
|
139
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
140
|
+
cells: z
|
|
141
|
+
.array(z.object({
|
|
142
|
+
coords: Vector2iSchema,
|
|
143
|
+
source_id: z.number().int().optional(),
|
|
144
|
+
atlas_coords: Vector2iSchema.optional(),
|
|
145
|
+
alternative_tile: z.number().int().optional(),
|
|
146
|
+
}))
|
|
147
|
+
.describe('Array of cells to set'),
|
|
148
|
+
}),
|
|
149
|
+
async execute({ node_path, cells }, { godot }) {
|
|
150
|
+
const result = await godot.sendCommand('set_cells_batch', { node_path, cells });
|
|
151
|
+
return `Set ${result.cells_set} cells`;
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
export const convertCoords = defineTool({
|
|
155
|
+
name: 'convert_coords',
|
|
156
|
+
description: 'Convert between local and map coordinates',
|
|
157
|
+
schema: z.object({
|
|
158
|
+
node_path: z.string().describe('Path to TileMapLayer node'),
|
|
159
|
+
local_position: z
|
|
160
|
+
.object({ x: z.number(), y: z.number() })
|
|
161
|
+
.optional()
|
|
162
|
+
.describe('Local position to convert to map coords'),
|
|
163
|
+
map_coords: Vector2iSchema.optional().describe('Map coordinates to convert to local position'),
|
|
164
|
+
}),
|
|
165
|
+
async execute({ node_path, local_position, map_coords }, { godot }) {
|
|
166
|
+
const result = await godot.sendCommand('convert_coords', { node_path, local_position, map_coords });
|
|
167
|
+
return JSON.stringify(result, null, 2);
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
export const listGridmaps = defineTool({
|
|
171
|
+
name: 'list_gridmaps',
|
|
172
|
+
description: 'Find all GridMap nodes in the scene',
|
|
173
|
+
schema: z.object({
|
|
174
|
+
root_path: z
|
|
175
|
+
.string()
|
|
176
|
+
.optional()
|
|
177
|
+
.describe('Starting node path, defaults to scene root'),
|
|
178
|
+
}),
|
|
179
|
+
async execute({ root_path }, { godot }) {
|
|
180
|
+
const result = await godot.sendCommand('list_gridmaps', { root_path });
|
|
181
|
+
if (result.gridmaps.length === 0) {
|
|
182
|
+
return 'No GridMap nodes found in scene';
|
|
183
|
+
}
|
|
184
|
+
return `Found ${result.gridmaps.length} GridMap(s):\n${result.gridmaps.map((g) => ` - ${g.path}`).join('\n')}`;
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
export const getGridmapInfo = defineTool({
|
|
188
|
+
name: 'get_gridmap_info',
|
|
189
|
+
description: 'Get GridMap properties (mesh_library, cell_size, etc.)',
|
|
190
|
+
schema: z.object({
|
|
191
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
192
|
+
}),
|
|
193
|
+
async execute({ node_path }, { godot }) {
|
|
194
|
+
const result = await godot.sendCommand('get_gridmap_info', { node_path });
|
|
195
|
+
return JSON.stringify(result, null, 2);
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
export const getMeshlibInfo = defineTool({
|
|
199
|
+
name: 'get_meshlib_info',
|
|
200
|
+
description: 'Get MeshLibrary item names and indices',
|
|
201
|
+
schema: z.object({
|
|
202
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
203
|
+
}),
|
|
204
|
+
async execute({ node_path }, { godot }) {
|
|
205
|
+
const result = await godot.sendCommand('get_meshlib_info', { node_path });
|
|
206
|
+
return JSON.stringify(result, null, 2);
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
export const getGridmapUsedCells = defineTool({
|
|
210
|
+
name: 'get_gridmap_used_cells',
|
|
211
|
+
description: 'Get all non-empty cell coordinates in a GridMap',
|
|
212
|
+
schema: z.object({
|
|
213
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
214
|
+
}),
|
|
215
|
+
async execute({ node_path }, { godot }) {
|
|
216
|
+
const result = await godot.sendCommand('get_gridmap_used_cells', { node_path });
|
|
217
|
+
return JSON.stringify(result, null, 2);
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
export const getGridmapCell = defineTool({
|
|
221
|
+
name: 'get_gridmap_cell',
|
|
222
|
+
description: 'Get cell data (item index, orientation)',
|
|
223
|
+
schema: z.object({
|
|
224
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
225
|
+
coords: Vector3iSchema.describe('Cell coordinates'),
|
|
226
|
+
}),
|
|
227
|
+
async execute({ node_path, coords }, { godot }) {
|
|
228
|
+
const result = await godot.sendCommand('get_gridmap_cell', { node_path, coords });
|
|
229
|
+
return JSON.stringify(result, null, 2);
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
export const setGridmapCell = defineTool({
|
|
233
|
+
name: 'set_gridmap_cell',
|
|
234
|
+
description: 'Set a cell with an item',
|
|
235
|
+
schema: z.object({
|
|
236
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
237
|
+
coords: Vector3iSchema.describe('Cell coordinates'),
|
|
238
|
+
item: z.number().int().describe('MeshLibrary item index'),
|
|
239
|
+
orientation: z
|
|
240
|
+
.number()
|
|
241
|
+
.int()
|
|
242
|
+
.optional()
|
|
243
|
+
.describe('Orientation (0-23, default 0)'),
|
|
244
|
+
}),
|
|
245
|
+
async execute({ node_path, coords, item, orientation }, { godot }) {
|
|
246
|
+
const result = await godot.sendCommand('set_gridmap_cell', { node_path, coords, item, orientation });
|
|
247
|
+
return `Set cell at (${result.coords.x}, ${result.coords.y}, ${result.coords.z}) with item ${result.item}, orientation ${result.orientation}`;
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
export const clearGridmapCell = defineTool({
|
|
251
|
+
name: 'clear_gridmap_cell',
|
|
252
|
+
description: 'Clear a single cell',
|
|
253
|
+
schema: z.object({
|
|
254
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
255
|
+
coords: Vector3iSchema.describe('Cell coordinates to clear'),
|
|
256
|
+
}),
|
|
257
|
+
async execute({ node_path, coords }, { godot }) {
|
|
258
|
+
const result = await godot.sendCommand('clear_gridmap_cell', { node_path, coords });
|
|
259
|
+
return `Cleared cell at (${result.cleared.x}, ${result.cleared.y}, ${result.cleared.z})`;
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
export const clearGridmap = defineTool({
|
|
263
|
+
name: 'clear_gridmap',
|
|
264
|
+
description: 'Clear all cells in a GridMap',
|
|
265
|
+
schema: z.object({
|
|
266
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
267
|
+
}),
|
|
268
|
+
async execute({ node_path }, { godot }) {
|
|
269
|
+
const result = await godot.sendCommand('clear_gridmap', { node_path });
|
|
270
|
+
return `Cleared GridMap: ${result.cells_removed} cells removed`;
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
export const getCellsByItem = defineTool({
|
|
274
|
+
name: 'get_cells_by_item',
|
|
275
|
+
description: 'Get all cells containing a specific item',
|
|
276
|
+
schema: z.object({
|
|
277
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
278
|
+
item: z.number().int().describe('MeshLibrary item index to search for'),
|
|
279
|
+
}),
|
|
280
|
+
async execute({ node_path, item }, { godot }) {
|
|
281
|
+
const result = await godot.sendCommand('get_cells_by_item', { node_path, item });
|
|
282
|
+
return JSON.stringify(result, null, 2);
|
|
283
|
+
},
|
|
284
|
+
});
|
|
285
|
+
export const setGridmapCellsBatch = defineTool({
|
|
286
|
+
name: 'set_gridmap_cells_batch',
|
|
287
|
+
description: 'Set multiple cells at once',
|
|
288
|
+
schema: z.object({
|
|
289
|
+
node_path: z.string().describe('Path to GridMap node'),
|
|
290
|
+
cells: z
|
|
291
|
+
.array(z.object({
|
|
292
|
+
coords: Vector3iSchema,
|
|
293
|
+
item: z.number().int(),
|
|
294
|
+
orientation: z.number().int().optional(),
|
|
295
|
+
}))
|
|
296
|
+
.describe('Array of cells to set'),
|
|
297
|
+
}),
|
|
298
|
+
async execute({ node_path, cells }, { godot }) {
|
|
299
|
+
const result = await godot.sendCommand('set_gridmap_cells_batch', { node_path, cells });
|
|
300
|
+
return `Set ${result.cells_set} cells`;
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
export const tilemapTools = [
|
|
304
|
+
listTilemapLayers,
|
|
305
|
+
getTilemapLayerInfo,
|
|
306
|
+
getTilesetInfo,
|
|
307
|
+
getUsedCells,
|
|
308
|
+
getCell,
|
|
309
|
+
setCell,
|
|
310
|
+
eraseCell,
|
|
311
|
+
clearLayer,
|
|
312
|
+
getCellsInRegion,
|
|
313
|
+
setCellsBatch,
|
|
314
|
+
convertCoords,
|
|
315
|
+
listGridmaps,
|
|
316
|
+
getGridmapInfo,
|
|
317
|
+
getMeshlibInfo,
|
|
318
|
+
getGridmapUsedCells,
|
|
319
|
+
getGridmapCell,
|
|
320
|
+
setGridmapCell,
|
|
321
|
+
clearGridmapCell,
|
|
322
|
+
clearGridmap,
|
|
323
|
+
getCellsByItem,
|
|
324
|
+
setGridmapCellsBatch,
|
|
325
|
+
];
|
|
326
|
+
//# sourceMappingURL=tilemap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tilemap.js","sourceRoot":"","sources":["../../src/tools/tilemap.ts"],"names":[],"mappings":"AAAA,OAAO,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