Merge branch 'main' into wa/game-connection

# Conflicts:
#	models/road-split_colormap.png.import
#	scenes/main.tscn
pull/18/head
jc-stemuli 2025-05-05 14:31:39 +07:00
commit 1f2a5efb51
23 changed files with 212 additions and 289 deletions

@ -6,9 +6,9 @@
[resource]
render_priority = 0
shader = ExtResource("1_r8t2t")
shader_parameter/Albedo_Map = ExtResource("2_83rgw")
shader_parameter/Albedo_Tone = Color(0.505645, 0.698715, 1, 1)
shader_parameter/Metallic = 0.194
shader_parameter/Roughness = 0.403
shader_parameter/Emission = Color(0.151504, 0.398018, 0.646932, 1)
shader_parameter/Fresnel_Power = 0.1
shader_parameter/Albedo_Map = ExtResource("2_83rgw")

@ -67,10 +67,10 @@ render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_s
uniform sampler2D tex_vtx_17;
uniform sampler2D Albedo_Map : hint_default_black;
uniform vec4 Albedo_Tone : source_color;
uniform float Metallic : hint_range(0, 1);
uniform float Roughness : hint_range(0, 1);
uniform float Metallic : hint_range(0.0, 1.0);
uniform float Roughness : hint_range(0.0, 1.0);
uniform vec4 Emission : source_color;
uniform float Fresnel_Power : hint_range(-10, 100) = 100;
uniform float Fresnel_Power : hint_range(-10.0, 100.0) = 100.0;

