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:
Tony Bark 2021-05-27 10:33:08 -04:00
parent 346ceaacb9
commit 72e2c96542
76 changed files with 2489 additions and 458 deletions

View file

@ -0,0 +1,49 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scripts/advisor_window.gd" type="Script" id=1]
[node name="Advisor" type="AcceptDialog"]
anchor_left = 0.293945
anchor_top = 0.303333
anchor_right = 0.706055
anchor_bottom = 0.696667
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Container" type="HSplitContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 8.0
margin_right = -8.0
margin_bottom = -36.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Advisor" type="VBoxContainer" parent="Container"]
margin_right = 100.0
margin_bottom = 192.0
[node name="Avatar" type="TextureRect" parent="Container/Advisor"]
margin_right = 100.0
rect_min_size = Vector2( 100, 0 )
[node name="RankLbl" type="Label" parent="Container/Advisor"]
margin_top = 4.0
margin_right = 100.0
margin_bottom = 18.0
align = 1
[node name="NameLbl" type="Label" parent="Container/Advisor"]
margin_top = 22.0
margin_right = 100.0
margin_bottom = 36.0
align = 1
[node name="DescriptionLbl" type="RichTextLabel" parent="Container"]
margin_left = 112.0
margin_right = 406.001
margin_bottom = 192.0

View file

@ -0,0 +1,51 @@
[gd_scene format=2]
[node name="Credits" type="WindowDialog"]
anchor_left = 0.394043
anchor_top = 0.293333
anchor_right = 0.605957
anchor_bottom = 0.706667
window_title = "Credits"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="RichText" type="RichTextLabel" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
bbcode_enabled = true
bbcode_text = "[center]
Developed by
Tony Bark
Sprites by
Maxis
Icons by
Font Awesome
Powered by
Godot Engine
Inspired by
SimCity
[/center]"
text = "
Developed by
Tony Bark
Sprites by
Maxis
Icons by
Font Awesome
Powered by
Godot Engine
Inspired by
SimCity
"
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,60 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/debug_console.gd" type="Script" id=1]
[ext_resource path="res://scripts/command_handler.gd" type="Script" id=2]
[node name="DebugConsole" type="WindowDialog"]
pause_mode = 2
anchor_left = 0.302734
anchor_top = 0.365833
anchor_right = 0.697266
anchor_bottom = 0.634167
margin_right = -4.0
margin_bottom = -1.0
window_title = "Console"
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="CommandHandler" type="Node" parent="."]
script = ExtResource( 2 )
[node name="Output" type="TextEdit" parent="."]
anchor_left = 0.0148515
anchor_top = 0.0372671
anchor_right = 0.987624
anchor_bottom = 0.751553
readonly = true
wrap_enabled = true
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
}
[node name="Input" type="LineEdit" parent="."]
anchor_left = 0.0173267
anchor_top = 0.801242
anchor_right = 0.80198
anchor_bottom = 0.950311
caret_blink = true
caret_blink_speed = 0.5
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
}
[node name="SubmitBtn" type="Button" parent="."]
anchor_left = 0.824257
anchor_top = 0.796624
anchor_right = 0.985148
anchor_bottom = 0.951903
margin_top = 7.62939e-06
text = "Submit"
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
}
[connection signal="text_entered" from="Input" to="." method="_on_Input_text_entered"]
[connection signal="pressed" from="SubmitBtn" to="." method="_on_SubmitBtn_pressed"]

63
scenes/windows/Meet.tscn Normal file
View file

@ -0,0 +1,63 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://sprites/avatars/cindy.png" type="Texture" id=1]
[ext_resource path="res://sprites/avatars/kit.png" type="Texture" id=2]
[ext_resource path="res://sprites/avatars/zc.png" type="Texture" id=3]
[node name="AdvisorMeet" type="WindowDialog"]
anchor_left = 0.328125
anchor_top = 0.301667
anchor_right = 0.722656
anchor_bottom = 0.763333
window_title = "Meet"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Advsiors" type="HBoxContainer" parent="."]
anchor_left = -0.00161441
anchor_top = -0.00235459
anchor_right = 0.998386
anchor_bottom = -0.00235459
margin_top = 4.0
margin_bottom = 104.0
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CityPlannerBtn" type="TextureButton" parent="Advsiors"]
margin_left = 47.0
margin_right = 147.0
margin_bottom = 100.0
texture_normal = ExtResource( 1 )
[node name="FinanceBtn" type="TextureButton" parent="Advsiors"]
margin_left = 151.0
margin_right = 251.0
margin_bottom = 100.0
texture_normal = ExtResource( 2 )
[node name="TransportBtn" type="TextureButton" parent="Advsiors"]
margin_left = 255.0
margin_right = 355.0
margin_bottom = 100.0
texture_normal = ExtResource( 3 )
[node name="Tree" type="Tree" parent="."]
anchor_left = 0.0148515
anchor_top = 0.411552
anchor_right = 0.987624
anchor_bottom = 0.978339
__meta__ = {
"_edit_use_anchors_": true
}
[node name="HSeparator" type="HSeparator" parent="."]
anchor_left = 0.0170455
anchor_top = 0.380995
anchor_right = 0.985795
anchor_bottom = 0.397731
__meta__ = {
"_edit_use_anchors_": true
}

View file

@ -0,0 +1,127 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://sprites/symbols/fontawesome/thumbs-down.svg" type="Texture" id=1]
[ext_resource path="res://sprites/symbols/fontawesome/thumbs-up.svg" type="Texture" id=2]
[ext_resource path="res://sprites/symbols/fontawesome/question-circle.svg" type="Texture" id=3]
[ext_resource path="res://scripts/policy_window.gd" type="Script" id=4]
[node name="Ordinance" type="WindowDialog"]
anchor_left = 0.324707
anchor_top = 0.238333
anchor_right = 0.675293
anchor_bottom = 0.761667
window_title = "Ordinance"
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="OrdinanceLbl" type="Label" parent="."]
anchor_left = 0.0222841
anchor_top = 0.022293
anchor_right = 0.97493
anchor_bottom = 0.0700637
__meta__ = {
"_edit_use_anchors_": true
}
[node name="ActionCtr" type="VBoxContainer" parent="."]
anchor_left = 0.0278552
anchor_top = 0.729299
anchor_right = 0.245125
anchor_bottom = 0.977707
custom_constants/separation = 5
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
}
[node name="TakeActionLbl" type="Label" parent="ActionCtr"]
margin_right = 78.0
margin_bottom = 14.0
text = "Take Action:"
[node name="EnectCtr" type="HBoxContainer" parent="ActionCtr"]
margin_top = 19.0
margin_right = 78.0
margin_bottom = 39.0
custom_constants/separation = 10
[node name="EnectBtn" type="Button" parent="ActionCtr/EnectCtr"]
margin_right = 22.0
margin_bottom = 20.0
icon = ExtResource( 2 )
[node name="EnectLbl" type="Label" parent="ActionCtr/EnectCtr"]
margin_left = 32.0
margin_top = 3.0
margin_right = 66.0
margin_bottom = 17.0
text = "Enact"
[node name="IgnoreCtr" type="HBoxContainer" parent="ActionCtr"]
margin_top = 44.0
margin_right = 78.0
margin_bottom = 64.0
custom_constants/separation = 10
[node name="IgnoreBtn" type="Button" parent="ActionCtr/IgnoreCtr"]
margin_right = 22.0
margin_bottom = 20.0
icon = ExtResource( 1 )
[node name="IgnoreLbl" type="Label" parent="ActionCtr/IgnoreCtr"]
margin_left = 32.0
margin_top = 3.0
margin_right = 73.0
margin_bottom = 17.0
text = "Ignore"
[node name="DescPanel" type="Panel" parent="."]
anchor_left = 0.281337
anchor_top = 0.0859873
anchor_right = 0.97493
anchor_bottom = 0.684713
__meta__ = {
"_edit_use_anchors_": true
}
[node name="DescriptionLbl" type="RichTextLabel" parent="DescPanel"]
anchor_left = 0.0160643
anchor_top = 0.0194175
anchor_right = 0.971888
anchor_bottom = 0.975728
margin_left = 0.652039
margin_right = 0.652039
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
}
[node name="AnalysisCtr" type="HBoxContainer" parent="."]
anchor_left = 0.549742
anchor_top = 0.869427
anchor_right = 0.967569
anchor_bottom = 0.933121
custom_constants/separation = 10
alignment = 1
__meta__ = {
"_edit_use_anchors_": true
}
[node name="AnalysisLbl" type="Label" parent="AnalysisCtr"]
margin_left = 5.0
margin_top = 3.0
margin_right = 111.0
margin_bottom = 17.0
text = "Impact Analysis:"
[node name="AnalysisBtn" type="Button" parent="AnalysisCtr"]
margin_left = 121.0
margin_right = 143.0
margin_bottom = 20.0
icon = ExtResource( 3 )
[connection signal="pressed" from="ActionCtr/EnectCtr/EnectBtn" to="." method="_on_EnectBtn_pressed"]
[connection signal="pressed" from="ActionCtr/IgnoreCtr/IgnoreBtn" to="." method="_on_IgnoreBtn_pressed"]
[connection signal="pressed" from="AnalysisCtr/AnalysisBtn" to="." method="_on_AnalysisBtn_pressed"]

View file

@ -0,0 +1,142 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scripts/tax_window.gd" type="Script" id=2]
[node name="TaxWindow" type="WindowDialog"]
anchor_left = 0.2809
anchor_top = 0.265
anchor_right = 0.631486
anchor_bottom = 0.446667
margin_left = -0.641174
margin_right = -0.641174
window_title = "RCI"
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": true
}
[node name="TaxSlidersCtr" type="VBoxContainer" parent="."]
anchor_left = 0.0167131
anchor_top = 0.0666667
anchor_right = 0.874652
anchor_bottom = 0.6
alignment = 1
__meta__ = {
"_edit_use_anchors_": true
}
[node name="ResCtr" type="HSplitContainer" parent="TaxSlidersCtr"]
margin_top = 1.0
margin_right = 308.0
margin_bottom = 17.0
dragger_visibility = 1
[node name="ResLbl" type="Label" parent="TaxSlidersCtr/ResCtr"]
margin_top = 1.0
margin_right = 71.0
margin_bottom = 15.0
text = "Residential"
align = 2
[node name="ResSlider" type="HSlider" parent="TaxSlidersCtr/ResCtr"]
margin_left = 83.0
margin_right = 308.0
margin_bottom = 16.0
min_value = 1.0
max_value = 10.0
value = 1.0
[node name="ComCtr" type="HSplitContainer" parent="TaxSlidersCtr"]
margin_top = 21.0
margin_right = 308.0
margin_bottom = 37.0
dragger_visibility = 1
[node name="ComLbl" type="Label" parent="TaxSlidersCtr/ComCtr"]
margin_top = 1.0
margin_right = 77.0
margin_bottom = 15.0
text = "Commerical"
align = 2
[node name="ComSlider" type="HSlider" parent="TaxSlidersCtr/ComCtr"]
margin_left = 89.0
margin_right = 308.0
margin_bottom = 16.0
min_value = 1.0
max_value = 10.0
value = 1.0
[node name="IndCtr" type="HSplitContainer" parent="TaxSlidersCtr"]
margin_top = 41.0
margin_right = 308.0
margin_bottom = 57.0
dragger_visibility = 1
[node name="IndLbl" type="Label" parent="TaxSlidersCtr/IndCtr"]
margin_top = 1.0
margin_right = 57.0
margin_bottom = 15.0
text = "Industral"
align = 2
[node name="IndSlider" type="HSlider" parent="TaxSlidersCtr/IndCtr"]
margin_left = 69.0
margin_right = 308.0
margin_bottom = 16.0
min_value = 1.0
max_value = 10.0
value = 1.0
[node name="PrecentCtr" type="VBoxContainer" parent="."]
anchor_left = 0.88329
anchor_top = 0.0790961
anchor_right = 0.991643
anchor_bottom = 0.555287
margin_bottom = -20.339
__meta__ = {
"_edit_use_anchors_": true
}
[node name="ResPctLbl" type="Label" parent="PrecentCtr"]
margin_right = 38.0
margin_bottom = 14.0
text = "1%"
[node name="ComPctLbl" type="Label" parent="PrecentCtr"]
margin_top = 18.0
margin_right = 38.0
margin_bottom = 32.0
text = "1%"
[node name="IndPctLbl" type="Label" parent="PrecentCtr"]
margin_top = 36.0
margin_right = 38.0
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
__meta__ = {
"_edit_use_anchors_": true
}
[node name="IcnomeLbl" type="Label" parent="IncomeCtr"]
margin_top = 3.0
margin_right = 90.0
margin_bottom = 17.0
text = "Income: $0/yr"
[node name="ExpensivesLbl" type="Label" parent="IncomeCtr"]
margin_left = 94.0
margin_top = 3.0
margin_right = 206.0
margin_bottom = 17.0
text = "Expensives: $0/yr"
[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"]
[connection signal="value_changed" from="TaxSlidersCtr/IndCtr/IndSlider" to="." method="_on_IndSlider_value_changed"]

View file

@ -0,0 +1,163 @@
[gd_scene load_steps=24 format=2]
[ext_resource path="res://sprites/ui/iccom.png" type="Texture" id=1]
[ext_resource path="res://sprites/ui/icpolhi.png" type="Texture" id=2]
[ext_resource path="res://sprites/ui/iccomhi.png" type="Texture" id=3]
[ext_resource path="res://sprites/ui/icres.png" type="Texture" id=4]
[ext_resource path="res://sprites/ui/icreshi.png" type="Texture" id=5]
[ext_resource path="res://sprites/ui/icfire.png" type="Texture" id=6]
[ext_resource path="res://sprites/ui/icindhi.png" type="Texture" id=7]
[ext_resource path="res://sprites/ui/icind.png" type="Texture" id=8]
[ext_resource path="res://sprites/ui/icqry.png" type="Texture" id=9]
[ext_resource path="res://sprites/ui/icpol.png" type="Texture" id=10]
[ext_resource path="res://sprites/ui/icnuc.png" type="Texture" id=11]
[ext_resource path="res://sprites/ui/icpark.png" type="Texture" id=12]
[ext_resource path="res://sprites/ui/icseap.png" type="Texture" id=13]
[ext_resource path="res://sprites/ui/icseaphi.png" type="Texture" id=14]
[ext_resource path="res://sprites/ui/icstad.png" type="Texture" id=15]
[ext_resource path="res://sprites/ui/icdozrhi.png" type="Texture" id=16]
[ext_resource path="res://sprites/ui/icfirehi.png" type="Texture" id=17]
[ext_resource path="res://sprites/ui/iccoal.png" type="Texture" id=18]
[ext_resource path="res://sprites/ui/icqryhi.png" type="Texture" id=19]
[ext_resource path="res://sprites/ui/icparkhi.png" type="Texture" id=20]
[ext_resource path="res://sprites/ui/icdozr.png" type="Texture" id=21]
[ext_resource path="res://sprites/ui/iccoalhi.png" type="Texture" id=22]
[ext_resource path="res://sprites/ui/icnuchi.png" type="Texture" id=23]
[node name="ToolsWindow" type="WindowDialog"]
anchor_left = 0.40332
anchor_top = 0.315
anchor_right = 0.544922
anchor_bottom = 0.683333
window_title = "Tools"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="CenterCtr" type="CenterContainer" parent="."]
anchor_left = 0.5
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -90.0
margin_right = 90.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VertCtr" type="VBoxContainer" parent="CenterCtr"]
margin_top = 24.0
margin_right = 180.0
margin_bottom = 196.0
[node name="LargeCtr" type="HBoxContainer" parent="CenterCtr/VertCtr"]
margin_right = 180.0
margin_bottom = 42.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureButton" type="TextureButton" parent="CenterCtr/VertCtr/LargeCtr"]
margin_right = 42.0
margin_bottom = 42.0
texture_normal = ExtResource( 15 )
[node name="TextureButton2" type="TextureButton" parent="CenterCtr/VertCtr/LargeCtr"]
margin_left = 46.0
margin_right = 88.0
margin_bottom = 42.0
texture_normal = ExtResource( 13 )
texture_pressed = ExtResource( 14 )
[node name="NuclearBtn" type="TextureButton" parent="CenterCtr/VertCtr/LargeCtr"]
margin_left = 92.0
margin_right = 134.0
margin_bottom = 42.0
texture_normal = ExtResource( 11 )
texture_pressed = ExtResource( 23 )
[node name="CoalBtn" type="TextureButton" parent="CenterCtr/VertCtr/LargeCtr"]
margin_left = 138.0
margin_right = 180.0
margin_bottom = 42.0
texture_normal = ExtResource( 18 )
texture_pressed = ExtResource( 22 )
[node name="SmallCtr" type="HBoxContainer" parent="CenterCtr/VertCtr"]
margin_top = 46.0
margin_right = 180.0
margin_bottom = 80.0
__meta__ = {
"_edit_use_anchors_": true
}
[node name="PoliceBtn" type="TextureButton" parent="CenterCtr/VertCtr/SmallCtr"]
margin_right = 34.0
margin_bottom = 34.0
texture_normal = ExtResource( 2 )
texture_pressed = ExtResource( 10 )
[node name="FireBtn" type="TextureButton" parent="CenterCtr/VertCtr/SmallCtr"]
margin_left = 38.0
margin_right = 72.0
margin_bottom = 34.0
texture_normal = ExtResource( 17 )
texture_pressed = ExtResource( 6 )
[node name="ParkBtn" type="TextureButton" parent="CenterCtr/VertCtr/SmallCtr"]
margin_left = 76.0
margin_right = 110.0
margin_bottom = 34.0
texture_normal = ExtResource( 12 )
texture_pressed = ExtResource( 20 )
[node name="ToolsCtr" type="HBoxContainer" parent="CenterCtr/VertCtr"]
margin_top = 84.0
margin_right = 180.0
margin_bottom = 118.0
__meta__ = {
"_edit_use_anchors_": true
}
[node name="InfoBtn" type="TextureButton" parent="CenterCtr/VertCtr/ToolsCtr"]
margin_right = 34.0
margin_bottom = 34.0
texture_normal = ExtResource( 9 )
texture_pressed = ExtResource( 19 )
[node name="BulldozeBtn" type="TextureButton" parent="CenterCtr/VertCtr/ToolsCtr"]
margin_left = 38.0
margin_right = 72.0
margin_bottom = 34.0
texture_normal = ExtResource( 21 )
texture_pressed = ExtResource( 16 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ZonesCtr" type="HBoxContainer" parent="CenterCtr/VertCtr"]
margin_top = 122.0
margin_right = 180.0
margin_bottom = 172.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ResBtn" type="TextureButton" parent="CenterCtr/VertCtr/ZonesCtr"]
margin_right = 34.0
margin_bottom = 50.0
texture_normal = ExtResource( 4 )
texture_pressed = ExtResource( 5 )
[node name="ComBtn" type="TextureButton" parent="CenterCtr/VertCtr/ZonesCtr"]
margin_left = 38.0
margin_right = 72.0
margin_bottom = 50.0
texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 3 )
[node name="IndBtn" type="TextureButton" parent="CenterCtr/VertCtr/ZonesCtr"]
margin_left = 76.0
margin_right = 110.0
margin_bottom = 50.0
texture_normal = ExtResource( 8 )
texture_pressed = ExtResource( 7 )