housing.qsrc 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. ! home_owned[15] = 1: 'A house on the edge of St. Petersburg residential area.'
  12. if $ARGS[0] = 'rent':
  13. if month = 1:
  14. ArendHouseSL_due = 31
  15. elseif month = 2:
  16. if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
  17. ArendHouseSL_due = 29
  18. else
  19. ArendHouseSL_due = 28
  20. end
  21. elseif month = 3:
  22. ArendHouseSL_due = 31
  23. elseif month = 4:
  24. ArendHouseSL_due = 30
  25. elseif month = 5:
  26. ArendHouseSL_due = 31
  27. elseif month = 6:
  28. ArendHouseSL_due = 30
  29. elseif month = 7:
  30. ArendHouseSL_due = 31
  31. elseif month = 8:
  32. ArendHouseSL_due = 31
  33. elseif month = 9:
  34. ArendHouseSL_due = 30
  35. elseif month = 10:
  36. ArendHouseSL_due = 31
  37. elseif month = 11:
  38. ArendHouseSL_due = 30
  39. elseif month = 12:
  40. ArendHouseSL_due = 31
  41. end
  42. home_rent[1] = 15000
  43. $home_rent_txt[1] = '15,000'
  44. !home_rent[3] = 00000
  45. !$home_rent_txt[3] = '00,000'
  46. home_rent[4] = 10000
  47. $home_rent_txt[4] = '10,000'
  48. !home_rent[5] = 00000
  49. !$home_rent_txt[5] = '00,000'
  50. end
  51. if $ARGS[0] = 'sale':
  52. home_value[1] = 800000
  53. $home_value_txt[1] = '800,000'
  54. home_value[3] = 150000
  55. $home_value_txt[3] = '150,000'
  56. !home_value[4] = 000000
  57. !$home_value_txt[4] = '000,000'
  58. home_value[5] = 1500000
  59. $home_value_txt[5] = '1,500,000'
  60. home_value[15] = 800000
  61. $home_value_txt[15] = '800,000'
  62. end
  63. if $ARGS[0] = 'util':
  64. killvar 'hcount_util'
  65. if accessible_property['city_apartment'] = 1: hcount_util += 1
  66. if accessible_property['village_cottage'] > 1: hcount_util += 1
  67. if accessible_property['old_town_apartment'] > 0: hcount_util += 1
  68. if accessible_property['matryona_mansion'] > 2: hcount_util += 1
  69. if accessible_property['city_house'] = 1: hcount_util += 1
  70. end
  71. if $ARGS[0] = 'cable':
  72. if accessible_property['city_apartment'] = 1: hcount_cable += 1
  73. !if accessible_property['village_cottage'] > 1: hcount_cable += 1
  74. if accessible_property['old_town_apartment'] > 0: hcount_cable += 1
  75. if accessible_property['matryona_mansion'] > 2: hcount_cable += 1
  76. if accessible_property['city_house'] = 1: hcount_cable += 1
  77. end
  78. --- housing ---------------------------------