Răsfoiți Sursa

Renamed `owned_property` to `accessible_property` more precise name

netuttki 1 an în urmă
părinte
comite
487732cfa7
50 a modificat fișierele cu 348 adăugiri și 499 ștergeri
  1. 1 1
      locations/Cheatmenu_din.qsrc
  2. 4 4
      locations/FedorEv4.qsrc
  3. 11 11
      locations/Komp.qsrc
  4. 2 2
      locations/MartinTalk.qsrc
  5. 1 1
      locations/Peterroom.qsrc
  6. 9 9
      locations/agentned.qsrc
  7. 2 2
      locations/booty_call_after.qsrc
  8. 4 4
      locations/brother.qsrc
  9. 1 1
      locations/cikl.qsrc
  10. 2 2
      locations/city_island.qsrc
  11. 4 4
      locations/city_residential.qsrc
  12. 2 2
      locations/city_suburbs.qsrc
  13. 3 3
      locations/dachain.qsrc
  14. 1 1
      locations/dachi.qsrc
  15. 9 9
      locations/dina.qsrc
  16. 1 1
      locations/dvor.qsrc
  17. 1 1
      locations/food_menu.qsrc
  18. 2 2
      locations/gadbana.qsrc
  19. 1 1
      locations/gadhouse.qsrc
  20. 4 4
      locations/gkafe.qsrc
  21. 2 2
      locations/gschool_grounds.qsrc
  22. 1 1
      locations/gschool_lunch.qsrc
  23. 1 1
      locations/home_activity.qsrc
  24. 206 357
      locations/homes_properties.qsrc
  25. 1 1
      locations/hookup_after.qsrc
  26. 10 10
      locations/housing.qsrc
  27. 1 1
      locations/internet_mobile.qsrc
  28. 11 11
      locations/journal.qsrc
  29. 1 1
      locations/liames.qsrc
  30. 1 1
      locations/lug.qsrc
  31. 1 1
      locations/parks.qsrc
  32. 2 2
      locations/pav_clinic.qsrc
  33. 1 1
      locations/pav_commercial.qsrc
  34. 5 5
      locations/pav_complex.qsrc
  35. 1 1
      locations/pav_disco_coolkids.qsrc
  36. 2 2
      locations/pav_lake.qsrc
  37. 2 2
      locations/pav_park.qsrc
  38. 1 1
      locations/pav_shared_apt.qsrc
  39. 3 3
      locations/pod_ezd.qsrc
  40. 2 2
      locations/podezdM.qsrc
  41. 5 5
      locations/shop.qsrc
  42. 8 8
      locations/shopdacha.qsrc
  43. 1 1
      locations/shulgahall.qsrc
  44. 3 3
      locations/stat_display.qsrc
  45. 1 1
      locations/street_event.qsrc
  46. 2 2
      locations/telefon.qsrc
  47. 1 1
      locations/uni_dorm.qsrc
  48. 1 1
      locations/uni_grounds.qsrc
  49. 1 1
      locations/unused/pornstudio.qsrc
  50. 5 5
      locations/zoomagazine.qsrc

+ 1 - 1
locations/Cheatmenu_din.qsrc

