Organized city and advisor dialogs

- Added another existing character, Cindy Diamond, to take over as City Planning now that City Limits officially takes place in Nethington. Zack now handles transport.
- News keys are now properly shuffled after index.
- Updated screenshot to the recent look
- Simplified money cheat
- Updated credits in README
This commit is contained in:
Tony Bark 2021-05-26 10:30:41 -04:00
parent 8b37060d5c
commit 986789ae5d
19 changed files with 400 additions and 46 deletions

View file

@ -14,6 +14,7 @@ City Limits is a re-imagining of SimCity Classic that contains features and conc
- **Tony Bark** - _Initial work_ - [tonytins](https://github.com/tonytins)
- **Maxis** - _Assets_ - [SimHacker](https://github.com/SimHacker/)
- **Font Awesome** - *Icons* - [FontAwesome.com](https://fontawesome.com/)
See also the list of [contributors](https://github.com/tonytins/citylimits/contributors) who participated in this project.

View file

@ -0,0 +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."
}
}

View file

View file

@ -1,6 +0,0 @@
{
"1": {
"name": "Roll up your sleeves, Mayor!",
"text": "Welcome to City Limits! I'm Zack, and I'll be your city planner. I'll help you with zoning, land values, and handling connections to and from the city."
}
}

View file

@ -66,7 +66,7 @@
"text": "Local Cop Found To Be Ticketing Only Lantern-Jawed Males."
},
"23": {
"text": "Tree Stuck In Cat; Firefighters Baffled."
"text": "From The Desk Of Wise Guy Sammy: Better To Aim High And Miss Then To Aim Low And Hit."
},
"24": {
"text": "Weasel Rejected As [city]'s Crime-Fighting Mascot."
@ -88,5 +88,41 @@
},
"30": {
"text": "[city] Baker Wins Pickled Crumpet Toss Three Years Running."
},
"31": {
"text": "Local Merchants Puzzled By Rumors Of Kitty Kibble Shortage; \"We Have Plenty,\" Say Most."
},
"32": {
"text": "Cats Concerned By Rumors Of Kitty Kibble Shortage; Owners In Panic."
},
"33": {
"text": "No Kitty Kibble Shortage Says Local Representative Of Kitty Kibble Association."
},
"34": {
"text": "Rumors Persist In Kitty Kibble Shortage; Unfounded Say Many."
},
"35": {
"text": "Is Kitty Kibble Shortage A Hoax? Cats Search For Truth."
},
"37": {
"text": "Cats Say Not Enough Being Done In Kitty Kibble Shortage."
},
"38": {
"text": "Rumors Persist In Kitty Kibble Shortage; Unfounded Say Many."
},
"39": {
"text": "Enough Kitty Kibble For Twenty Years, Experts Agree."
},
"40": {
"text": "From The Desk Of Wise Guy Sammy: One Word In This Ticker Is Mispelled."
},
"50": {
"text": "From The Desk Of Wise Guy Sammy: One Word In This Ticker Is Sdrawkcab (Backwards)."
},
"51": {
"text": "From The Desk Of Wise Guy Sammy: It Is Easier To Get Forgiveness Than Permission."
},
"52": {
"text": "From The Desk Of Wise Guy Sammy: You Can't Outwait A Bureaucracy."
}
}

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://sprites/avatars/zc.png" type="Texture" id=1]
[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
@ -37,6 +38,12 @@ margin_right = 304.0
margin_bottom = 100.0
texture_normal = ExtResource( 2 )
[node name="TransportBtn" type="TextureButton" parent="Advsiors"]
margin_left = 204.0
margin_right = 304.0
margin_bottom = 100.0
texture_normal = ExtResource( 3 )
[node name="Tree" type="Tree" parent="."]
anchor_left = 0.0148515
anchor_top = 0.411552

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=38 format=2]
[gd_scene load_steps=40 format=2]
[ext_resource path="res://scenes/Map.tscn" type="PackedScene" id=1]
[ext_resource path="res://sprites/symbols/population.svg" type="Texture" id=2]
@ -37,6 +37,8 @@
[ext_resource path="res://scripts/ticker.gd" type="Script" id=35]
[ext_resource path="res://sprites/symbols/building.svg" type="Texture" id=36]
[ext_resource path="res://scripts/windows.gd" type="Script" id=37]
[ext_resource path="res://sprites/symbols/meet.svg" type="Texture" id=38]
[ext_resource path="res://sprites/ui/pause.svg" type="Texture" id=39]
[node name="Game" type="Node2D"]
script = ExtResource( 20 )
@ -54,12 +56,13 @@ autostart = true
[node name="Controls" type="CanvasLayer" parent="."]
[node name="Windows" type="Control" parent="Controls"]
anchor_right = 0.938477
anchor_bottom = 0.935
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -81.0
margin_bottom = -54.0
script = ExtResource( 37 )
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": true
"_edit_use_anchors_": false
}
[node name="Console" parent="Controls/Windows" instance=ExtResource( 6 )]
@ -107,10 +110,10 @@ __meta__ = {
}
[node name="VertCtr" type="VBoxContainer" parent="Controls/Windows/ToolsWindow/CenterCtr"]
margin_left = 6.0
margin_top = 17.0
margin_right = 186.0
margin_bottom = 189.0
margin_left = 4.0
margin_top = 14.0
margin_right = 184.0
margin_bottom = 186.0
[node name="LargeCtr" type="HBoxContainer" parent="Controls/Windows/ToolsWindow/CenterCtr/VertCtr"]
margin_right = 180.0
@ -228,6 +231,17 @@ texture_pressed = ExtResource( 12 )
[node name="Credits" parent="Controls/Windows" instance=ExtResource( 34 )]
visible = false
[node name="PauseIndicator" type="TextureRect" parent="Controls/Windows"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 39 )
stretch_mode = 1
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
[node name="Menu" type="Panel" parent="Controls"]
anchor_left = 0.919922
anchor_top = -0.02
@ -239,7 +253,7 @@ __meta__ = {
}
[node name="ButtonCtr" type="VBoxContainer" parent="Controls/Menu"]
anchor_top = 0.0305085
anchor_top = 0.0491526
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 7.62939e-06
@ -263,12 +277,12 @@ size_flags_horizontal = 4
icon = ExtResource( 36 )
[node name="AdvsiorBtn" type="Button" parent="Controls/Menu/ButtonCtr"]
margin_left = 7.0
margin_left = 10.0
margin_top = 125.0
margin_right = 74.0
margin_bottom = 145.0
margin_right = 71.0
margin_bottom = 171.0
size_flags_horizontal = 4
text = "Advisors"
icon = ExtResource( 38 )
[node name="Status" type="Panel" parent="Controls"]
anchor_top = 1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 181 KiB

