diff --git a/AI/population/UpdateAgent.gd b/AI/population/UpdateAgent.gd index c40bfb6..ef6c78f 100644 --- a/AI/population/UpdateAgent.gd +++ b/AI/population/UpdateAgent.gd @@ -45,7 +45,7 @@ func removeAgent(i, j): for agent in ActiveAgents: if (agent.residential_tile.i == i && agent.residential_tile.j == j): var currTile = agent.residential_tile - currTile.remove_people(1) + #currTile.remove_people(1) agent.removeJob() ActiveAgents.erase(agent) break @@ -54,7 +54,7 @@ func onRemovedTile(i, j): for agent in ActiveAgents: if (agent.residential_tile.i == i && agent.residential_tile.j == j): var currTile = agent.residential_tile - currTile.remove_people(1) + #currTile.remove_people(1) agent.removeJob() ActiveAgents.erase(agent) if (agent.commercial_tile != null): diff --git a/AI/population/can_find_job_leaf.gd b/AI/population/can_find_job_leaf.gd index 8a892db..0030471 100644 --- a/AI/population/can_find_job_leaf.gd +++ b/AI/population/can_find_job_leaf.gd @@ -200,7 +200,8 @@ func _tick(agent: Node, blackboard: Blackboard) -> bool: if current_agent.months_passed > 6: var currTile = current_agent.residential_tile - currTile.remove_people(1) + currTile.move_people_out(1) + UpdatePopulation.change_residents(-1) UpdateAgent.ActiveAgents.erase(current_agent) # updates queue diff --git a/AI/population/cannot_find_job_leaf.gd b/AI/population/cannot_find_job_leaf.gd index 176679a..d9d15da 100644 --- a/AI/population/cannot_find_job_leaf.gd +++ b/AI/population/cannot_find_job_leaf.gd @@ -14,7 +14,8 @@ func _tick(agent: Node, blackboard: Blackboard) -> bool: if current_agent.months_passed > 6: var currTile = current_agent.residential_tile - currTile.remove_people(1) + currTile.move_people_out(1) + UpdatePopulation.change_residents(-1) UpdateAgent.ActiveAgents.erase(current_agent) # updates queue diff --git a/AI/population/is_happy.gd b/AI/population/is_happy.gd index 0ef1b2e..844edd0 100644 --- a/AI/population/is_happy.gd +++ b/AI/population/is_happy.gd @@ -20,7 +20,7 @@ func _pre_tick(agent: Node, blackboard: Blackboard) -> void: var status = currTile.get_status() var selectTile = BASE_STAY_CHANCE * (currTile.landValue + currTile.happiness) if (!currTile.has_utilities()): - leaveChance += NO_UTILITIES_UNHAPPINESS + leaveChance += NO_UTILITIES_UNHAPPINESS if (status == Tile.TileStatus.LIGHT_DAMAGE || status == Tile.TileStatus.MEDIUM_DAMAGE): leaveChance += DAMAGE_UNHAPPINESS elif (status == Tile.TileStatus.HEAVY_DAMAGE): diff --git a/AI/population/is_unhappy_leaf.gd b/AI/population/is_unhappy_leaf.gd index 3509c3f..70aabe8 100644 --- a/AI/population/is_unhappy_leaf.gd +++ b/AI/population/is_unhappy_leaf.gd @@ -11,37 +11,37 @@ var rng = RandomNumberGenerator.new() func _tick(agent: Node, blackboard: Blackboard) -> bool: var current_agent = blackboard.get_data("queue").pop_front() #Agent will move if they are unhappy or leave the city - var mapHeight = Global.mapHeight - var mapWidth = Global.mapWidth var moved = false # iterates through the map to find possible living spaces - for i in mapHeight: - for j in mapWidth: + for key in Global.activeTiles: if moved == false: - var current_tile = Global.tileMap[i][j] - var maxRange = current_tile.landValue + current_tile.happiness + var current_tile = Global.tileMap[key[0]][key[1]] + var maxRange = current_tile.happiness + current_tile.landValue var selectTile = BASE_MOVE_CHANCE * (current_tile.landValue + current_tile.happiness) if current_tile.zone == Tile.TileZone.MULTI_FAMILY || current_tile.zone == Tile.TileZone.SINGLE_FAMILY: if current_tile.has_utilities() && current_tile.tileDamage == 0: rng.randomize() # if living space is suitable and chance of moving allows for move to happen, move agent - if (selectTile > rng.randf_range(0, maxRange)): + if (selectTile > rng.randf_range(0,maxRange)): current_agent.change_residence(current_tile) moved = true break # if no suitable living space, agent leaves city if moved == false: + print("agent left city") var currTile = current_agent.residential_tile - currTile.remove_people(1) + currTile.move_people_out(1) + UpdatePopulation.change_residents(-1) var currWorkTile = current_agent.commercial_tile if currWorkTile != null: current_agent.removeJob() #currWorkTile.remove_people(1) UpdateAgent.ActiveAgents.erase(current_agent) + print("agents:", UpdateAgent.ActiveAgents.size()) # updates queue check_empty(blackboard) diff --git a/assets/characters/Clark.png b/assets/characters/Clark.png new file mode 100644 index 0000000..b25ed3a Binary files /dev/null and b/assets/characters/Clark.png differ diff --git a/assets/characters/Clark.png.import b/assets/characters/Clark.png.import new file mode 100644 index 0000000..0e040f0 --- /dev/null +++ b/assets/characters/Clark.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Clark.png-4dd79fbb734ae1b27b7abf1df35fab29.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/characters/Clark.png" +dest_files=[ "res://.import/Clark.png-4dd79fbb734ae1b27b7abf1df35fab29.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/characters/Clark_unlocked.png b/assets/characters/Clark_unlocked.png new file mode 100644 index 0000000..9f0be87 Binary files /dev/null and b/assets/characters/Clark_unlocked.png differ diff --git a/assets/characters/Clark_unlocked.png.import b/assets/characters/Clark_unlocked.png.import new file mode 100644 index 0000000..015efa2 --- /dev/null +++ b/assets/characters/Clark_unlocked.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Clark_unlocked.png-5e09d13f6665549204305723bda47e82.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/characters/Clark_unlocked.png" +dest_files=[ "res://.import/Clark_unlocked.png-5e09d13f6665549204305723bda47e82.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/characters/Jermaine.png b/assets/characters/Jermaine.png index d4681e0..0a273da 100644 Binary files a/assets/characters/Jermaine.png and b/assets/characters/Jermaine.png differ diff --git a/assets/characters/Jermaine.svg.import b/assets/characters/Jermaine.svg.import new file mode 100644 index 0000000..a935782 --- /dev/null +++ b/assets/characters/Jermaine.svg.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Jermaine.svg-63777cf9bbcfe5c28acc27d1ab2ff1ed.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/characters/Jermaine.svg" +dest_files=[ "res://.import/Jermaine.svg-63777cf9bbcfe5c28acc27d1ab2ff1ed.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/characters/Jermaine_unlocked.png b/assets/characters/Jermaine_unlocked.png new file mode 100644 index 0000000..57d9be7 Binary files /dev/null and b/assets/characters/Jermaine_unlocked.png differ diff --git a/assets/characters/Jermaine_unlocked.png.import b/assets/characters/Jermaine_unlocked.png.import new file mode 100644 index 0000000..69da29a --- /dev/null +++ b/assets/characters/Jermaine_unlocked.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Jermaine_unlocked.png-f8fbadea2e97bd1d83eb3efaa6adccf0.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/characters/Jermaine_unlocked.png" +dest_files=[ "res://.import/Jermaine_unlocked.png-f8fbadea2e97bd1d83eb3efaa6adccf0.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/characters/Judith.png b/assets/characters/Judith.png new file mode 100644 index 0000000..f7b36a5 Binary files /dev/null and b/assets/characters/Judith.png differ diff --git a/assets/characters/Judith.png.import b/assets/characters/Judith.png.import new file mode 100644 index 0000000..5a1e63c --- /dev/null +++ b/assets/characters/Judith.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Judith.png-01de32655fe25d87f875392661e296a9.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/characters/Judith.png" +dest_files=[ "res://.import/Judith.png-01de32655fe25d87f875392661e296a9.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/characters/Judith_unlocked.png b/assets/characters/Judith_unlocked.png new file mode 100644 index 0000000..41b5874 Binary files /dev/null and b/assets/characters/Judith_unlocked.png differ diff --git a/assets/characters/Judith_unlocked.png.import b/assets/characters/Judith_unlocked.png.import new file mode 100644 index 0000000..e8a2955 --- /dev/null +++ b/assets/characters/Judith_unlocked.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Judith_unlocked.png-60cded93511a070aa741f09e2ee077ee.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/characters/Judith_unlocked.png" +dest_files=[ "res://.import/Judith_unlocked.png-60cded93511a070aa741f09e2ee077ee.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/characters/judth.png b/assets/characters/judth.png deleted file mode 100644 index 3fa2723..0000000 Binary files a/assets/characters/judth.png and /dev/null differ diff --git a/assets/office/Clark.png b/assets/office/Clark.png index 5efdb91..f1574d3 100644 Binary files a/assets/office/Clark.png and b/assets/office/Clark.png differ diff --git a/assets/office/Judith.png b/assets/office/Judith.png new file mode 100644 index 0000000..9c8f089 Binary files /dev/null and b/assets/office/Judith.png differ diff --git a/assets/office/Judith.png.import b/assets/office/Judith.png.import new file mode 100644 index 0000000..5b3fe11 --- /dev/null +++ b/assets/office/Judith.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Judith.png-309490ce4c1bee6f463be2e9396d9c4f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/office/Judith.png" +dest_files=[ "res://.import/Judith.png-309490ce4c1bee6f463be2e9396d9c4f.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/scripts/NPCOrganizer.gd b/scripts/NPCOrganizer.gd index 2ded324..41ea980 100644 --- a/scripts/NPCOrganizer.gd +++ b/scripts/NPCOrganizer.gd @@ -8,8 +8,8 @@ var npcCount: int = 0 #Called only once to intialize the NPCs func _ready(): addNPC("PLAYER_NAME", "Mayor", 0, "res://assets/characters/test_profession_icon.png", "") - addNPC("Jermaine", "Deputy Mayor", 1, "res://assets/characters/Jermaine.png", "I am a deputy mayor!") - addNPC("Judith","Researcher", 2, "res://assets/characters/judth.png", "I am a researcher!") + addNPC("Jermaine", "Deputy Mayor", 1, "res://assets/characters/Jermaine.png", "A deputy mayor assists the mayor in matters of running the city. He chairs council meetings, liaisons with the community, and acts on behalf of the mayor.") + addNPC("Judith","Researcher", 2, "res://assets/characters/Judith.png", "I am a researcher!") addNPC("Clark", "Environmental Engineer", 3, "res://assets/characters/scientist_icon.png", "I am an environmental engineer!") #addNPC("Test Name","Test Profession", 4, "res://assets/characters/test_profession_icon.png", "I am definitely something!") diff --git a/scripts/Office.gd b/scripts/Office.gd index 299577f..f26a196 100644 --- a/scripts/Office.gd +++ b/scripts/Office.gd @@ -29,7 +29,7 @@ func _on_QuitOffice_button_down(): func _on_Phone_pressed(): var phone = preload("res://ui/hud/NPC_Interactions/Phone.tscn") var phone_instance = phone.instance() - add_child(phone_instance) + get_tree().get_current_scene().add_child(phone_instance) # opens sensor graphs func _on_Computer_pressed(): diff --git a/scripts/Phone.gd b/scripts/Phone.gd index 707ad34..4706011 100644 --- a/scripts/Phone.gd +++ b/scripts/Phone.gd @@ -1,4 +1,4 @@ -extends Node2D +extends CanvasLayer #stores the current npc from clicked character card var currNPC @@ -17,10 +17,7 @@ func _npc_callback(npc_character): $phone_info/photo.texture = load(picPath) $phone_info/name.text = currNPC.name $phone_info/job.text = currNPC.job - if currNPC.name !="Jermaine": - $phone_info/jobdesc.text = "No information available at the moment. Please check later!" - else: - $phone_info/jobdesc.text = "A deputy mayor assists the mayor in matters of running the city. He chairs council meetings, liaisons with the community, and acts on behalf of the mayor." + $phone_info/jobdesc.text = currNPC.description $phone_info/fee.text = str("You can consult with ",currNPC.name, " for free.") $phone_info.visible = true $ScrollContainer.visible = false diff --git a/scripts/Tile.gd b/scripts/Tile.gd index 3d8c5a1..cc4ac88 100644 --- a/scripts/Tile.gd +++ b/scripts/Tile.gd @@ -851,8 +851,9 @@ func remove_people(n): var diff = data[2] - before if (is_residential()): UpdatePopulation.change_residents(diff) - if (diff == 1): - UpdateAgent.removeAgent(i, j) + if (diff < 0): + for i in range(abs(diff)): + UpdateAgent.removeAgent(i, j) elif (is_commercial()): UpdatePopulation.change_workers(diff) return diff @@ -993,7 +994,10 @@ func set_resource_demand(): var tile = Global.tileMap[n[0]][n[1]] if tile.is_residential(): pop_demanding += tile.data[2] - resource_demand = clamp(pop_demanding / total_population, 0, 1) + if (total_population != 0): + resource_demand = clamp(pop_demanding / total_population, 0, 1) + else: + resource_demand = 0 func set_goods_services_cost(): if !is_residential(): return diff --git a/scripts/Tutorial.gd b/scripts/Tutorial.gd index 7dbdbe1..2a125d8 100644 --- a/scripts/Tutorial.gd +++ b/scripts/Tutorial.gd @@ -88,7 +88,7 @@ func display_char_photo_and_name(char_id: int): var npc: NPC = NPCOrganizer.npcDictionary[char_id] var npc_icon = load(npc.icon) var npc_name = npc.name if npc.name != "PLAYER_NAME" else Global.userName - $DialogueBox/SpeakerBox/Speaker.texture = npc_icon + $DialogueBox/SpeakerBox/Border/Speaker.texture = npc_icon $DialogueBox/SpeakerBox/SpeakerName.bbcode_text = "[center]" + npc_name + "[/center]" func _on_NextButton_pressed(): diff --git a/scripts/UpdateHappiness.gd b/scripts/UpdateHappiness.gd index 1e668f4..2e758e9 100644 --- a/scripts/UpdateHappiness.gd +++ b/scripts/UpdateHappiness.gd @@ -10,6 +10,7 @@ func update_happiness(): for tile in Global.activeTiles: var currTile = Global.tileMap[tile[0]][tile[1]] #If there are people in the tile + currTile.happiness = 0 if (currTile.is_residential() && currTile.data[2] != 0): var happiness = currTile.calculateHappiness() #if unemployment is high, happiness takes a big hit diff --git a/scripts/start_map.gd b/scripts/start_map.gd index 8eebc80..0a7c9c3 100644 --- a/scripts/start_map.gd +++ b/scripts/start_map.gd @@ -175,10 +175,6 @@ func _unhandled_input(event): tile.sensor = Tile.TileSensor.NONE reset_selected() - - # Can't place anything until the tutorial is complete - if not Global.TutorialComplete: - return # Perform action based on current tool selected match Global.mapTool: @@ -1385,15 +1381,9 @@ func _on_NoButton_pressed(): # help display func _on_HelpButton_pressed(): - #$SensorChoice/ColorRect/ChoiceBox/HelpButton/ColorRect.visible = true - match Global.mapTool: - Global.Tool.SENSOR_TIDE: - $SensorChoice/ColorRect/ChoiceBox/HelpButton/ColorRect/RichTextLabel.text = "The Professor recommends putting tide sensors in the ocean, near the shore, where they will be most effective." - Global.Tool.SENSOR_RAIN: - $SensorChoice/ColorRect/ChoiceBox/HelpButton/ColorRect/RichTextLabel.text = "The Professor recommends putting rain sensors inland, near tall buildings, where they will be most effective." - Global.Tool.SENSOR_WIND: - $SensorChoice/ColorRect/ChoiceBox/HelpButton/ColorRect/RichTextLabel.text = "The Professor recommends putting wind sensors near the beach, where they will be most effective." - + var phone = preload("res://ui/hud/NPC_Interactions/Phone.tscn") + var phone_instance = phone.instance() + add_child(phone_instance) func _on_CloseHelpButton_pressed(): $SensorChoice/ColorRect/ChoiceBox/HelpButton/ColorRect.visible = false diff --git a/start_map.tscn b/start_map.tscn index 1d52cce..09c871b 100644 --- a/start_map.tscn +++ b/start_map.tscn @@ -662,7 +662,7 @@ margin_top = 185.0 margin_bottom = 300.0 [node name="PauseTitle" type="Label" parent="PauseMenu/PauseMenu"] -margin_right = 1280.0 +margin_right = 1450.0 margin_bottom = 72.0 custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_offset_x = 0 @@ -674,25 +674,30 @@ valign = 1 [node name="PauseButtons" type="VBoxContainer" parent="PauseMenu/PauseMenu"] margin_top = 76.0 -margin_right = 1280.0 +margin_right = 1450.0 margin_bottom = 292.0 [node name="ContinueButton" parent="PauseMenu/PauseMenu/PauseButtons" instance=ExtResource( 113 )] +margin_right = 1450.0 [node name="SaveButton" parent="PauseMenu/PauseMenu/PauseButtons" instance=ExtResource( 114 )] margin_top = 44.0 +margin_right = 1450.0 margin_bottom = 84.0 [node name="LoadButton" parent="PauseMenu/PauseMenu/PauseButtons" instance=ExtResource( 110 )] margin_top = 88.0 +margin_right = 1450.0 margin_bottom = 128.0 [node name="AchievementButton" parent="PauseMenu/PauseMenu/PauseButtons" instance=ExtResource( 112 )] margin_top = 132.0 +margin_right = 1450.0 margin_bottom = 172.0 [node name="QuitButton" parent="PauseMenu/PauseMenu/PauseButtons" instance=ExtResource( 115 )] margin_top = 176.0 +margin_right = 1450.0 margin_bottom = 216.0 [node name="Popups" type="CanvasLayer" parent="."] @@ -904,18 +909,18 @@ Any unsved progress will be lost." align = 1 [node name="RoadRepair" type="CanvasLayer" parent="."] -visible = false [node name="ColorRect" type="ColorRect" parent="RoadRepair"] -margin_right = 1280.0 -margin_bottom = 720.0 +visible = false +margin_right = 1450.0 +margin_bottom = 850.0 color = Color( 0, 0, 0, 0.196078 ) [node name="ChoiceBox" type="ColorRect" parent="RoadRepair/ColorRect"] -margin_left = 600.0 -margin_top = 200.0 -margin_right = 834.0 -margin_bottom = 370.0 +margin_left = 685.0 +margin_top = 265.0 +margin_right = 919.0 +margin_bottom = 435.0 color = Color( 0, 0, 0, 1 ) [node name="ChoicePrompt" type="RichTextLabel" parent="RoadRepair/ColorRect/ChoiceBox"] @@ -945,15 +950,15 @@ text = "No" visible = false [node name="ColorRect" type="ColorRect" parent="RoadRepairError"] -margin_right = 1280.0 -margin_bottom = 720.0 +margin_right = 1450.0 +margin_bottom = 850.0 color = Color( 0, 0, 0, 0.196078 ) [node name="ChoiceBox" type="ColorRect" parent="RoadRepairError/ColorRect"] -margin_left = 600.0 -margin_top = 200.0 -margin_right = 834.0 -margin_bottom = 370.0 +margin_left = 685.0 +margin_top = 265.0 +margin_right = 919.0 +margin_bottom = 435.0 color = Color( 0, 0, 0, 1 ) [node name="ErrorMessage" type="RichTextLabel" parent="RoadRepairError/ColorRect/ChoiceBox"] diff --git a/ui/Popups/CharacterUnlock.tscn b/ui/Popups/CharacterUnlock.tscn index 3fc08df..19fcff5 100644 --- a/ui/Popups/CharacterUnlock.tscn +++ b/ui/Popups/CharacterUnlock.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://assets/fonts/upheavtt.ttf" type="DynamicFontData" id=1] -[ext_resource path="res://assets/characters/researcher_icon.png" type="Texture" id=2] [ext_resource path="res://ui/Popups/CharacterUnlock.gd" type="Script" id=3] [sub_resource type="DynamicFont" id=1] @@ -24,11 +23,9 @@ margin_right = 1426.0 margin_bottom = 179.0 [node name="TextureRect" type="TextureRect" parent="BG"] -margin_left = -39.0 -margin_top = -29.4 -margin_right = 160.0 -margin_bottom = 170.6 -texture = ExtResource( 2 ) +margin_right = 135.0 +margin_bottom = 142.0 +expand = true [node name="CharacterUnlocked" type="Label" parent="BG"] margin_left = 118.0 diff --git a/ui/Popups/Overlay.gd b/ui/Popups/Overlay.gd index b96a678..27aae83 100644 --- a/ui/Popups/Overlay.gd +++ b/ui/Popups/Overlay.gd @@ -34,9 +34,9 @@ func error_pop(errorDesc): $AnimationPlayer.queue("Fade") #Pretty much same thing as achievement popup, but for characters to make it clear -func character_pop(npcName, npcPic): +func character_pop(npcName: String, npcPic: String): var inst = characterPopup.instance() - inst.set_values(npcName, npcPic) + inst.set_values(npcName, npcPic.replace(".png", "_unlocked.png")) inst.name = npcName inst.visible = false queue.append(npcName) diff --git a/ui/hud/NPC_Interactions/Phone.tscn b/ui/hud/NPC_Interactions/Phone.tscn index 9927dd1..054cd0d 100644 --- a/ui/hud/NPC_Interactions/Phone.tscn +++ b/ui/hud/NPC_Interactions/Phone.tscn @@ -7,7 +7,7 @@ [ext_resource path="res://assets/office/characterCard.png" type="Texture" id=5] [ext_resource path="res://assets/office/Jermaine.png" type="Texture" id=6] -[node name="Node2D" type="Node2D"] +[node name="Phone" type="CanvasLayer"] script = ExtResource( 1 ) [node name="phone_background" type="ColorRect" parent="."] @@ -42,7 +42,6 @@ rect_scale = Vector2( 1.25, 1.1 ) texture_normal = ExtResource( 5 ) [node name="photo" type="TextureRect" parent="phone_info"] -visible = false margin_left = 135.2 margin_top = 37.2727 margin_right = 217.2 diff --git a/ui/hud/NPC_Interactions/Tutorial.tscn b/ui/hud/NPC_Interactions/Tutorial.tscn index ae77253..5ac79b7 100644 --- a/ui/hud/NPC_Interactions/Tutorial.tscn +++ b/ui/hud/NPC_Interactions/Tutorial.tscn @@ -1,9 +1,17 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://assets/fonts/upheavtt_40.tres" type="DynamicFont" id=6] [ext_resource path="res://assets/fonts/upheavtt_24.tres" type="DynamicFont" id=7] [ext_resource path="res://scripts/Tutorial.gd" type="Script" id=8] +[sub_resource type="StyleBoxFlat" id=5] +bg_color = Color( 0.6, 1, 1, 0.15 ) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color( 0, 0, 0, 1 ) + [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.08, 0.24, 0.39, 0.4 ) @@ -66,18 +74,25 @@ margin_right = 1121.0 margin_bottom = 291.0 color = Color( 0.0156863, 0.278431, 0.407843, 1 ) -[node name="Speaker" type="TextureRect" parent="DialogueBox/SpeakerBox"] -margin_left = 40.0 -margin_top = 28.0 -margin_right = 240.0 -margin_bottom = 228.0 -stretch_mode = 1 +[node name="Border" type="Panel" parent="DialogueBox/SpeakerBox"] +margin_left = 26.0 +margin_top = 12.0 +margin_right = 252.0 +margin_bottom = 251.0 +custom_styles/panel = SubResource( 5 ) + +[node name="Speaker" type="TextureRect" parent="DialogueBox/SpeakerBox/Border"] +margin_left = 2.0 +margin_top = 4.0 +margin_right = 224.0 +margin_bottom = 237.0 +stretch_mode = 5 [node name="SpeakerName" type="RichTextLabel" parent="DialogueBox/SpeakerBox"] -margin_left = -3.0 -margin_top = 232.0 -margin_right = 283.0 -margin_bottom = 284.0 +margin_left = -2.0 +margin_top = 251.0 +margin_right = 284.0 +margin_bottom = 296.0 custom_fonts/normal_font = ExtResource( 7 ) bbcode_enabled = true