first commit
This commit is contained in:
18
src/Utils/Room.ts
Normal file
18
src/Utils/Room.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
type RoomConfig = Configuration & {
|
||||
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
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user