mirror of
https://github.com/tonytins/citylimits
synced 2025-12-19 06:14:42 -05:00
Removed some redundant code
- Change month and day within debug console - Removed get_week() in SimData
This commit is contained in:
parent
622eea364e
commit
ae1b600928
3 changed files with 19 additions and 7 deletions
|
|
@ -17,23 +17,29 @@ func _resume_rotation():
|
|||
|
||||
func _on_DayCycle_timeout():
|
||||
|
||||
if SimData.prev_month < 12:
|
||||
SimData.last_total_days = SimData.total_days
|
||||
SimData.total_days += 1
|
||||
|
||||
# Increment the number days until it reaches 30
|
||||
if SimData.prev_day < 30:
|
||||
SimData.prev_day = SimData.day
|
||||
SimData.day += 1
|
||||
|
||||
# Reset the number of days to 1 on day 30 and increment the month
|
||||
if SimData.prev_day == 30:
|
||||
SimData.prev_day = SimData.day
|
||||
SimData.day = 1
|
||||
SimData.prev_month = SimData.month
|
||||
SimData.month += 1
|
||||
SimEvents.emit_signal("budget")
|
||||
|
||||
|
||||
# Increment the year on the 12th month
|
||||
if SimData.prev_month == 12:
|
||||
SimData.prev_year = SimData.year
|
||||
SimData.total_days = 1
|
||||
SimData.month = 1
|
||||
SimData.year += 1
|
||||
|
||||
SimData.last_total_days = SimData.total_days
|
||||
SimData.prev_day = SimData.day
|
||||
|
||||
func _on_TurtleBtn_toggled(button_pressed):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue