Selaa lähdekoodia

Added to check for Sveta being homeless.

netuttki 2 kuukautta sitten
vanhempi
sitoutus
aeff8607ff
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      locations/homes_properties.qsrc

+ 3 - 2
locations/homes_properties.qsrc

@@ -864,7 +864,7 @@ if $ARGS[0] = 'tenants_move_in':
 	gs 'homes_properties', 'set_access', $ARGS[1], TENANTS
 	accessible_property['<<$ARGS[1]>>-tenant-day'] = ARGS[2]
 	accessible_property['<<$ARGS[1]>>-tenant-month'] = ARGS[3]
-	if $home['current'] = '' and accessible_property['accessible_home_count'] = 1:
+	if ($home['current'] = '' or dyneval($is_homeless)) and accessible_property['accessible_home_count'] = 1:
 		gs 'homes_properties', 'get_accessible_properties', 'home'
 		if accessible_property['<<$property_code>>-is-home']: gs 'homes_properties', 'set_home', $property_code
 		gs 'homes_properties', 'clean_up_property_data'
@@ -905,7 +905,8 @@ if $ARGS[0] = 'tenant_move_out_check':
 			killvar 'property'
 		if hp_i < count: jump 'tenantloop'
 	end
-	if accessible_property['accessible_home_count'] = 1 and $home['current'] = '':
+
+	if accessible_property['accessible_home_count'] = 1 and ($home['current'] = '' or dyneval($is_homeless)):
 		gs 'homes_properties', 'get_accessible_properties', 'home'
 		if accessible_property['<<$property_code>>-is-home'] = 1: gs 'homes_properties', 'set_home', $property_code
 		gs 'homes_properties', 'clean_up_property_data'