diff --git a/.gitignore b/.gitignore
index 43e1e86..4819d04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,4 +171,4 @@ $RECYCLE.BIN/
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
-/export
\ No newline at end of file
+export/**
\ No newline at end of file
diff --git a/README.md b/README.md
index db2bbf0..965ec61 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@

-City Limits is a re-imagining of SimCity Classic using
+City Limits is a re-imagining of SimCity Classic that brings modern city building concepts to the classic game.
## Getting Started
diff --git a/dialog/advisors/cityplanner.json b/dialog/advisors/cityplanner.json
index 79f00f8..c516ea0 100644
--- a/dialog/advisors/cityplanner.json
+++ b/dialog/advisors/cityplanner.json
@@ -1,6 +1,6 @@
{
"1": {
"name": "Roll up your sleeves, Mayor!",
- "text": "Welcome to City Limits! I'm Cindy, and I'll be your city planner. I'll help you with zoning, land values, and handling connections to and from the city."
+ "text": "Nice to meet you, Mayor [name]. I'm Cindy, your city planner. I'll be helping you with zoning, land values, and handling connections to and from the city."
}
}
\ No newline at end of file
diff --git a/dialog/policies/policies.json b/dialog/policies/proposels.json
similarity index 96%
rename from dialog/policies/policies.json
rename to dialog/policies/proposels.json
index b277aeb..d3938e2 100644
--- a/dialog/policies/policies.json
+++ b/dialog/policies/proposels.json
@@ -9,6 +9,6 @@
},
"3": {
"name": "Tire Recylcing Proposed",
- "text": "Mayor [name], used tires a big are a big problem. They waste land space or accumlate in piles that, if ignited, pollute our air. Do you know that tires could be recycled and used in paving material? It can even reduce the cost of building roads. [city] would greatly benefit from having a tire recylcing program.\nWe could set the sheels in motion today, if you agree to enact the Tire Recylcing Program."
+ "text": "Mayor [name], used tires a big are a big problem. They waste land space or accumlate in piles that, if ignited, pollute our air. Do you know that tires could be recycled and used in paving material? It can even reduce the cost of building roads. [city] would greatly benefit from having a tire recylcing program.\nWe could set the wheels in motion today, if you agree to enact the Tire Recylcing Program."
}
}
\ No newline at end of file
diff --git a/dialog/ticker/ticker.json b/dialog/ticker/ticker.json
index b3123d4..5baa469 100644
--- a/dialog/ticker/ticker.json
+++ b/dialog/ticker/ticker.json
@@ -126,10 +126,10 @@
"text": "From The Desk Of Wise Guy Sammy: You Can't Outwait A Bureaucracy."
},
"53": {
- "text": "Mr. Fluffy’s Futures Rise in the Wake of Kitty Kibble Shortage Rumors."
+ "text": "Mr. Fluffy's Futures Rise in the Wake of Kitty Kibble Shortage Rumors."
},
"54": {
- "text": "[species] Discovers Picayune Newspaper in Trash."
+ "text": "[species] Discovers Picayune Newspaper Lying on the Ground; Throws It Away."
},
"55": {
"text": "Local [species] Bill Flopsby Heads County Commission On Snuggles And Hugs."
@@ -151,8 +151,5 @@
},
"61": {
"text": "Bus Misses Turn, Dozens Late For Work."
- },
- "62": {
- "text": "."
}
}
\ No newline at end of file
diff --git a/scenes/game.tscn b/scenes/game.tscn
index fa52765..f58a4dc 100644
--- a/scenes/game.tscn
+++ b/scenes/game.tscn
@@ -69,20 +69,21 @@ anchor_bottom = 1.0
script = ExtResource( 37 )
__meta__ = {
"_edit_lock_": true,
-"_edit_use_anchors_": false
+"_edit_use_anchors_": true
}
[node name="Console" parent="Controls/Windows" instance=ExtResource( 6 )]
-anchor_left = 0.52391
-anchor_top = 0.0691609
-anchor_right = 0.918441
-anchor_bottom = 0.320828
+anchor_left = 0.590492
+anchor_top = 0.0604199
+anchor_right = 0.985023
+anchor_bottom = 0.312087
rect_min_size = Vector2( 400, 150 )
resizable = true
[node name="CityPlanner" parent="Controls/Windows" instance=ExtResource( 4 )]
[node name="TaxWindow" parent="Controls/Windows" instance=ExtResource( 32 )]
+visible = false
anchor_left = 0.297863
anchor_top = 0.409167
anchor_right = 0.702137
@@ -250,162 +251,189 @@ __meta__ = {
[node name="Ordinance" parent="Controls/Windows" instance=ExtResource( 44 )]
-[node name="Menu" type="Panel" parent="Controls"]
-anchor_left = 1.0
+[node name="Status" type="Panel" parent="Controls"]
+anchor_top = 0.860396
anchor_right = 1.0
-anchor_bottom = 1.0
-margin_left = -57.0
-margin_top = -18.0
+anchor_bottom = 1.00206
+__meta__ = {
+"_edit_lock_": true,
+"_edit_use_anchors_": true
+}
+
+[node name="StatCtr" type="HBoxContainer" parent="Controls/Status"]
+anchor_left = 0.00119134
+anchor_top = 0.489112
+anchor_right = 1.00119
+anchor_bottom = 0.489112
+margin_left = 0.940155
+margin_top = -30.0
+margin_right = 0.940063
+margin_bottom = 6.0
+custom_constants/separation = 50
+alignment = 1
+script = ExtResource( 3 )
+__meta__ = {
+"_edit_lock_": true,
+"_edit_use_anchors_": false
+}
+
+[node name="ButtonCtr" type="HBoxContainer" parent="Controls/Status/StatCtr"]
+margin_left = 241.0
+margin_right = 575.0
+margin_bottom = 36.0
+custom_constants/separation = 10
+alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="ButtonCtr" type="VBoxContainer" parent="Controls/Menu"]
-anchor_top = 0.0420712
-anchor_right = 1.0
-anchor_bottom = 1.0
-custom_constants/separation = 5
-__meta__ = {
-"_edit_use_anchors_": true
-}
-
-[node name="TaxBtn" type="Button" parent="Controls/Menu/ButtonCtr"]
-margin_left = 7.0
-margin_right = 49.0
+[node name="TaxBtn" type="Button" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_right = 42.0
margin_bottom = 36.0
hint_tooltip = "RCI"
size_flags_horizontal = 4
icon = ExtResource( 7 )
-[node name="ToolsBtn" type="Button" parent="Controls/Menu/ButtonCtr"]
-margin_left = 7.0
-margin_top = 41.0
-margin_right = 49.0
-margin_bottom = 72.0
+[node name="ToolsBtn" type="Button" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 52.0
+margin_right = 94.0
+margin_bottom = 36.0
hint_tooltip = "Tools"
size_flags_horizontal = 4
icon = ExtResource( 36 )
-[node name="AdvsiorBtn" type="Button" parent="Controls/Menu/ButtonCtr"]
-margin_left = 7.0
-margin_top = 77.0
-margin_right = 49.0
-margin_bottom = 103.0
+[node name="AdvsiorBtn" type="Button" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 104.0
+margin_right = 146.0
+margin_bottom = 36.0
hint_tooltip = "Meet"
size_flags_horizontal = 4
icon = ExtResource( 38 )
-[node name="SettingsBtn" type="Button" parent="Controls/Menu/ButtonCtr"]
-margin_left = 7.0
-margin_top = 108.0
-margin_right = 49.0
-margin_bottom = 140.0
+[node name="SettingsBtn" type="Button" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 156.0
+margin_right = 198.0
+margin_bottom = 36.0
hint_tooltip = "Meet"
size_flags_horizontal = 4
icon = ExtResource( 43 )
-[node name="Status" type="Panel" parent="Controls"]
-anchor_left = -0.0126953
-anchor_top = 0.908333
-anchor_right = 1.01953
-anchor_bottom = 1.0
-__meta__ = {
-"_edit_use_anchors_": true
-}
+[node name="VSeparator" type="VSeparator" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 208.0
+margin_right = 212.0
+margin_bottom = 36.0
-[node name="StatCtr" type="HBoxContainer" parent="Controls/Status"]
-anchor_left = 0.0302744
-anchor_top = 0.527271
-anchor_right = 0.808894
-anchor_bottom = 0.981815
-margin_bottom = -3.8147e-06
-custom_constants/separation = 50
+[node name="TurtleBtn" type="Button" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 222.0
+margin_right = 263.0
+margin_bottom = 36.0
+hint_tooltip = "Slow"
+toggle_mode = true
+icon = ExtResource( 40 )
+
+[node name="CheetaBtn" type="Button" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 273.0
+margin_right = 320.0
+margin_bottom = 36.0
+hint_tooltip = "Fast"
+toggle_mode = true
+icon = ExtResource( 41 )
+
+[node name="VSeparator2" type="VSeparator" parent="Controls/Status/StatCtr/ButtonCtr"]
+margin_left = 330.0
+margin_right = 334.0
+margin_bottom = 36.0
+
+[node name="NameDate" type="VBoxContainer" parent="Controls/Status/StatCtr"]
+margin_left = 625.0
+margin_right = 705.0
+margin_bottom = 36.0
alignment = 1
-script = ExtResource( 3 )
-__meta__ = {
-"_edit_use_anchors_": true
-}
-[node name="CityNameLbl" type="Label" parent="Controls/Status/StatCtr"]
-margin_left = 237.0
-margin_top = 5.0
-margin_right = 303.0
-margin_bottom = 19.0
+[node name="CityNameLbl" type="Label" parent="Controls/Status/StatCtr/NameDate"]
+margin_top = 2.0
+margin_right = 80.0
+margin_bottom = 16.0
text = "City Name"
+align = 1
-[node name="YearCtr" type="HBoxContainer" parent="Controls/Status/StatCtr"]
-margin_left = 353.0
-margin_right = 433.0
-margin_bottom = 25.0
+[node name="YearCtr" type="HBoxContainer" parent="Controls/Status/StatCtr/NameDate"]
+margin_top = 20.0
+margin_right = 80.0
+margin_bottom = 34.0
-[node name="CalIcon" type="TextureRect" parent="Controls/Status/StatCtr/YearCtr"]
+[node name="CalIcon" type="TextureRect" parent="Controls/Status/StatCtr/NameDate/YearCtr"]
margin_right = 10.0
-margin_bottom = 25.0
+margin_bottom = 14.0
texture = ExtResource( 8 )
stretch_mode = 4
-[node name="CalendarLbl" type="Label" parent="Controls/Status/StatCtr/YearCtr"]
+[node name="CalendarLbl" type="Label" parent="Controls/Status/StatCtr/NameDate/YearCtr"]
margin_left = 14.0
-margin_top = 5.0
margin_right = 80.0
-margin_bottom = 19.0
+margin_bottom = 14.0
text = "1/1/12000"
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="BudgetCtr" type="HBoxContainer" parent="Controls/Status/StatCtr"]
-margin_left = 483.0
-margin_right = 509.0
-margin_bottom = 25.0
+[node name="PopBudget" type="VBoxContainer" parent="Controls/Status/StatCtr"]
+margin_left = 755.0
+margin_right = 781.0
+margin_bottom = 36.0
+alignment = 1
-[node name="CoinsIcon" type="TextureRect" parent="Controls/Status/StatCtr/BudgetCtr"]
+[node name="BudgetCtr" type="HBoxContainer" parent="Controls/Status/StatCtr/PopBudget"]
+margin_top = 2.0
+margin_right = 26.0
+margin_bottom = 16.0
+
+[node name="CoinsIcon" type="TextureRect" parent="Controls/Status/StatCtr/PopBudget/BudgetCtr"]
margin_right = 14.0
-margin_bottom = 25.0
+margin_bottom = 14.0
texture = ExtResource( 42 )
stretch_mode = 4
-[node name="BudgetLbl" type="Label" parent="Controls/Status/StatCtr/BudgetCtr"]
+[node name="BudgetLbl" type="Label" parent="Controls/Status/StatCtr/PopBudget/BudgetCtr"]
margin_left = 18.0
-margin_top = 5.0
margin_right = 26.0
-margin_bottom = 19.0
+margin_bottom = 14.0
text = "0"
-[node name="PopCtr" type="HBoxContainer" parent="Controls/Status/StatCtr"]
-margin_left = 559.0
-margin_right = 585.0
-margin_bottom = 25.0
+[node name="PopCtr" type="HBoxContainer" parent="Controls/Status/StatCtr/PopBudget"]
+margin_top = 20.0
+margin_right = 26.0
+margin_bottom = 34.0
-[node name="PopIcon" type="TextureRect" parent="Controls/Status/StatCtr/PopCtr"]
+[node name="PopIcon" type="TextureRect" parent="Controls/Status/StatCtr/PopBudget/PopCtr"]
margin_right = 14.0
-margin_bottom = 25.0
+margin_bottom = 14.0
texture = ExtResource( 2 )
stretch_mode = 4
-[node name="PopLbl" type="Label" parent="Controls/Status/StatCtr/PopCtr"]
+[node name="PopLbl" type="Label" parent="Controls/Status/StatCtr/PopBudget/PopCtr"]
margin_left = 18.0
-margin_top = 5.0
margin_right = 26.0
-margin_bottom = 19.0
+margin_bottom = 14.0
text = "0"
[node name="TickerBg" type="ColorRect" parent="Controls/Status"]
-anchor_left = 0.0331126
-anchor_top = 0.0363635
-anchor_right = 0.808894
-anchor_bottom = 0.436362
+anchor_left = 0.00073738
+anchor_top = 1.0
+anchor_right = 1.00074
+anchor_bottom = 1.0
+margin_top = -28.0
color = Color( 0, 0, 0, 1 )
script = ExtResource( 35 )
__meta__ = {
-"_edit_use_anchors_": true
+"_edit_use_anchors_": false
}
[node name="TickerTxt" type="RichTextLabel" parent="Controls/Status/TickerBg"]
-anchor_left = 0.00601721
-anchor_top = 0.181818
-anchor_right = 0.994298
-anchor_bottom = 0.954545
+anchor_left = 0.0145068
+anchor_top = 0.17248
+anchor_right = 0.987427
+anchor_bottom = 0.93248
margin_top = 0.687989
margin_bottom = 0.687988
__meta__ = {
@@ -413,38 +441,12 @@ __meta__ = {
"_edit_use_anchors_": true
}
-[node name="SpeedCtr" type="HBoxContainer" parent="Controls/Status"]
-anchor_left = 0.816463
-anchor_top = 0.181818
-anchor_right = 0.918639
-anchor_bottom = 0.818179
-alignment = 1
-__meta__ = {
-"_edit_use_anchors_": true
-}
-
-[node name="TurtleBtn" type="Button" parent="Controls/Status/SpeedCtr"]
-margin_left = 7.0
-margin_right = 48.0
-margin_bottom = 35.0
-hint_tooltip = "Slow"
-toggle_mode = true
-icon = ExtResource( 40 )
-
-[node name="CheetaBtn" type="Button" parent="Controls/Status/SpeedCtr"]
-margin_left = 52.0
-margin_right = 99.0
-margin_bottom = 35.0
-hint_tooltip = "Fast"
-toggle_mode = true
-icon = ExtResource( 41 )
-
[connection signal="timeout" from="DayCycle" to="." method="_on_DayCycle_timeout"]
[connection signal="timeout" from="RotateNews" to="Controls/Status/TickerBg" method="_on_RotateNews_timeout"]
[connection signal="pressed" from="Controls/Windows/ToolsWindow/CenterCtr/VertCtr/LargeCtr/CoalBtn" to="Map" method="_on_CoalBtn_pressed"]
[connection signal="pressed" from="Controls/Windows/ToolsWindow/CenterCtr/VertCtr/ZonesCtr/ResBtn" to="Map" method="_on_ResBtn_pressed"]
-[connection signal="pressed" from="Controls/Menu/ButtonCtr/TaxBtn" to="Controls/Windows" method="_on_TaxBtn_pressed"]
-[connection signal="pressed" from="Controls/Menu/ButtonCtr/ToolsBtn" to="Controls/Windows" method="_on_ToolsBtn_pressed"]
-[connection signal="pressed" from="Controls/Menu/ButtonCtr/AdvsiorBtn" to="Controls/Windows" method="_on_AdvsiorBtn_pressed"]
-[connection signal="toggled" from="Controls/Status/SpeedCtr/TurtleBtn" to="." method="_on_TurtleBtn_toggled"]
-[connection signal="toggled" from="Controls/Status/SpeedCtr/CheetaBtn" to="." method="_on_CheetaBtn_toggled"]
+[connection signal="pressed" from="Controls/Status/StatCtr/ButtonCtr/TaxBtn" to="Controls/Windows" method="_on_TaxBtn_pressed"]
+[connection signal="pressed" from="Controls/Status/StatCtr/ButtonCtr/ToolsBtn" to="Controls/Windows" method="_on_ToolsBtn_pressed"]
+[connection signal="pressed" from="Controls/Status/StatCtr/ButtonCtr/AdvsiorBtn" to="Controls/Windows" method="_on_AdvsiorBtn_pressed"]
+[connection signal="toggled" from="Controls/Status/StatCtr/ButtonCtr/TurtleBtn" to="." method="_on_TurtleBtn_toggled"]
+[connection signal="toggled" from="Controls/Status/StatCtr/ButtonCtr/CheetaBtn" to="." method="_on_CheetaBtn_toggled"]
diff --git a/scenes/windows/TaxWindow.tscn b/scenes/windows/TaxWindow.tscn
index bcdfc4a..2e6b73c 100644
--- a/scenes/windows/TaxWindow.tscn
+++ b/scenes/windows/TaxWindow.tscn
@@ -1,12 +1,16 @@
-[gd_scene load_steps=2 format=2]
+[gd_scene load_steps=5 format=2]
+[ext_resource path="res://sprites/symbols/fontawesome/coins.svg" type="Texture" id=1]
[ext_resource path="res://scripts/tax_window.gd" type="Script" id=2]
+[ext_resource path="res://sprites/symbols/fontawesome/arrow-pointing-down.svg" type="Texture" id=3]
+[ext_resource path="res://sprites/symbols/fontawesome/arrow-up.svg" type="Texture" id=4]
[node name="TaxWindow" type="WindowDialog"]
+visible = true
anchor_left = 0.2809
-anchor_top = 0.265
+anchor_top = 0.265764
anchor_right = 0.631486
-anchor_bottom = 0.446667
+anchor_bottom = 0.447431
margin_left = -0.641174
margin_right = -0.641174
window_title = "RCI"
@@ -116,26 +120,54 @@ margin_bottom = 50.0
text = "1%"
[node name="IncomeCtr" type="HBoxContainer" parent="."]
-anchor_left = 0.00835655
-anchor_top = 0.642202
-anchor_right = 0.97493
-anchor_bottom = 0.834862
+anchor_left = 0.00707957
+anchor_top = 0.650614
+anchor_right = 0.973653
+anchor_bottom = 0.843274
+alignment = 1
__meta__ = {
-"_edit_use_anchors_": true
+"_edit_use_anchors_": false
+}
+
+[node name="CoinIcn" type="TextureRect" parent="IncomeCtr"]
+margin_left = 115.0
+margin_right = 129.0
+margin_bottom = 20.0
+texture = ExtResource( 1 )
+stretch_mode = 6
+
+[node name="UpArrowIcn" type="TextureRect" parent="IncomeCtr"]
+modulate = Color( 0.054902, 1, 0, 1 )
+margin_left = 133.0
+margin_right = 142.0
+margin_bottom = 20.0
+texture = ExtResource( 4 )
+stretch_mode = 6
+__meta__ = {
+"_edit_use_anchors_": false
}
[node name="IcnomeLbl" type="Label" parent="IncomeCtr"]
+margin_left = 146.0
margin_top = 3.0
-margin_right = 90.0
+margin_right = 180.0
margin_bottom = 17.0
-text = "Income: $0/yr"
+text = "0/mo"
+
+[node name="DownArrowIcn" type="TextureRect" parent="IncomeCtr"]
+modulate = Color( 1, 0, 0, 1 )
+margin_left = 184.0
+margin_right = 193.0
+margin_bottom = 20.0
+texture = ExtResource( 3 )
+stretch_mode = 6
[node name="ExpensivesLbl" type="Label" parent="IncomeCtr"]
-margin_left = 94.0
+margin_left = 197.0
margin_top = 3.0
-margin_right = 206.0
+margin_right = 231.0
margin_bottom = 17.0
-text = "Expensives: $0/yr"
+text = "0/mo"
[connection signal="value_changed" from="TaxSlidersCtr/ResCtr/ResSlider" to="." method="_on_ResSlider_value_changed"]
[connection signal="value_changed" from="TaxSlidersCtr/ComCtr/ComSlider" to="." method="_on_ComSlider_value_changed"]
diff --git a/screenshot.png b/screenshot.png
index 6da2127..6bc0bec 100644
Binary files a/screenshot.png and b/screenshot.png differ
diff --git a/scripts/advisor_window.gd b/scripts/advisor_window.gd
index ff621c4..e3b533a 100644
--- a/scripts/advisor_window.gd
+++ b/scripts/advisor_window.gd
@@ -61,7 +61,15 @@ func _init_advisor(file, advisor):
func _launch_advisor_window(key):
_index_dialogue()
- description_label.text = dialogue_keys[key].text
+ var message: String = dialogue_keys[key].text
+
+ if "[name]" in message:
+ message = message.replace("[name]", SimData.mayor_name)
+
+ if "[city]" in message:
+ message = message.replace("[city]", SimData.city_name)
+
+ description_label.text = message
window_title = dialogue_keys[key].name
show()
diff --git a/scripts/autoload/sim_events.gd b/scripts/autoload/sim_events.gd
index b74f36e..2f774f9 100644
--- a/scripts/autoload/sim_events.gd
+++ b/scripts/autoload/sim_events.gd
@@ -4,6 +4,7 @@ signal has_power
signal budget
signal game_speed
+# Policies and Advisors
signal policy_message(policy)
signal policy_analysis(advisor, policy)
signal advisor_message(advisor, message)
diff --git a/scripts/city_status.gd b/scripts/city_status.gd
index 7b3ca63..5de90ad 100644
--- a/scripts/city_status.gd
+++ b/scripts/city_status.gd
@@ -1,8 +1,8 @@
extends HBoxContainer
-onready var city_name = $CityNameLbl
-onready var budget = $BudgetCtr/BudgetLbl
-onready var calendar = $YearCtr/CalendarLbl
+onready var city_name = $NameDate/CityNameLbl
+onready var budget = $PopBudget/BudgetCtr/BudgetLbl
+onready var calendar = $NameDate/YearCtr/CalendarLbl
func _process(delta):
city_name.text = SimData.city_name
diff --git a/scripts/game.gd b/scripts/game.gd
index e25cba5..d4e01de 100644
--- a/scripts/game.gd
+++ b/scripts/game.gd
@@ -2,8 +2,8 @@ extends Node2D
onready var rotate_news = $RotateNews
onready var day_cycle = $DayCycle
-onready var turtle_btn = $Controls/Status/SpeedCtr/TurtleBtn
-onready var cheeta_btn = $Controls/Status/SpeedCtr/CheetaBtn
+onready var turtle_btn = $Controls/Status/StatCtr/ButtonCtr/TurtleBtn
+onready var cheeta_btn = $Controls/Status/StatCtr/ButtonCtr/CheetaBtn
func _ready():
SimEvents.connect("resume_news", self, "_resume_rotation")
@@ -45,3 +45,4 @@ func _on_CheetaBtn_toggled(button_pressed):
if button_pressed:
day_cycle.wait_time = 2
turtle_btn.pressed = false
+
diff --git a/scripts/policy_window.gd b/scripts/policy_window.gd
index a89add3..9e69921 100644
--- a/scripts/policy_window.gd
+++ b/scripts/policy_window.gd
@@ -1,38 +1,39 @@
extends WindowDialog
-var dialogue_file = "res://dialog/policies/policies.json"
+var dialogue_file = "res://dialog/policies/proposels.json"
var dialogue_keys = []
var dialogue_name = ""
var dialogue_text = ""
-var policy: int
+var policy_id
onready var ordinance_label = $OrdinanceLbl
onready var description_label = $DescPanel/DescriptionLbl
-func _start_dialogue(ordinance):
-
+func _start_dialogue(policy):
+ match policy:
+ [SimData.Ordinances.ENERGY_CONSERVATION, 1]:
+ policy_id = 1
+ _launch_policy_window(1)
+ [SimData.Ordinances.CLEAN_AIR_ACT, 3]:
+ policy_id = 2
+ _launch_policy_window(2)
+ [SimData.Ordinances.TIRE_RECYCLE, 3]:
+ policy_id = 3
+ _launch_policy_window(3)
+
+func _launch_policy_window(key):
_index_dialogue()
+ var message: String = dialogue_keys[key].text
- match ordinance:
- 1:
- policy = 1
- 2:
- policy = 2
- 3:
- policy = 3
+ if "[name]" in message:
+ message = message.replace("[name]", SimData.mayor_name)
- var proposel: String = dialogue_keys[policy].text
-
- if "[name]" in proposel:
- proposel = proposel.replace("[name]", SimData.mayor_name)
-
- if "[city]" in proposel:
- proposel = proposel.replace("[city]", SimData.city_name)
-
- description_label.text = proposel
- ordinance_label.text = dialogue_keys[policy].name
+ if "[city]" in message:
+ message = message.replace("[city]", SimData.city_name)
+ description_label.text = message
+ window_title = dialogue_keys[key].name
show()
func _index_dialogue():
@@ -52,18 +53,18 @@ func _ready():
SimEvents.connect("policy_message", self, "_start_dialogue")
func _on_IgnoreBtn_pressed():
- policy = 0
+ policy_id = 0
description_label.text = ""
ordinance_label.text = ""
hide()
func _on_EnectBtn_pressed():
- match policy:
+ match policy_id:
1: SimEvents.emit_signal("energy_saving")
2: SimEvents.emit_signal("clean_air_act")
func _on_AnalysisBtn_pressed():
- match policy:
- 1: SimEvents.emit_signal("policy_analysis", SimData.Advisors.CITY_PLANNER, policy)
- 2: SimEvents.emit_signal("policy_analysis", SimData.Advisors.CITY_PLANNER, policy)
- 3: SimEvents.emit_signal("policy_analysis", SimData.Advisors.CITY_PLANNER, policy)
+ match policy_id:
+ 1: SimEvents.emit_signal("policy_analysis", SimData.Advisors.CITY_PLANNER, policy_id)
+ 2: SimEvents.emit_signal("policy_analysis", SimData.Advisors.CITY_PLANNER, policy_id)
+ 3: SimEvents.emit_signal("policy_analysis", SimData.Advisors.CITY_PLANNER, policy_id)
diff --git a/scripts/tax_window.gd b/scripts/tax_window.gd
index 386950e..9587407 100644
--- a/scripts/tax_window.gd
+++ b/scripts/tax_window.gd
@@ -26,9 +26,8 @@ func _ready():
func _process(delta):
var total_income = int(SimData.res_income + SimData.comm_income + SimData.ind_income)
-
- if total_income >= 1:
- annual_income.text = "Income: " + SimData.currency + str(total_income) + "/yr"
+ if SimData.prev_month < SimData.month and total_income > 1:
+ annual_income.text = str(total_income) + "/mo"
func _on_ResSlider_value_changed(value):
SimData.res_tax = int(value)
diff --git a/sprites/symbols/fontawesome/arrow-pointing-down.svg b/sprites/symbols/fontawesome/arrow-pointing-down.svg
new file mode 100644
index 0000000..765f329
--- /dev/null
+++ b/sprites/symbols/fontawesome/arrow-pointing-down.svg
@@ -0,0 +1,117 @@
+
+
diff --git a/sprites/symbols/fontawesome/arrow-pointing-down.svg.import b/sprites/symbols/fontawesome/arrow-pointing-down.svg.import
new file mode 100644
index 0000000..df67ad3
--- /dev/null
+++ b/sprites/symbols/fontawesome/arrow-pointing-down.svg.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/arrow-pointing-down.svg-2e9bf66bb94d470af7a92af17efa38ff.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://sprites/symbols/fontawesome/arrow-pointing-down.svg"
+dest_files=[ "res://.import/arrow-pointing-down.svg-2e9bf66bb94d470af7a92af17efa38ff.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/sprites/symbols/fontawesome/arrow-up.svg b/sprites/symbols/fontawesome/arrow-up.svg
new file mode 100644
index 0000000..8e4bff9
--- /dev/null
+++ b/sprites/symbols/fontawesome/arrow-up.svg
@@ -0,0 +1,117 @@
+
+
diff --git a/sprites/symbols/fontawesome/arrow-up.svg.import b/sprites/symbols/fontawesome/arrow-up.svg.import
new file mode 100644
index 0000000..9da6739
--- /dev/null
+++ b/sprites/symbols/fontawesome/arrow-up.svg.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/arrow-up.svg-5447ff6f0f50b151c17fd310ad1c924b.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://sprites/symbols/fontawesome/arrow-up.svg"
+dest_files=[ "res://.import/arrow-up.svg-5447ff6f0f50b151c17fd310ad1c924b.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0