Autotiles are a new asset type with a tab that shows every tile of the floor (2x3) or wall (2x2) block and an animated sample pattern (#118)
game-maker / gate (push) Successful in 1m50s
game-maker / suite (push) Successful in 5m59s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5 committed 2026-09-17 21:35:29 +02:00
1 parent c17b2b5426
commit 1a9f07c4ac
24 files changed
+1797 -18

No files matched your search

+7 -1
View File
@@ -1,7 +1,7 @@
/** Lookups that throw a `CommandError` when the target does not exist. */
import { findNode, type Graph, type GraphEdge, type GraphNode } from '../graph/Graph';
import { type NodeDef, nodeDef } from '../graph/NodeRegistry';
import type { Asset, BehaviorAsset, StateMachineAsset, VariablesAsset } from '../model/Asset';
import type { Asset, AutotileAsset, BehaviorAsset, StateMachineAsset, VariablesAsset } from '../model/Asset';
import { findObject, type ObjectTree } from '../model/hierarchy';
import { isTemplateContent, objectRef, type ObjectRef } from '../model/instance';
import {
@@ -79,6 +79,12 @@ export function requireVariableOwner(project: Project, assetId: string): Behavio
return asset;
}
export function requireAutotile(project: Project, assetId: string): AutotileAsset {
const asset = findAssetOf(project, assetId, 'autotile');
if (!asset) throw new CommandError(`Autotile ${assetId} not found`);
return asset;
}
export function requireStateMachine(project: Project, assetId: string): StateMachineAsset {
const asset = findAssetOf(project, assetId, 'statemachine');
if (!asset) throw new CommandError(`State machine ${assetId} not found`);