Files
Next_Station_Plugin/src/Utils/Room.ts

19 lines
514 B
TypeScript
Raw Normal View History

2025-09-17 21:37:53 +02:00
export type RoomConfig = Configuration & {
2025-09-14 13:34:16 +02:00
RoomId: IntValue;
RoomType: StringValue;
Origin: Vector3Value;
End: Vector3Value;
[key: `Exit_${number}`]: CFrameValue;
};
export function checkRoomConfig(obj: Instance): obj is RoomConfig {
return (
(obj.IsA("Configuration") &&
obj.FindFirstChild("RoomId")?.IsA("IntValue") &&
obj.FindFirstChild("RoomType")?.IsA("StringValue") &&
obj.FindFirstChild("Origin")?.IsA("Vector3Value") &&
obj.FindFirstChild("End")?.IsA("Vector3Value")) ??
false
);
}