View file

@ -17,17 +17,23 @@ onready var description_label = $Container/DescriptionLbl
func _start_dialogue(advisor, message):
if advisor == SimData.Advisors.CITY_PLANNER:
dialogue_file = "res://dialog/cityplanner.json"
dialogue_file = "res://dialog/advisors/cityplanner.json"
_load_dialogue()
avatar_texture.texture = preload("res://sprites/avatars/zc.png")
name_label.text = "Zack Casey"
avatar_texture.texture = preload("res://sprites/avatars/cindy.png")
name_label.text = "Cindy Diamond"
rank_label.text = "City Planner"
elif advisor == SimData.Advisors.FINANCIAL:
dialogue_file = "res://dialog/finacial.json"
dialogue_file = "res://dialog/advisors/finacial.json"
_load_dialogue()
avatar_texture.texture = preload("res://sprites/avatars/kit.png")
name_label.text = "Kit Welsh"
rank_label.text = "Financial Advisor"
elif advisor == SimData.Advisors.FINANCIAL:
dialogue_file = "res://dialog/advisors/transport.json"
_load_dialogue()
avatar_texture.texture = preload("res://sprites/avatars/zc.png")
name_label.text = "Zack Casey"
rank_label.text = "Transportation Advisor"
_index_dialogue()
description_label.text = dialogue_keys[message].text

View file

@ -17,17 +17,7 @@ func _budget_print(value: int):
return "Budget increased to " + str(value)
func money(value):
var motherlode = 50000
var rosebud = 1000
if value == "motherlode":
SimData.budget += motherlode
return _budget_print(motherlode)
if value == "rosebud":
SimData.budget += rosebud
return _budget_print(rosebud)
return ""
SimData.budget += int(value)
func whereyoufrom(value):
SimData.city_name = str(value)

View file

