mirror of
https://github.com/tonytins/citylimits.git
synced 2025-03-15 04:11:23 +00:00
Rebinded buttons.
- WIP and very primitive power grid logic
This commit is contained in:
parent
abf160838c
commit
44386959d3
3 changed files with 195 additions and 13 deletions
201
scenes/game.tscn
201
scenes/game.tscn
|
@ -1,10 +1,13 @@
|
|||
[gd_scene load_steps=35 format=2]
|
||||
[gd_scene load_steps=45 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/maps/MapOne.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scenes/windows/Status.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://scripts/ticker.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/population.svg" type="Texture" id=3]
|
||||
[ext_resource path="res://scenes/windows/Advisor.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://assets/ui/iccom.png" type="Texture" id=5]
|
||||
[ext_resource path="res://scenes/windows/DebugConsole.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/fast.svg" type="Texture" id=7]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/slow.svg" type="Texture" id=8]
|
||||
[ext_resource path="res://assets/ui/icres.png" type="Texture" id=9]
|
||||
[ext_resource path="res://assets/ui/icreshi.png" type="Texture" id=10]
|
||||
[ext_resource path="res://assets/ui/icfire.png" type="Texture" id=11]
|
||||
|
@ -31,8 +34,15 @@
|
|||
[ext_resource path="res://scenes/windows/TaxWindow.tscn" type="PackedScene" id=32]
|
||||
[ext_resource path="res://assets/ui/icfirehi.png" type="Texture" id=33]
|
||||
[ext_resource path="res://scenes/windows/Credits.tscn" type="PackedScene" id=34]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/cogs.svg" type="Texture" id=35]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/calendar.svg" type="Texture" id=36]
|
||||
[ext_resource path="res://scripts/windows.gd" type="Script" id=37]
|
||||
[ext_resource path="res://scripts/city_status.gd" type="Script" id=38]
|
||||
[ext_resource path="res://assets/ui/pause.svg" type="Texture" id=39]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/pie-chart.svg" type="Texture" id=40]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/coins.svg" type="Texture" id=41]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/city.svg" type="Texture" id=42]
|
||||
[ext_resource path="res://assets/symbols/fontawesome/envelope.svg" type="Texture" id=43]
|
||||
[ext_resource path="res://scenes/windows/Ordinance.tscn" type="PackedScene" id=44]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
|
@ -91,6 +101,7 @@ margin_right = 234.609
|
|||
margin_bottom = 138.5
|
||||
|
||||
[node name="ToolsWindow" type="WindowDialog" parent="Controls/Windows"]
|
||||
visible = true
|
||||
anchor_left = 0.402435
|
||||
anchor_top = 0.315697
|
||||
anchor_right = 0.60263
|
||||
|
@ -252,15 +263,185 @@ __meta__ = {
|
|||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="Status" parent="Controls" instance=ExtResource( 2 )]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
[node name="Status" type="Panel" parent="Controls/Windows"]
|
||||
anchor_top = 0.908333
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -512.0
|
||||
margin_top = -64.0
|
||||
margin_right = 512.0
|
||||
margin_bottom = 0.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="SettingsBtn" type="Button" parent="Controls/Windows/Status"]
|
||||
anchor_left = 0.0115391
|
||||
anchor_top = 0.193259
|
||||
anchor_right = 0.0525548
|
||||
anchor_bottom = 0.670871
|
||||
margin_top = -9.53674e-07
|
||||
hint_tooltip = "Meet"
|
||||
size_flags_horizontal = 4
|
||||
icon = ExtResource( 35 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="StatCtr" type="HBoxContainer" parent="Controls/Windows/Status"]
|
||||
anchor_left = 0.0566406
|
||||
anchor_top = 0.208955
|
||||
anchor_right = 0.601562
|
||||
anchor_bottom = 0.746269
|
||||
margin_top = 9.53674e-07
|
||||
custom_constants/separation = 50
|
||||
alignment = 1
|
||||
script = ExtResource( 38 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="ButtonCtr" type="HBoxContainer" parent="Controls/Windows/Status/StatCtr"]
|
||||
margin_left = 30.0
|
||||
margin_right = 312.0
|
||||
margin_bottom = 36.0
|
||||
custom_constants/separation = 10
|
||||
alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TaxBtn" type="Button" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_right = 42.0
|
||||
margin_bottom = 36.0
|
||||
hint_tooltip = "RCI"
|
||||
size_flags_horizontal = 4
|
||||
icon = ExtResource( 40 )
|
||||
|
||||
[node name="ToolsBtn" type="Button" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_left = 52.0
|
||||
margin_right = 94.0
|
||||
margin_bottom = 36.0
|
||||
hint_tooltip = "Tools"
|
||||
size_flags_horizontal = 4
|
||||
icon = ExtResource( 42 )
|
||||
|
||||
[node name="AdvsiorBtn" type="Button" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_left = 104.0
|
||||
margin_right = 146.0
|
||||
margin_bottom = 36.0
|
||||
hint_tooltip = "Meet"
|
||||
size_flags_horizontal = 4
|
||||
icon = ExtResource( 43 )
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_left = 156.0
|
||||
margin_right = 160.0
|
||||
margin_bottom = 36.0
|
||||
|
||||
[node name="TurtleBtn" type="Button" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_left = 170.0
|
||||
margin_right = 211.0
|
||||
margin_bottom = 36.0
|
||||
hint_tooltip = "Slow"
|
||||
toggle_mode = true
|
||||
icon = ExtResource( 8 )
|
||||
|
||||
[node name="CheetaBtn" type="Button" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_left = 221.0
|
||||
margin_right = 268.0
|
||||
margin_bottom = 36.0
|
||||
hint_tooltip = "Fast"
|
||||
toggle_mode = true
|
||||
icon = ExtResource( 7 )
|
||||
|
||||
[node name="VSeparator2" type="VSeparator" parent="Controls/Windows/Status/StatCtr/ButtonCtr"]
|
||||
margin_left = 278.0
|
||||
margin_right = 282.0
|
||||
margin_bottom = 36.0
|
||||
|
||||
[node name="NameDate" type="VBoxContainer" parent="Controls/Windows/Status/StatCtr"]
|
||||
margin_left = 362.0
|
||||
margin_right = 450.0
|
||||
margin_bottom = 36.0
|
||||
alignment = 1
|
||||
|
||||
[node name="CityNameLbl" type="Label" parent="Controls/Windows/Status/StatCtr/NameDate"]
|
||||
margin_top = 2.0
|
||||
margin_right = 88.0
|
||||
margin_bottom = 16.0
|
||||
text = "City Name"
|
||||
align = 1
|
||||
|
||||
[node name="YearCtr" type="HBoxContainer" parent="Controls/Windows/Status/StatCtr/NameDate"]
|
||||
margin_top = 20.0
|
||||
margin_right = 88.0
|
||||
margin_bottom = 34.0
|
||||
|
||||
[node name="CalIcon" type="TextureRect" parent="Controls/Windows/Status/StatCtr/NameDate/YearCtr"]
|
||||
margin_right = 10.0
|
||||
margin_bottom = 14.0
|
||||
texture = ExtResource( 36 )
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="CalendarLbl" type="Label" parent="Controls/Windows/Status/StatCtr/NameDate/YearCtr"]
|
||||
margin_left = 14.0
|
||||
margin_right = 88.0
|
||||
margin_bottom = 14.0
|
||||
text = "01/01/2000"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PopBudget" type="VBoxContainer" parent="Controls/Windows/Status/StatCtr"]
|
||||
margin_left = 500.0
|
||||
margin_right = 526.0
|
||||
margin_bottom = 36.0
|
||||
alignment = 1
|
||||
|
||||
[node name="BudgetCtr" type="HBoxContainer" parent="Controls/Windows/Status/StatCtr/PopBudget"]
|
||||
margin_top = 2.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 16.0
|
||||
|
||||
[node name="CoinsIcon" type="TextureRect" parent="Controls/Windows/Status/StatCtr/PopBudget/BudgetCtr"]
|
||||
margin_right = 14.0
|
||||
margin_bottom = 14.0
|
||||
texture = ExtResource( 41 )
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="BudgetLbl" type="Label" parent="Controls/Windows/Status/StatCtr/PopBudget/BudgetCtr"]
|
||||
margin_left = 18.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 14.0
|
||||
text = "0"
|
||||
|
||||
[node name="PopCtr" type="HBoxContainer" parent="Controls/Windows/Status/StatCtr/PopBudget"]
|
||||
margin_top = 20.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 34.0
|
||||
|
||||
[node name="PopIcon" type="TextureRect" parent="Controls/Windows/Status/StatCtr/PopBudget/PopCtr"]
|
||||
margin_right = 14.0
|
||||
margin_bottom = 14.0
|
||||
texture = ExtResource( 3 )
|
||||
stretch_mode = 4
|
||||
|
||||
[node name="PopLbl" type="Label" parent="Controls/Windows/Status/StatCtr/PopBudget/PopCtr"]
|
||||
margin_left = 18.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 14.0
|
||||
text = "0"
|
||||
|
||||
[node name="Ticker" type="ItemList" parent="Controls/Windows/Status"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 622.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="timeout" from="DayCycle" to="." method="_on_DayCycle_timeout"]
|
||||
[connection signal="pressed" from="Controls/Windows/VRMode" to="." method="_on_VRMode_pressed"]
|
||||
[connection signal="pressed" from="Controls/Windows/Status/StatCtr/ButtonCtr/TaxBtn" to="Controls/Windows" method="_on_TaxBtn_pressed"]
|
||||
[connection signal="pressed" from="Controls/Windows/Status/StatCtr/ButtonCtr/ToolsBtn" to="Controls/Windows" method="_on_ToolsBtn_pressed"]
|
||||
[connection signal="pressed" from="Controls/Windows/Status/StatCtr/ButtonCtr/AdvsiorBtn" to="Controls/Windows" method="_on_AdvsiorBtn_pressed"]
|
||||
[connection signal="toggled" from="Controls/Windows/Status/StatCtr/ButtonCtr/TurtleBtn" to="." method="_on_TurtleBtn_toggled"]
|
||||
[connection signal="toggled" from="Controls/Windows/Status/StatCtr/ButtonCtr/CheetaBtn" to="." method="_on_CheetaBtn_toggled"]
|
||||
|
|
|
@ -52,11 +52,11 @@ func _get_budget():
|
|||
SimData.budget += total_income
|
||||
SimData.res_income = total_income
|
||||
|
||||
func _on_Zone_body_entered(body):
|
||||
func _on_Zone_body_entered(body: Node):
|
||||
if SimData.has_power and can_grab == false:
|
||||
quarters.start()
|
||||
_animante_sprite()
|
||||
|
||||
func _on_Zone_body_exited(body):
|
||||
func _on_Zone_body_exited(body: Node):
|
||||
quarters.stop()
|
||||
_animante_sprite(false)
|
||||
|
|
|
@ -46,4 +46,5 @@ func _on_CheetaBtn_toggled(button_pressed):
|
|||
turtle_btn.pressed = false
|
||||
|
||||
func _on_VRMode_pressed():
|
||||
get_tree().change_scene("res://scenes/VR Game.tscn")
|
||||
# get_tree().change_scene("res://scenes/VR Game.tscn")
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue