mirror of
https://github.com/tonytins/citylimits
synced 2025-12-19 06:14:42 -05:00
SC3k-style Ordinances
This wound up being a bigger commit than I had initially planned. - New SC3k-style policies based on the advisor code. - Added license file to Font Awesome folder. - Refactored the advisor code so it can handle multiple files. - Updated icons. Should be more consistent now. - Replaced Sims with Animals in ticker text. - Moved dialogs to windows directory.
This commit is contained in:
parent
346ceaacb9
commit
72e2c96542
76 changed files with 2489 additions and 458 deletions
|
|
@ -1,20 +1,45 @@
|
|||
extends Node2D
|
||||
|
||||
onready var rotate_news = $RotateNews
|
||||
onready var quarters = $Quarters
|
||||
onready var day_cycle = $DayCycle
|
||||
onready var turtle_btn = $Controls/Status/SpeedCtr/TurtleBtn
|
||||
onready var cheeta_btn = $Controls/Status/SpeedCtr/CheetaBtn
|
||||
|
||||
func _ready():
|
||||
SimEvents.connect("resume_news", self, "_resume_rotation")
|
||||
SimEvents.connect("send_alert", self, "_stop_news")
|
||||
|
||||
func _on_Quarters_timeout():
|
||||
SimData.year += 1
|
||||
SimData.prev_quarter = SimData.quarter
|
||||
|
||||
SimEvents.emit_signal("budget")
|
||||
|
||||
func _stop_news():
|
||||
rotate_news.stop()
|
||||
|
||||
func _resume_rotation():
|
||||
rotate_news.start()
|
||||
|
||||
func _on_DayCycle_timeout():
|
||||
|
||||
if SimData.prev_day < 30:
|
||||
SimData.day += 1
|
||||
|
||||
if SimData.prev_day == 30:
|
||||
SimData.month =+ 1
|
||||
SimData.prev_month = SimData.month
|
||||
SimData.day = 1
|
||||
SimEvents.emit_signal("budget")
|
||||
|
||||
if SimData.prev_month == 12:
|
||||
SimData.prev_year = SimData.year
|
||||
SimData.total_days = 1
|
||||
SimData.month = 1
|
||||
SimData.year += 1
|
||||
|
||||
SimData.prev_day = SimData.day
|
||||
|
||||
func _on_TurtleBtn_toggled(button_pressed):
|
||||
if button_pressed:
|
||||
day_cycle.wait_time = 12
|
||||
cheeta_btn.pressed = false
|
||||
|
||||
func _on_CheetaBtn_toggled(button_pressed):
|
||||
if button_pressed:
|
||||
day_cycle.wait_time = 2
|
||||
turtle_btn.pressed = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue