Explorar el Código

Fixed the bug with home status check.

Removed the numeric value check for now.
netuttki hace 2 meses
padre
commit
e6ae44f68d
Se han modificado 1 ficheros con 6 adiciones y 15 borrados
  1. 6 15
      locations/homes_properties.qsrc

+ 6 - 15
locations/homes_properties.qsrc

@@ -299,14 +299,6 @@ end
 !!			 'purchased' -> both 'owned' and 'tenants'
 !!			 'blocked' -> is the property blocked?
 !!			 'hasaccess' -> can Sveta use the property (without owning or renting it)?
-!! ARGS[1]: the status that is checked as a number
-!!			 Accepted values
-!!			 RENTED or 1 -> is the property rented?
-!!			 OWNED or 2  -> is the property is owned (bought by Sveta) ?
-!!			 TENANTS or 3 -> are there tenants in the property?
-!!			 NO_ACCESS or 0  -> is the property blocked?
-!!			 ACCESSIBLE or 4 -> can Sveta use the property (without owning or renting it)?
-!!			 PURCHASED or 5 -> both 'owned' and 'tenants'
 !! $ARGS[2]: the location for which the access is checked
 !!			Accepted values
 !!			- property code   -> 'city_apartment', 'parents_home'
@@ -316,18 +308,17 @@ end
 !!			  					NOTE: only added in case someone really want to use the old ids
 if $ARGS[0] = 'is_property_of_status':
 	$propstatcode = iif($ARGS[2] = '', $home_name[$loc], $home_name[$ARGS[2]])
-
-	if $ARGS[1] = 'rented' or ARGS[1] = RENTED:
+	if $ARGS[1] = 'rented':
 		result = accessible_property[$propstatcode] = RENTED
-	elseif $ARGS[1] = 'owned' or ARGS[1] = OWNED:
+	elseif $ARGS[1] = 'owned':
 		result = accessible_property[$propstatcode] = OWNED
-	elseif $ARGS[1] = 'tenants' or ARGS[1] = TENANTS:
+	elseif $ARGS[1] = 'tenants':
 		result = accessible_property[$propstatcode] = TENANTS
-	elseif $ARGS[1] = 'blocked' or ARGS[1] = NO_ACCESS:
+	elseif $ARGS[1] = 'blocked':
 		result = accessible_property[$propstatcode] = NO_ACCESS
-	elseif $ARGS[1] = 'hasacces' or ARGS[1] = ACCESSIBLE:
+	elseif $ARGS[1] = 'hasacces':
 		result = accessible_property[$propstatcode] = ACCESSIBLE
-	elseif $ARGS[1] = 'purchased' or ARGS[1] = PURCHASED:
+	elseif $ARGS[1] = 'purchased':
 		result = accessible_property[$propstatcode] = OWNED or accessible_property[$propstatcode] = TENANTS
 	else
 		result = 0