@ -9,10 +9,12 @@ var news_keys = []
func _index_news():
var news = _load_news()
news_keys.clear()
for key in news:
news_keys.append(news[key])
news_keys[rng.randi()%news_keys.size()] # Sbuffle Keys
randomize()
news_keys.shuffle()
func _load_news():
var file = File.new()
@ -26,7 +28,7 @@ func _ready():
SimData.mayor_name = SimData.mayor_name.capitalize()
SimEvents.connect("send_alert", self, "_start_alert")
SimEvents.connect("resume_news", self, "_resume_ticker")
_random_news("res://dialog/ticker.json")
_random_news("res://dialog/ticker/ticker.json")
func _process(delta):
if get_tree().paused:
@ -34,19 +36,21 @@ func _process(delta):
func _start_alert(message):
SimData.is_alert = true
news_file = "res://dialog/ticker_alerts.json"
news_file = "res://dialog/ticker/ticker_alerts.json"
ticker_text.text = news_keys[message].text
func _random_news(file):
news_file = file
rng.randomize()
_load_news()
_index_news()
rng.randomize()
var max_mange = news_keys.size() - 1
var ticker_range = rng.randi_range(0, max_mange)
var news = news_keys[ticker_range].text # Shuffle News
var news = news_keys[ticker_range].text
if SimData.has_ctower or SimData.city_name == "Furtropolis" and "[outlet]" in news:
if SimData.has_ctower or SimData.city_name == "Furtropolis" or "Furville" and "[outlet]" in news:
# FNN = Furtropolis/Furry News Network
news = news.replace("[outlet]", "FNN")
elif "[outlet]" in news:
@ -61,7 +65,7 @@ func _random_news(file):
ticker_text.text = news
func _resume_ticker():
_random_news("res://dialog/ticker.json")
_random_news("res://dialog/ticker/ticker.json")
func _on_RotateNews_timeout():
_random_news("res://dialog/ticker.json")
_random_news("res://dialog/ticker/ticker.json")

