feat: Enhance simulation state management to include StaticMachineEventsSchema

- Updated various modules to accommodate StaticMachineEventsSchema in simulation states.
- Modified event handling in addAssetModel, deleteFloorItems, and loadInitialFloorItems to support new event types.
- Adjusted type definitions in worldTypes.d.ts to define StaticMachineEventsSchema.
- Refactored path management in processCreator and simulation to handle new event types.
- Ensured compatibility in selection and manipulation controls for StaticMachine events.
- Removed bug that made the other assets not droppable
This commit is contained in:
2025-04-05 14:33:25 +05:30
parent c89129e4ce
commit 1cc877aee1
15 changed files with 412 additions and 377 deletions

View File

@@ -433,6 +433,7 @@ export interface PathPoint {
}
export interface SimulationPath {
type: string;
modeluuid: string;
points: PathPoint[];
pathPosition: [number, number, number];
@@ -464,6 +465,7 @@ function convertToSimulationPath(
if (path.type === "Conveyor") {
return {
type: path.type,
modeluuid,
points: path.points.map((point) => ({
uuid: point.uuid,
@@ -483,6 +485,7 @@ function convertToSimulationPath(
};
} else {
return {
type: path.type,
modeluuid,
points: [
{
@@ -614,6 +617,7 @@ export function useProcessCreation() {
const [processes, setProcesses] = useState<Process[]>([]);
const hasSpawnAction = useCallback((path: SimulationPath): boolean => {
if (path.type !== "Conveyor") return false;
return path.points.some((point) =>
point.actions.some((action) => action.type.toLowerCase() === "spawn")
);