@@ -1548,7 +1548,7 @@ $cheatmenu['reputation'] = {
 		end
 		*nl
 		if func('homes_properties', 'can_live_here', 'parents_home') = 0:
-			'<a href="exec: gs ''homes_properties'', ''set_ownership'', ''parents_home'', 1 & dynamic $cheatmenu[''reputation'']">Restore</a> access to your parent''s apartment.'
+			'<a href="exec: gs ''homes_properties'', ''give_access'', ''parents_home'' & dynamic $cheatmenu[''reputation'']">Restore</a> access to your parent''s apartment.'
 		end
 		if momKnowsKolka = 1:
 			'Your mother knows Kolka is the father. <a href="momKnowsKolka = 0 & dynamic $cheatmenu[''reputation'']">Clear</a>.'

+ 4 - 4
locations/FedorEv4.qsrc

@@ -1011,7 +1011,7 @@ if $ARGS[0] = 'Fedor Livingroom':
 		act 'Talk about what happened with Dimka':gt 'FedorEv4', 'Dimka Aftermath'
 	end
 
-	if owned_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
+	if accessible_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
 
 	act 'Chat':gt 'FedorEv4', 'Fedor Livingroom Chat'	
 end
@@ -1064,7 +1064,7 @@ if $ARGS[0] = 'Fedor Kitchen':
 		act 'Talk about what happened with Dimka':gt 'FedorEv4', 'Dimka Aftermath'
 	end
 
-	if owned_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
+	if accessible_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
 	
 	act 'Chat':gt 'FedorEv4', 'Fedor Kitchen Chat'	
 end
@@ -1102,7 +1102,7 @@ if $ARGS[0] = 'Fedor Bedroom':
 
 	act 'Walk away':gt 'FedorEv4', 'Bedroom'
 	
-	if owned_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
+	if accessible_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
 
 	if FedorLove = 0 and strelaQW = -1:
 		act 'Find out what''s bothering him':gt 'FedorEv4', 'Love Talk Strela'
@@ -1163,7 +1163,7 @@ if $ARGS[0] = 'Fedor Bedroom 2':
 	if pcs_hairbsh = 0: 'Fedor notices your messy hair and pulls out his <a href="exec:gt ''FedorMisc'', ''Comb''">comb</a>.'
 	if $clothingworntype = 'nude': 'Fedor reaches over, then begins gently squeezing your breasts, "You have great tits, <<$pcs_firstname>>."'
 	
-	if owned_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
+	if accessible_property['parents_home'] = 0 and FedorShelter = 0:act 'Ask about moving in':gt 'FedorEv4', 'Fedor Shelter'
 
 	act 'Maybe later':gt 'FedorEv4', 'Bedroom'
 	act 'Sure':gt 'FedorEv4', 'Fedor Bedroom Chat 2'

+ 11 - 11
locations/Komp.qsrc

@@ -87,7 +87,7 @@ if $ARGS[0] = 'browse':
 
 		'A blinking banner for a <a href="exec:gt ''komp'',''agent''">Kirsanova Real Estate Agency</a> keeps popping up in the corner.'
 
-		if owned_property['city_apartment'] = 2 and husband = 0: act 'Rent your apartment out':gt 'komp', 'sale'
+		if accessible_property['city_apartment'] = 2 and husband = 0: act 'Rent your apartment out':gt 'komp', 'sale'
 
 		if access['noporn'] = 0: act 'Watch porn': gt 'komp', 'porno'
 
@@ -570,49 +570,49 @@ if $ARGS[0] = 'agent':
 	'<br>The website shows they have apartments available for rent or purchase in various areas, both in and out of the city. Renting or purchase requires you visit the agency in the city center to fill an application and collect the keys. Rent on all properties is deducted every month on the 25th.'
 	*nl
 	'<b>Property listing</b>:'
-	if owned_property['city_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'city_apartment') > 0:
+	if accessible_property['city_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'city_apartment') > 0:
 		'You have <B><<func(''homes_properties'', ''get_rent_days'', ''city_apartment'')>> days</B> remaining on the rental of your St. Petersburg apartment.'
 		*nl
-	elseif owned_property['city_apartment'] = 0:
+	elseif accessible_property['city_apartment'] = 0:
 		'There is an apartment in St. Petersburg residental area available, for rent or puchase.'
 		'Rent is: <<func(''homes_properties'', ''get_rent'', ''city_apartment'')>> ₽ per month. Current sale price is listed at: <<func(''homes_properties'', ''get_price'', ''city_apartment'')>> <b>₽</b>.'
 		*nl
 	end
 
-	if owned_property['village_cottage'] = 0:
+	if accessible_property['village_cottage'] = 0:
 		'There is a holiday cottage with an adjacent allotment in the communal village for sale.'
 		'Current sale price is listed at: <<func(''homes_properties'', ''get_price'', ''village_cottage'')>> <b>₽</b>.'
 		*nl
 	end
 	
-	if owned_property['old_town_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'old_town_apartment') > 0:
+	if accessible_property['old_town_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'old_town_apartment') > 0:
 		'You have <B><<func(''homes_properties'', ''get_rent_days'', ''old_town_apartment'')>> days</B> remaining on the rental of your Pushkin apartment.'
 		*nl
-	elseif owned_property['old_town_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'old_town_apartment') = 0:
+	elseif accessible_property['old_town_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'old_town_apartment') = 0:
 		'There is an apartment in Pushkin area (Old Town) available to rent.'
 		'Rent is: <<func(''homes_properties'', ''get_rent'', ''old_town_apartment'')>> <b>₽</b> per month.'
 		*nl
 	end
 
-	if owned_property['matryona_mansion'] = 0:
+	if accessible_property['matryona_mansion'] = 0:
 		'There is a plot in the suburbs available for puchase, with planning permission for a mansion.'
 		'Current sale price is listed at: <<func(''homes_properties'', ''get_price'', ''matryona_mansion'')>> <b>₽</b>.'
 		*nl
 	end
 
-	if karta + bankDebtLimit >= func('homes_properties', 'get_rent', 'city_apartment') and owned_property['city_apartment'] = 1:
+	if karta + bankDebtLimit >= func('homes_properties', 'get_rent_amount', 'city_apartment') and accessible_property['city_apartment'] = 1:
 		act 'Pay rent on St. Petersburg':
 			cla
-			karta -= func('homes_properties', 'get_rent', 'city_apartment')
+			karta -= func('homes_properties', 'get_rent_amount', 'city_apartment')
 			gs 'homes_properties', 'add_rent_days'
 			'After a very simple procedure, you can now call an apartment in the city residential district home for another 30 days. You have <B><<func(''homes_properties'', ''get_rent_days'', ''city_apartment'')>> days</B> remaining on the rental of your apartment.'
 			act 'Leave this website':gt 'komp','browse'
 		end
 	end
-	if karta + bankDebtLimit >= func('homes_properties', 'get_rent', 'old_town_apartment') and owned_property['old_town_apartment'] = 1:
+	if karta + bankDebtLimit >= func('homes_properties', 'get_rent_amount', 'old_town_apartment') and accessible_property['old_town_apartment'] = 1:
 		act 'Pay rent on Pushkin':
 			cla
-			karta -= func('homes_properties', 'get_rent', 'old_town_apartment')
+			karta -= func('homes_properties', 'get_rent_amount', 'old_town_apartment')
 			gs 'homes_properties', 'add_rent_days'
 			'After a very simple procedure, you can now call an apartment in Pushkin home for another 30 days. You have <B><<func(''homes_properties'', ''get_rent_days'', ''old_town_apartment'')>> days</B> remaining on the rental of your apartment.'
 			act 'Leave this website':gt 'komp','browse'

+ 2 - 2
locations/MartinTalk.qsrc

@@ -908,7 +908,7 @@ end
 
 if $ARGS[0] = 'MartinTalkApartment':
 	'<center><img <<$set_imgh>> src="images/locations/city/industrial/bar/martintalk.jpg"></center>'	
-	if owned_property['city_apartment'] = 1:
+	if accessible_property['city_apartment'] = 1:
 		'"Actually, I have a small apartment, on the other side of the park."'
 		*nl
 		'"Well, it''s good if you can afford it. Living on your own builds character."'
@@ -936,7 +936,7 @@ if $ARGS[0] = 'MartinTalkApartment':
 		*nl
 		$OpenInnerThought+'He wouldn''t be Martin if he didn''t tell me to "watch out" at least once a day,'+$CloseInnerThought+' you think and roll your eyes, but still smile and say "I always do" before he has to get back to work.'
 	
-	elseif mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4:
+	elseif mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4:
 		'"I still live with my parents, in Pavlovsk," you admit.'
 		*nl
 		'"Oh, well, that can''t be easy at your age."'

+ 1 - 1
locations/Peterroom.qsrc

@@ -203,7 +203,7 @@ if $ARGS[0] = 'end':
             'You spend the journey talking about the sex you just had and you reach the city center a few minutes later. Peter leans over and gives your ass a firm squeeze as you climb out of the car. "Until next time <<$pcs_nickname>>." You smile at him and close the door before he drives off.' 			
 			gt 'city_center'
 		end
-		if owned_property['city_house'] = 1 or owned_property['city_house'] = 2:
+		if accessible_property['city_house'] = 1 or accessible_property['city_house'] = 2:
 			act 'To your apartment':
 				gs 'arousal', 'end'
 				'You nod and get into the car next to him, giving him directions to your apartment complex.'

+ 9 - 9
locations/agentned.qsrc

@@ -154,12 +154,12 @@ if $ARGS[0] = 'sell':
 	act 'Return':gt'agentned', 'start'
 	
 	if bankAccount = 1:
-		if owned_property['city_apartment'] = 2:
+		if accessible_property['city_apartment'] = 2:
 			if rembedr = 1 and remsitr = 1 and remkorr = 1 and remvanr = 1 and remkuhr = 1:
 				!Renovated city residential apartment
-				offer1 = ((prop_price['city_apartment'] + 250000) + rand(-100000, 100000)) 
+				offer1 = ((800000 + 250000) + rand(-100000, 100000)) 
 			else
-				offer1 = (prop_price['city_apartment'] + rand(-100000, 100000))
+				offer1 = (800000 + rand(-100000, 100000))
 			end
 			'We have found a buyer for your apartment in the city residential area. They will offer <<offer1>> <b>₽</b>, minus 5% for fees and taxes, bringing the total to <<offer1/100*95>>'
 			act 'Sell the city apartment':
@@ -222,12 +222,12 @@ if $ARGS[0] = 'sell':
 			end
 		end
 		
-		if owned_property['city_house'] = 2:
+		if accessible_property['city_house'] = 2:
 			!! - might do later - Alaratt.
 			'Sorry, we are unable to find a buyer for your house at this time.'
 		end
 
-		if owned_property['city_apartment'] = 0 and owned_property['village_cottage'] = 0 and owned_property['city_house'] = 0 and owned_property['matryona_mansion'] = 0:
+		if accessible_property['city_apartment'] = 0 and accessible_property['village_cottage'] = 0 and accessible_property['city_house'] = 0 and accessible_property['matryona_mansion'] = 0:
 			'You don''t currently own any property.'
 		end
 	else
@@ -252,17 +252,17 @@ if $ARGS[0] = 'rent':
 	act 'Return':gt'agentned', 'start'
 	
 
-	if owned_property['city_apartment'] > 0 and owned_property['old_town_apartment'] > 0:
+	if accessible_property['city_apartment'] > 0 and accessible_property['old_town_apartment'] > 0:
 		'We currently have no properties listed for rent.'
-	elseif owned_property['city_apartment'] = 0 and owned_property['old_town_apartment'] = 0:
+	elseif accessible_property['city_apartment'] = 0 and accessible_property['old_town_apartment'] = 0:
 		*nl
 		'There are two apartments available for rent. They are located in the city residential area and in Pushkin.'
 		act 'View the city apartment details': gt 'agentned', 'rent_cityres'
 		act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
-	elseif owned_property['city_apartment'] = 0:
+	elseif accessible_property['city_apartment'] = 0:
 		'There is a property for rent in the city residential area'
 		act 'View the city apartment details': gt 'agentned', 'rent_cityres'
-	elseif owned_property['old_town_apartment'] = 0:
+	elseif accessible_property['old_town_apartment'] = 0:
 		'There is a property for rent in the old town of Pushkin'
 		act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
 	end

+ 2 - 2
locations/booty_call_after.qsrc

@@ -768,7 +768,7 @@ if $ARGS[0] = 'black_out':
 				gs'sleep', 'simple'
 			end
 
-			if mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4: sveta_punishment['no_come_home'] = 1
+			if mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4: sveta_punishment['no_come_home'] = 1
 			gt'booty_call_morning', 'morning'
 		end
 	end
@@ -2094,7 +2094,7 @@ if $ARGS[0] = 'sleep_function':
 		gs'sleep', 'simple'
 	end
 
-	if mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4: sveta_punishment['no_come_home'] = 1
+	if mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4: sveta_punishment['no_come_home'] = 1
 	gt'booty_call_morning', 'morning'
 end
 --- booty_call_after ---------------------------------

+ 4 - 4
locations/brother.qsrc

@@ -1640,7 +1640,7 @@ if $ARGS[0] = 'brotherknows6':
 		'He finally gathers his courage and says, "Yes, I love getting you pregnant. Every time we fuck, I have to fight the urge to just unload inside you, and every time I give in is the best moment of my life. Knowing that every rope I shoot into your wonderful pussy could knock you up turns me on more than anything else. Even before we had sex for the first time, I would fantasize about knocking you up every time I masturbated. I love knowing that I put that baby in you and that your body will tell everyone else. I want to impregnate you over and over, keeping you pregnant for as long as I can."'
 		'As he finishes, you stare in silence. You were hoping for a confession, but that was way beyond what you were expecting. Unable to bear the silence any longer, Kolka breaks the tension by gripping your ass and kissing you as passionately as he can. This snaps you back to reality and you return the kiss.'
 		'After several minutes, you pull back and lick your lips. Still sitting in Kolka''s lap, you say, "Every moment that we’re together is fantastic, and I love that this baby is yours, but I don''t know if I want any more children after this. So, when we have sex after this baby is born, please try to control yourself." He nods.'
-		if momKnowsKolka = 1 and owned_property['parents_home'] = 4:
+		if momKnowsKolka = 1 and accessible_property['parents_home'] = 4:
 			cla
 			'Kolka chuckles, "Since <<$npc_nickname[''A29'']>> already knows I''ve gotten you pregnant before, we probably don''t need to keep this one secret, do we?"'
 			'"No, I don''t think we do. Even though she freaked she fuck out the first time, I''m actually looking forward to her reaction this time. She''s had plenty of time to come to terms with our…" You stop for a moment and grind into Kolka''s lap, "special relationship."'
@@ -1649,7 +1649,7 @@ if $ARGS[0] = 'brotherknows6':
 			'You kiss your brother one more time before getting up from his lap. Now that you''ve told him the news, it''s time to tell your mother. You really hope your right about her reaction…'
 
 			act 'Continue':minut += 10 & gt 'KatjaHomeTalk'
-		elseif momKnowsKolka = 1 and owned_property['parents_home'] = 0:
+		elseif momKnowsKolka = 1 and accessible_property['parents_home'] = 0:
 			cla
 			'"Since <<$npc_nickname[''A29'']>> already knows I''ve gotten you pregnant before, we probably don''t need to keep this one secret, do we?"'
 			'You scowl, "I don''t give a fuck what <<$npc_nickname[''A29'']>> knows. She''s not speaking to me and I really don''t care to say anything to her!"'
@@ -1680,12 +1680,12 @@ if $ARGS[0] = 'brotherknows6':
 		'"Yeah, it''s yours. I can''t believe you got me pregnant again." You shake your head, "I don''t know why the hell I thought you''d be more careful after the first time."'
 		'"You thought I''d be more careful? It takes two, sweetheart." He chuckles, "And besides, I didn''t hear you complaining while we were fucking."'
 		'You snap at him, "You shut your goddamn mouth. You don''t have to walk around with a baby inside you. I do. So yeah, I have every right to be pissed and you’re just going to sit back and deal with it."'
-		if momKnowsKolka = 1 and owned_property['parents_home'] = 4:
+		if momKnowsKolka = 1 and accessible_property['parents_home'] = 4:
 			cla
 			'"<<$npc_nickname[''A29'']>> already knows you got me pregnant before." You breath a deep sigh, "I am <i>not</i> looking forward to telling her about this."'
 
 			act 'Continue':minut += 10 & gt 'KatjaHomeTalk'
-		elseif momKnowsKolka = 1 and owned_property['parents_home'] = 0:
+		elseif momKnowsKolka = 1 and accessible_property['parents_home'] = 0:
 			cla
 			'"God, I was already kicked out, thanks to you." You drop your head, "I should''ve known you''d only make my life worse"'
 

+ 1 - 1
locations/cikl.qsrc

@@ -923,7 +923,7 @@ if mid($start_type,1,2) = 'sg':
 		old_grupvalue[4] = grupvalue[4]
 		
 	elseif SchoolAtestat = -1:
-		if owned_property['parents_home'] = 0:
+		if accessible_property['parents_home'] = 0:
 			$holyday = '<b>You missed your graduation. You could pick up your diploma at the school.</b>'
 		else
 			$holyday = '<b>You missed your graduation. Maybe your mother picked up your diploma.</b>'

+ 2 - 2
locations/city_island.qsrc

@@ -44,7 +44,7 @@ if streetevent_hour + 2 < hour:gt'street_event','city_island', 'main'
 
 gs 'street_event', 'city_island', 'extras'
 
-if owned_property['university_dorm'] = 4 :act '<b>GO HOME</b> (University dorm)':gt 'uni_dorm', 'start'
+if accessible_property['university_dorm'] = 4 :act '<b>GO HOME</b> (University dorm)':gt 'uni_dorm', 'start'
 
 if car > 0 and cardrive = 25:'In the parking stands your <a href="exec:GS ''carF'', ''start''"><<$car>></a>.'
 
@@ -80,7 +80,7 @@ act 'Go to the University campus':
 	gt 'uni_grounds', 'main'
 end
 
-if owned_property['university_dorm'] = 4 or university['student'] = 1 or hour >= 6:'The <a href="exec:gt ''uni_dorm'', ''start''">University dorms</a> offers small, but cheap, living space, for university students.'
+if accessible_property['university_dorm'] = 4 or university['student'] = 1 or hour >= 6:'The <a href="exec:gt ''uni_dorm'', ''start''">University dorms</a> offers small, but cheap, living space, for university students.'
 
 if pcs_magik >= 1 and mainQW = 0 and mid($start_type,1,3) = 'uni':
 	*clr & cla

+ 4 - 4
locations/city_residential.qsrc

@@ -46,7 +46,7 @@ gs'street_event','city_residential', 'extras'
 
 if opusk > 0 or gnewQW = 5:
 	if rand(0,9) = 0:gt 'gopnew', 'start5'
-	if owned_property['city_apartment'] > 0:'Something is written on the wall near the entrance to your building. It reads:<b>"<<$pcs_firstname>> <<$pcs_lastname>> from apartment 69 is a cheap slut!"</b>'
+	if accessible_property['city_apartment'] > 0:'Something is written on the wall near the entrance to your building. It reads:<b>"<<$pcs_firstname>> <<$pcs_lastname>> from apartment 69 is a cheap slut!"</b>'
 end
 
 gs 'stat'
@@ -64,7 +64,7 @@ if car > 0 and cardrive = 1 or cardrive = 8:
 	end
 end
 
-if owned_property['city_house'] = 2:
+if accessible_property['city_house'] = 2:
 	'Your <a href="exec: minut += 10 & gs ''city_house_res_misc'', ''fronty''">house</a> is within walking distance.'
 	act '<b>Go to your house</b>':
 		minut += 10
@@ -72,7 +72,7 @@ if owned_property['city_house'] = 2:
 	end
 end
 
-if owned_property['city_apartment'] = 1 or owned_property['city_apartment'] = 2:
+if accessible_property['city_apartment'] = 1 or accessible_property['city_apartment'] = 2:
 	act '<b>Go to your apartment</b>':
 		gorand = rand(0, 100)
 
@@ -171,7 +171,7 @@ if Enable_tablemap = 0:
 	end
 end
 
-if owned_property['city_apartment'] = 0:
+if accessible_property['city_apartment'] = 0:
 	'You see several <a href="exec: minut += 1 & gt ''city_trashplace''">trash bins</a> in the courtyard of one of the apartment buildings.'
 else
 	'You see several <a href="exec: minut += 1 & gt ''city_trashplace''">trash bins</a> in the courtyard of your <a href="exec: gt ''city_apt_building'',''floor_1''">apartment building</a>.'

+ 2 - 2
locations/city_suburbs.qsrc

@@ -27,10 +27,10 @@ if $ARGS[0]='start':
 		act 'BDSM-club':gt'BDSM_Club','start'
 	end
 	
-	if owned_property['matryona_mansion'] = 0:
+	if accessible_property['matryona_mansion'] = 0:
 		'There is a vacant piece of land for sale where a large mansion could be constructed.'
 		act 'Visit the land for sale': minut += 10 & gt 'city_mansion_entrance'
-	elseif owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') < 3:
+	elseif accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') < 3:
 		'You mansion is partially built near here.'
 		act 'Visit your mansion': minut += 10 & gt 'city_mansion_entrance'
 	else

+ 3 - 3
locations/dachain.qsrc

@@ -15,7 +15,7 @@ if $args[0] = 'start':
 	*clr & cla
 	gs 'stat'
 	'<center><b><font color="maroon">Cottage</font></b></center>'
-	if owned_property['village_cottage'] = 2 and owned_property['village_cottage-renovated'] = 1:
+	if accessible_property['village_cottage'] = 2 and accessible_property['village_cottage-renovated'] = 1:
 		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom2.jpg"></center>'
 	else
 		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom1.jpg"></center>'
@@ -78,7 +78,7 @@ if $args[0] = 'dachakit':
 	gs 'kit_din'
 	gs 'stat'
 	'<center><b><font color="maroon">Cottage Kitchen</font></b></center>'
-	if owned_property['village_cottage'] = 2 and owned_property['village_cottage-renovated'] = 1:
+	if accessible_property['village_cottage'] = 2 and accessible_property['village_cottage-renovated'] = 1:
 		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachakit2.jpg"></center>'
 	else
 		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachakit1.jpg"></center>'
@@ -158,7 +158,7 @@ if $args[0] = 'dachabath':
 	*clr & cla
 	gs 'stat'
 	'<center><b><font color="maroon">Cottage Bathroom</font></b></center>'
-	if owned_property['village_cottage'] = 2 and owned_property['village_cottage-renovated'] = 1:
+	if accessible_property['village_cottage'] = 2 and accessible_property['village_cottage-renovated'] = 1:
 		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachavan2.jpg"></center>'
 	else
 		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachavan1.jpg"></center>'

+ 1 - 1
locations/dachi.qsrc

@@ -24,7 +24,7 @@ end
 
 act 'Go to the highway':minut += 15 & nroad = 5 & gt 'road'
 
-if owned_property['village_cottage'] = 2:
+if accessible_property['village_cottage'] = 2:
 	'Enter <a href="exec:gt ''dachamy'', ''start''">your yard</a>.'
 	'Across the street from your cottage is another <a href="exec:gt ''etoexhib'', ''pos8''">cottage</a> almost identical to yours.'
 	if hour = meethour:

+ 9 - 9
locations/dina.qsrc

@@ -2,9 +2,9 @@
 
 $brodila = {
 	sexpartkno = 0
-	if owned_property['city_apartment'] > 0:
+	if accessible_property['city_apartment'] > 0:
 		gt'korr','start'
-	elseif owned_property['old_town_apartment'] = 1:
+	elseif accessible_property['old_town_apartment'] = 1:
 		gt'korr2x','start'
 	else
 		gt'city_residential', 'start'
@@ -12,9 +12,9 @@ $brodila = {
 }
 
 $brodilr = {
-	if mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4:
+	if mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4:
 		gt 'pav_residential'
-	elseif owned_property['old_town_apartment'] = 1:
+	elseif accessible_property['old_town_apartment'] = 1:
 		gt'liames'
 	else
 		gt'city_residential','start'
@@ -22,9 +22,9 @@ $brodilr = {
 }
 
 $brodilk = {
-	if owned_property['city_apartment'] > 0:
+	if accessible_property['city_apartment'] > 0:
 		gt'kuhr','start'
-	elseif owned_property['old_town_apartment']= 1:
+	elseif accessible_property['old_town_apartment']= 1:
 		gt'kuhr2x','start'
 	else
 		gt'city_residential', 'start'
@@ -32,11 +32,11 @@ $brodilk = {
 }
 
 $brodils = {
-	if owned_property['city_apartment'] > 0:
+	if accessible_property['city_apartment'] > 0:
 		gt'sitr','start'
-	elseif owned_property['old_town_apartment'] = 1:
+	elseif accessible_property['old_town_apartment'] = 1:
 		gt'sitr2x','start'
-	elseif mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4:
+	elseif mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4:
 		gt 'sitrPar'
 	else
 		gt'city_residential', 'start'

+ 1 - 1
locations/dvor.qsrc

@@ -29,7 +29,7 @@ if psi1day =1 and pavserpsiday ! daystart:
     act 'Enter the house':gt'koncepod1','krr2x'
 end
 
-!if owned_property['city_apartment'] = 3: act '<b>Enter the house</b>':gt 'koncepod'
+!if accessible_property['city_apartment'] = 3: act '<b>Enter the house</b>':gt 'koncepod'
 !end
 
 --- dvor ---------------------------------

+ 1 - 1
locations/food_menu.qsrc

@@ -71,7 +71,7 @@ elseif $loc = 'gkafe':
 	*nl
 	'<center><img <<$set_imgh>> src="images/shared/menus/borislav.jpg"</center><br>'
 	!'<center><img <<$set_imgh>> src="images/shared/drinks/cafedrinks.jpg"</center><br>'
-	if mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4:
+	if mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4:
 		$_eat['0,name'] = 'Vegetarian Piroshki'
 		$_eat['0,type'] = 'pirosh'
 		$_eat['0,price'] = 'Free'

+ 2 - 2
locations/gadbana.qsrc

@@ -118,12 +118,12 @@ if mira_guest = 0:
 	end
 	*nl
 
-	if shampoo > 0 or (locat['Fam_inGad'] = 1 and owned_property['parents_home'] = 4):
+	if shampoo > 0 or (locat['Fam_inGad'] = 1 and accessible_property['parents_home'] = 4):
 		act 'Wash your body (0:25)':
 			*clr & cla
 			menu_off = 1
 			minut += 25
-			if locat['Fam_inGad'] = 1 and owned_property['parents_home'] = 4: noShampoo = 1
+			if locat['Fam_inGad'] = 1 and accessible_property['parents_home'] = 4: noShampoo = 1
 			dynamic $showerdin
 			if frost > 0:frost = 0
 			!!gs 'clothing', 'strip', 'gadbana'

+ 1 - 1
locations/gadhouse.qsrc

@@ -1597,7 +1597,7 @@ if $ARGS[0] = 'family_trip':
 
 		gs 'mother', 'check_workout'
 
-		if gadstay_day ! daystart and owned_property['parents_home'] = 4:
+		if gadstay_day ! daystart and accessible_property['parents_home'] = 4:
 			if week = 7:
 				if hour = 20:
 					locat['Fam_month_inGad'] = month

+ 4 - 4
locations/gkafe.qsrc

@@ -76,15 +76,15 @@ if $ARGS[0] = '':
 
 			if mid($start_type,1,2) = 'sg':
 				if SchoolBlock = 0:
-					if owned_property['parents_home'] = 4: 
+					if accessible_property['parents_home'] = 4: 
 						'Since your <<$npc_nickname[''A29'']>> works here, you can eat-in for free.'
-					elseif owned_property['parents_home'] = 0:
+					elseif accessible_property['parents_home'] = 0:
 						'Since you left home, you can no longer eat here for free.'
 					end
 				else
-					if owned_property['parents_home'] = 4:
+					if accessible_property['parents_home'] = 4:
 						'Since you got kicked out of school, you can no longer eat here for free. Your <<$npc_nickname[''A29'']>> wants you to earn a living.'
-					elseif owned_property['parents_home'] = 0:
+					elseif accessible_property['parents_home'] = 0:
 						'Since you were expelled from school and left home, you can no longer eat here for free.'
 					end
 				end

+ 2 - 2
locations/gschool_grounds.qsrc

@@ -86,7 +86,7 @@ if $ARGS[0] = 'main':
 			kanikuli = 7
 			gs 'stat'
 
-			if owned_property['parents_home'] = 0:
+			if accessible_property['parents_home'] = 0:
 				'Everyone from your year is assembled in the auditorium of the school. Your teachers are standing on a platform in front of several rows of chairs where you and your classmates are sitting. Some parents and siblings are sitting in the back rows. Nobody from your family showed up.'
 			else
 				'Everyone from your year is assembled in the auditorium of the school. Your teachers are standing on a platform in front of several rows of chairs where you and your classmates are sitting. Some parents and siblings are sitting in the back rows. You turn your head and see your mother and your brother sitting among them.'
@@ -96,7 +96,7 @@ if $ARGS[0] = 'main':
 
 			if class['school_grade_average'] >= 90:
 				'You go up to the podium. As the Principal shakes your hand she announces "As every year I''d like to honor our best student of the year. Miss <<$pcs_lastname>> here performed exceptionally well in her studies and I think that deserves some recognition." She starts applauding and the auditorium quickly joins in.'
-				if owned_property['parents_home'] = 4: 'As you return to your place you see your mother smiling brightly.'
+				if accessible_property['parents_home'] = 4: 'As you return to your place you see your mother smiling brightly.'
 			elseif class['school_grade_average'] >= 70:
 				'You go up to the podium. The Principal shakes your hand and gives you your diploma. "Well done, Miss <<$pcs_lastname>>!" she says before you return to your place.'
 			else

+ 1 - 1
locations/gschool_lunch.qsrc

@@ -86,7 +86,7 @@ if $ARGS[0] = 'cafeteria':
 		act 'Continue': gt 'gschool_lunch', 'break'
 	end
 
-	if owned_property['parents_home'] = 4:
+	if accessible_property['parents_home'] = 4:
 		act 'Eat bagged lunch':
 			cla
 			menu_off = 1

+ 1 - 1
locations/home_activity.qsrc

@@ -37,7 +37,7 @@ if $ARGS[0] = 'vomiting_images':
 		$home_activity['vomit_exit'] = 'vanrPar'
 	elseif at_home = 3:
 		!! location = 'My cottage in the cooperative farm'
-		if owned_property['village_cottage-renovated'] = 1:
+		if accessible_property['village_cottage-renovated'] = 1:
 			$home_activity['vomit_bedroom'] = '<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom2.jpg"></center>'
 			$home_activity['vomit_bathroom'] = '<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom2.jpg"></center>'
 		else

+ 206 - 357
locations/homes_properties.qsrc

@@ -454,461 +454,310 @@ end
 !! ARGS[4]:renovation status - optional
 !!			0: not renovated
 !!			1: fully renovated
-if $ARGS[0] = 'set_ownership':
+if $ARGS[0] = 'set_access':
 	if $ARGS[1] = '':
-		$prop_code = $home_name[$loc]
+		$propcode = $home_name[$loc]
 	else
-		$prop_code = $home_name[$ARGS[1]]
+		$propcode = $home_name[$ARGS[1]]
 	end
-	orig_status_code = owned_property[$prop_code]
-	new_status_code = $ARGS[2]
-	if ARGS[2] = 1 and $property['rental'] = 0: new_status_code = 4
-	
+	orig_status_code = accessible_property[$propcode]
+	new_status_code = ARGS[2]
+
 	if orig_status_code ! new_status_code:
-		gs 'homes_properties', 'get_property_attr', $prop_code		
-		
-		$owned_property[$prop_code] = $prop_code
-		owned_property['<<$prop_code>>-rent'] = property['rent']
-		owned_property['<<$prop_code>>-display'] = $property['display']
-		owned_property['<<$prop_code>>-name'] = $property['name']
-		owned_property[$prop_code] = new_status_code
+		if $accessible_property[$propcode] = '' or accessible_property['<<$propcode>>-display'] = '' or accessible_property['<<$propcode>>-name']:
+			gs 'homes_properties', 'get_property_attr', $propcode		
+			if ARGS[2] = 1 and property['rental'] = 0: new_status_code = 4
+
+			accessible_property[$propcode] = new_status_code			
+			$accessible_property[$propcode] = $propcode
+			$accessible_property['<<$propcode>>-display'] = $property['display']
+			$accessible_property['<<$propcode>>-name'] = $property['name']
+			accessible_property['<<$propcode>>-rent'] = property['rent']
 			
+			if $property['type'] = 'permanent_residence' or $property['type'] = 'temporary_residence': accessible_property['<<$propcode>>-is-home'] = 1
+		end
+
 		if $property['contstruction_needed'] = 1:
-			owned_property[$prop_code+'-construction-status'] = ARGS[3]
+			accessible_property[$propcode+'-construction-status'] = ARGS[3]
 		else
-			owned_property[$prop_code+'-construction-status'] = 2
+			accessible_property[$propcode+'-construction-status'] = 2
 		end
-		owned_property[$prop_code+'-renovated'] = ARGS[4]
+		accessible_property[$propcode+'-renovated'] = ARGS[4]
 
 		!! Setting status dependent variables
-		if owned_property[$prop_code] = 0:
+		!! Property is unaccessible
+		if accessible_property[$propcode] = 0:
 			!! If this was the current home then killing it
-			if $home['current'] = $prop_code: killvar '$home'
-			!! Resetting rent days just to be sure
-			owned_property['<<$prop_code>>-days-left'] = -1
+			if $home['current'] = $propcode: killvar '$home'
 			
 			!! Updating home counts
 			!! NOTE: Valid transitions: 1 -> 0, 2 -> 0, 4 -> 0
-			if $property['type'] = 'permanent_residence' or $property['type'] = 'temporary_residence':
-				if orig_status_code = 1: owned_property['rental_home_count'] -= 1
-				if orig_status_code = 2: owned_property['owned_home_count'] -= 1
-				if owned_property['<<$prop_code>>-construction-status'] = 2: owned_property['furnishable_home_count'] -= 1
-				owned_property['accessible_home_count'] -= 1
+			if accessible_property['<<$propcode>>-is-home'] = 1:
+				if orig_status_code = 1: accessible_property['rental_home_count'] -= 1
+				if orig_status_code = 2: accessible_property['owned_home_count'] -= 1
+				if accessible_property['<<$propcode>>-construction-status'] = 2: accessible_property['furnishable_home_count'] -= 1
+				accessible_property['accessible_home_count'] -= 1
 			end
-		elseif owned_property[$prop_code] = 1:
-			!! Setting rent days
-			owned_property[$prop_code+'-days-left'] += func('homes_properties', 'rent_due_date')
-			
+		!! Property is rented
+		elseif accessible_property[$propcode] = 1:
 			!! Updating home counts
 			!! NOTE: Only valid transition is 0 -> 1
-			if $property['type'] = 'permanent_residence' or $property['type'] = 'temporary_residence':
-				owned_property['rental_home_count']+-= 1
-				owned_property['accessible_home_count'] += 1
-				if owned_property['<<$prop_code>>-construction-status'] = 2: owned_property['furnishable_home_count'] +=1 
+			if accessible_property['<<$propcode>>-is-home'] = 1:
+				accessible_property['rental_home_count'] += 1
+				accessible_property['accessible_home_count'] += 1
+				if accessible_property['<<$propcode>>-construction-status'] = 2: accessible_property['furnishable_home_count'] +=1 
 			end
-		elseif owned_property[$prop_code] = 2:
-			!! Resetting rent days left just in case
-			owned_property[$prop_code+'-days-left'] = -1
-			
+		!! Property is owned
+		elseif accessible_property[$propcode] = 2:
 			!! Updating home counts
 			!! NOTE: Valid transitions: 0 -> 2, 1 -> 2, 3-> 2
-			if $property['type'] = 'permanent_residence' or $property['type'] = 'temporary_residence':
-			if orig_status_code = 0: 
-				owned_property['accessible_home_count'] += 1
-				if owned_property[$prop_code+'-construction-status'] = 2: owned_property['furnishable_home_count'] += 1
-			end
-			if orig_status_code = 1: owned_property['rental_home_count'] -= 1
-			if orig_status_code = 3: 
-				owned_property['tenant_home_count'] -= 1 
-				if owned_property[$prop_code+'-construction-status'] = 2: owned_property['furnishable_home_count'] += 1
+			if accessible_property['<<$propcode>>-is-home'] = 1:
+				if orig_status_code = 0: accessible_property['accessible_home_count'] += 1
+				if accessible_property[$propcode+'-construction-status'] = 2: accessible_property['furnishable_home_count'] += 1
+				if orig_status_code = 1: accessible_property['rental_home_count'] -= 1
+				if orig_status_code = 3: 
+					accessible_property['tenant_home_count'] -= 1 
+					accessible_property['<<$propcode>>-tenant-day'] = -1
+					accessible_property['<<$propcode>>-tenant-month'] = -1	
+					if accessible_property['<<$propcode>>-construction-status'] = 2: accessible_property['furnishable_home_count'] += 1
+				end
+				accessible_property['owned_home_count'] += 1
 			end
-			owned_property['owned_home_count'] += 1
-		elseif owned_property[$prop_code] = 3:
-			!! Resetting rent days left just in case
-			owned_property[$prop_code+'-days-left'] = -1
-			
+		!! Property has tenants
+		elseif accessible_property[$propcode] = 3:
 			!! Updating home counts
 			!! NOTE: Valid transitions: 2 -> 3
-			if $property['type'] = 'permanent_residence' or $property['type'] = 'temporary_residence':
-				owned_property['tenant_home_count'] += 1
-				owned_property['owned_home_count'] -= 1
-				owned_property['accessible_home_count'] -= 1
+			if accessible_property['<<$propcode>>-is-home'] = 1:
+				accessible_property['tenant_home_count'] += 1
+				accessible_property['owned_home_count'] -= 1
+				accessible_property['accessible_home_count'] -= 1
+				if accessible_property[$propcode+'-construction-status'] = 2: accessible_property['furnishable_home_count'] -= 1
 			end
-		elseif owned_property[$prop_code] = 4:
-			!! Resetting rent days left just in case
-			owned_property[$prop_code+'-days-left'] = -1
-			
+		!! Property is just accessible
+		elseif accessible_property[$propcode] = 4:
 			!! Updating home counts
 			!! NOTE: Valid transitions: 0 -> 4
-			if $property['type'] = 'permanent_residence' or $property['type'] = 'temporary_residence':
-				owned_property['accessible_home_count'] += 1
+			if accessible_property['<<$propcode>>-is-home'] = 1:
+				accessible_property['accessible_home_count'] += 1
 			end
 		end
 		killvar 'property'
 	end
-
-	killvar 'orig_status_code'
-	killvar 'new_status_code'
+	killvar 'propcode' && killvar 'orig_status_code' && killvar 'new_status_code'
 end
 
-!! Returns the owned property values
-!! ARGS[1] - property code
-if $ARGS[0] = 'get_owned_property':
-	gs 'homes_properties', 'get_property_attr', $ARGS[1]
-	$result['code'] = $owned_property[$ARGS[1]]
-	'Code: <<$result[''code'']>>'
-	$result['name'] = $property['display']
-	'Name: <<$result[''name'']>>'
-	result['renovated'] = owned_property[$ARGS[1]+'renovated']
-	'Renovated: <<result[''renovated'']>>'
-	result['status'] = owned_property[$ARGS[1]]
-	'Status: <<result[''status'']>>'
-	result['construction_status'] = owned_property[$ARGS[1]+'-construction-status']
-	'Construction Status: <<result[''construction_status'']>>'
-	result['days_left'] = owned_property[$ARGS[1]+'-days-left']
-	'Days left: <<result[''days_left'']>>'
-	result['rent'] = $property['rent']
-	'Rent: <<result[''rent'']>>'
-
-	killvar 'property'
+!! $ARGS[1]: 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] = 'can_live_here':
+	if $ARGS[1] = '':
+		result = accessible_property[$home_name[$loc]] > 0 and func('homes_properties', 'property_construction_status', $home_name[$loc]) = 2
+	else
+		result = accessible_property[$home_name[$ARGS[1]]] > 0 and func('homes_properties', 'property_construction_status', $home_name[$loc]) = 2
+	end
 end
 
-
-!! Use it as a func() returns the list of property codes for the properties are homes and are owned
-!!
-!! ARGS[1] - optional, if 1 then the full list is returns, if 0 then homes are occupied by tenants are left out.
-if $ARGS[0] = 'get_owned_homes':
-	i = 0
-	j = 0
-	count = ARRSIZE('owned_property')
-	if count > 0: 
-		:countloop
-			gs 'homes_properties', 'get_property_attr', $owned_property[i]
-			if $property['type'] = 'permanent_residence' and (owned_property[i] = 2 or (owned_property[i] = 3 and $ARGS[1] = 1)): 
-				$result[j] = $property['code']
-				j += 1
-			end
-			i += 1
-			killvar 'property'
-		if i < count: jump 'countloop'
+!! $ARGS[1]: 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] = 'is_current_home':
+	if $ARGS[1] = '': 
+		result = $home['current'] = $home_name[$loc]
+	elseif $home_name[$ARGS[1]] ! '':
+		result = $home_name[$ARGS[1]]
+	else
+		result = 0
 	end
-	killvar 'count'
-	killvar 'i'
-	killvar 'j'
 end
 
-!! Use it as a func() returns the count of properties that are homes and are owned
-!!
-!! ARGS[1] - optional, if 1 then the full list is returns, if 0 then homes are occupied by tenants are left out.
-if $ARGS[0] = 'get_owned_homes_count':
-	
+!! $ARGS[1]: 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_home_name':
+	if $ARGS[1] = '': 
+		$result = $home_name[$loc]
+	elseif $home_name[$ARGS[1]] ! '':
+		$result = $home_name[$ARGS[1]]
+	else
+		$result = ''
+	end
 end
 
+!!---------------------------------------------------------
+!!  Home and Property Counts
+!!---------------------------------------------------------
+
 !! Returns the count of rented properties
 !!
 !! ARGS[1] - property type filter: 'home', 'business', 'all' or '' or missing
 if $ARGS[0] = 'get_rented_property_count':
-	if $ARGS[1] = 'home': result = owned_propeprty['rental_home_count']
-	if $ARGS[1] = 'business': result = owned_propeprty['rental_busiess_count']
-	if $ARGS[1] = 'all' or $ARGS[1] = '': result = owned_propeprty['rental_home_count'] + owned_propeprty['rental_busiess_count']
+	if $ARGS[1] = 'home': 
+		result = accessible_property['rental_home_count']
+	elseif $ARGS[1] = 'business': 
+		result = accessible_property['rental_business_count']
+	elseif $ARGS[1] = 'all' or $ARGS[1] = '': 
+		result = accessible_property['rental_home_count'] + accessible_property['rental_business_count']
+	end
 end
 
-!! $ARGS[1]: the location that will have the ownership
-!!			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
-if $ARGS[0] = 'property_status':
-	if $ARGS[1] = '':
-		result = owned_property[$home_name[$loc]]
-	else
-		result = owned_property[$home_name[$ARGS[1]]]
+!! Returns the count of rented properties
+!!
+!! ARGS[1] - property type filter: 'home', 'business', 'all' or '' or missing
+if $ARGS[0] = 'get_accessible_property_count':
+	if $ARGS[1] = 'home': 
+		result = accessible_property['accessible_home_count']
+	elseif $ARGS[1] = 'business': 
+		result = accessible_property['accessible_business_count']
+	elseif $ARGS[1] = 'all' or $ARGS[1] = '': 
+		result = accessible_property['accessible_home_count'] + accessible_property['accessible_business_count']
 	end
 end
 
 
+!!---------------------------------------------------------
+!!  Get Properties and their values
+!!---------------------------------------------------------
 
-!! Use it as a func() returns the list of property codes for rented properties that are homes
+!! Use it as `gs`, returns the rent related information for all rented homes
 !!
-!! Returns: rental_due, rental_days, rental_name ($property['display']), rental_code
+!! Returns: rental_amount, rental_days, $rental_name, $rental_code
 if $ARGS[0] = 'get_rented_homes':
 	i = 0
 	j = 0
-	count = ARRSIZE('owned_property')
+	count = ARRSIZE('accessible_property')
 	if count > 0: 
 		:countloop
-			gs 'homes_properties', 'get_property_attr', $owned_property[i]
-			if property['rental'] = 1 and owned_property[i] = 1: 
-				$result[j] = $property['code']
+			if $home_name[$accessible_property[i]] ! '' and accessible_property[i] = 1:
+				$rental_code[j] = $accessible_property[i]
+				$rental_name[j] = $accessible_property['<<$accessible_property[i]>>-display']
+				rental_days[j] = accessible_property['<<$accessible_property[i]>>-days-left']
+				rental_amount[j] = accessible_property['<<$accessible_property[i]>>-rent']
 				j += 1
 			end
 			i += 1
-			killvar 'property'
 		if i < count: jump 'countloop'
 	end
-	killvar 'count', 'i', 'j'
+	killvar 'count' && killvar 'i' && killvar 'j'
 end
 
-!! Use it as `gs` to create rent payment info
-!! Creates $rent_name, rent_due, rent_days
-if $ARGS[0] = 'rent_payment_info':
-	i = 0
-	j = 0
-	count = ARRSIZE('owned_property')
-	if count > 0: 
-		:countloop
-			gs 'homes_properties', 'get_property_attr', $owned_property[i]
-			if property['rental'] = 1 and owned_property[i] = 1: 
-				$rent_name[j] = $property['display']
-				$rent_code[j] = $property['code']
-				rent_due[j] = property['rent']
-				rent_days[j] = owned_property[$property['code']+'-days-left']
-				j += 1
-			end
-			i += 1
-			killvar 'property'
-		if i < count: jump 'countloop'
-	end
- 
-	killvar 'count'
-	killvar 'i'
-	killvar 'j'
-end
+!!---------------------------------------------------------
+!!  Give and block access to properties - use these if the 
+!!  property is not bought or rented.
+!!  Parents home, Meynold household, Grandparents house, etc.
+!!---------------------------------------------------------
 
-!! Use it as a func() returns the total count of properties that are homes and accessible
-if $ARGS[0] = 'get_accessible_count':
-	result = owned_property['accessible_home_count']
+!! $ARGS[1]: 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] = 'give_access':
+	if $ARGS[1] = '':
+		gs 'homes_properties', 'set_access', $home_name[$loc], 1
+	else
+		gs 'homes_properties', 'set_access', $home_name[$ARGS[1]], 1
+	end
 end
 
-!! Use it as a func() returns the total count of rented or woned properties that can be lived in a stuff can be bought for
-!! TV, Computer, etc. that checks for this to allow purchase
-if $ARGS[0] = 'get_count_of_furnishable_homes':
-	result = owned_property['furnishable_home_count']
+!! $ARGS[1]: 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] = 'block_access':
+	if $ARGS[1] = '':
+		gs 'homes_properties', 'set_access', $home_name[$loc], 0
+	else
+		gs 'homes_properties', 'set_access', $home_name[$ARGS[1]], 0
+	end
 end
 
+!!---------------------------------------------------------
+!!  Buy, rent out and sell properties
+!!---------------------------------------------------------
 
-if $ARGS[0] = 'properties_for_sale':
-	i = 0
-	j = 0
-	count = ARRSIZE('$home_name')
-	if count > 0:
-		:countloop
-			if control_array[$home_name[i]] = 0:				
-				control_array[$home_name[i]] = 1
-				gs 'homes_properties', 'get_property_attr', $home_name[i]
-				if owned_property[$home_name[i]] < 2 and $property['type'] = 'permanent_residence':					
-					$properties_for_sale_name[j] = $property['agency_display']
-					$properties_for_sale_code[j] = $property['code']
-					$properties_for_sale_price[j] = $property['price']
-					properties_for_sale_price[j] = property['price']
-					j += 1
-				end
-				killvar 'property'
-			end
-			i += 1
-		if i < count: jump 'countloop'
-	end
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+if $ARGS[0] = 'buy_property':
+	gs 'homes_properties', 'set_access',$ARGS[1], 2
 end
 
-!! A list of codes for the properties that can be rented.
-if $ARGS[0] = 'properties_for_rent':
-	i = 0
-	j = 0
-	count = ARRSIZE('$home_name')
-	if count > 0:
-		:countloop
-			if control_array[$home_name[i]] = 0:				
-				control_array[$home_name[i]] = 1
-				gs 'homes_properties', 'get_property_attr', $home_name[i]
-				if owned_property[$home_name[i]] = 0 and property['rental'] = 1 and owned_property[$home_name[i]] = 0:
-					$result[j] = $property['code']
-					j += 1
-				end
-				killvar 'property'
-			end
-			i += 1
-		if i < count: jump 'countloop'
-	end
-	killvar 'i', 'j'
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+if $ARGS[0] = 'sell_property':
+	gs 'homes_properties', 'set_access',$ARGS[1], 0
 end
 
-
-!! Given a location or property code,this will tell whether Sveta can live here
-!! Could owned, rented or just allowed to stay (parents home, Meynold household, etc.)
-!! Call it as `func('homes_properties', 'can_live_here')` 
-!! It returns 0 if the answer is NO and 1 or -1 if the answer is yes
-!!
-!! $ARGS[1] - A string to use for the check. 
-!!			  Accepted values:
-!!			  - A property code: 'city_apartment', 'village_cottage', etc.
-!!			  - A location: any value that can show up in $loc, e.g. 'bedrPar', 'mey_home', etc.
-!!			  - empty string: If the argument is not passed - or an empty string - it will use $loc for the check
-!!
-if $ARGS[0] = 'can_live_here':
-	if $ARGS[1] = '':
-		result = owned_property[$home_name[$loc]] > 0
-	else
-		result = owned_property[$home_name[$ARGS[1]]] > 0
-	end
+!! $ARGS[1] - the property code of the home that is rented to tenants
+!! ARGS[2] - the tenancy end day
+!! ARGS[3] - the tenancy end month
+if $ARGS[0] = 'tenants_move_in':
+	gs 'homes_properties', 'set_ownership', $ARGS[1], 3
+	owned_property['<<$ARGS[1]>>-tenant-day'] = ARGS[2]
+	owned_property['<<$ARGS[1]>>-tenant-month'] = ARGS[3]
 end
 
-!! Given a location, it will tell whether the location is the current home
-!! Call it as `func('homes_properties', 'is_current_home')` 
-!! It returns 0 if the location is not the current home otherwise 1 or -1 
-!!
-!! $ARGS[1] - A string to use for the check. 
-!!			  Accepted values:
-!!			  - A property code: 'city_apartment', 'village_cottage', etc.
-!!			  - A location: any value that can show up in $loc, e.g. 'bedrPar', 'mey_home', etc.
-!!			  - empty string: If the argument is not passed - or an empty string - it will use $loc for the check
-!!
-if $ARGS[0] = 'is_current_home':
-	if $ARGS[1] = '': 
-		result = $home['current'] = $home_name[$loc]
-	elseif $home_name[$ARGS[1]] ! '':
-		$result = $home_name[$ARGS[1]]
-	else
-		result = 0
-	end
-end
+!!---------------------------------------------------------
+!!  Create, Update and Cancel Rents and related values
+!!---------------------------------------------------------
 
-!! Given a location it returns the home name ($property['code']).
-!! It can then be checked against current home, or used as the property code where 
-!! originally the $home_name variable was used.
-!! Call this as `func('homes_properties', 'get_home_name', $ARGS[1])` 
-!!
-!! $ARGS[1] - the location to be checked
-!!			  Accepted values:
-!!			  - a property code - 'city_apartment', etc.
-!!			  - a location - a value that could show up in $loc, like 'bedr' or 'mey_home'
-!!			  - empty string - in this case the actual $loc value will be used
-if $ARGS[0] = 'get_home_name':
-	if $ARGS[1] = '': 
-		$result = $home['current'] = $home_name[$loc]
-	elseif $home_name[$ARGS[1]] ! '':
-		$result = $home_name[$ARGS[1]]
-	else
-		$result = ''
-	end
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+!! ARGS[2] = the number of days the rent is paid for, optional
+if $ARGS[0] = 'rent_property':
+	gs 'homes_properties', 'set_access', $ARGS[1], 1
+	gs 'homes_properties', 'add_rent_days', $ARGS[1], $ARGS[2]
 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 a 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 
-$ARGS[2] 	the location that is being replaced - if it is a new location, leave this as an empty string
-$ARGS[3] 	the name of the home if it is a completely new location - otherwise pass '' or don''t pass it			}
-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]]
-	else
-		$home_name[$ARGS[1]] = $ARGS[3]
-	end
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+if $ARGS[0] = 'cancel_rent':
+	gs 'homes_properties', 'set_access', $ARGS[1], 0
+	gs 'homes_properties', 'set_rent_days', $ARGS[1], -1
 end
 
-!! $ARGS[1] = the code name of the property, e.g. 'city_apartment' 
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
 !! ARGS[2] - the number of days to add.
 !!           if the value is 0 then the code will add the number of days that is there in the month
 if $ARGS[0] = 'add_rent_days':
 	if ARGS[2] = 0:
-		owned_property[$ARGS[1]+'-days-left'] += func( 'homes_properties', 'rent_due_date')
+		accessible_property['<<$ARGS[1]>>-days-left'] += func( 'homes_properties', 'rent_due_date')
 	else
-		owned_property[$ARGS[1]+'-days-left'] += ARGS[2]
+		accessible_property['<<$ARGS[1]>>-days-left'] += ARGS[2]
 	end
 end
 
-!! $ARGS[1] = the code name of the property, e.g. 'city_apartment' 
-!! ARGS[2] - the number of days to set to.
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+!! ARGS[2] - the number of days to set to - it's an absolute value
 if $ARGS[0] = 'set_rent_days':
-	owned_property[$ARGS[1]+'-days-left'] = ARGS[2]
+	accessible_property['<<$ARGS[1]>>-days-left'] = ARGS[2]
 end
 
-!! Call it as a func()
-!! $ARGS[1] = the code name of the property, e.g. 'city_apartment' 
-if $ARGS[0] = 'get_rent_days':
-	result = owned_property[$ARGS[1]+'-days-left']
-end
 
 !! Call it as a func()
-!! $ARGS[1] = the code name of the property, e.g. 'city_apartment' 
-if $ARGS[0] = 'property_construction_status':
-	result = owned_property[$ARGS[1]+'-construction-status']
-end
-
-!! $ARGS[1] = the code name of the property, e.g. 'city_apartment' 
-if $ARGS[0] = 'progress_construction_status':
-	if owned_property[$ARGS[1]+'-construction-status'] < 2: owned_property[$ARGS[1]+'-construction-status'] += 1
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+if $ARGS[0] = 'get_rent_days':
+	result = accessible_property['<<$ARGS[1]>>-days-left']
 end
 
 !! Call it as a func()
-!! $ARGS[1] = the code name of the property, e.g. 'city_apartment' 
-if $ARGS[0] = 'property_renovated':
-	result = owned_property[$ARGS[1]+'-renovated']
-end
-
-
-!! Returns a simple string representation of the status
-!! $ARGS[1]: the code name of the property, e.g. 'city_apartment' 
-if $ARGS[0] = 'property_status_to_text':
-	if ARGS[1] = 0: 
-		result = 'no access'
-	elseif ARGS[1] = 1: 
-		result = 'rented'
-	elseif ARGS[1] = 2: 
-		result = 'owned'
-	elseif ARGS[1] = 3: 
-		result = 'tenants'		
-	elseif ARGS[1] = 4:
-		result = 'has access'
-	else
-		result = 'invalid status'
-	end
+!! $ARGS[1] = the code name of the property, e.g. 'city_apartment'
+if $ARGS[0] = 'get_rent_amount':
+	result = accessible_property['<<$ARGS[1]>>-rent']
 end
 
-!! Returns a string that can be displayed in a longer text.
-!! For example 'You have tenants living in your city apartment.'
-!! ARGS[1]: The ownership type
-if $ARGS[0] = 'property_status_to_display_text':
-	if ARGS[1] = 0: 
-		result = 'You have no access to '
-	elseif ARGS[1] = 1: 
-		result = 'You are renting '
-	elseif ARGS[1] = 2: 
-		result = 'You own '
-	elseif ARGS[1] = 3: 
-		result = 'You have tenants living in '		
-	else
-		result = 'invalid status'
-	end
-end
-
-!! Returns the monthly rent the property has - both as a number and as a string (result and $result)
-!! Call as a func()
-!! ARGS[1] - the code (not display) name of the property, e.g. city_apartment
-if $ARGS[0] = 'get_rent':
-	result = prop_rent[$ARGS[1]]
-end
-
-!! Returns the price of the property - both as a number and as a string (result and $result)
-!! Call as a func() 
-!! ARGS[1] - the code (not display) name of the property, e.g. city_apartment
-if $ARGS[0] = 'get_price':
-	result = prop_price[$ARGS[0]]
-end
 
 !! Returns the rent due date for the given month. Call as a func()
 if $ARGS[0] = 'rent_due_date':

+ 1 - 1
locations/hookup_after.qsrc

@@ -2181,7 +2181,7 @@ if $ARGS[0] = 'sleep':
 		gs 'sleep', 'simple'
 	end	
 	
-	if mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4: sveta_punishment['no_come_home'] = 1
+	if mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4: sveta_punishment['no_come_home'] = 1
 	gt 'hookup_morning', 'morning'
 end
 --- hookup_after ---------------------------------

+ 10 - 10
locations/housing.qsrc

@@ -75,19 +75,19 @@ end
 
 if $ARGS[0] = 'util':
 	killvar 'hcount_util'
-	if owned_property['city_apartment'] = 1: hcount_util += 1
-	if owned_property['village_cottage'] > 1: hcount_util += 1
-	if owned_property['old_town_apartment'] > 0: hcount_util += 1
-	if owned_property['matryona_mansion'] > 2: hcount_util += 1
-	if owned_property['city_house'] = 1: hcount_util += 1
+	if accessible_property['city_apartment'] = 1: hcount_util += 1
+	if accessible_property['village_cottage'] > 1: hcount_util += 1
+	if accessible_property['old_town_apartment'] > 0: hcount_util += 1
+	if accessible_property['matryona_mansion'] > 2: hcount_util += 1
+	if accessible_property['city_house'] = 1: hcount_util += 1
 end
 
 if $ARGS[0] = 'cable':
-	if owned_property['city_apartment'] = 1: hcount_cable += 1
-	!if owned_property['village_cottage'] > 1: hcount_cable += 1
-	if owned_property['old_town_apartment'] > 0: hcount_cable += 1
-	if owned_property['matryona_mansion'] > 2: hcount_cable += 1
-	if owned_property['city_house'] = 1: hcount_cable += 1
+	if accessible_property['city_apartment'] = 1: hcount_cable += 1
+	!if accessible_property['village_cottage'] > 1: hcount_cable += 1
+	if accessible_property['old_town_apartment'] > 0: hcount_cable += 1
+	if accessible_property['matryona_mansion'] > 2: hcount_cable += 1
+	if accessible_property['city_house'] = 1: hcount_cable += 1
 end
 
 --- housing ---------------------------------

+ 1 - 1
locations/internet_mobile.qsrc

@@ -90,7 +90,7 @@ if $ARGS[0] = 'check_subscription_actions':
 	if count > 0:
 		:propertyloop
             gs 'homes_properties', 'get_property_attr', $property_list[i]
-			if owned_property[$property_list[i]] ! 0 and owned_property[$property_list[i]] ! 3:
+			if accessible_property[$property_list[i]] ! 0 and accessible_property[$property_list[i]] ! 3:
 				if property['internet_enabled'] = 1 and subscription[$property['code']] = 1:
                     if subscription[$property['code']+'-date'] = day: gs 'internet_mobile', 'renew_subscription', $property['code']
                     if subscription[$property['code']+'-suspension_month'] = month and subscription[$property['code']+'-suspension_day'] >= day: gs 'internet_mobile', 'renew_subscription', $property['code']

+ 11 - 11
locations/journal.qsrc

@@ -82,17 +82,17 @@ if $ARGS[0] = 'housingtab':
 	*nl
 	constructionstatus = func('homes_properties', 'property_construction_status', 'matryona_mansion')
 	if pavSharedAptEnabled = 1:'You share an apartment with three others in Pavlovsk. Your bills are paid by the other tenants in exchange for your house services'
-	if owned_property['city_apartment'] = 1:'You rent a two room apartment in the city residential area. Your rent for the apartment is subtracted automatically in sum of <<home_rent[1]>> <b>₽</b> us electric bill on 25th of each month. You are currently paid up for <b><<ArendHouseSL>></b> days'
-	if owned_property['city_apartment'] = 2:'You own a two room apartment in the city residential area. Your utility bills are due on the 25th of each month.'
-	if owned_property['city_apartment'] = 3:'You own a two room apartment in the city residential area. It''s currently occupied by your tenants.'
-	if owned_property['parents_home'] = 4:'You live with your parents and siblings in a two room apartment in Pavlovsk.'
-	if owned_property['village_cottage']= 2 :'You own a small holiday cottage with an adjacent allotment in the communal village.'
-	if owned_property['old_town_apartment'] = 1:'You rent a two room apartment in Pushkin. Your rent for the apartment is subtracted automatically in the sum of <<home_rent[4]>> <b>₽</b> us electric bill on the 25th of each month. You are currently paid up for <b><<ArendHouseSL4>></b> days'
-	if owned_property['matryona_mansion'] = 2 and constructionstatus = 0:'You own a vacant block in the city suburbs. Your utility bills are due on the 25th of each month.'
-	if owned_property['matryona_mansion'] = 2 and constructionstatus = 1:'You own a plot of land in the city suburbs upon which you are building a house. Your utility bills are due on the 25th of each month.'
-	if owned_property['matryona_mansion'] = 2 and constructionstatus = 2:'You own an impressive mansion in the city suburbs. Your utility bills are due on the 25th of each month.'
-	if owned_property['city_house'] = 2:'You own a nice house on the edge of the city residential district. Your utility bills are due on the 25th of each month.'
-	if owned_property['meynold_household'] = 4:'You live with Vicky, Katja and Tamara Meynold. You have your own room and get an allowance based on helping out around the house and/or studying with Tamara.'
+	if accessible_property['city_apartment'] = 1:'You rent a two room apartment in the city residential area. Your rent for the apartment is subtracted automatically in sum of <<home_rent[1]>> <b>₽</b> us electric bill on 25th of each month. You are currently paid up for <b><<ArendHouseSL>></b> days'
+	if accessible_property['city_apartment'] = 2:'You own a two room apartment in the city residential area. Your utility bills are due on the 25th of each month.'
+	if accessible_property['city_apartment'] = 3:'You own a two room apartment in the city residential area. It''s currently occupied by your tenants.'
+	if accessible_property['parents_home'] = 4:'You live with your parents and siblings in a two room apartment in Pavlovsk.'
+	if accessible_property['village_cottage']= 2 :'You own a small holiday cottage with an adjacent allotment in the communal village.'
+	if accessible_property['old_town_apartment'] = 1:'You rent a two room apartment in Pushkin. Your rent for the apartment is subtracted automatically in the sum of <<home_rent[4]>> <b>₽</b> us electric bill on the 25th of each month. You are currently paid up for <b><<ArendHouseSL4>></b> days'
+	if accessible_property['matryona_mansion'] = 2 and constructionstatus = 0:'You own a vacant block in the city suburbs. Your utility bills are due on the 25th of each month.'
+	if accessible_property['matryona_mansion'] = 2 and constructionstatus = 1:'You own a plot of land in the city suburbs upon which you are building a house. Your utility bills are due on the 25th of each month.'
+	if accessible_property['matryona_mansion'] = 2 and constructionstatus = 2:'You own an impressive mansion in the city suburbs. Your utility bills are due on the 25th of each month.'
+	if accessible_property['city_house'] = 2:'You own a nice house on the edge of the city residential district. Your utility bills are due on the 25th of each month.'
+	if accessible_property['meynold_household'] = 4:'You live with Vicky, Katja and Tamara Meynold. You have your own room and get an allowance based on helping out around the house and/or studying with Tamara.'
 	*nl
 	if car > 0:
 		'<center><h2>Car</h2></center>'

+ 1 - 1
locations/liames.qsrc

@@ -57,7 +57,7 @@ else
 	'The old theatre that houses a burlesque club is closed now. It is open every day 18:00 - 23:00'
 end
 
-if owned_property['old_town_apartment'] = 1: act '<b>Go home</b>':gt'korr2x'
+if accessible_property['old_town_apartment'] = 1: act '<b>Go home</b>':gt'korr2x'
 
 act 'Walk to the Town Center (0:05)':minut += 5 & gt 'liam'
 

+ 1 - 1
locations/lug.qsrc

@@ -32,7 +32,7 @@ if $ARGS[0] = 'start':
 	end
 
 
-	if pavserhom = 0 and psiha = 0 and owned_property['city_apartment'] = 0:
+	if pavserhom = 0 and psiha = 0 and accessible_property['city_apartment'] = 0:
 		temp = RAND(1,100)
 		if temp >= 90:
 			pcs_horny += 20

+ 1 - 1
locations/parks.qsrc

@@ -37,7 +37,7 @@ if $ARGS[0] = 'start':
 	gs 'park_walkevents', 'run'
 
 	if hour >= 20 or hour < 6 :
-		if owned_property['old_town_apartment'] = 0:
+		if accessible_property['old_town_apartment'] = 0:
 			!nowhere to live in town
 			'It''s quite dark now, and you have no where to stay nearby. Maybe you should try to sleep on a bench?'
 		else

+ 2 - 2
locations/pav_clinic.qsrc

@@ -119,7 +119,7 @@ if $ARGS[0] = '':
 				if Gspravka < 10 and ginrand = 0:
 					'When you clean the floor of the gynaecologist''s examination room, he leaves the room to let you do your work in peace. You''re alone now.'
 
-					if pcs_vag > 0 and motherKnowSpravka = 0 and owned_property['parents_home'] = 4:
+					if pcs_vag > 0 and motherKnowSpravka = 0 and accessible_property['parents_home'] = 4:
 						act 'Forge a referral to give to your mother':
 							*clr & cla
 							Gspravka = 30
@@ -696,7 +696,7 @@ if $ARGS[0] = '':
 				end
 			end
 		end
-		if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0 and Gspravka < 3 and motherKnowSpravka = 0 and owned_property['parents_home'] = 4: act 'Go to the gynaecologist for a referral': gt 'pav_clinic', 'referral'
+		if mid($start_type,1,2) = 'sg' and SchoolAtestat = 0 and Gspravka < 3 and motherKnowSpravka = 0 and accessible_property['parents_home'] = 4: act 'Go to the gynaecologist for a referral': gt 'pav_clinic', 'referral'
 	else
 		'The clinic is closed. It''s open every day between 06:00 and 21:00.'
 	end

+ 1 - 1
locations/pav_commercial.qsrc

@@ -61,7 +61,7 @@ gs'street_event','pav_commercial', 'extras'
 if ((month = 9 and day > 16) or month >= 10) and (AlbinaQW['StarletsShutDown'] = 0 or AlbinaQW['Chernov'] = 0): 'You can see election posters on the walls all over town. They say: "Vote for Boris Barlovsky!" Wait a minute... isn''t that Albina''s father?'
 if AlbinaQW['StarletsJoined'] > 0 and AlbinaQW['StarletsShutDown'] = 0 and npc_pregtalk['A23'] = 0 and AlbinaQW['Chernov'] = 0 and ((month = 11 and day > 18) or month = 12) and hour >= 14:gt 'albina_election_events', 'start'
 
-if mid($start_type,1,2) = 'sg' and hour < 4 and motherWorry = 0 and SchoolAtestat = 0 and age < 18 and owned_property['parents_home'] = 4:
+if mid($start_type,1,2) = 'sg' and hour < 4 and motherWorry = 0 and SchoolAtestat = 0 and age < 18 and accessible_property['parents_home'] = 4:
 	motherWorry = 1
 end
 

+ 5 - 5
locations/pav_complex.qsrc

@@ -55,7 +55,7 @@ if $ARGS[0] = 'start':
 		end
 	end
 
-	if mid($start_type,1,2) = 'sg' and hour < 5 and motherWorry = 0 and SchoolAtestat = 0 and age < 18 and owned_property['parents_home'] = 4 and locat['Fam_inGad'] = 0: motherWorry = 1
+	if mid($start_type,1,2) = 'sg' and hour < 5 and motherWorry = 0 and SchoolAtestat = 0 and age < 18 and accessible_property['parents_home'] = 4 and locat['Fam_inGad'] = 0: motherWorry = 1
 
 	if ((minut + 60*(hour+daystart*24) - pavcomplexevent_time) > 60) or ((daystart+1)*1440 < pavcomplexevent_time):
 		if hour >= 8 and hour <= 20 and rand (0,2) = 0: 
@@ -79,7 +79,7 @@ if $ARGS[0] = 'start':
 		act 'Join Rex in his car':gt 'rex_events','avto2'
 	end
 
-	'Located in the old part of Pavlovsk, these Soviet era apartment blocks are the Five Eight Estate. Your family''s apartment is on the second floor of the nearest building'+iif(owned_property['parents_home'] = 4, '.', ', but you are no longer welcome there.')
+	'Located in the old part of Pavlovsk, these Soviet era apartment blocks are the Five Eight Estate. Your family''s apartment is on the second floor of the nearest building'+iif(accessible_property['parents_home'] = 4, '.', ', but you are no longer welcome there.')
 	*nl
 	'Opposite you is a meager courtyard, which has changed over the years to now include a kid''s playground, a basketball court and a small grassy area that''s mostly used to play football.'
 	'A few benches and tables surround it, and there''s a handful of small utility sheds tucked away in the corner for tenants to use if they''re willing to pay for the extra space.'
@@ -138,7 +138,7 @@ if $ARGS[0] = 'start':
 	
 !!	if mid($start_type,1,2) = 'sg': '<br>Nearby, in another block of apartments, there''s an <a href="exec:minut += 3 & gt ''pavComplexOld'',''etaj_1''">old apartment building</a> that looks quite rundown and possibly abandoned.'
 	
-	if owned_property['parents_home'] = 4: act '<b>Go Home</b> (Parents'' Apartment)': minut += 4 & pavhome_enter = 1 & gt 'korrPar'
+	if accessible_property['parents_home'] = 4: act '<b>Go Home</b> (Parents'' Apartment)': minut += 4 & pavhome_enter = 1 & gt 'korrPar'
 	if pavSharedAptEnabled = 1: act '<b>Go Home</b> (Shared Apartment)': minut += 5 & gt 'pav_shared_apt', 'start'
 	act 'Walk to the Residential area (0:02)':minut += 2 & gt 'pav_residential'
 	act 'Walk to the Commercial area (0:05)':minut += 5 & gt 'pav_commercial'
@@ -146,9 +146,9 @@ if $ARGS[0] = 'start':
 	act 'Walk to the Market (0:15)':minut += 15 & gt 'pav_market'
 	act 'Walk to the train station (0:15)':minut += 15 & gt 'pav_train_hall'
 	act 'Walk to Pushkin (0:30)':minut += 30 & nroad = 19 & gt 'liam'
-	if mid($start_type,1,2) = 'sg' and owned_property['parents_home'] = 4: 
+	if mid($start_type,1,2) = 'sg' and accessible_property['parents_home'] = 4: 
 		act 'Go to your apartment building':minut += 1 & gt 'pod_ezd', 'etaj_1'
-	elseif mid($start_type,1,2) = 'sg' and (owned_property['parents_home'] = 0 or pavSharedAptEnabled = 1):
+	elseif mid($start_type,1,2) = 'sg' and (accessible_property['parents_home'] = 0 or pavSharedAptEnabled = 1):
 		act 'Go to your parent''s apartment building':minut += 1 & gt 'pod_ezd', 'etaj_1'
 	end
 !!	if mid($start_type,1,2) = 'sg': act 'Go to the old apartment building':minut += 1 & gt 'pavComplexOld', 'etaj_1'

+ 1 - 1
locations/pav_disco_coolkids.qsrc

@@ -1377,7 +1377,7 @@ if $ARGS[0] = 'katja_walkhome':
 	katjaQW['drunk_help'] = 1
 	gs 'stat'
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/disco/school_kids/walkhome_katja.jpg"></center>'
-	if owned_property['parents_home'] = 4:
+	if accessible_property['parents_home'] = 4:
 		'Katja takes you by the arm and helps you get home.'
 		act 'Go home': gt 'korrPar'
 	else

+ 2 - 2
locations/pav_lake.qsrc

@@ -135,14 +135,14 @@ if month >= 5 and month <= 9:
 			menu_off = 1
 			minut+=5
 			nudelake = rand(1,20)
-			if nudelake <= 3 and owned_property['parents_home'] = 4:
+			if nudelake <= 3 and accessible_property['parents_home'] = 4:
 				minut += 5
 				pcs_mood -= 5
 				inhib_exp += rand(1,3)
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/event/noclothes.jpg"></center>'
 				'You return to the place where put your clothes to get dressed... except you can''t find them. You desperately search the beach for a while, a few passers-by giving you amused stares. Despite your efforts, you can''t find them. You panic and, without thinking, start running home naked.'
 				act 'Run home naked': gt 'pav_lake', 'nude_home'
-			elseif nudelake = 4 and owned_property['parents_home'] = 4:
+			elseif nudelake = 4 and accessible_property['parents_home'] = 4:
 				minut += 5
 				pcs_mood -= 5
 				'<center><img <<$set_imgh>> src="images/locations/pavlovsk/lake/event/nakedcar.jpg"></center>'

+ 2 - 2
locations/pav_park.qsrc

@@ -252,11 +252,11 @@ if $ARGS[0] = 'start':
 	if joint > 0 and jointhigh = 0: act 'Smoke a joint': gs 'drugs', 'joint' & gt $loc, $loc_arg
 
 	if (hour >= 20 or hour < 6) and (pcs_sleep <= 30 or cheatNoSleep ! 0):
-		if owned_property['parents_home'] = 0 and workPTU <= 2 and HotelRoom < 1:
+		if accessible_property['parents_home'] = 0 and workPTU <= 2 and HotelRoom < 1:
 			!nowhere to live in town
 			'It''s quite dark now, and you have no where to stay nearby. Maybe you should try to sleep on a bench?'
 			if mid($start_type,1,2) = 'sg': 'Or try your luck and go to Uncle Shulgin''s Apartment?'
-		elseif owned_property['parents_home'] = 4 and (hour >= 22 or hour < 6):
+		elseif accessible_property['parents_home'] = 4 and (hour >= 22 or hour < 6):
 			'It''s quite dark outside, and you feel tired. Maybe you should head home.'
 		else
 			'It''s quite dark now, and you feel tired. Maybe you should try sleeping on a bench?'

+ 1 - 1
locations/pav_shared_apt.qsrc

@@ -502,7 +502,7 @@ if $ARGS[0] = 'intro':
 		'<font color=#<<$nd_font>>>"I''m sorry <<$pcs_firstname>>, but we don''t want children or pets in the apartment!"</font>'
 		'<font color=#<<$gp_font>>>"If you get rid of the kid, come back and see us."</font>'
 		'<font color=#<<$sp_font>>>"Don''t mind him. There''s simply not enough room for 4 people, plus kids or pets. I hope you understand"</font>'
-		if owned_property['parents_home'] = 4:
+		if accessible_property['parents_home'] = 4:
 			act 'Suggest a compromise':
 				cla
 				pavIntroStep = 2

+ 3 - 3
locations/pod_ezd.qsrc

@@ -50,7 +50,7 @@ if $ARGS[0] = 'etaj_1' or $ARGS[0] = '':
 	'There''s a <a href="exec: gt ''pod_ezd'', ''occupants''">list</a> of the people who live here on the wall.'
 	'Someone put up some <a href="exec:gt ''pod_ezd'',''pod_objava''">advertisements</a> on the wall, near the entrance.'
 	act 'Leave the building':
-		if hour < 4 and motherWorry = 0 and age < 18 and owned_property['parents_home'] = 4:
+		if hour < 4 and motherWorry = 0 and age < 18 and accessible_property['parents_home'] = 4:
 			'<font color=red>Are you sure? Your mother will worry if you go out at this time.</font>'
 			cla
 			act 'No, stay inside': gt 'pod_ezd','etaj_1'
@@ -98,9 +98,9 @@ if $ARGS[0] = 'etaj_2':
 	act 'Go down to the first floor': minut += 1 & gt 'pod_ezd','etaj_1'
 	act 'Go up to the third floor': minut += 1 & gt 'pod_ezd','etaj_3'
 
-	if owned_property['parents_home'] = 4:
+	if accessible_property['parents_home'] = 4:
 		act '<b>Apartment 7: Your parents</b>': pavhome_enter = 1 & gt 'korrPar'
-	elseif owned_property['parents_home'] = 0:
+	elseif accessible_property['parents_home'] = 0:
 		act '<b>Apartment 7: Your parents</b>': msg 'Your knock is unanswered, and you no longer have a key.<br>It''s obvious you are no longer welcome here.'
 	end
 

+ 2 - 2
locations/podezdM.qsrc

@@ -111,7 +111,7 @@ end
 if $ARGS[0] = 'kiosk2':
 	cla
 	*clr
-	if owned_property['city_house'] > 0:
+	if accessible_property['city_house'] > 0:
 		'<<$loverdesc[lover_number]>> drinks his beer and wraps his arm around you. "<<$pcs_nickname>> why don''t we go back to your place?"'
 		act 'Invite him in':gt 'sexm', 'start'
 		act 'Turn him down':gt 'podezdM', 'Walk'
@@ -143,7 +143,7 @@ if $ARGS[0] = 'Walk':
 	else
 		act 'Break away (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
 	end	
-	if owned_property['city_house'] > 0:
+	if accessible_property['city_house'] > 0:
 		act 'Kiss':
 			cla
 			'You return his kiss and rub the crotch of his pants. "Why don''t we head over to my place?." you ask him.'

+ 5 - 5
locations/shop.qsrc

@@ -553,7 +553,7 @@ if $shoplocation = 'tech':
 	*p func ('$single_stock_item', 1, 'Computer', 40000, 'komp', $curloc)
 	*p func ('$single_stock_item', 1, 'Computer game Dead Sunset', 800, 'GameCD2', $curloc, '', iif(komp > 0, 0, 1), 'You need a computer')
 	*p func ('$single_stock_item', 1, 'Dishwasher', 28000, 'posudomashina', $curloc, '', iif(func('homes_properties', 'get_count_of_furnishable_homes'), 0, 1), 'You need your own home')
-	*p func ('$single_stock_item', 1, 'Washing machine', 30000, 'stiralka', $curloc, '', iif(owned_property['city_apartment'] = 1 or owned_property['city_apartment'] = 2 or owned_property['village_cottage'] = 2 or owned_property['city_house'] = 2 or owned_property['old_town_apartment'] = 2  or (owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 2), 0, 1), 'You need your own home')
+	*p func ('$single_stock_item', 1, 'Washing machine', 30000, 'stiralka', $curloc, '', iif(accessible_property['city_apartment'] = 1 or accessible_property['city_apartment'] = 2 or accessible_property['village_cottage'] = 2 or accessible_property['city_house'] = 2 or accessible_property['old_town_apartment'] = 2  or (accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 2), 0, 1), 'You need your own home')
 	*p func ('$single_stock_item', 1, 'Camera', 20000, 'zenit', $curloc)
 	*p func ('$single_stock_item', 1, 'Mini camera disguised as a cigarette pack', 100000, 'minifoto', $curloc)
 	*p func ('$single_stock_item', 1, 'Webcam', 2000, 'webcamera', $curloc, '', iif((npc_rel['A11']>=30 and webcamera = 0) or (camwhore = 1 and webcamera = 0), 0, 1), 'You have no use for this')
@@ -627,19 +627,19 @@ if $shoplocation = 'megafon':
 			gs 'homes_properties', 'get_property_attr', $property_list[i]
 			if property['internet_enabled'] = 1 and $home['id'] ! $property['id']:
 				$title = '<center><h4>Internet Subscription for your other properties</h4></center>'
-				if owned_property[$property_list[i]] = 3:
+				if accessible_property[$property_list[i]] = 3:
 					$line += '<tr><td align="center">You have rented out <<$property[''display'']>> and you don''t have to buy internet for your tenants.</td></tr>'
 				elseif subscription[$property_list[i]] = 0:
 					$line += '<tr><td style="padding-left: 10px; padding-right: 10px; align: left; ">Monthly internet subscription for <<price>> <b>₽</b> at <<$property[''display'']>>. Automatically renews every month</td>'
 					if bankAccount = 0:
 						$line += '<td style="padding-left: 10px; padding-right: 10px;">No bank account</td></tr>'
 					elseif karta+bankDebtLimit >= price: 
-						$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''<<$owned_property[i]>>'', <<price>>, 0 & minut += 30 & karta -= <<price>> & gt ''shop'' ">Pay with card</a></td></tr>'
+						$line += '<td style="padding-left: 10px; padding-right: 10px;"><a href="exec: gs ''internet_mobile'', ''buy_subscription'', ''<<$accessible_property[i]>>'', <<price>>, 0 & minut += 30 & karta -= <<price>> & gt ''shop'' ">Pay with card</a></td></tr>'
 					else
 						$line += '<td style="padding-left: 10px; padding-right: 10px;">Insufficient balance</td></tr>'
 					end
-				elseif subscription[$owned_property[i]] > 0:
-					line += '<tr><td align="center">You have an active internet subscription at <<$property[''display'']>> that will renew next month on day <<subscription[$owned_property[i]+''-date'']>> for <<price>> <b>₽</b></td></tr>'
+				elseif subscription[$accessible_property[i]] > 0:
+					line += '<tr><td align="center">You have an active internet subscription at <<$property[''display'']>> that will renew next month on day <<subscription[$accessible_property[i]+''-date'']>> for <<price>> <b>₽</b></td></tr>'
 				end
 			end
 			killvar '$property'

+ 8 - 8
locations/shopdacha.qsrc

@@ -13,7 +13,7 @@ act 'Leave': minut += 3 & gt 'torgcentr'
 if hour < 8 or hour > 20:
 	'Shop closed.'
 else
-	if karta + bankDebtLimit >= 50000 and (owned_property['city_house'] = 2 or owned_property['city_house'] = 3):
+	if karta + bankDebtLimit >= 50000 and (accessible_property['city_house'] = 2 or accessible_property['city_house'] = 3):
 		if rembedr = 0:
 			act 'Renovate city apartment bedroom (50,000 <b>₽</b>)':
 				cla
@@ -89,11 +89,11 @@ else
 			end
 		end
 	end
-	if karta + bankDebtLimit >= 200000 and owned_property['village_cottage-renovated'] = 1:
+	if karta + bankDebtLimit >= 200000 and accessible_property['village_cottage-renovated'] = 1:
 		act 'Upgrade your cottage (200,000 <b>₽</b>)':
 			cls
 			karta -= 200000
-			owned_property['village_cottage-renovated'] = 1
+			accessible_property['village_cottage-renovated'] = 1
 			minut += 15
 			gs 'stat'
 			'You upgrade you dacha in the cooperative.'
@@ -101,7 +101,7 @@ else
 		end
 	end
 
-	if karta + bankDebtLimit >= 500000 and owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 0:
+	if karta + bankDebtLimit >= 500000 and accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 0:
 		act 'Connect water, electricity (500,000 <b>₽</b>)':
 			cls
 			karta -= 500000
@@ -114,7 +114,7 @@ else
 		end
 	end
 
-	if karta + bankDebtLimit >= 1500000 and owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 1:
+	if karta + bankDebtLimit >= 1500000 and accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 1:
 		act 'Build mansion''s shell for (1,500,000 <b>₽</b>)':
 			cls
 			karta -= 1500000
@@ -127,7 +127,7 @@ else
 		end
 	end
 
-	if karta + bankDebtLimit >= 500000 and owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 2 and ymanrem[3] = 0:
+	if karta + bankDebtLimit >= 500000 and accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 2 and ymanrem[3] = 0:
 		act 'Build internal walls (500, 000 <b>₽</b>)':
 			cls
 			karta -= 500000
@@ -140,7 +140,7 @@ else
 		end
 	end
 
-	if owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') >= 1:
+	if accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') >= 1:
 		if karta + bankDebtLimit >= 800000 and banaMansion = 0:
 			act 'Install electrics and plumbing (800,000 <b>₽</b>)':
 				cls
@@ -167,7 +167,7 @@ else
 			end
 		end
 	end
-	if owned_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 2:
+	if accessible_property['matryona_mansion'] = 2 and func('homes_properties', 'property_construction_status', 'matryona_mansion') = 2:
 		if karta + bankDebtLimit >= 250000 and ymanrem[3] = 1:
 			act 'Build hallways (250,000 <b>₽</b>)':
 				cls

+ 1 - 1
locations/shulgahall.qsrc

@@ -28,7 +28,7 @@ if $ARGS[0] = '':
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/resident/apartment/shulginhome/korr.jpg"></center>'
 	*nl
 	'The hallway of Uncle Sergey''s one bedroom apartment is similar to every other apartment in the complex. There are several doors leading to the various rooms. The bedroom is Uncle Sergey''s. There''s also the kitchen, bathroom, and finally the livingroom, which Vasily uses for a bedroom.'
-	if owned_property['parents_home'] = 0 and func('homes_properties', 'is_current_home'):
+	if accessible_property['parents_home'] = 0 and func('homes_properties', 'is_current_home'):
 		'There are several <a href="exec:gt ''wardrobe'', ''start''">closets</a> in the hall, which Sergey said you can use to store your clothes while you''re staying here</a>, and a large tall <a href="exec:gt ''mirror'', ''start''">mirror</a> on one of the doors.'
 		gs 'prostitution_functions', 'prostitute_outfit_at_home'
 	else

+ 3 - 3
locations/stat_display.qsrc

@@ -1903,11 +1903,11 @@ if mid($start_type,1,2) = 'sg' and nerd_night_game = 1 and nerd_night_game_day =
 
 !!--------------- mid($start_type,1,2) = 'sg' Events (End) ------------------------
 
-if owned_property['city_house'] = 1 and owned_property['old_town_apartment'] > 0:
+if accessible_property['city_house'] = 1 and accessible_property['old_town_apartment'] > 0:
 	$stat_msg += '<BR>You have rented an apartment in the city residential area, which is paid up for <b><<func(''homes_properties'', ''get_rent_days'', ''city_apartment'')>></b> days, and you also have an apartment in Pushkin, which is paid up for <b><<func(''homes_properties'', ''get_rent_days'', ''old_town_apartment'')>></b> days. Utilities are due on the 25th of <<$month>>.'
-elseif owned_property['city_house'] = 1:
+elseif accessible_property['city_house'] = 1:
 	$stat_msg += '<BR>You have rented an apartment in the city residential area, and you''re paid up for <<func(''homes_properties'', ''get_rent_days'', ''city_apartment'')>> days. Utilities are due on the 25th of <<$month>>.'
-elseif owned_property['old_town_apartment'] > 0:
+elseif accessible_property['old_town_apartment'] > 0:
 	$stat_msg += '<BR>You have rented an apartment in Pushkin, and you''re paid up for <<func(''homes_properties'', ''get_rent_days'', ''old_town_apartment'')>> days. Utilities are due on the 25th of <<$month>>.'
 end
 

+ 1 - 1
locations/street_event.qsrc

@@ -56,7 +56,7 @@ elseif $ARGS[0] = 'city_industrial':
 	streetev_hijack = 0
 	streetev_bf = 30
 	streetev_mistmeet = 5
-	if owned_property['city_apartment'] = 0 and tanwork = 0 and func('uniutil', 'student', 'not_enrolled'):
+	if accessible_property['city_apartment'] = 0 and tanwork = 0 and func('uniutil', 'student', 'not_enrolled'):
 		streetev_home = 0
 		$streetev_home = 'by the train station'
 	end

+ 2 - 2
locations/telefon.qsrc

@@ -1235,8 +1235,8 @@ if $ARGS[0] = 'Phone_notebook':
 	<<year>>-<<$month>>-<<day>>, <<$week[week]>><br><br>'
 	rent1 = -1
 	rent4 = -1
-	if owned_property['city_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'city_apartment') > 0: rent1 = func('homes_properties', 'get_rent_days', 'city_apartment')
-	if owned_property['old_town_apartment'] > 0 and func('homes_properties', 'get_rent_days', 'old_town_apartment') > 0: rent4 = func('homes_properties', 'get_rent_days', 'old_town_apartment')
+	if accessible_property['city_apartment'] = 1 and func('homes_properties', 'get_rent_days', 'city_apartment') > 0: rent1 = func('homes_properties', 'get_rent_days', 'city_apartment')
+	if accessible_property['old_town_apartment'] > 0 and func('homes_properties', 'get_rent_days', 'old_town_apartment') > 0: rent4 = func('homes_properties', 'get_rent_days', 'old_town_apartment')
 	d1 = day
 	w1 = week
 	m1 = month

+ 1 - 1
locations/uni_dorm.qsrc

@@ -342,7 +342,7 @@ if $ARGS[0] = 'tenth_floor':
 	end
 	act 'Elevator': gt 'uni_dorm', 'elevator'
 
-	if owned_property['university_dorm'] = 4:
+	if accessible_property['university_dorm'] = 4:
 		if courtletter_date <= daystart and courtletter_date ! 0:
 			gt 'sentence', 'letter'
 		end

+ 1 - 1
locations/uni_grounds.qsrc

@@ -94,7 +94,7 @@ if $ARGS[0] = 'main':
 	if university['semester_week'] > 0 and university['enrolled_in_semester'] > university['semester_passed']: gs 'uni_lessons', 'schedule'
 	if university['exam_week'] > 0 and university['enrolled_in_semester'] > university['semester_passed']: gs 'uni_lessons', 'exam_schedule'
 
-	if owned_property['university_dorm'] = 1 or university['student'] = 1:
+	if accessible_property['university_dorm'] = 1 or university['student'] = 1:
 		act 'Go to your room': minut += 7 & gt 'uni_dorm', 'dorm_room'
 	end
 

+ 1 - 1
locations/unused/pornstudio.qsrc

@@ -770,7 +770,7 @@ if $ARGS[0] = 'first':
 	'<center><img <<$set_imgh>> src="images/locations/city/redlight/studio_porn/casting/casting0.jpg"></center>'
 	'You sit down on the sofa and greet the manager. "I see it''s your first time with us. So, you want to be a porn star?'
 
-	if pcs_inhib < 40 and (money <= 500 and karta <= 500 and owned_property['parents_home'] = 0) or (narkoman = 1 or SLomka > 0):
+	if pcs_inhib < 40 and (money <= 500 and karta <= 500 and accessible_property['parents_home'] = 0) or (narkoman = 1 or SLomka > 0):
 		'While you don''t feel confident enough showing off your body, you''re desperate for money, and are willing to do anything to earn it.'
 		act 'Continue': gt 'pornstudio', 'yes'
 	elseif pcs_inhib < 40:

+ 5 - 5
locations/zoomagazine.qsrc

@@ -110,7 +110,7 @@ if $ARGS[0] = 'start':
 		act 'Buy a rabbit (2000 <b>₽</b>)':
 			cla & *clr
 			menu_off = 1
-			if owned_property['city_apartment'] > 0:
+			if accessible_property['city_apartment'] > 0:
 				minut += 10
 				krolik += 1
 				money -= 2000
@@ -125,7 +125,7 @@ if $ARGS[0] = 'start':
 		end
 	end
 
-	if money >= 3000 and rex['owned'] = 0 and owned_property['parents_home'] = 0 :
+	if money >= 3000 and rex['owned'] = 0 and accessible_property['parents_home'] = 0 :
 		act 'Buy a dog (3000 <b>₽</b>)':
 			cla & *clr
 			menu_off = 1
@@ -144,11 +144,11 @@ if $ARGS[0] = 'start':
 		end
 	end
 
-	if money >= 3000 and ParrotQW['Owned1'] = 0 and owned_property['parents_home'] = 0 :
+	if money >= 3000 and ParrotQW['Owned1'] = 0 and accessible_property['parents_home'] = 0 :
 		act 'Buy a parrot (3000 <b>₽</b>)':
 			cla & *clr
 			menu_off = 1
-			if owned_property['city_apartment'] > 0:
+			if accessible_property['city_apartment'] > 0:
 				minut += 10
 				ParrotQW['Owned1'] = 1
 				money -= 3000
@@ -163,7 +163,7 @@ if $ARGS[0] = 'start':
 		end
 	end
 
-	if money >= 3000 and ParrotQW['Owned2'] = 0 and owned_property['parents_home'] = 4 :
+	if money >= 3000 and ParrotQW['Owned2'] = 0 and accessible_property['parents_home'] = 4 :
 		act 'Buy a parrot for your parent''s apartment (3000 <b>₽</b>)':
 			cla & *clr
 			menu_off = 1