diff --git a/process/gatherchat.lua b/process/gatherchat.lua index 7d8282e..0dfebbc 100644 --- a/process/gatherchat.lua +++ b/process/gatherchat.lua @@ -31,7 +31,12 @@ Worlds = Worlds or { lastActivity = 1713833416559, name = "WelcomeLobby", description = "Welcome to the Lobby!", - theme = "clubhouse1", + worldSize = { + w = 21, + h = 12, + }, + worldType = "decoratedRoom", + worldTheme = "room_default", spawnPosition = { x = 5, y = 4, @@ -48,7 +53,12 @@ Worlds = Worlds or { lastActivity = 1713833416559, name = "ChillZone", description = "Take it easy ;)", - theme = "clubhouse2", + worldSize = { + w = 12, + h = 14, + }, + worldType = "clubbeach", + worldTheme = "clubhouse1", spawnPosition = { x = 5, y = 4, @@ -60,7 +70,12 @@ Worlds = Worlds or { lastActivity = 1713833416559, name = "HolidayHangout", description = "Sun, sand, and sea~", - theme = "beach1", + worldSize = { + w = 18, + h = 10, + }, + worldType = "clubbeach", + worldTheme = "beach1", spawnPosition = { x = 5, y = 4, diff --git a/src/components/layout/GatherChat.tsx b/src/components/layout/GatherChat.tsx index ac86e53..5f165d7 100644 --- a/src/components/layout/GatherChat.tsx +++ b/src/components/layout/GatherChat.tsx @@ -22,6 +22,9 @@ import { ChatBox } from "../../features/post/components/ChatBox"; import { ProfileView } from "../../features/profile/components/ProfileView"; import { SetupForm } from "../../features/profile/components/SetupForm"; import { SidePanel, type SidePanelState } from "./SidePanel"; +import { createClubBeach } from "@/features/worlds/ClubBeach"; +import type { RoomTileSet } from "@/features/worlds/components/RoomLayout"; +import type { GenericTileSet } from "@/features/worlds/components/GenericLayout"; export type UploadInfo = Pick; @@ -135,19 +138,23 @@ export const GatherChat = ({ const world = useMemo( () => - createDecoratedRoom( - "room_default", - { - w: 21, - h: 12, - }, - 3, - { - w: 4, - h: 4, - }, + contractState.world.worldType === "clubbeach" ? ( + createClubBeach( + contractState.world.worldTheme as GenericTileSet, + contractState.world.worldSize, + ) + ) : ( + createDecoratedRoom( + contractState.world.worldTheme as RoomTileSet, + contractState.world.worldSize, + 3, + { + w: 4, + h: 4, + }, + ) ), - [], + [contractState.world], ); return ( diff --git a/src/features/ao/lib/ao-gather.ts b/src/features/ao/lib/ao-gather.ts index 6fed708..8361c37 100644 --- a/src/features/ao/lib/ao-gather.ts +++ b/src/features/ao/lib/ao-gather.ts @@ -41,7 +41,12 @@ export type ContractWorld = { lastActivity: number; name: string; description: string; - theme: string; + worldSize: { + w: number; + h: number; + } + worldType: string; + worldTheme: string; spawnPosition: ContractPosition; playerPositions: Record; }; diff --git a/src/routes/index.lazy.tsx b/src/routes/index.lazy.tsx index b861937..0de129c 100644 --- a/src/routes/index.lazy.tsx +++ b/src/routes/index.lazy.tsx @@ -21,7 +21,12 @@ const defaultState: GatherContractState = { lastActivity: 0, name: "", description: "", - theme: "", + worldSize: { + w: 21, + h: 12, + }, + worldType: "room", + worldTheme: "room_default", spawnPosition: { x: 5, y: 4, diff --git a/src/routes/render.lazy.tsx b/src/routes/render.lazy.tsx index 426c91d..831b950 100644 --- a/src/routes/render.lazy.tsx +++ b/src/routes/render.lazy.tsx @@ -225,7 +225,12 @@ function Render() { lastActivity: 0, name: "", description: "", - theme: "", + worldSize: { + w: widthSlider, + h: heightSlider, + }, + worldType, + worldTheme: worldType === "room" ? roomTileSet : clubbeachTileSet, spawnPosition: { x: 0, y: 0,