123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667 |
- # homes_properties_attr
- !! Setting up the train stations to use when
- !! go_home would change region or player is homeless
- if ARRSIZE('train_station') < 1:
- $train_station['city'] = "gt 'city_center'"
- $train_station['pav'] = "gt 'pav_market'"
- $train_station['pav_park'] = "gt 'pav_market'"
- $train_station['pushkin'] = "gt 'pushkin_sq'"
- $train_station['gad'] = "gt 'train', 'village'"
- $train_station['gad_forest'] = "gt 'train', 'village'"
- $train_station['dachi'] = "gt 'train', 'communal'"
- end
- if ARRSIZE('homes') < 18:
- killvar '$homes'
- $homes[] = 'city_apartment'
- $homes[] = 'parents_home'
- $homes[] = 'village_cottage'
- $homes[] = 'old_town_apartment'
- $homes[] = 'matryona_mansion'
- $homes[] = 'pavlovsk_hotel'
- $homes[] = 'maid_bedroom'
- $homes[] = 'niko_apartment'
- $homes[] = 'vasilyhome'
- $homes[] = 'lyceum_dorm'
- $homes[] = 'university_dorm'
- $homes[] = 'hunters_lodge'
- $homes[] = 'shared_apartment'
- $homes[] = 'grandparents_house'
- $homes[] = 'city_house'
- $homes[] = 'meynold_household'
- $homes[] = 'hotel_therapist'
- $homes[] = 'pushkin_ballet_dorm'
- end
- if ARRSIZE('home_name') < 4:
- !! The list goes like this:
- !! 1. $home_name['property code']
- !! 2. $home_name['property id'] - for backward compatibility only, nothing else and the number is a string index
- !! 3. $home_name['enctrance location']
- !! 4.- N. $home_name['other locations']
- !! CITY APARTMENT
- $home_name['city_apartment'] = 'city_apartment'
- $home_name['1'] = 'city_apartment'
- $home_name['korr'] = 'city_apartment'
- $home_name['bedr'] = 'city_apartment'
- $home_name['sitr'] = 'city_apartment'
- $home_name['kuhr'] = 'city_apartment'
- $home_name['vanr'] = 'city_apartment'
- !! PARENTS HOME
- $home_name['parents_home'] = 'parents_home'
- $home_name['2'] = 'parents_home'
- $home_name['code'] = 'parents_home'
- $home_name['korrPar'] = 'parents_home'
- $home_name['bedrPar'] = 'parents_home'
- $home_name['sitrPar'] = 'parents_home'
- $home_name['kuhrPar'] = 'parents_home'
- $home_name['vanrPar'] = 'parents_home'
- !! VILLAGE COTTAGE
- $home_name['village_cottage'] = 'village_cottage'
- $home_name['3'] = 'village_cottage'
- $home_name['dachamy'] = 'village_cottage'
- $home_name['dachain'] = 'village_cottage'
- $home_name['dachaogr'] = 'village_cottage'
- $home_name['dachaogr0'] = 'village_cottage'
- !! OLD TOWN (PUSHKIN) APARTMENTS
- $home_name['old_town_apartment'] = 'old_town_apartment'
- $home_name['4'] = 'old_town_apartment'
- $home_name['korr2x'] = 'old_town_apartment'
- $home_name['bedr2x'] = 'old_town_apartment'
- $home_name['sitr2x'] = 'old_town_apartment'
- $home_name['kuhr2x'] = 'old_town_apartment'
- $home_name['vanr2x'] = 'old_town_apartment'
- !! MATRYONA MANSION
- $home_name['matryona_mansion'] = 'matryona_mansion'
- $home_name['5'] = 'matryona_mansion'
- $home_name['city_mansion_entrance'] = 'matryona_mansion'
- $home_name['city_mansion_residence_1'] = 'matryona_mansion'
- $home_name['city_mansion_residence_2'] = 'matryona_mansion'
- $home_name['city_mansion_residence_3'] = 'matryona_mansion'
- !! PAVLOVSK HOTEL
- $home_name['pavlovsk_hotel'] = 'pavlovsk_hotel'
- $home_name['6'] = 'pavlovsk_hotel'
- $home_name['pav_hotel'] = 'pavlovsk_hotel'
- $home_name['HotelRoom'] = 'pavlovsk_hotel'
- !! LIVE IN MAID BEDROOM
- $home_name['maid_bedroom'] = 'maid_bedroom'
- $home_name['7'] = 'maid_bedroom'
- $home_name['nichBedroomServant'] = 'maid_bedroom'
- !! NIKO APARTMENT
- $home_name['niko_apartment'] = 'niko_apartment'
- $home_name['8'] = 'niko_apartment'
- !! This home actually doesn''t exist yet, but it was defined,
- !! has an ID and all so, I am keeping it here
- !! SHULGA APARTMENT
- $home_name['shulga_apartment'] = 'vasilyhome'
- $home_name['9'] = 'vasilyhome'
- $home_name['vasilyhome'] = 'vasilyhome'
-
- !! LYCEUM DORM
- $home_name['lyceum_dorm'] = 'lyceum_dorm'
- $home_name['10'] = 'lyceum_dorm'
- $home_name['dom_gor'] = 'lyceum_dorm'
- !! UNIVERSITY DORM
- $home_name['university_dorm'] = 'university_dorm'
- $home_name['11'] = 'university_dorm'
- $home_name['uni_grounds'] = 'university_dorm'
- $home_name['uni_dorm'] = 'university_dorm'
-
- !! HUNTERS LODGE
- $home_name['hunters_lodge'] = 'hunters_lodge'
- $home_name['12'] = 'hunters_lodge'
- $home_name['gad_swamphouse'] = 'hunters_lodge'
- $home_name['gad_swamp_yard'] = 'hunters_lodge'
- !! SHARED APARTMENT - PAVLOVSK
- $home_name['shared_apartment'] = 'shared_apartment'
- $home_name['13'] = 'shared_apartment'
- $home_name['pav_shared_apt'] = 'shared_apartment'
- !! GRANDPARENTS HOUSE
- $home_name['grandparents_house'] = 'grandparents_house'
- $home_name['14'] = 'grandparents_house'
- $home_name['gad_gpyard'] = 'grandparents_house'
- $home_name['gad_gpbath'] = 'grandparents_house'
- $home_name['gad_gphouse'] = 'grandparents_house'
- $home_name['gad_gpbarn'] = 'grandparents_house'
- !! CITY HOUSE
- $home_name['city_house'] = 'city_house'
- $home_name['15'] = 'city_house'
- $home_name['city_house_res_misc'] = 'city_house'
- $home_name['city_house_res_bath'] = 'city_house'
- $home_name['city_house_re_bedr'] = 'city_house'
- $home_name['city_house-res_kitch'] = 'city_house'
- !! MEYNODLD HOUSEHOLD
- $home_name['meynold_household'] = 'meynold_household'
- $home_name['16'] = 'meynold_household'
- $home_name['mey_home'] = 'meynold_household'
- !! HOTEL
- $home_name['hotel_therapist'] = 'hotel_therapist'
- $home_name['17'] = 'hotel_therapist'
- !! BALLET DORM
- $home_name['pushkin_ballet_dorm'] = 'pushkin_ballet_dorm'
- $home_name['18'] = 'pushkin_ballet_dorm'
- end
- !!{ All the existing properties should be added here.
- id: The old numerical id - for the nostalgia
- code: The code of the property. Example: 'city_apartment', 'village_cottage'
- name: General name to display
- display: The string to use in the middle of a sentence
- town: The town/city/village the property can be found
- location: The region within the town
- location-arg: The entry argument for the 'location' location
- entrance: The location where the charactes enter
- entrance-arg: The entry argument for the 'entrance' location
- bathroom: The location of the bathroom
- bedroom-arg: The entry argument for the 'bathroom' location
- bedroom: The location where the charactes sleep
- bedroom-arg: The entry argument for the 'bedroom' location
- gs '<<location>>', '<<location-arg>>' will take Sveta to the location that leads
- to the property. For example Pavlovsk Complex, City Residential, etc.)
- gs '<<entrance>>', '<<entrance-arg>>' will take Sveta straight to the entrance of
- the property. For example the hallway in the Parents'' Home.
- type: The type of the property - it is used by some checks right now, dating app and such.
- In the future this could be expanded to things like business properties, offices or other whatever we
- want to simplify some checks.
- price: The sales value of the property.
- rent: The monthly rent of the property.
- rental: Whether the property can be rented by Sveta or not.
- 1: Can be rented
- 0: Can''t be rented // Examples are: Parents home, Shulga apartment, Hotel room in Pavlovsk, University dorm.
- Possible values are:
- free_internet: if the property comes with free internet (uses subscription['free']) then the value is `1`
- internet_enabled: If the value is 1, then Sveta can buy, cancel, transfer an internet subscription here
- can_be_renovated: Whether the property can be renovated or not. Tentative, not sure it is needed.
- construction_needed: If the value is 1, then the property needs to built before Sveta can move it.
- Currently the Matryona Mansion works like this, it starts as an empty plot of land.
- Property Types
- !! IMPORTANT:
- !! NOTE: The types are not 100% clear and decided yet, need some more thinking. Also new ones can be added.
- permanent_residence: This is a home that can be used for everything. Certain things don''t allow the more "transient"
- homes, like the dating app in Uni.
- temporary_residence: This is a home that some events/actions won''t consider.
- 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.
- For example a music studio/practice room, or a gallery, or a newspaper kiosk
- To make life easier, if is 0 or '' for a property, then I didn''t include it.
- Undefined strings will always evaluate to '' and undefined integers have a value of 0.
- }
- !! Always call this function with gs and use killvar'property' after finished with the data.
- !!
- !! ARGS[1] - the proprty code - a string identifier of the property.
- if $ARGS[0] = 'get_property_attr':
- killvar 'property'
- if $ARGS[1] = 'city_apartment':
- property['id'] = 1
- $property['code'] = $ARGS[1]
- $property['name'] = 'City residential apartment'
- $property['display'] = 'apartment in St. Petersburg''s residential area'
- $property['region'] = 'city'
- $property['town'] = 'city'
- $property['location'] = 'city_residential'
- $property['location_arg'] = ''
- $property['entrance'] = 'korr'
- $property['entrance_arg'] = ''
- $property['bathroom'] = 'vanr'
- $property['bathroom_arg'] = ''
- $property['bedroom'] = 'bedr'
- $property['bedroom_arg'] = ''
- $property['type'] = 'permanent_residence'
- property['price'] = 800000
- property['rent'] = 15000
- property['rental'] = 1
- property['internet_enabled'] = 1
- property['can_be_renovated'] = 1
- elseif $ARGS[1] = 'parents_home':
- property['id'] = 2
- $property['code'] = $ARGS[1]
- $property['name'] = 'Parent''s home in Pavlovsk'
- $property['display'] = 'parent''s home in Pavlovsk'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_complex'
- $property['location_arg'] = 'start'
- $property['entrance'] = 'korrPar'
- $property['entrance_arg'] = 'start'
- $property['bathroom'] = 'vanrPar'
- $property['bathroom_arg'] = ''
- $property['bedroom'] = 'bedrPar'
- $property['bedroom_arg'] = 'start'
- $property['type'] = 'permanent_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'village_cottage':
- property['id'] = 3
- $property['code'] = $ARGS[1]
- $property['name'] = 'My cottage in the cooperative village'
- $property['display'] = 'cottage located in the cooperative village'
- $property['region'] = 'dachi'
- $property['town'] = 'dachi'
- $property['location'] = 'dachamy'
- $property['location_arg'] = ''
- $property['entrance'] = 'dachamy'
- $property['entrance_arg'] = ''
- $property['bathroom'] = 'dachabath'
- $property['bathroom_arg'] = ''
- $property['bedroom'] = 'dachain'
- $property['bedroom_arg'] = 'start'
- $property['type'] = 'permanent_residence'
- property['price'] = 150000
- !! Currently no cable or internet can be installed at this property, maybe later.
- property['internet_enabled'] = 0
- elseif $ARGS[1] = 'old_town_apartment':
- property['id'] = 4
- $property['code'] = $ARGS[1]
- $property['name'] = 'Old town apartment'
- $property['display'] = 'apartment in the old town of Pushkin'
- $property['region'] = 'pushkin'
- $property['town'] = 'oldtown'
- $property['location'] = 'pushkin_sq'
- $property['location_arg'] = ''
- $property['entrance'] = 'korr2x'
- $property['entrance_arg'] = ''
- $property['bathroom'] = 'vanr2x'
- $property['bathroom_arg'] = ''
- $property['bedroom'] = 'bedr2x'
- $property['bedroom_arg'] = ''
- $property['type'] = 'permanent_residence'
-
- property['rental'] = 1
- property['rent'] = 10000
- property['internet_enabled'] = 1
- elseif $ARGS[1] = 'matryona_mansion':
- property['id'] = 5
- $property['code'] = $ARGS[1]
- $property['name'] = 'Matryona mansion'
- $property['display_0'] = 'plot of land in the St. Petersburg''s suburbs'
- $property['display_1'] = 'impressive mansion under construction in the St. Petersburg''s suburbs'
- $property['display_2'] = 'impressive mansion in the St. Petersburg''s suburbs'
- $property['display'] = $property['display_<<accessible_property["<<$args[1]>>-construction-status"]>>']
- $property['region'] = 'city'
- $property['town'] = 'city'
- $property['location'] = 'city_mansion_entrance'
- $property['location_arg'] = ''
- $property['entrance'] = 'city_mansion_residence_1'
- $property['entrance_arg'] = 'yfoyer'
- $property['bathroom'] = 'city_mansion_residence_1'
- $property['bathroom_arg'] = 'ybathroom'
- $property['bedroom'] = 'city_mansion_residence_1'
- $property['bedroom_arg'] = 'ybedroom'
- $property['type'] = 'permanent_residence'
- property['price'] = 1500000
- property['internet_enabled'] = 1
- property['construction_needed'] = 1
- elseif $ARGS[1] = 'pavlovsk_hotel':
- property['id'] = 6
- $property['code'] = $ARGS[1]
- $property['name'] = 'My hotel room in Pavlovsk'
- $property['display'] = 'hotel room in Pavlovsk'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_market'
- $property['location_arg'] = ''
- $property['entrance'] = 'pav_hotel'
- $property['entrance_arg'] = ''
- $property['bathroom'] = 'HotelRoom'
- $property['bathroom_arg'] = 'shower1'
- $property['bedroom'] = 'HotelRoom'
- $property['bedroom_arg'] = 'normal'
- !I do not know how to do this for the various price levels.....
- $property['type'] = 'temporary_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'maid_bedroom':
- property['id'] = 7
- $property['code'] = $ARGS[1]
- $property['name'] = 'Nicholas'' Apartment'
- $property['display'] = 'maid bedroom in Nicholas'' apartment'
- $property['region'] = 'city'
- $property['town'] = 'city'
- $property['location'] = 'city_center'
- $property['location_arg'] = ''
- $property['entrance'] = 'nichBedroomServant'
- $property['entrance_arg'] = 'start'
- $property['bathroom'] = 'nichBathServant'
- $property['bathroom_arg'] = ''
- $property['bedroom'] = 'nichBedroomServant'
- $property['bedroom_arg'] = 'start'
- $property['type'] = 'permanent_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'niko_apartment':
- property['id'] = 8
- $property['code'] = $ARGS[1]
- $property['name'] = 'Niko''s apartment'
- $property['display'] = 'Niko''s apartment'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_residential'
- $property['location_arg'] = ''
- $property['entrance'] = 'pav_residential'
- $property['entrance_arg'] = ''
- $property['bathroom'] = 'pav_residential'
- $property['bathroom_arg'] = ''
- $property['bedroom'] = 'pav_residential'
- $property['bedroom_arg'] = ''
- $property['type'] = 'temporary_residence'
- elseif $ARGS[1] = 'shulga_apartment':
- property['id'] = 9
- $property['code'] = $ARGS[1]
- $property['name'] = 'Uncle Sergey''s apartment'
- $property['display'] = 'Uncle Sergey''s apartment'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_complex'
- $property['location_arg'] = 'start'
- $property['entrance'] = 'vasilyhome'
- $property['entrance_arg'] = 'hallway'
- $property['bathroom'] = 'vasilyhome'
- $property['bathroom_arg'] = 'bathroom'
- $property['bedroom'] = 'vasilyhome'
- $property['bedroom_arg'] = 'vasily_room'
- $property['type'] = 'temporary_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'lyceum_dorm':
- property['id'] = 10
- $property['code'] = $ARGS[1]
- $property['name'] = 'Lyceum school'
- $property['display'] = 'room in the Lyceum dorm'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_commercial'
- $property['location_arg'] = ''
- $property['entrance'] = 'etoexhib'
- $property['entrance_arg'] = 'pos40'
- $property['bathroom'] = 'etoexhib'
- $property['bathroom_arg'] = 'pos41'
- $property['bedroom'] = 'dom_gor'
- $property['bedroom_arg'] = ''
- $property['type'] = 'permanent_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'university_dorm':
- property['id'] = 11
- $property['code'] = $ARGS[1]
- $property['name'] = 'University halls'
- $property['display'] = 'room in the university dorm'
- $property['region'] = 'city'
- $property['town'] = 'city'
- $property['location'] = 'city_island'
- $property['location_arg'] = ''
- $property['entrance'] = 'uni_dorm'
- $property['entrance_arg'] = 'dorm_room'
- $property['bathroom'] = 'uni_dorm'
- $property['bathroom_arg'] = 'womens_restroom'
- $property['bedroom'] = 'uni_dorm'
- $property['bedroom_arg'] = 'dorm_room'
- $property['type'] = 'permanent_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'hunters_lodge':
- property['id'] = 12
- $property['code'] = $ARGS[1]
- $property['name'] = 'Hunter''s lodge in Gadukino'
- $property['display'] = 'hunter''s lodge in Gadukino'
- $property['region'] = 'gad_forest'
- $property['town'] = 'gadukino'
- $property['location'] = 'gad_swamp_yard'
- $property['location_arg'] = 'start'
- $property['entrance'] = 'gad_swamphouse'
- $property['entrance_arg'] = 'start'
- $property['bathroom'] = 'gad_swamphouse'
- $property['bathroom_arg'] = 'washstand'
- $property['bedroom'] = 'gad_swamphouse'
- $property['bedroom_arg'] = 'start'
- $property['type'] = 'temporary_residence'
- elseif $ARGS[1] = 'shared_apartment':
- property['id'] = 13
- $property['code'] = $ARGS[1]
- $property['name'] = 'Shared apartment in Pavlovsk'
- $property['display'] = 'shared apartment in Pavlovsk'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_complex'
- $property['location_arg'] = 'start'
- $property['entrance'] = 'pav_shared_apt'
- $property['entrance_arg'] = 'start'
- $property['bathroom'] = 'pav_shared_apt'
- $property['bathroom_arg'] = 'bathroom'
- $property['bedroom'] = 'pav_shared_apt'
- $property['bedroom_arg'] = 'pcsRoom'
- $property['type'] = 'temporary_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'grandparents_house':
- property['id'] = 14
- $property['code'] = $ARGS[1]
- $property['name'] = 'Grandparent''s house in Gadukino'
- $property['display'] = 'grandparent''s house in Gadukino'
- $property['region'] = 'gad'
- $property['town'] = 'gadukino'
- $property['location'] = 'gad_gpyard'
- $property['location_arg'] = 'start'
- $property['entrance'] = 'gad_gpyard'
- $property['entrance_arg'] = 'start'
- $property['bathroom'] = 'gad_gpbath'
- $property['bathroom_arg'] = 'start'
- $property['bedroom'] = 'gad_gpbarn'
- $property['bedroom_arg'] = 'barn_room'
- $property['type'] = 'temporary_residence'
- elseif $ARGS[1] = 'city_house':
- property['id'] = 15
- $property['code'] = $ARGS[1]
- $property['name'] = 'City residential house'
- $property['display'] = 'house in the St. Petersburg''s residential area'
- $property['region'] = 'city'
- $property['town'] = 'city'
- $property['location'] = 'city_residential'
- $property['location_arg'] = ''
- $property['entrance'] = 'city_house_res_misc'
- $property['entrance_arg'] = 'fronty'
- $property['bathroom'] = 'city_house_res_bathr'
- $property['bathroom_arg'] = 'bathr'
- $property['bedroom'] = 'city_house_res_bedr'
- $property['bedroom_arg'] = 'bedro'
- $property['type'] = 'permanent_residence'
- property['price'] = 800000
- property['internet_enabled'] = 1
- elseif $ARGS[1] = 'meynold_household':
- property['id'] = 16
- $property['code'] = $ARGS[1]
- $property['name'] = 'Meynold Household'
- $property['display'] = 'the Meynold Household'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_residential'
- $property['location_arg'] = ''
- $property['entrance'] = 'mey_home'
- $property['entrance_arg'] = 'door'
- $property['bathroom'] = 'mey_home'
- $property['bathroom_arg'] = 'bathroom'
- $property['bedroom'] = 'mey_home'
- $property['bedroom_arg'] = 'guest_bedroom'
- $property['type'] = 'temporary_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'hotel_therapist':
- property['id'] = 17
- $property['code'] = $ARGS[1]
- $property['name'] = 'Pavlovsk Hotel Room'
- $property['display'] = 'husband''s hotel room'
- $property['region'] = 'pav'
- $property['town'] = 'pavlovsk'
- $property['location'] = 'pav_residential'
- $property['location_arg'] = ''
- $property['entrance'] = 'pav_hotel'
- $property['entrance_arg'] = ''
- $property['bathroom'] = 'HotelRoom'
- $property['bathroom_arg'] = 'shower1'
- $property['bedroom'] = 'HotelRoom'
- $property['bedroom_arg'] = 'therapist'
- $property['type'] = 'temporary_residence'
- property['free_internet'] = 1
- elseif $ARGS[1] = 'pushkin_ballet_dorm':
- property['id'] = 18
- $property['code'] = $ARGS[1]
- $property['name'] = 'Pushkin Ballet Dorm'
- $property['display'] = 'ballet dorm'
- $property['region'] = 'pav'
- $property['town'] = 'pushkin'
- $property['location'] = 'pushkin_sq'
- $property['location_arg'] = ''
- $property['entrance'] = 'pushkin_ballet_center'
- $property['entrance_arg'] = 'start'
- $property['bathroom'] = 'pushkin_ballet_class'
- $property['bathroom_arg'] = 'shower'
- $property['bedroom'] = 'pushkin_ballet_res'
- $property['bedroom_arg'] = 'bedroom'
- $property['type'] = 'temporary_residence'
- else
- gs 'homes_properties_attr', 'mod_property_query_hook'
- end
- end
- !! Use it as `func`, returns a single $RESULT or RESULT value with the requested
- !! field of a `property`
- !! $ARGS[1]: the name of the field requested, prefixed with $ if it is a string value
- !! E.g. `'$bedroom', '$region', 'rent', 'price', etc.`
- !! $ARGS[2]: optional - the location for which the access is set
- !! Accepted values
- !! - property code -> 'city_apartment', 'parents_home'
- !! - a location -> 'bedrPar', 'koo2x' - A value that can shop up in $loc
- !! - empty strying -> '' - will work as if a location was passed, but will use the actual value of $loc
- !! - A number as str -> '1', '2' - this should be the id of the property
- !! NOTE: only added in case someone really want to use the old ids
- if $ARGS[0] = 'get_property_attribute':
- $name = iif($ARGS[2] = '', $home_name[$loc], $home_name[$ARGS[2]])
- gs 'homes_properties_attr', 'get_property_attr', $name
- if $MID($ARGS[1],1,1) = '$':
- $RESULT = $property[$MID($ARGS[1],2)]
- else
- RESULT = property[$ARGS[1]]
- end
- killvar 'property'
- killvar 'name'
- end
- !!-----------------------------------------------------------------------------------------------------
- !!
- !! Calls for mods
- !!
- !!-----------------------------------------------------------------------------------------------------
- !! This does nothing, the only reason to have this is that a mod can use a redirect to their own
- !! location, $args[0] where they have the property info and can return it.
- if $ARGS[0] = 'property_query_hook':
- !! use this for the redirect
- mod_result = 1
- end
- !!{ This is for the mods that want to introduce some new home
- **OR** they rename an existing home location.
- Call this when the mod is initialised and then never again
- Example: A mod changes some things in the bedroom at the parents home and for this
- redirects to `mod_whatever_bedrPar`.
- In this case it would fail as the location code passed would not match
- `bedrPar` and would get back an empty string as the name of the home
- To avoid this, the mod should call this function with to location to the mapping.
- IMPORTANT: $ARGS[1] is mandatory, and either $ARGS[2] or $ARGS[3] must have a value!
- $ARGS[1] the new location name as it would appear in the $loc variable. This must start with `mod_` otherwise it will be ignored
- $ARGS[2] the name of the home if it is a completely new location - otherwise pass '' or don''t pass it
- $ARGS[3] the location that is being replaced - if it is a new location, leave this as an empty string }
- if $ARGS[0] = 'add_new_home_location':
- if $home_name[$ARGS[1]] ! '':
- !! WARNING: Do Nothing, the location already exists
- elseif $ARGS[2] = '' and $ARGS[3] = '':
- !! WARNING: Either $ARGS[2] or $ARGS[3] must have a value, otherwise no mapping will be created
- $home_name[$ARGS[1]] = ''
- elseif $ARGS[2] ! '':
- $home_name[$ARGS[1]] = $home_name[$ARGS[2]]
- $homes[] = $home_name[$ARGS[2]]
- else
- $home_name[$ARGS[1]] = $home_name[$ARGS[3]]
- end
- end
- !! This is for the mods that want to introduce some new region
- !! and a location where a player generally should
- !! end up when she is "going home" as a result of a "Going Home", "Go straight home"
- !! or "Go to home bathroom" act at the end of a scene if the player lives in different city
- !! (e.g. the event is in Pavlovsk but the player lives in St. Petersburg) or the player is homeless.
- !! This should be a train station or a bus station or such.
- !!
- !! One region can have only one entry.
- !!
- !! $ARGS[1]: The value set in the `$region` variable (like city, pav, pushkin, etc.)
- !! $ARGS[2]: The first argument for the `gt` call
- !! $ARGS[3]: The second argument for the `gt` call (optional)
- !!
- !! Example: with the current code, adding the Pavlovsk train station would be:
- !! gs 'homes_properties_attr', 'add_new_trainstation', 'pav', 'pav_market'
- !!
- if $ARGS[0] = 'add_new_train_station':
- if $train_station[$ARGS[1]] ! '':
- !! WARNING: Do Nothing, the location already exists
- else
- $train_station[$ARGS[1]] = "gt '<<$ARGS[2]>>', '<<$ARGS[3]>>'"
- end
- end
- --- homes_properties_attr ---------------------------------
|