1
0

housing.qsrc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # housing
  2. ! 'rent' checks rent days given matches days of the month, and how much each rental costs.
  3. ! 'util' checks which properties having working utilities, then multiplies the amount owed accordingly.
  4. ! 'cable' checks which properties can have cable TV, then multiplies the amount owed accordingly.
  5. ! home_owned[1] = 2: 'Apartment in St. Petersburg residential area.'
  6. ! home_owned[1] = 3: 'Apartment in St. Petersburg residential area, that is currently occupied by your tenants.'
  7. ! home_owned[2] = 1: 'Apartment in Pavlovsk where you live with your parents.'
  8. ! home_owned[3] > 0: 'An cottage located in the cooperative village.'
  9. ! home_owned[4] = 1: 'An apartment in Pushkin.'
  10. ! home_owned[5] = 1: 'A plot of land in the St. Petersburg suburbs.'
  11. if $ARGS[0] = 'rent':
  12. if month = 1:
  13. ArendHouseSL_due = 31
  14. elseif month = 2:
  15. if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
  16. ArendHouseSL_due = 29
  17. else
  18. ArendHouseSL_due = 28
  19. end
  20. elseif month = 3:
  21. ArendHouseSL_due = 31
  22. elseif month = 4:
  23. ArendHouseSL_due = 30
  24. elseif month = 5:
  25. ArendHouseSL_due = 31
  26. elseif month = 6:
  27. ArendHouseSL_due = 30
  28. elseif month = 7:
  29. ArendHouseSL_due = 31
  30. elseif month = 8:
  31. ArendHouseSL_due = 31
  32. elseif month = 9:
  33. ArendHouseSL_due = 30
  34. elseif month = 10:
  35. ArendHouseSL_due = 31
  36. elseif month = 11:
  37. ArendHouseSL_due = 30
  38. elseif month = 12:
  39. ArendHouseSL_due = 31
  40. end
  41. home_rent[1] = 15000
  42. $home_rent_txt[1] = '15,000'
  43. !home_rent[3] = 00000
  44. !$home_rent_txt[3] = '00,000'
  45. home_rent[4] = 10000
  46. $home_rent_txt[4] = '10,000'
  47. !home_rent[5] = 00000
  48. !$home_rent_txt[5] = '00,000'
  49. end
  50. if $ARGS[0] = 'sale':
  51. home_value[1] = 2000000
  52. $home_value_txt[1] = '2,000,000'
  53. home_value[3] = 150000
  54. $home_value_txt[3] = '150,000'
  55. !home_value[4] = 000000
  56. !$home_value_txt[4] = '000,000'
  57. home_value[5] = 1500000
  58. $home_value_txt[5] = '1,500,000'
  59. end
  60. if $ARGS[0] = 'util':
  61. killvar 'hcount_util'
  62. if home_owned[1] = 1: hcount_util += 1
  63. if home_owned[3] > 1: hcount_util += 1
  64. if home_owned[4] > 0: hcount_util += 1
  65. if home_owned[5] > 2: hcount_util += 1
  66. end
  67. if $ARGS[0] = 'cable':
  68. if home_owned[1] = 1: hcount_cable += 1
  69. !if home_owned[3] > 1: hcount_cable += 1
  70. if home_owned[4] > 0: hcount_cable += 1
  71. if home_owned[5] > 2: hcount_cable += 1
  72. end
  73. --- housing ---------------------------