BIN
sprites/avatars/cindy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cindy.png-9796569595eb0cae76e24ffc424e43d7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/avatars/cindy.png"
dest_files=[ "res://.import/cindy.png-9796569595eb0cae76e24ffc424e43d7.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

125
sprites/symbols/meet.svg Normal file
View file

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="49.999996"
height="40"
viewBox="0 0 49.999997 40.000001"
xml:space="preserve"
sodipodi:docname="meet.svg"
inkscape:version="1.0.2 (e86c8708, 2021-01-15)"><metadata
id="metadata876"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs874" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="987"
id="namedview872"
showgrid="false"
inkscape:pagecheckerboard="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.3056566"
inkscape:cx="255.81"
inkscape:cy="201.00849"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="1"
inkscape:current-layer="Capa_1" />
<g
id="g839"
transform="matrix(0.09772897,0,0,0.09949829,0,-5.4526058)"
style="fill:#ffffff">
<g
id="g837"
style="fill:#ffffff">
<path
d="m 301.923,327.602 c 30.93,-13.038 55.34,-30.785 73.228,-53.248 17.891,-22.458 26.837,-46.915 26.837,-73.372 0,-26.458 -8.946,-50.914 -26.837,-73.376 C 357.263,105.147 332.853,87.398 301.923,74.357 270.993,61.318 237.352,54.801 200.995,54.801 164.641,54.801 131,61.322 100.068,74.361 69.14,87.4 44.729,105.149 26.84,127.609 8.947,150.068 0,174.523 0,200.982 c 0,22.648 6.764,43.975 20.276,63.957 13.512,19.985 32.071,36.833 55.671,50.535 -1.902,4.572 -3.853,8.754 -5.852,12.566 -2,3.806 -4.377,7.467 -7.139,10.991 -2.76,3.525 -4.899,6.283 -6.423,8.275 -1.523,1.998 -3.997,4.809 -7.424,8.422 -3.428,3.617 -5.618,5.996 -6.567,7.135 0,-0.191 -0.383,0.24 -1.143,1.287 -0.763,1.047 -1.191,1.52 -1.287,1.431 -0.094,-0.103 -0.476,0.373 -1.141,1.42 -0.666,1.048 -1,1.571 -1,1.571 l -0.715,1.423 c -0.284,0.568 -0.476,1.137 -0.57,1.712 -0.096,0.567 -0.144,1.19 -0.144,1.854 0,0.664 0.094,1.28 0.286,1.854 0.383,2.471 1.477,4.466 3.284,5.996 1.809,1.52 3.757,2.279 5.854,2.279 h 0.857 c 9.515,-1.332 17.701,-2.854 24.552,-4.569 29.312,-7.614 55.771,-19.797 79.372,-36.545 17.128,3.046 33.88,4.568 50.248,4.568 36.354,0.012 69.999,-6.503 100.928,-19.542 z m -159.739,-23.835 -12.564,8.846 c -5.33,3.614 -11.227,7.331 -17.7,11.14 l 9.995,-23.986 -27.694,-15.988 C 75.945,273.123 61.767,260.56 51.679,246.094 41.59,231.629 36.548,216.592 36.548,200.983 c 0,-19.417 7.474,-37.594 22.414,-54.534 14.938,-16.94 35.067,-30.358 60.382,-40.259 25.313,-9.895 52.532,-14.847 81.653,-14.847 29.121,0 56.342,4.952 81.654,14.847 25.313,9.9 45.442,23.319 60.388,40.259 14.94,16.939 22.408,35.116 22.408,54.534 0,19.414 -7.468,37.59 -22.408,54.53 -14.945,16.945 -35.074,30.36 -60.388,40.256 -25.312,9.897 -52.53,14.846 -81.654,14.846 -14.272,0 -28.833,-1.335 -43.681,-3.997 z"
id="path833"
style="fill:#ffffff" />
<path
d="m 491.347,338.156 c 13.518,-19.896 20.272,-41.255 20.272,-64.098 0,-23.411 -7.139,-45.303 -21.409,-65.666 -14.277,-20.362 -33.694,-37.305 -58.245,-50.819 4.374,14.274 6.563,28.739 6.563,43.398 0,25.503 -6.368,49.676 -19.129,72.519 -12.752,22.836 -31.025,43.01 -54.816,60.524 -22.08,15.988 -47.205,28.261 -75.377,36.829 -28.164,8.562 -57.573,12.848 -88.218,12.848 -5.708,0 -14.084,-0.377 -25.122,-1.137 38.256,25.119 83.177,37.685 134.756,37.685 16.371,0 33.119,-1.526 50.251,-4.571 23.6,16.755 50.06,28.931 79.37,36.549 6.852,1.718 15.037,3.237 24.554,4.568 2.283,0.195 4.381,-0.476 6.283,-1.995 1.903,-1.526 3.142,-3.614 3.71,-6.276 -0.089,-1.143 0,-1.77 0.287,-1.861 0.281,-0.09 0.233,-0.712 -0.144,-1.852 -0.376,-1.144 -0.568,-1.715 -0.568,-1.715 l -0.712,-1.424 c -0.198,-0.376 -0.52,-0.903 -0.999,-1.567 -0.476,-0.66 -0.855,-1.14 -1.143,-1.427 -0.28,-0.284 -0.705,-0.763 -1.28,-1.424 -0.568,-0.66 -0.951,-1.092 -1.143,-1.283 -0.951,-1.143 -3.139,-3.521 -6.564,-7.139 -3.429,-3.613 -5.899,-6.42 -7.422,-8.418 -1.523,-1.999 -3.665,-4.757 -6.424,-8.282 -2.758,-3.518 -5.14,-7.183 -7.139,-10.991 -1.998,-3.806 -3.949,-7.995 -5.852,-12.56 23.594,-13.716 42.156,-30.512 55.66,-50.415 z"
id="path835"
style="fill:#ffffff" />
</g>
</g>
<g
id="g841"
transform="translate(0,-54.801)">
</g>
<g
id="g843"
transform="translate(0,-54.801)">
</g>
<g
id="g845"
transform="translate(0,-54.801)">
</g>
<g
id="g847"
transform="translate(0,-54.801)">
</g>
<g
id="g849"
transform="translate(0,-54.801)">
</g>
<g
id="g851"
transform="translate(0,-54.801)">
</g>
<g
id="g853"
transform="translate(0,-54.801)">
</g>
<g
id="g855"
transform="translate(0,-54.801)">
</g>
<g
id="g857"
transform="translate(0,-54.801)">
</g>
<g
id="g859"
transform="translate(0,-54.801)">
</g>
<g
id="g861"
transform="translate(0,-54.801)">
</g>
<g
id="g863"
transform="translate(0,-54.801)">
</g>
<g
id="g865"
transform="translate(0,-54.801)">
</g>
<g
id="g867"
transform="translate(0,-54.801)">
</g>
<g
id="g869"
transform="translate(0,-54.801)">
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/meet.svg-01ad78e7fe219a3f705e2a6c758737df.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/symbols/meet.svg"
dest_files=[ "res://.import/meet.svg-01ad78e7fe219a3f705e2a6c758737df.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

69
sprites/ui/pause.svg Normal file
View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="148.37917mm"
height="98.379166mm"
viewBox="0 0 148.37917 98.379165"
version="1.1"
id="svg8"
inkscape:version="1.0.2 (e86c8708, 2021-01-15)"
sodipodi:docname="pause.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.5842348"
inkscape:cx="236.41478"
inkscape:cy="145.41117"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="987"
inkscape:window-x="1979"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:pagecheckerboard="true" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-23.244938,-100.81042)">
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#ff0000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.5"
id="rect833"
width="147.37917"
height="97.379166"
x="23.744938"
y="101.31042"
ry="2.8182361" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/pause.svg-57f433d5692457edf43461406cee36ab.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/ui/pause.svg"
dest_files=[ "res://.import/pause.svg-57f433d5692457edf43461406cee36ab.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