1
0

housing.qsrc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. if $ARGS[0] = 'rent':
  6. if month = 1:
  7. ArendHouseSL_due = 31
  8. elseif month = 2:
  9. if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0):
  10. ArendHouseSL_due = 29
  11. else
  12. ArendHouseSL_due = 28
  13. end
  14. elseif month = 3:
  15. ArendHouseSL_due = 31
  16. elseif month = 4:
  17. ArendHouseSL_due = 30
  18. elseif month = 5:
  19. ArendHouseSL_due = 31
  20. elseif month = 6:
  21. ArendHouseSL_due = 30
  22. elseif month = 7:
  23. ArendHouseSL_due = 31
  24. elseif month = 8:
  25. ArendHouseSL_due = 31
  26. elseif month = 9:
  27. ArendHouseSL_due = 30
  28. elseif month = 10:
  29. ArendHouseSL_due = 31
  30. elseif month = 11:
  31. ArendHouseSL_due = 30
  32. elseif month = 12:
  33. ArendHouseSL_due = 31
  34. end
  35. home_rent[1] = 15000
  36. $home_rent_txt[1] = '15,000'
  37. !home_rent[3] = 00000
  38. !$home_rent_txt[3] = '00,000'
  39. home_rent[4] = 10000
  40. $home_rent_txt[4] = '10,000'
  41. !home_rent[5] = 00000
  42. !$home_rent_txt[5] = '00,000'
  43. end
  44. if $ARGS[0] = 'sale':
  45. home_value[1] = 2000000
  46. $home_value_txt[1] = '2,000,000'
  47. home_value[3] = 150000
  48. $home_value_txt[3] = '150,000'
  49. !home_value[4] = 000000
  50. !$home_value_txt[4] = '000,000'
  51. home_value[5] = 1500000
  52. $home_value_txt[5] = '1,500,000'
  53. end
  54. if $ARGS[0] = 'util':
  55. killvar 'hcount_util'
  56. if home_owned[1] = 1: hcount_util += 1
  57. if home_owned[3] > 1: hcount_util += 1
  58. if home_owned[4] > 0: hcount_util += 1
  59. if home_owned[5] > 2: hcount_util += 1
  60. end
  61. if $ARGS[0] = 'cable':
  62. if home_owned[1] = 1: hcount_cable += 1
  63. !if home_owned[3] > 1: hcount_cable += 1
  64. if home_owned[4] > 0: hcount_cable += 1
  65. if home_owned[5] > 2: hcount_cable += 1
  66. end
  67. --- housing ---------------------------