@ -1,39 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://oo7o4pp68xgr"
path.s3tc="res://.godot/imported/pavement-fountain_colormap.png-d827cc6b1a4dc607aa80cf851d86b35e.s3tc.ctex"
path.etc2="res://.godot/imported/pavement-fountain_colormap.png-d827cc6b1a4dc607aa80cf851d86b35e.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "007d2d2af08d0a09042bcd8910fe8d8f"
}
[deps]
source_file="res://models/pavement-fountain_colormap.png"
dest_files=["res://.godot/imported/pavement-fountain_colormap.png-d827cc6b1a4dc607aa80cf851d86b35e.s3tc.ctex", "res://.godot/imported/pavement-fountain_colormap.png-d827cc6b1a4dc607aa80cf851d86b35e.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

@ -32,6 +32,13 @@ animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
_subresources={
"materials": {
"colormap": {
"use_external/enabled": true,
"use_external/path": "uid://b8yum5qqa1c75"
}
}
}
gltf/naming_version=1
gltf/embedded_image_handling=1

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@ -2,9 +2,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dcamohwwb5prk"
path.s3tc="res://.godot/imported/road-split_colormap.png-d20fd957a58f362b47c3e36589efd30c.s3tc.ctex"
path.etc2="res://.godot/imported/road-split_colormap.png-d20fd957a58f362b47c3e36589efd30c.etc2.ctex"
uid="uid://ckqy5ay5m40cu"
path.s3tc="res://.godot/imported/power_plant_colormap.png-e3852f3ab950661f6fb34853a2c5c106.s3tc.ctex"
path.etc2="res://.godot/imported/power_plant_colormap.png-e3852f3ab950661f6fb34853a2c5c106.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
@ -15,8 +15,8 @@ generator_parameters={
[deps]
source_file="res://models/road-split_colormap.png"
dest_files=["res://.godot/imported/road-split_colormap.png-d20fd957a58f362b47c3e36589efd30c.s3tc.ctex", "res://.godot/imported/road-split_colormap.png-d20fd957a58f362b47c3e36589efd30c.etc2.ctex"]
source_file="res://models/power_plant_colormap.png"
dest_files=["res://.godot/imported/power_plant_colormap.png-e3852f3ab950661f6fb34853a2c5c106.s3tc.ctex", "res://.godot/imported/power_plant_colormap.png-e3852f3ab950661f6fb34853a2c5c106.etc2.ctex"]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@ -1,39 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://rmdd8v6vmym5"
path.s3tc="res://.godot/imported/road-intersection_colormap.png-c61e4b104cdf6bfa6866d3f91af681fd.s3tc.ctex"
path.etc2="res://.godot/imported/road-intersection_colormap.png-c61e4b104cdf6bfa6866d3f91af681fd.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "007d2d2af08d0a09042bcd8910fe8d8f"
}
[deps]
source_file="res://models/road-intersection_colormap.png"
dest_files=["res://.godot/imported/road-intersection_colormap.png-c61e4b104cdf6bfa6866d3f91af681fd.s3tc.ctex", "res://.godot/imported/road-intersection_colormap.png-c61e4b104cdf6bfa6866d3f91af681fd.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@ -1,39 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cckpaetm6elpf"
path.s3tc="res://.godot/imported/road-straight-lightposts_colormap.png-c8d1253418f218a084df50c53c513432.s3tc.ctex"
path.etc2="res://.godot/imported/road-straight-lightposts_colormap.png-c8d1253418f218a084df50c53c513432.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "007d2d2af08d0a09042bcd8910fe8d8f"
}
[deps]
source_file="res://models/road-straight-lightposts_colormap.png"
dest_files=["res://.godot/imported/road-straight-lightposts_colormap.png-c8d1253418f218a084df50c53c513432.s3tc.ctex", "res://.godot/imported/road-straight-lightposts_colormap.png-c8d1253418f218a084df50c53c513432.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@ -1,37 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ddl8lrcoeovpw"
path="res://.godot/imported/road-straight_colormap.png-b6a117d52548e61c263bb6e65713a481.ctex"
metadata={
"vram_texture": false
}
generator_parameters={
"md5": "007d2d2af08d0a09042bcd8910fe8d8f"
}
[deps]
source_file="res://models/road-straight_colormap.png"
dest_files=["res://.godot/imported/road-straight_colormap.png-b6a117d52548e61c263bb6e65713a481.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

@ -3,7 +3,7 @@
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://h0vrvst3cumo"
uid="uid://rdfjckc8h1dp"
path="res://.godot/imported/store.glb-eb219227761a994cd73630b580ffec3c.scn"
[deps]
@ -13,8 +13,8 @@ dest_files=["res://.godot/imported/store.glb-eb219227761a994cd73630b580ffec3c.sc
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
@ -32,6 +32,13 @@ animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=0
_subresources={
"materials": {
"colormap": {
"use_external/enabled": true,
"use_external/path": "uid://b8yum5qqa1c75"
}
}
}
gltf/naming_version=1
gltf/embedded_image_handling=1

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@ -2,9 +2,9 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bxv7gyds50dps"
path.s3tc="res://.godot/imported/pavement_colormap.png-49f7e71226550d61a313322246614540.s3tc.ctex"
path.etc2="res://.godot/imported/pavement_colormap.png-49f7e71226550d61a313322246614540.etc2.ctex"
uid="uid://bmwvd0udrl3mt"
path.s3tc="res://.godot/imported/store_colormap.png-0c8242d7cffc0f8d4757c000844710b2.s3tc.ctex"
path.etc2="res://.godot/imported/store_colormap.png-0c8242d7cffc0f8d4757c000844710b2.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
@ -15,8 +15,8 @@ generator_parameters={
[deps]
source_file="res://models/pavement_colormap.png"
dest_files=["res://.godot/imported/pavement_colormap.png-49f7e71226550d61a313322246614540.s3tc.ctex", "res://.godot/imported/pavement_colormap.png-49f7e71226550d61a313322246614540.etc2.ctex"]
source_file="res://models/store_colormap.png"
dest_files=["res://.godot/imported/store_colormap.png-0c8242d7cffc0f8d4757c000844710b2.s3tc.ctex", "res://.godot/imported/store_colormap.png-0c8242d7cffc0f8d4757c000844710b2.etc2.ctex"]
[params]

@ -80,7 +80,7 @@ transform = Transform3D(0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 0, 0, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_8ib1s")
&"": SubResource("AnimationLibrary_8ib1s")
}
autoplay = "walk"
speed_scale = 3.0

@ -11,12 +11,11 @@ sky_material = SubResource("ProceduralSkyMaterial_lg8b7")
[resource]
background_mode = 1
background_color = Color(0.560784, 0.592157, 0.670588, 1)
background_color = Color(0.219333, 0.21, 0.35, 1)
sky = SubResource("Sky_7bk1c")
ambient_light_source = 2
ambient_light_color = Color(0.662745, 0.694118, 0.772549, 1)
ambient_light_energy = 0.75
tonemap_mode = 2
ambient_light_source = 3
ambient_light_color = Color(0.36875, 0.741929, 0.801344, 1)
tonemap_mode = 3
ssao_enabled = true
ssao_detail = 1.0
ssao_horizon = 0.25
@ -25,7 +24,10 @@ ssao_ao_channel_affect = 0.75
sdfgi_cascades = 1
sdfgi_max_distance = 25.6
sdfgi_energy = 0.5
glow_enabled = true
glow_levels/2 = 0.6
glow_levels/3 = 0.6
glow_levels/5 = 0.0
glow_intensity = 2.0
glow_strength = 2.0
fog_light_energy = 0.54
fog_density = 0.0035

@ -1,4 +1,4 @@
[gd_scene load_steps=68 format=3 uid="uid://vgwrcfy1qawf"]
[gd_scene load_steps=38 format=3 uid="uid://vgwrcfy1qawf"]
[ext_resource type="Script" uid="uid://c37h6na3e4twn" path="res://scripts/builder.gd" id="1_jybm7"]
[ext_resource type="Environment" uid="uid://jbptgqvstei3" path="res://scenes/main-environment.tres" id="1_yndf3"]
@ -17,51 +17,20 @@
[ext_resource type="PackedScene" uid="uid://dmsy06s02tcw4" path="res://scenes/generic_text_panel.tscn" id="13_7i6dj"]
[ext_resource type="Resource" uid="uid://bh65eqgid4kxy" path="res://structures/building-small-c.tres" id="13_kf5aa"]
[ext_resource type="Script" uid="uid://ctqqmg4ydlbse" path="res://scripts/mission/mission_ui.gd" id="13_xvw5w"]
[ext_resource type="Script" uid="uid://bt3emc1vt40gq" path="res://resources/generic_text_panel.resource.gd" id="14_76jlq"]
[ext_resource type="Script" uid="uid://n26k1k7243dd" path="res://resources/generic_text_panel.resource.gd" id="14_76jlq"]
[ext_resource type="Script" uid="uid://dnquivpg0ead" path="res://scripts/mission/learning_panel.gd" id="14_q2ymb"]
[ext_resource type="Resource" uid="uid://dqqe3iofnleup" path="res://structures/pavement-fountain.tres" id="14_t5ykj"]
[ext_resource type="Script" uid="uid://cjaik5ku37xqx" path="res://scripts/mission/mission_data.gd" id="14_vcrh8"]
[ext_resource type="Resource" uid="uid://dveu4dnue0d54" path="res://structures/road-intersection.tres" id="15_e755i"]
[ext_resource type="Resource" uid="uid://cjr36hqnmyn0x" path="res://mission/unit_1.02/census_planning_3.tres" id="17_rrdy6"]
[ext_resource type="FontFile" uid="uid://d0cxd77jybrcn" path="res://fonts/lilita_one_regular.ttf" id="17_vlub6"]
[ext_resource type="PackedScene" uid="uid://b4gkfwf4i3ydl" path="res://scenes/character.tscn" id="18_8lrh8"]
[ext_resource type="PackedScene" uid="uid://cgk66f6rg03mj" path="res://scenes/hud.tscn" id="18_hud"]
[ext_resource type="PackedScene" uid="uid://bqjnp7uypupog" path="res://scenes/controls_panel.tscn" id="19_controls"]
[ext_resource type="Script" uid="uid://b5nubrdeseay4" path="res://scripts/game_manager.gd" id="20_game_manager"]
[ext_resource type="Resource" uid="uid://442cwthak2pa" path="res://mission/unit_1.02/market_research_1.tres" id="20_ngu16"]
[ext_resource type="PackedScene" uid="uid://b4s46k58ddpyc" path="res://scenes/sound_panel.tscn" id="21_sound_panel"]
[ext_resource type="Resource" uid="uid://dtal0tl2ee336" path="res://structures/store.tres" id="21_y11qv"]
[ext_resource type="PackedScene" uid="uid://btfwonjc8uj0w" path="res://scenes/mission_select_menu.tscn" id="24_ro3en"]
[ext_resource type="Resource" uid="uid://bom5bu47dy5kp" path="res://mission/unit_1.02/market_research_2.tres" id="24_xud6a"]
[ext_resource type="Resource" uid="uid://csrqvfwp63ygr" path="res://mission/unit_1.02/market_research_3.tres" id="25_6hx7u"]
[ext_resource type="PackedScene" uid="uid://b4k3xfm8pd8qw" path="res://scenes/building_selector.tscn" id="25_od4ux"]
[ext_resource type="Resource" uid="uid://qwiwim2pg88f" path="res://mission/unit_1.02/market_research_4.tres" id="26_lvk23"]
[ext_resource type="Resource" uid="uid://cfgw8dblm55c5" path="res://mission/unit_1.03_1.05/grid_growth_1.tres" id="27_s0e58"]
[ext_resource type="Resource" uid="uid://ba3ndftq7dht7" path="res://mission/unit_1.03_1.05/grid_growth_2.tres" id="28_hurxs"]
[ext_resource type="Resource" uid="uid://cua0khnbyusip" path="res://mission/unit_1.02/unlock_buildings.tres" id="28_ro3en"]
[ext_resource type="Resource" uid="uid://dgimr2v12rjqu" path="res://mission/unit_1.03_1.05/grid_growth_3.tres" id="29_rhn1n"]
[ext_resource type="Resource" uid="uid://dm2o4dq2oml53" path="res://mission/unit_1.03_1.05/grid_growth_4.tres" id="30_4rwkv"]
[ext_resource type="Resource" uid="uid://btwrfq37q8vey" path="res://mission/unit_1.03_1.05/traffic_flow_1.tres" id="31_j2idb"]
[ext_resource type="Resource" uid="uid://cf7gpb4j7gq1g" path="res://mission/unit_1.03_1.05/traffic_flow_2.tres" id="32_ipu0c"]
[ext_resource type="Resource" uid="uid://ddmxjjyxgxyxo" path="res://mission/unit_1.03_1.05/traffic_flow_3.tres" id="33_c0l5e"]
[ext_resource type="Resource" uid="uid://doxd30r8qbgdq" path="res://mission/unit_1.03_1.05/traffic_flow_4.tres" id="34_21t20"]
[ext_resource type="Resource" uid="uid://duaxn13myfx22" path="res://mission/unit_1.06/sustainable_dev_1.tres" id="35_o0bjh"]
[ext_resource type="Resource" uid="uid://fuxb3pfbbwjm" path="res://mission/unit_1.06/sustainable_dev_2.tres" id="36_2wodh"]
[ext_resource type="Resource" uid="uid://byd5jxiutxpky" path="res://mission/unit_1.06/sustainable_dev_3.tres" id="37_psgx1"]
[ext_resource type="Resource" uid="uid://daug1o7kppqit" path="res://mission/unit_1.06/sustainable_dev_4.tres" id="38_hw762"]
[ext_resource type="Resource" uid="uid://cp7tcpktwlrkt" path="res://mission/unit_1.06/urban_planning_1.tres" id="39_ymw5p"]
[ext_resource type="Resource" uid="uid://c3q1afcvwi4rk" path="res://mission/unit_1.06/urban_planning_2.tres" id="40_uggp1"]
[ext_resource type="Resource" uid="uid://ct1k7n2oopwdu" path="res://mission/unit_1.06/urban_planning_3.tres" id="41_f0dxf"]
[ext_resource type="Resource" uid="uid://d1fykuxfmh2q1" path="res://mission/unit_1.06/urban_planning_4.tres" id="42_fv8gl"]
[ext_resource type="Resource" uid="uid://detwnqsq87r30" path="res://mission/unit_1.07/economic_forecast_1.tres" id="43_qvne6"]
[ext_resource type="Resource" uid="uid://bj7tjuknfaeyg" path="res://mission/unit_1.07/economic_forecast_2.tres" id="44_haub2"]
[ext_resource type="Resource" uid="uid://ctyrlnq5cxuiu" path="res://mission/unit_1.07/economic_forecast_3.tres" id="45_xs8xk"]
[ext_resource type="Resource" uid="uid://bwrkqv42wk8f" path="res://mission/unit_1.07/resource_alloc_1.tres" id="47_6w4y8"]
[ext_resource type="Resource" uid="uid://d0nblitd4ixir" path="res://mission/unit_1.07/resource_alloc_2.tres" id="48_ck35a"]
[ext_resource type="Resource" uid="uid://cxh8dgf54oimx" path="res://mission/unit_1.07/resource_alloc_3.tres" id="49_cvgxw"]
[ext_resource type="Resource" uid="uid://cpfr2xnjtpcog" path="res://mission/unit_1.07/resource_alloc_4.tres" id="50_6ke0d"]
[ext_resource type="Script" uid="uid://be2nkvjhpebhi" path="res://scripts/mission/mission_objective.gd" id="51_kf5aa"]
[ext_resource type="Resource" uid="uid://bsic030rpgh08" path="res://mission/unit_1.06/sustainable_dev_2b.tres" id="57_e755i"]
[ext_resource type="PackedScene" uid="uid://blfrsgh3cct2l" path="res://scenes/structure_menu.tscn" id="58_structure_menu"]
[ext_resource type="Script" uid="uid://cjaik5ku37xqx" path="res://scripts/mission/mission_data.gd" id="26_tel4y"]
[ext_resource type="Resource" uid="uid://cua0khnbyusip" path="res://mission/unit_1.02/unlock_buildings.tres" id="27_qkpxi"]
[sub_resource type="Resource" id="Resource_1gdbm"]
script = ExtResource("14_76jlq")
@ -96,57 +65,6 @@ body_text = "Congratulations, City Planner!
"
button_text = "Close"
[sub_resource type="Resource" id="Resource_f1uf2"]
script = ExtResource("51_kf5aa")
type = 2
target_count = 1000
current_count = 0
description = "Maintain a minimum of 1000 money"
completed = false
[sub_resource type="Resource" id="Resource_t5ykj"]
script = ExtResource("14_vcrh8")
id = "27"
title = "Economic Forecasting"
description = "Financial reserves are critical for economic stability. Use your forecasting model to ensure your city maintains a healthy treasury."
objectives = Array[ExtResource("51_kf5aa")]([SubResource("Resource_f1uf2")])
rewards = {
"cash": 500
}
next_mission_id = "28"
graph_path = ""
full_screen_path = ""
intro_text = "Let's forecast financial stability! Maintain a minimum treasury of 1000 money to ensure your city's economic health."
question_text = ""
correct_answer = ""
feedback_text = ""
incorrect_feedback = ""
company_data = ""
power_math_content = ""
num_of_user_inputs = 1
input_labels = Array[String]([])
companion_dialog = {
"mission_completed": {
"animation": "happy",
"duration": 6000,
"text": ["Well done maintaining a healthy treasury! Your financial forecasting model shows strong fiscal health."]
},
"mission_started": {
"animation": "excited",
"duration": 6000,
"text": ["Time to focus on fiscal forecasting! A strong treasury indicates good economic management."]
}
}
unlocked_items = Array[String]([])
starting_structures = Array[String]([])
open_react_graph = false
open_react_table = false
react_data = {}
react_table_data = {
"headers": [],
"rows": []
}
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mission"]
bg_color = Color(0.145098, 0.172549, 0.231373, 0.941176)
border_width_left = 2
@ -161,6 +79,44 @@ corner_radius_bottom_left = 8
shadow_size = 5
shadow_offset = Vector2(2, 2)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lsmd5"]
bg_color = Color(0.196078, 0.196078, 0.196078, 0.960784)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0.294118, 0.478431, 0.729412, 1)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
shadow_size = 5
shadow_offset = Vector2(3, 3)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_description"]
bg_color = Color(0.145098, 0.145098, 0.164706, 0.768627)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.294118, 0.478431, 0.729412, 0.301961)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_graph"]
bg_color = Color(0.117647, 0.137255, 0.160784, 0.768627)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.294118, 0.478431, 0.729412, 0.301961)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[node name="Main" type="Node3D"]
script = ExtResource("20_game_manager")
intro_text_resource = SubResource("Resource_1gdbm")
@ -199,7 +155,7 @@ cell_center_y = false
cell_center_z = false
[node name="Sun" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.642788, 0.766044, 0, -0.766045, 0.642787, 0, 0, 0)
transform = Transform3D(0.430511, -0.372862, -0.821969, 0, 0.910684, -0.413104, 0.902585, 0.177846, 0.392059, 0, 0, 0)
light_energy = 2.0
light_indirect_energy = 3.0
light_volumetric_fog_energy = 3.07
@ -211,35 +167,19 @@ shadow_opacity = 0.75
[node name="HUD" parent="CanvasLayer" instance=ExtResource("18_hud")]
[node name="ControlsPanel" parent="CanvasLayer" instance=ExtResource("19_controls")]
visible = false
[node name="SoundPanel" parent="CanvasLayer" instance=ExtResource("21_sound_panel")]
visible = false
anchors_preset = 8
[node name="GenericTextPanel" parent="CanvasLayer" instance=ExtResource("13_7i6dj")]
visible = false
resource_data = ExtResource("14_76jlq")
[node name="MissionSelectMenu" parent="CanvasLayer" instance=ExtResource("24_ro3en")]
visible = false
[node name="BuildingSelector" parent="CanvasLayer" instance=ExtResource("25_od4ux")]
visible = false
layout_direction = 2
offset_right = -277.0
[node name="StructureMenu" parent="CanvasLayer" instance=ExtResource("58_structure_menu")]
offset_left = 4.0
offset_top = 83.0
offset_right = 304.0
offset_bottom = 683.0
grow_horizontal = 1
grow_vertical = 1
[node name="MissionManager" type="Node" parent="." node_paths=PackedStringArray("mission_ui", "builder")]
script = ExtResource("10_oe3re")
missions = Array[ExtResource("14_vcrh8")]([ExtResource("28_ro3en"), ExtResource("17_rrdy6"), ExtResource("20_ngu16"), ExtResource("24_xud6a"), ExtResource("25_6hx7u"), ExtResource("26_lvk23"), ExtResource("27_s0e58"), ExtResource("28_hurxs"), ExtResource("29_rhn1n"), ExtResource("30_4rwkv"), ExtResource("31_j2idb"), ExtResource("32_ipu0c"), ExtResource("33_c0l5e"), ExtResource("34_21t20"), ExtResource("35_o0bjh"), ExtResource("36_2wodh"), ExtResource("37_psgx1"), ExtResource("38_hw762"), ExtResource("39_ymw5p"), ExtResource("40_uggp1"), ExtResource("41_f0dxf"), ExtResource("42_fv8gl"), ExtResource("43_qvne6"), ExtResource("44_haub2"), ExtResource("45_xs8xk"), SubResource("Resource_t5ykj"), ExtResource("47_6w4y8"), ExtResource("48_ck35a"), ExtResource("49_cvgxw"), ExtResource("50_6ke0d"), ExtResource("57_e755i")])
missions = Array[ExtResource("26_tel4y")]([ExtResource("27_qkpxi")])
mission_ui = NodePath("MissionPanel")
builder = NodePath("../Builder")
character_scene = ExtResource("18_8lrh8")
@ -304,9 +244,128 @@ layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 10
[node name="LearningPanel" type="PanelContainer" parent="MissionManager"]
visible = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 50.0
offset_top = 50.0
offset_right = -50.0
offset_bottom = -50.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_lsmd5")
script = ExtResource("14_q2ymb")
[node name="MarginContainer" type="MarginContainer" parent="MissionManager/LearningPanel"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 30
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 30
[node name="VBoxContainer" type="VBoxContainer" parent="MissionManager/LearningPanel/MarginContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 20
[node name="TitleLabel" type="Label" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("17_vlub6")
theme_override_font_sizes/font_size = 32
text = "Learning Module"
horizontal_alignment = 1
[node name="HSeparator" type="HSeparator" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="DescriptionPanel" type="PanelContainer" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 0.5
theme_override_styles/panel = SubResource("StyleBoxFlat_description")
[node name="MarginContainer" type="MarginContainer" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/DescriptionPanel"]
layout_mode = 2
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 15
theme_override_constants/margin_bottom = 15
[node name="DescriptionLabel" type="Label" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/DescriptionPanel/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 20
text = "Description goes here..."
autowrap_mode = 2
[node name="GraphTitle" type="Label" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Graph:"
horizontal_alignment = 1
[node name="GraphContainer" type="Panel" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 300)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_stretch_ratio = 2.0
theme_override_styles/panel = SubResource("StyleBoxFlat_graph")
[node name="AnswerContainer" type="VBoxContainer" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 10
[node name="QuestionLabel" type="Label" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/AnswerContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 18
text = "How many workers do we need to build 10 houses in a week?"
horizontal_alignment = 1
[node name="AnswerField" type="LineEdit" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/AnswerContainer"]
custom_minimum_size = Vector2(150, 40)
layout_mode = 2
size_flags_horizontal = 4
theme_override_font_sizes/font_size = 18
placeholder_text = "Enter answer"
alignment = 1
max_length = 5
[node name="CheckButton" type="Button" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/AnswerContainer"]
custom_minimum_size = Vector2(150, 40)
layout_mode = 2
size_flags_horizontal = 4
theme_override_font_sizes/font_size = 16
text = "Check Answer"
[node name="FeedbackLabel" type="Label" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/AnswerContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 18
horizontal_alignment = 1
autowrap_mode = 2
text_overrun_behavior = 3
max_lines_visible = 6
[node name="HBoxContainer" type="HBoxContainer" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="CompleteButton" type="Button" parent="MissionManager/LearningPanel/MarginContainer/VBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(200, 50)
layout_mode = 2
theme_override_font_sizes/font_size = 18
disabled = true
text = "Complete"
[node name="ObjectiveLabel" type="Label" parent="MissionManager"]
offset_right = 40.0
offset_bottom = 23.0
[connection signal="all_missions_completed" from="MissionManager" to="." method="_on_mission_manager_all_missions_completed"]
[connection signal="mission_started" from="MissionManager" to="." method="_on_mission_manager_mission_started"]
[connection signal="pressed" from="MissionManager/LearningPanel/MarginContainer/VBoxContainer/HBoxContainer/CompleteButton" to="MissionManager/LearningPanel" method="_on_complete_button_pressed"]

@ -118,8 +118,10 @@ func _setup_structure_menu():
structure_menu = structure_menu_scene.instantiate()
var canvas_layer = get_node_or_null("/root/Main/CanvasLayer")
if canvas_layer:
canvas_layer.add_child(structure_menu)
# Set the builder reference
# Use call_deferred to add the child
canvas_layer.add_child.call_deferred(structure_menu)
# Set the builder reference after a frame to ensure the node is added
await get_tree().process_frame
if _builder:
structure_menu.builder = _builder

@ -12,7 +12,7 @@ price = 5000
population_count = 0
kW_usage = 0.0
kW_production = 40.0
selector_scale = 13
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "A power-generating facility that produces electricity to keep your city's buildings operational and citizens happy. Produces 40 kW of energy."