homes_properties_attr.qsrc 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. # homes_properties_attr
  2. !! Setting up the train stations to use when
  3. !! go_home would change region or player is homeless
  4. if ARRSIZE('train_station') < 1:
  5. $train_station['city'] = "gt 'city_center'"
  6. $train_station['pav'] = "gt 'pav_market'"
  7. $train_station['pav_park'] = "gt 'pav_market'"
  8. $train_station['pushkin'] = "gt 'pushkin_sq'"
  9. $train_station['gad'] = "gt 'train', 'village'"
  10. $train_station['gad_forest'] = "gt 'train', 'village'"
  11. $train_station['dachi'] = "gt 'train', 'communal'"
  12. end
  13. if ARRSIZE('homes') < 18:
  14. killvar '$homes'
  15. $homes[] = 'city_apartment'
  16. $homes[] = 'parents_home'
  17. $homes[] = 'village_cottage'
  18. $homes[] = 'old_town_apartment'
  19. $homes[] = 'matryona_mansion'
  20. $homes[] = 'pavlovsk_hotel'
  21. $homes[] = 'maid_bedroom'
  22. $homes[] = 'niko_apartment'
  23. $homes[] = 'vasilyhome'
  24. $homes[] = 'lyceum_dorm'
  25. $homes[] = 'university_dorm'
  26. $homes[] = 'hunters_lodge'
  27. $homes[] = 'shared_apartment'
  28. $homes[] = 'grandparents_house'
  29. $homes[] = 'city_house'
  30. $homes[] = 'meynold_household'
  31. $homes[] = 'hotel_therapist'
  32. $homes[] = 'pushkin_ballet_dorm'
  33. end
  34. if ARRSIZE('home_name') < 4:
  35. !! The list goes like this:
  36. !! 1. $home_name['property code']
  37. !! 2. $home_name['property id'] - for backward compatibility only, nothing else and the number is a string index
  38. !! 3. $home_name['enctrance location']
  39. !! 4.- N. $home_name['other locations']
  40. !! CITY APARTMENT
  41. $home_name['city_apartment'] = 'city_apartment'
  42. $home_name['1'] = 'city_apartment'
  43. $home_name['korr'] = 'city_apartment'
  44. $home_name['bedr'] = 'city_apartment'
  45. $home_name['sitr'] = 'city_apartment'
  46. $home_name['kuhr'] = 'city_apartment'
  47. $home_name['vanr'] = 'city_apartment'
  48. !! PARENTS HOME
  49. $home_name['parents_home'] = 'parents_home'
  50. $home_name['2'] = 'parents_home'
  51. $home_name['code'] = 'parents_home'
  52. $home_name['korrPar'] = 'parents_home'
  53. $home_name['bedrPar'] = 'parents_home'
  54. $home_name['sitrPar'] = 'parents_home'
  55. $home_name['kuhrPar'] = 'parents_home'
  56. $home_name['vanrPar'] = 'parents_home'
  57. !! VILLAGE COTTAGE
  58. $home_name['village_cottage'] = 'village_cottage'
  59. $home_name['3'] = 'village_cottage'
  60. $home_name['dachamy'] = 'village_cottage'
  61. $home_name['dachain'] = 'village_cottage'
  62. $home_name['dachaogr'] = 'village_cottage'
  63. $home_name['dachaogr0'] = 'village_cottage'
  64. !! OLD TOWN (PUSHKIN) APARTMENTS
  65. $home_name['old_town_apartment'] = 'old_town_apartment'
  66. $home_name['4'] = 'old_town_apartment'
  67. $home_name['korr2x'] = 'old_town_apartment'
  68. $home_name['bedr2x'] = 'old_town_apartment'
  69. $home_name['sitr2x'] = 'old_town_apartment'
  70. $home_name['kuhr2x'] = 'old_town_apartment'
  71. $home_name['vanr2x'] = 'old_town_apartment'
  72. !! MATRYONA MANSION
  73. $home_name['matryona_mansion'] = 'matryona_mansion'
  74. $home_name['5'] = 'matryona_mansion'
  75. $home_name['city_mansion_entrance'] = 'matryona_mansion'
  76. $home_name['city_mansion_residence_1'] = 'matryona_mansion'
  77. $home_name['city_mansion_residence_2'] = 'matryona_mansion'
  78. $home_name['city_mansion_residence_3'] = 'matryona_mansion'
  79. !! PAVLOVSK HOTEL
  80. $home_name['pavlovsk_hotel'] = 'pavlovsk_hotel'
  81. $home_name['6'] = 'pavlovsk_hotel'
  82. $home_name['pav_hotel'] = 'pavlovsk_hotel'
  83. $home_name['HotelRoom'] = 'pavlovsk_hotel'
  84. !! LIVE IN MAID BEDROOM
  85. $home_name['maid_bedroom'] = 'maid_bedroom'
  86. $home_name['7'] = 'maid_bedroom'
  87. $home_name['nichBedroomServant'] = 'maid_bedroom'
  88. !! NIKO APARTMENT
  89. $home_name['niko_apartment'] = 'niko_apartment'
  90. $home_name['8'] = 'niko_apartment'
  91. !! This home actually doesn''t exist yet, but it was defined,
  92. !! has an ID and all so, I am keeping it here
  93. !! SHULGA APARTMENT
  94. $home_name['shulga_apartment'] = 'vasilyhome'
  95. $home_name['9'] = 'vasilyhome'
  96. $home_name['vasilyhome'] = 'vasilyhome'
  97. !! LYCEUM DORM
  98. $home_name['lyceum_dorm'] = 'lyceum_dorm'
  99. $home_name['10'] = 'lyceum_dorm'
  100. $home_name['dom_gor'] = 'lyceum_dorm'
  101. !! UNIVERSITY DORM
  102. $home_name['university_dorm'] = 'university_dorm'
  103. $home_name['11'] = 'university_dorm'
  104. $home_name['uni_grounds'] = 'university_dorm'
  105. $home_name['uni_dorm'] = 'university_dorm'
  106. !! HUNTERS LODGE
  107. $home_name['hunters_lodge'] = 'hunters_lodge'
  108. $home_name['12'] = 'hunters_lodge'
  109. $home_name['gad_swamphouse'] = 'hunters_lodge'
  110. $home_name['gad_swamp_yard'] = 'hunters_lodge'
  111. !! SHARED APARTMENT - PAVLOVSK
  112. $home_name['shared_apartment'] = 'shared_apartment'
  113. $home_name['13'] = 'shared_apartment'
  114. $home_name['pav_shared_apt'] = 'shared_apartment'
  115. !! GRANDPARENTS HOUSE
  116. $home_name['grandparents_house'] = 'grandparents_house'
  117. $home_name['14'] = 'grandparents_house'
  118. $home_name['gad_gpyard'] = 'grandparents_house'
  119. $home_name['gad_gpbath'] = 'grandparents_house'
  120. $home_name['gad_gphouse'] = 'grandparents_house'
  121. $home_name['gad_gpbarn'] = 'grandparents_house'
  122. !! CITY HOUSE
  123. $home_name['city_house'] = 'city_house'
  124. $home_name['15'] = 'city_house'
  125. $home_name['city_house_res_misc'] = 'city_house'
  126. $home_name['city_house_res_bath'] = 'city_house'
  127. $home_name['city_house_re_bedr'] = 'city_house'
  128. $home_name['city_house-res_kitch'] = 'city_house'
  129. !! MEYNODLD HOUSEHOLD
  130. $home_name['meynold_household'] = 'meynold_household'
  131. $home_name['16'] = 'meynold_household'
  132. $home_name['mey_home'] = 'meynold_household'
  133. !! HOTEL
  134. $home_name['hotel_therapist'] = 'hotel_therapist'
  135. $home_name['17'] = 'hotel_therapist'
  136. !! BALLET DORM
  137. $home_name['pushkin_ballet_dorm'] = 'pushkin_ballet_dorm'
  138. $home_name['18'] = 'pushkin_ballet_dorm'
  139. end
  140. !!{ All the existing properties should be added here.
  141. id: The old numerical id - for the nostalgia
  142. code: The code of the property. Example: 'city_apartment', 'village_cottage'
  143. name: General name to display
  144. display: The string to use in the middle of a sentence
  145. town: The town/city/village the property can be found
  146. location: The region within the town
  147. location-arg: The entry argument for the 'location' location
  148. entrance: The location where the charactes enter
  149. entrance-arg: The entry argument for the 'entrance' location
  150. bathroom: The location of the bathroom
  151. bedroom-arg: The entry argument for the 'bathroom' location
  152. bedroom: The location where the charactes sleep
  153. bedroom-arg: The entry argument for the 'bedroom' location
  154. gs '<<location>>', '<<location-arg>>' will take Sveta to the location that leads
  155. to the property. For example Pavlovsk Complex, City Residential, etc.)
  156. gs '<<entrance>>', '<<entrance-arg>>' will take Sveta straight to the entrance of
  157. the property. For example the hallway in the Parents'' Home.
  158. type: The type of the property - it is used by some checks right now, dating app and such.
  159. In the future this could be expanded to things like business properties, offices or other whatever we
  160. want to simplify some checks.
  161. price: The sales value of the property.
  162. rent: The monthly rent of the property.
  163. rental: Whether the property can be rented by Sveta or not.
  164. 1: Can be rented
  165. 0: Can''t be rented // Examples are: Parents home, Shulga apartment, Hotel room in Pavlovsk, University dorm.
  166. Possible values are:
  167. free_internet: if the property comes with free internet (uses subscription['free']) then the value is `1`
  168. internet_enabled: If the value is 1, then Sveta can buy, cancel, transfer an internet subscription here
  169. can_be_renovated: Whether the property can be renovated or not. Tentative, not sure it is needed.
  170. construction_needed: If the value is 1, then the property needs to built before Sveta can move it.
  171. Currently the Matryona Mansion works like this, it starts as an empty plot of land.
  172. Property Types
  173. !! IMPORTANT:
  174. !! NOTE: The types are not 100% clear and decided yet, need some more thinking. Also new ones can be added.
  175. permanent_residence: This is a home that can be used for everything. Certain things don''t allow the more "transient"
  176. homes, like the dating app in Uni.
  177. temporary_residence: This is a home that some events/actions won''t consider.
  178. New ones in the future could be for porperties that Sveta can own, rent, used, is not a home but can be changed/customised, etc.
  179. For example a music studio/practice room, or a gallery, or a newspaper kiosk
  180. To make life easier, if is 0 or '' for a property, then I didn''t include it.
  181. Undefined strings will always evaluate to '' and undefined integers have a value of 0.
  182. }
  183. !! Always call this function with gs and use killvar'property' after finished with the data.
  184. !!
  185. !! ARGS[1] - the proprty code - a string identifier of the property.
  186. if $ARGS[0] = 'get_property_attr':
  187. killvar 'property'
  188. if $ARGS[1] = 'city_apartment':
  189. property['id'] = 1
  190. $property['code'] = $ARGS[1]
  191. $property['name'] = 'City residential apartment'
  192. $property['display'] = 'apartment in St. Petersburg''s residential area'
  193. $property['region'] = 'city'
  194. $property['town'] = 'city'
  195. $property['location'] = 'city_residential'
  196. $property['location_arg'] = ''
  197. $property['entrance'] = 'korr'
  198. $property['entrance_arg'] = ''
  199. $property['bathroom'] = 'vanr'
  200. $property['bathroom_arg'] = ''
  201. $property['bedroom'] = 'bedr'
  202. $property['bedroom_arg'] = ''
  203. $property['type'] = 'permanent_residence'
  204. property['price'] = 800000
  205. property['rent'] = 15000
  206. property['rental'] = 1
  207. property['internet_enabled'] = 1
  208. property['can_be_renovated'] = 1
  209. elseif $ARGS[1] = 'parents_home':
  210. property['id'] = 2
  211. $property['code'] = $ARGS[1]
  212. $property['name'] = 'Parent''s home in Pavlovsk'
  213. $property['display'] = 'parent''s home in Pavlovsk'
  214. $property['region'] = 'pav'
  215. $property['town'] = 'pavlovsk'
  216. $property['location'] = 'pav_complex'
  217. $property['location_arg'] = 'start'
  218. $property['entrance'] = 'korrPar'
  219. $property['entrance_arg'] = 'start'
  220. $property['bathroom'] = 'vanrPar'
  221. $property['bathroom_arg'] = ''
  222. $property['bedroom'] = 'bedrPar'
  223. $property['bedroom_arg'] = 'start'
  224. $property['type'] = 'permanent_residence'
  225. property['free_internet'] = 1
  226. elseif $ARGS[1] = 'village_cottage':
  227. property['id'] = 3
  228. $property['code'] = $ARGS[1]
  229. $property['name'] = 'My cottage in the cooperative village'
  230. $property['display'] = 'cottage located in the cooperative village'
  231. $property['region'] = 'dachi'
  232. $property['town'] = 'dachi'
  233. $property['location'] = 'dachamy'
  234. $property['location_arg'] = ''
  235. $property['entrance'] = 'dachamy'
  236. $property['entrance_arg'] = ''
  237. $property['bathroom'] = 'dachabath'
  238. $property['bathroom_arg'] = ''
  239. $property['bedroom'] = 'dachain'
  240. $property['bedroom_arg'] = 'start'
  241. $property['type'] = 'permanent_residence'
  242. property['price'] = 150000
  243. !! Currently no cable or internet can be installed at this property, maybe later.
  244. property['internet_enabled'] = 0
  245. elseif $ARGS[1] = 'old_town_apartment':
  246. property['id'] = 4
  247. $property['code'] = $ARGS[1]
  248. $property['name'] = 'Old town apartment'
  249. $property['display'] = 'apartment in the old town of Pushkin'
  250. $property['region'] = 'pushkin'
  251. $property['town'] = 'oldtown'
  252. $property['location'] = 'pushkin_sq'
  253. $property['location_arg'] = ''
  254. $property['entrance'] = 'korr2x'
  255. $property['entrance_arg'] = ''
  256. $property['bathroom'] = 'vanr2x'
  257. $property['bathroom_arg'] = ''
  258. $property['bedroom'] = 'bedr2x'
  259. $property['bedroom_arg'] = ''
  260. $property['type'] = 'permanent_residence'
  261. property['rental'] = 1
  262. property['rent'] = 10000
  263. property['internet_enabled'] = 1
  264. elseif $ARGS[1] = 'matryona_mansion':
  265. property['id'] = 5
  266. $property['code'] = $ARGS[1]
  267. $property['name'] = 'Matryona mansion'
  268. $property['display_0'] = 'plot of land in the St. Petersburg''s suburbs'
  269. $property['display_1'] = 'impressive mansion under construction in the St. Petersburg''s suburbs'
  270. $property['display_2'] = 'impressive mansion in the St. Petersburg''s suburbs'
  271. $property['display'] = $property['display_<<accessible_property["<<$args[1]>>-construction-status"]>>']
  272. $property['region'] = 'city'
  273. $property['town'] = 'city'
  274. $property['location'] = 'city_mansion_entrance'
  275. $property['location_arg'] = ''
  276. $property['entrance'] = 'city_mansion_residence_1'
  277. $property['entrance_arg'] = 'yfoyer'
  278. $property['bathroom'] = 'city_mansion_residence_1'
  279. $property['bathroom_arg'] = 'ybathroom'
  280. $property['bedroom'] = 'city_mansion_residence_1'
  281. $property['bedroom_arg'] = 'ybedroom'
  282. $property['type'] = 'permanent_residence'
  283. property['price'] = 1500000
  284. property['internet_enabled'] = 1
  285. property['construction_needed'] = 1
  286. elseif $ARGS[1] = 'pavlovsk_hotel':
  287. property['id'] = 6
  288. $property['code'] = $ARGS[1]
  289. $property['name'] = 'My hotel room in Pavlovsk'
  290. $property['display'] = 'hotel room in Pavlovsk'
  291. $property['region'] = 'pav'
  292. $property['town'] = 'pavlovsk'
  293. $property['location'] = 'pav_market'
  294. $property['location_arg'] = ''
  295. $property['entrance'] = 'pav_hotel'
  296. $property['entrance_arg'] = ''
  297. $property['bathroom'] = 'HotelRoom'
  298. $property['bathroom_arg'] = 'shower1'
  299. $property['bedroom'] = 'HotelRoom'
  300. $property['bedroom_arg'] = 'normal'
  301. !I do not know how to do this for the various price levels.....
  302. $property['type'] = 'temporary_residence'
  303. property['free_internet'] = 1
  304. elseif $ARGS[1] = 'maid_bedroom':
  305. property['id'] = 7
  306. $property['code'] = $ARGS[1]
  307. $property['name'] = 'Nicholas'' Apartment'
  308. $property['display'] = 'maid bedroom in Nicholas'' apartment'
  309. $property['region'] = 'city'
  310. $property['town'] = 'city'
  311. $property['location'] = 'city_center'
  312. $property['location_arg'] = ''
  313. $property['entrance'] = 'nichBedroomServant'
  314. $property['entrance_arg'] = 'start'
  315. $property['bathroom'] = 'nichBathServant'
  316. $property['bathroom_arg'] = ''
  317. $property['bedroom'] = 'nichBedroomServant'
  318. $property['bedroom_arg'] = 'start'
  319. $property['type'] = 'permanent_residence'
  320. property['free_internet'] = 1
  321. elseif $ARGS[1] = 'niko_apartment':
  322. property['id'] = 8
  323. $property['code'] = $ARGS[1]
  324. $property['name'] = 'Niko''s apartment'
  325. $property['display'] = 'Niko''s apartment'
  326. $property['region'] = 'pav'
  327. $property['town'] = 'pavlovsk'
  328. $property['location'] = 'pav_residential'
  329. $property['location_arg'] = ''
  330. $property['entrance'] = 'pav_residential'
  331. $property['entrance_arg'] = ''
  332. $property['bathroom'] = 'pav_residential'
  333. $property['bathroom_arg'] = ''
  334. $property['bedroom'] = 'pav_residential'
  335. $property['bedroom_arg'] = ''
  336. $property['type'] = 'temporary_residence'
  337. elseif $ARGS[1] = 'shulga_apartment':
  338. property['id'] = 9
  339. $property['code'] = $ARGS[1]
  340. $property['name'] = 'Uncle Sergey''s apartment'
  341. $property['display'] = 'Uncle Sergey''s apartment'
  342. $property['region'] = 'pav'
  343. $property['town'] = 'pavlovsk'
  344. $property['location'] = 'pav_complex'
  345. $property['location_arg'] = 'start'
  346. $property['entrance'] = 'vasilyhome'
  347. $property['entrance_arg'] = 'hallway'
  348. $property['bathroom'] = 'vasilyhome'
  349. $property['bathroom_arg'] = 'bathroom'
  350. $property['bedroom'] = 'vasilyhome'
  351. $property['bedroom_arg'] = 'vasily_room'
  352. $property['type'] = 'temporary_residence'
  353. property['free_internet'] = 1
  354. elseif $ARGS[1] = 'lyceum_dorm':
  355. property['id'] = 10
  356. $property['code'] = $ARGS[1]
  357. $property['name'] = 'Lyceum school'
  358. $property['display'] = 'room in the Lyceum dorm'
  359. $property['region'] = 'pav'
  360. $property['town'] = 'pavlovsk'
  361. $property['location'] = 'pav_commercial'
  362. $property['location_arg'] = ''
  363. $property['entrance'] = 'etoexhib'
  364. $property['entrance_arg'] = 'pos40'
  365. $property['bathroom'] = 'etoexhib'
  366. $property['bathroom_arg'] = 'pos41'
  367. $property['bedroom'] = 'dom_gor'
  368. $property['bedroom_arg'] = ''
  369. $property['type'] = 'permanent_residence'
  370. property['free_internet'] = 1
  371. elseif $ARGS[1] = 'university_dorm':
  372. property['id'] = 11
  373. $property['code'] = $ARGS[1]
  374. $property['name'] = 'University halls'
  375. $property['display'] = 'room in the university dorm'
  376. $property['region'] = 'city'
  377. $property['town'] = 'city'
  378. $property['location'] = 'city_island'
  379. $property['location_arg'] = ''
  380. $property['entrance'] = 'uni_dorm'
  381. $property['entrance_arg'] = 'dorm_room'
  382. $property['bathroom'] = 'uni_dorm'
  383. $property['bathroom_arg'] = 'womens_restroom'
  384. $property['bedroom'] = 'uni_dorm'
  385. $property['bedroom_arg'] = 'dorm_room'
  386. $property['type'] = 'permanent_residence'
  387. property['free_internet'] = 1
  388. elseif $ARGS[1] = 'hunters_lodge':
  389. property['id'] = 12
  390. $property['code'] = $ARGS[1]
  391. $property['name'] = 'Hunter''s lodge in Gadukino'
  392. $property['display'] = 'hunter''s lodge in Gadukino'
  393. $property['region'] = 'gad_forest'
  394. $property['town'] = 'gadukino'
  395. $property['location'] = 'gad_swamp_yard'
  396. $property['location_arg'] = 'start'
  397. $property['entrance'] = 'gad_swamphouse'
  398. $property['entrance_arg'] = 'start'
  399. $property['bathroom'] = 'gad_swamphouse'
  400. $property['bathroom_arg'] = 'washstand'
  401. $property['bedroom'] = 'gad_swamphouse'
  402. $property['bedroom_arg'] = 'start'
  403. $property['type'] = 'temporary_residence'
  404. elseif $ARGS[1] = 'shared_apartment':
  405. property['id'] = 13
  406. $property['code'] = $ARGS[1]
  407. $property['name'] = 'Shared apartment in Pavlovsk'
  408. $property['display'] = 'shared apartment in Pavlovsk'
  409. $property['region'] = 'pav'
  410. $property['town'] = 'pavlovsk'
  411. $property['location'] = 'pav_complex'
  412. $property['location_arg'] = 'start'
  413. $property['entrance'] = 'pav_shared_apt'
  414. $property['entrance_arg'] = 'start'
  415. $property['bathroom'] = 'pav_shared_apt'
  416. $property['bathroom_arg'] = 'bathroom'
  417. $property['bedroom'] = 'pav_shared_apt'
  418. $property['bedroom_arg'] = 'pcsRoom'
  419. $property['type'] = 'temporary_residence'
  420. property['free_internet'] = 1
  421. elseif $ARGS[1] = 'grandparents_house':
  422. property['id'] = 14
  423. $property['code'] = $ARGS[1]
  424. $property['name'] = 'Grandparent''s house in Gadukino'
  425. $property['display'] = 'grandparent''s house in Gadukino'
  426. $property['region'] = 'gad'
  427. $property['town'] = 'gadukino'
  428. $property['location'] = 'gad_gpyard'
  429. $property['location_arg'] = 'start'
  430. $property['entrance'] = 'gad_gpyard'
  431. $property['entrance_arg'] = 'start'
  432. $property['bathroom'] = 'gad_gpbath'
  433. $property['bathroom_arg'] = 'start'
  434. $property['bedroom'] = 'gad_gpbarn'
  435. $property['bedroom_arg'] = 'barn_room'
  436. $property['type'] = 'temporary_residence'
  437. elseif $ARGS[1] = 'city_house':
  438. property['id'] = 15
  439. $property['code'] = $ARGS[1]
  440. $property['name'] = 'City residential house'
  441. $property['display'] = 'house in the St. Petersburg''s residential area'
  442. $property['region'] = 'city'
  443. $property['town'] = 'city'
  444. $property['location'] = 'city_residential'
  445. $property['location_arg'] = ''
  446. $property['entrance'] = 'city_house_res_misc'
  447. $property['entrance_arg'] = 'fronty'
  448. $property['bathroom'] = 'city_house_res_bathr'
  449. $property['bathroom_arg'] = 'bathr'
  450. $property['bedroom'] = 'city_house_res_bedr'
  451. $property['bedroom_arg'] = 'bedro'
  452. $property['type'] = 'permanent_residence'
  453. property['price'] = 800000
  454. property['internet_enabled'] = 1
  455. elseif $ARGS[1] = 'meynold_household':
  456. property['id'] = 16
  457. $property['code'] = $ARGS[1]
  458. $property['name'] = 'Meynold Household'
  459. $property['display'] = 'the Meynold Household'
  460. $property['region'] = 'pav'
  461. $property['town'] = 'pavlovsk'
  462. $property['location'] = 'pav_residential'
  463. $property['location_arg'] = ''
  464. $property['entrance'] = 'mey_home'
  465. $property['entrance_arg'] = 'door'
  466. $property['bathroom'] = 'mey_home'
  467. $property['bathroom_arg'] = 'bathroom'
  468. $property['bedroom'] = 'mey_home'
  469. $property['bedroom_arg'] = 'guest_bedroom'
  470. $property['type'] = 'temporary_residence'
  471. property['free_internet'] = 1
  472. elseif $ARGS[1] = 'hotel_therapist':
  473. property['id'] = 17
  474. $property['code'] = $ARGS[1]
  475. $property['name'] = 'Pavlovsk Hotel Room'
  476. $property['display'] = 'husband''s hotel room'
  477. $property['region'] = 'pav'
  478. $property['town'] = 'pavlovsk'
  479. $property['location'] = 'pav_residential'
  480. $property['location_arg'] = ''
  481. $property['entrance'] = 'pav_hotel'
  482. $property['entrance_arg'] = ''
  483. $property['bathroom'] = 'HotelRoom'
  484. $property['bathroom_arg'] = 'shower1'
  485. $property['bedroom'] = 'HotelRoom'
  486. $property['bedroom_arg'] = 'therapist'
  487. $property['type'] = 'temporary_residence'
  488. property['free_internet'] = 1
  489. elseif $ARGS[1] = 'pushkin_ballet_dorm':
  490. property['id'] = 18
  491. $property['code'] = $ARGS[1]
  492. $property['name'] = 'Pushkin Ballet Dorm'
  493. $property['display'] = 'ballet dorm'
  494. $property['region'] = 'pav'
  495. $property['town'] = 'pushkin'
  496. $property['location'] = 'pushkin_sq'
  497. $property['location_arg'] = ''
  498. $property['entrance'] = 'pushkin_ballet_center'
  499. $property['entrance_arg'] = 'start'
  500. $property['bathroom'] = 'pushkin_ballet_class'
  501. $property['bathroom_arg'] = 'shower'
  502. $property['bedroom'] = 'pushkin_ballet_res'
  503. $property['bedroom_arg'] = 'bedroom'
  504. $property['type'] = 'temporary_residence'
  505. else
  506. gs 'homes_properties_attr', 'mod_property_query_hook'
  507. end
  508. end
  509. !! Use it as `func`, returns a single $RESULT or RESULT value with the requested
  510. !! field of a `property`
  511. !! $ARGS[1]: the name of the field requested, prefixed with $ if it is a string value
  512. !! E.g. `'$bedroom', '$region', 'rent', 'price', etc.`
  513. !! $ARGS[2]: optional - the location for which the access is set
  514. !! Accepted values
  515. !! - property code -> 'city_apartment', 'parents_home'
  516. !! - a location -> 'bedrPar', 'koo2x' - A value that can shop up in $loc
  517. !! - empty strying -> '' - will work as if a location was passed, but will use the actual value of $loc
  518. !! - A number as str -> '1', '2' - this should be the id of the property
  519. !! NOTE: only added in case someone really want to use the old ids
  520. if $ARGS[0] = 'get_property_attribute':
  521. $name = iif($ARGS[2] = '', $home_name[$loc], $home_name[$ARGS[2]])
  522. gs 'homes_properties_attr', 'get_property_attr', $name
  523. if $MID($ARGS[1],1,1) = '$':
  524. $RESULT = $property[$MID($ARGS[1],2)]
  525. else
  526. RESULT = property[$ARGS[1]]
  527. end
  528. killvar 'property'
  529. killvar 'name'
  530. end
  531. !!-----------------------------------------------------------------------------------------------------
  532. !!
  533. !! Calls for mods
  534. !!
  535. !!-----------------------------------------------------------------------------------------------------
  536. !! This does nothing, the only reason to have this is that a mod can use a redirect to their own
  537. !! location, $args[0] where they have the property info and can return it.
  538. if $ARGS[0] = 'property_query_hook':
  539. !! use this for the redirect
  540. mod_result = 1
  541. end
  542. !!{ This is for the mods that want to introduce some new home
  543. **OR** they rename an existing home location.
  544. Call this when the mod is initialised and then never again
  545. Example: A mod changes some things in the bedroom at the parents home and for this
  546. redirects to `mod_whatever_bedrPar`.
  547. In this case it would fail as the location code passed would not match
  548. `bedrPar` and would get back an empty string as the name of the home
  549. To avoid this, the mod should call this function with to location to the mapping.
  550. IMPORTANT: $ARGS[1] is mandatory, and either $ARGS[2] or $ARGS[3] must have a value!
  551. $ARGS[1] the new location name as it would appear in the $loc variable. This must start with `mod_` otherwise it will be ignored
  552. $ARGS[2] the name of the home if it is a completely new location - otherwise pass '' or don''t pass it
  553. $ARGS[3] the location that is being replaced - if it is a new location, leave this as an empty string }
  554. if $ARGS[0] = 'add_new_home_location':
  555. if $home_name[$ARGS[1]] ! '':
  556. !! WARNING: Do Nothing, the location already exists
  557. elseif $ARGS[2] = '' and $ARGS[3] = '':
  558. !! WARNING: Either $ARGS[2] or $ARGS[3] must have a value, otherwise no mapping will be created
  559. $home_name[$ARGS[1]] = ''
  560. elseif $ARGS[2] ! '':
  561. $home_name[$ARGS[1]] = $home_name[$ARGS[2]]
  562. $homes[] = $home_name[$ARGS[2]]
  563. else
  564. $home_name[$ARGS[1]] = $home_name[$ARGS[3]]
  565. end
  566. end
  567. !! This is for the mods that want to introduce some new region
  568. !! and a location where a player generally should
  569. !! end up when she is "going home" as a result of a "Going Home", "Go straight home"
  570. !! or "Go to home bathroom" act at the end of a scene if the player lives in different city
  571. !! (e.g. the event is in Pavlovsk but the player lives in St. Petersburg) or the player is homeless.
  572. !! This should be a train station or a bus station or such.
  573. !!
  574. !! One region can have only one entry.
  575. !!
  576. !! $ARGS[1]: The value set in the `$region` variable (like city, pav, pushkin, etc.)
  577. !! $ARGS[2]: The first argument for the `gt` call
  578. !! $ARGS[3]: The second argument for the `gt` call (optional)
  579. !!
  580. !! Example: with the current code, adding the Pavlovsk train station would be:
  581. !! gs 'homes_properties_attr', 'add_new_trainstation', 'pav', 'pav_market'
  582. !!
  583. if $ARGS[0] = 'add_new_train_station':
  584. if $train_station[$ARGS[1]] ! '':
  585. !! WARNING: Do Nothing, the location already exists
  586. else
  587. $train_station[$ARGS[1]] = "gt '<<$ARGS[2]>>', '<<$ARGS[3]>>'"
  588. end
  589. end
  590. --- homes_properties_attr ---------------------------------