Sfoglia il codice sorgente

Fixed the rent payment bug.

netuttki 10 mesi fa
parent
commit
183ee14c6e
2 ha cambiato i file con 8 aggiunte e 6 eliminazioni
  1. 1 1
      locations/agentned.qsrc
  2. 7 5
      locations/bank.qsrc

+ 1 - 1
locations/agentned.qsrc

@@ -35,7 +35,7 @@ if $ARGS[0] = 'start':
 		i = 0
 		'<h4>Rent Information</h4>'
 		:listing_rented_properties_loop
-			'You have <B><<property_days[i]>> days</B> remaining on the lease of your <<$property_display[i]>>, and your monthly rent is <<func(''agentned'', ''format_price_string'', property_rent[i])>><b>₽</b>. '+iif(money >= property_rent[i],'You can make a rent <a href="exec:money -= <<property_rent[i]>> & gs ''homes_properties'', ''add_rental_days'', ''<<$property_code[i]>>'' & gt ''agentned'', ''start''">payment</a> in cash to extend it.','You can''t afford to pay your rent at the moment')
+			'You have <B><<property_days[i]>> days</B> remaining on the lease of your <<$property_display[i]>>, and your monthly rent is <<func(''agentned'', ''format_price_string'', property_rent[i])>><b>₽</b>. '+iif(money >= property_rent[i],'You can make a rent <a href="exec: gs ''homes_properties'', ''pay_rent'', ''<<$property_code[i]>>'', ''cash'' & gt ''agentned'', ''start''">payment</a> in cash to extend it.','You can''t afford to pay your rent at the moment')
 				!! TODO: Make the duplication way less.
 				if $property_code[i] = 'city_apartment':
 					act 'Cancel the lease of the <<$property_display[i]>>':

+ 7 - 5
locations/bank.qsrc

@@ -599,14 +599,16 @@ if $ARGS[0] = 'cikl':
 					gs 'homes_properties', 'cancel_rent', $property_code[i]
 				elseif bankAccount = 1 and karta >= property_rent[i]:
 					'<b><font color="green">Your rent payment of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>, has automatically been deducted from your bank account.</font></b>'
-					karta -= property_rent[i]
-					gs 'homes_properties', 'add_rent_days', $property_code[i]
+					gs 'homes_properties', 'pay_rent', $property_code[i], 'card'
+					!karta -= property_rent[i]
+					!gs 'homes_properties', 'add_rent_days', $property_code[i]
 				elseif bankAccount = 1 and karta + bankDebtLimit >= property_rent[i]:
 					'<b><font color="green">Your rent payment of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>, has automatically been deducted from your bank account and overdraw facility. Please contact your bank regarding your overdraw repayment.</font></b>'
-					karta -= property_rent[i]
-					gs 'homes_properties', 'add_rent_days', $property_code[i]
+					gs 'homes_properties', 'pay_rent', $property_code[i], 'card'
+					!karta -= property_rent[i]
+					!gs 'homes_properties', 'add_rent_days', $property_code[i]
 				elseif bankAccount = 0:
-					'<b><font color="red">You currently do not have a bank account setup for automatic rent deduction of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>. To avoid eviction, please make manual payment as soon as possible.</font></b>'
+					'<b><font color="red">You currently do not have a bank account setup for automatic rent deduction of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>. To avoid eviction, please make a manual payment as soon as possible.</font></b>'
 				else
 					nl
 					'<b><b><font color="red">Your card was declined during automatic rent deduction of <<property_rent[i]>> <b>₽</b> for your <<$property_name[i]>>. To avoid eviction, please rectify as soon as possible.</font></b>'