Bläddra i källkod

Removed monthsend / $month definitions from cikl. added leapyear fix to gload and start

Ekay 8 år sedan
förälder
incheckning
9ff81f1243
3 ändrade filer med 9 tillägg och 39 borttagningar
  1. 1 29
      locations/cikl
  2. 4 5
      locations/loadg
  3. 4 5
      locations/start

+ 1 - 29
locations/cikl

@@ -736,35 +736,7 @@ if sdaday = day and sdamonth = month and housr = 0:
 	!msg 'Your tenants have moved out and your apartment is now vacant.'
 end
 
-monthsend[1] = 31
-if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0): 
-	Leapyear = 1 & monthsend[2] = 29
-else
-	Leapyear = 0 & monthsend[2] = 28
-end
-monthsend[3] = 31
-monthsend[4] = 30
-monthsend[5] = 31
-monthsend[6] = 30
-monthsend[7] = 31
-monthsend[8] = 31
-monthsend[9] = 30
-monthsend[10] = 31
-monthsend[11] = 30
-monthsend[12] = 31
-
-$monthName[1] = 'January'
-$monthName[2] = 'February'
-$monthName[3] = 'March'
-$monthName[4] = 'April'
-$monthName[5] = 'May'
-$monthName[6] = 'June'
-$monthName[7] = 'July'
-$monthName[8] = 'August'
-$monthName[9] = 'September'
-$monthName[10] = 'October' 
-$monthName[11] = 'November'
-$monthName[12] = 'December'
+
 
 if day > monthsEnd[month]:
 	day -= monthsEnd[month]

+ 4 - 5
locations/loadg

@@ -42,10 +42,10 @@ if menoage = 0:
 end
 
 monthsend[1] = 31
-if year = 2016 or year = 2020 or year = 2024 or year = 2028 or year = 2032:
-	monthsend[2] = 29
+if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0): 
+	Leapyear = 1 & monthsend[2] = 29
 else
-	monthsend[2] = 28
+	Leapyear = 0 & monthsend[2] = 28
 end
 monthsend[3] = 31
 monthsend[4] = 30
@@ -58,7 +58,6 @@ monthsend[10] = 31
 monthsend[11] = 30
 monthsend[12] = 31
 
-!MJ: Months names.
 $monthName[1] = 'January'
 $monthName[2] = 'February'
 $monthName[3] = 'March'
@@ -68,7 +67,7 @@ $monthName[6] = 'June'
 $monthName[7] = 'July'
 $monthName[8] = 'August'
 $monthName[9] = 'September'
-$monthName[10] = 'October'
+$monthName[10] = 'October' 
 $monthName[11] = 'November'
 $monthName[12] = 'December'
 

+ 4 - 5
locations/start

@@ -181,10 +181,10 @@ ashrinkdays = 3
 
 !MJ: The day the month ends. Including possible rollover months 0 and 13.
 monthsend[1] = 31
-if year = 2016 or year = 2020 or year = 2024 or year = 2028 or year = 2032:
-	monthsend[2] = 29
+if ((year mod 4 = 0) and (year mod 100 ! 0)) or (year mod 400 = 0): 
+	Leapyear = 1 & monthsend[2] = 29
 else
-	monthsend[2] = 28
+	Leapyear = 0 & monthsend[2] = 28
 end
 monthsend[3] = 31
 monthsend[4] = 30
@@ -197,7 +197,6 @@ monthsend[10] = 31
 monthsend[11] = 30
 monthsend[12] = 31
 
-!MJ: Months names.
 $monthName[1] = 'January'
 $monthName[2] = 'February'
 $monthName[3] = 'March'
@@ -207,7 +206,7 @@ $monthName[6] = 'June'
 $monthName[7] = 'July'
 $monthName[8] = 'August'
 $monthName[9] = 'September'
-$monthName[10] = 'October'
+$monthName[10] = 'October' 
 $monthName[11] = 'November'
 $monthName[12] = 'December'