@@ -4,25 +4,99 @@ import { Position } from '@engine/world/position';
44export const MAP_SIZE = 13 ;
55
66
7- export type RoomType = 'empty' | 'empty_grass' | 'garden_1' | 'garden_2' | 'parlor' ;
7+ export type RoomType =
8+ 'empty'
9+ | 'empty_grass'
10+ | 'garden'
11+ | 'formal_garden'
12+ | 'parlor'
13+ | 'kitchen'
14+ | 'dining_room'
15+ | 'bedroom'
16+ | 'skill_hall'
17+ | 'quest_hall'
18+ | 'portal_chamber'
19+ | 'combat_room'
20+ | 'games_room'
21+ | 'treasure_room'
22+ | 'chapel'
23+ | 'study'
24+ | 'throne_room'
25+ | 'workshop'
26+ | 'oubliette'
27+ | 'costume_room' ;
828
929
10- export type RoomTemplateMap = {
11- [ key in RoomType ] : Position ;
30+ export const RoomStyle = {
31+ basic_wood : 0 ,
32+ basic_stone : 1 ,
33+ whitewashed_stone : 2 ,
34+ fremennik_wood : 3 ,
35+ tropical_wood : 4 ,
36+ fancy_stone : 5
1237} ;
1338
14- export const roomTemplates : RoomTemplateMap = {
15- empty : new Position ( 1856 , 5056 ) ,
16- empty_grass : new Position ( 1864 , 5056 ) ,
17- garden_1 : new Position ( 1856 , 5064 ) ,
18- garden_2 : new Position ( 1872 , 5064 ) ,
19- parlor : new Position ( 1856 , 5112 ) ,
39+
40+ /**
41+ * A map of room types to their respective world map template positions within the game.
42+ */
43+ export const roomTemplates : { [ key in RoomType ] : Position } = {
44+ empty : new Position ( 1856 , 5056 ) ,
45+ empty_grass : new Position ( 1864 , 5056 ) ,
46+ garden : new Position ( 1856 , 5064 ) ,
47+ formal_garden : new Position ( 1872 , 5064 ) ,
48+ parlor : new Position ( 1856 , 5112 ) ,
49+ kitchen : new Position ( 1872 , 5112 ) ,
50+ dining_room : new Position ( 1888 , 5112 ) ,
51+ bedroom : new Position ( 1904 , 5112 ) ,
52+ skill_hall : new Position ( 1864 , 5104 ) ,
53+ quest_hall : new Position ( 1912 , 5104 ) ,
54+ portal_chamber : new Position ( 1864 , 5088 ) ,
55+ combat_room : new Position ( 1880 , 5088 ) ,
56+ games_room : new Position ( 1896 , 5088 ) ,
57+ treasure_room : new Position ( 1912 , 5088 ) ,
58+ chapel : new Position ( 1872 , 5096 ) ,
59+ study : new Position ( 1888 , 5096 ) ,
60+ throne_room : new Position ( 1904 , 5096 ) ,
61+ workshop : new Position ( 1856 , 5096 ) ,
62+ oubliette : new Position ( 1904 , 5080 ) ,
63+ costume_room : new Position ( 1904 , 5064 , 0 )
64+ } ;
65+
66+
67+ /**
68+ * A map of room builder widget button ids to their respective room types.
69+ */
70+ export const roomBuilderButtonMap : { [ key : number ] : RoomType } = {
71+ 160 : 'parlor' ,
72+ 161 : 'garden' ,
73+ 162 : 'kitchen' ,
74+ 163 : 'dining_room' ,
75+ 164 : 'workshop' ,
76+ 165 : 'bedroom' ,
77+ 166 : 'skill_hall' ,
78+ 167 : 'games_room' ,
79+ 168 : 'combat_room' ,
80+ 169 : 'quest_hall' ,
81+ 170 : 'study' ,
82+ 171 : 'costume_room' ,
83+ 172 : 'chapel' ,
84+ 173 : 'portal_chamber' ,
85+ 174 : 'formal_garden' ,
86+ 175 : 'throne_room' ,
87+ 176 : 'oubliette' ,
88+ 177 : 'treasure_room' , // @TODO dungeon corridor
89+ 178 : 'treasure_room' , // @TODO dungeon junction
90+ 179 : 'treasure_room' , // @TODO dungeon stair
91+ 180 : 'treasure_room'
2092} ;
2193
2294
2395export const instance1 = new Position ( 6400 , 6400 ) ;
2496export const instance1PohSpawn = new Position ( 6400 + 36 , 6400 + 36 ) ;
2597export const instance1Max = new Position ( 6400 + 64 , 6400 + 64 ) ;
2698export const instance2 = new Position ( 6400 , 6464 ) ;
27- export const instance2PohSpawn = new Position ( 6400 + 36 , 6464 + 36 ) ;
99+ export const instance2PohSpawn = new Position ( 6400 + 36 , 6464 + 36 ) ; // for reference
28100export const instance2Max = new Position ( 6400 + 64 , 6464 + 64 ) ;
101+
102+ // Standard home outer door ids: closed[13100, 13101], open[13102, 13103]
0 commit comments