/ main_game.tscn
main_game.tscn
1 [gd_scene format=3 uid="uid://d37lrs2and1qh"] 2 3 [ext_resource type="Script" uid="uid://1qmmch4sknii" path="res://MainGame.gd" id="1_jgkyn"] 4 [ext_resource type="Script" uid="uid://ckmit541ni5uu" path="res://NetworkManager.gd" id="1_ykeeq"] 5 [ext_resource type="Script" uid="uid://bwyepk43lflmg" path="res://MessageBus.gd" id="2_ykeeq"] 6 [ext_resource type="Script" uid="uid://dwp2g4tb7co2f" path="res://EventBus.gd" id="5_02kkc"] 7 [ext_resource type="Texture2D" uid="uid://hkbm430su8lk" path="res://Environment/Tilesets/tile_sheet_128px_by_128px.png" id="6_02kkc"] 8 [ext_resource type="Script" uid="uid://dhvfca1p1tn41" path="res://WorldRenderer.gd" id="6_2pltu"] 9 [ext_resource type="Texture2D" uid="uid://cmrkfb8ny03im" path="res://assets/drops/WoodLog.png" id="7_02kkc"] 10 [ext_resource type="Script" uid="uid://cndm8lmvotma1" path="res://ActorFactory.gd" id="7_4srsv"] 11 [ext_resource type="Texture2D" uid="uid://o6vq5bohf8yv" path="res://Environment/Tilesets/cobblestone.png" id="7_krmtw"] 12 [ext_resource type="Script" uid="uid://b8eokxd06px07" path="res://InputManager.gd" id="8_l5ukw"] 13 [ext_resource type="Script" uid="uid://b5mcpbnt0sumk" path="res://UIRoot.gd" id="9_4srsv"] 14 [ext_resource type="Texture2D" uid="uid://cxbuuqosb0wmo" path="res://Environment/Tilesets/tile_sheet_128px_by_128px(1).png" id="9_krmtw"] 15 [ext_resource type="Script" uid="uid://i3y852wowj3k" path="res://node2d.gd" id="9_mf81u"] 16 17 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_aomqu"] 18 texture = ExtResource("6_02kkc") 19 texture_region_size = Vector2i(64, 64) 20 0:0/0 = 0 21 1:0/0 = 0 22 2:0/0 = 0 23 3:0/0 = 0 24 4:0/0 = 0 25 5:0/0 = 0 26 6:0/0 = 0 27 7:0/0 = 0 28 8:0/0 = 0 29 30 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_an1vu"] 31 texture = ExtResource("7_krmtw") 32 texture_region_size = Vector2i(64, 64) 33 0:0/0 = 0 34 35 [sub_resource type="TileSet" id="TileSet_mf81u"] 36 tile_size = Vector2i(64, 64) 37 terrain_set_0/mode = 0 38 sources/1 = SubResource("TileSetAtlasSource_aomqu") 39 sources/4 = SubResource("TileSetAtlasSource_an1vu") 40 41 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_jgkyn"] 42 texture = ExtResource("7_02kkc") 43 texture_region_size = Vector2i(64, 64) 44 0:0/0 = 0 45 46 [sub_resource type="TileSet" id="TileSet_qpaub"] 47 tile_size = Vector2i(64, 64) 48 sources/0 = SubResource("TileSetAtlasSource_jgkyn") 49 50 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_qpaub"] 51 texture = ExtResource("9_krmtw") 52 texture_region_size = Vector2i(128, 128) 53 0:0/0 = 0 54 5:0/0 = 0 55 6:0/0 = 0 56 7:0/0 = 0 57 8:0/0 = 0 58 10:0/0 = 0 59 11:0/0 = 0 60 12:0/0 = 0 61 13:0/0 = 0 62 7:1/0 = 0 63 8:1/0 = 0 64 9:1/0 = 0 65 10:1/0 = 0 66 11:1/0 = 0 67 12:1/0 = 0 68 13:1/0 = 0 69 6:4/0 = 0 70 7:4/0 = 0 71 10:4/0 = 0 72 11:4/0 = 0 73 12:4/0 = 0 74 13:4/0 = 0 75 6:5/0 = 0 76 7:5/0 = 0 77 10:5/0 = 0 78 11:5/0 = 0 79 12:5/0 = 0 80 13:5/0 = 0 81 5:2/0 = 0 82 6:2/0 = 0 83 3:2/0 = 0 84 85 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_borgi"] 86 texture = ExtResource("9_krmtw") 87 texture_region_size = Vector2i(290, 128) 88 4:0/0 = 0 89 7:0/0 = 0 90 8:0/0 = 0 91 10:0/0 = 0 92 11:0/0 = 0 93 12:0/0 = 0 94 13:0/0 = 0 95 7:1/0 = 0 96 8:1/0 = 0 97 9:1/0 = 0 98 10:1/0 = 0 99 11:1/0 = 0 100 12:1/0 = 0 101 13:1/0 = 0 102 6:4/0 = 0 103 7:4/0 = 0 104 10:4/0 = 0 105 11:4/0 = 0 106 12:4/0 = 0 107 13:4/0 = 0 108 6:5/0 = 0 109 7:5/0 = 0 110 10:5/0 = 0 111 11:5/0 = 0 112 12:5/0 = 0 113 13:5/0 = 0 114 3:0/0 = 0 115 1:0/0 = 0 116 117 [sub_resource type="TileSet" id="TileSet_jgkyn"] 118 tile_size = Vector2i(64, 64) 119 sources/2 = SubResource("TileSetAtlasSource_borgi") 120 sources/1 = SubResource("TileSetAtlasSource_qpaub") 121 122 [node name="MainGame" type="Node2D" unique_id=1608656925] 123 process_mode = 4 124 script = ExtResource("1_jgkyn") 125 126 [node name="NetworkLayer" type="Node" parent="." unique_id=971597728] 127 unique_name_in_owner = true 128 129 [node name="NetworkManager" type="Node" parent="NetworkLayer" unique_id=627457221] 130 script = ExtResource("1_ykeeq") 131 132 [node name="MultiplayerAPI" type="Node" parent="NetworkLayer/NetworkManager" unique_id=1553034375] 133 134 [node name="ConnectionListener" type="Node" parent="NetworkLayer/NetworkManager" unique_id=1089071050] 135 136 [node name="RPC" type="Node" parent="NetworkLayer" unique_id=1033900249] 137 138 [node name="MessageBus" type="Node" parent="NetworkLayer/RPC" unique_id=1896040239] 139 script = ExtResource("2_ykeeq") 140 141 [node name="EventBus" type="Node" parent="." unique_id=249118610] 142 script = ExtResource("5_02kkc") 143 144 [node name="ViewLayer" type="Node2D" parent="." unique_id=198060175] 145 unique_name_in_owner = true 146 visibility_layer = 0 147 148 [node name="WorldRenderer" type="Node" parent="ViewLayer" unique_id=453758184] 149 script = ExtResource("6_2pltu") 150 151 [node name="TileMapLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=1943193286] 152 z_as_relative = false 153 tile_set = SubResource("TileSet_mf81u") 154 155 [node name="FilthLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=2084332103] 156 157 [node name="ItemLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=615448927] 158 z_index = 1 159 z_as_relative = false 160 tile_set = SubResource("TileSet_qpaub") 161 162 [node name="PipeLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=924886893] 163 164 [node name="StructureLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=1828200009] 165 tile_set = SubResource("TileSet_jgkyn") 166 167 [node name="BluePrintLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=1486137004] 168 169 [node name="EntityLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=3120120] 170 z_index = 1 171 z_as_relative = false 172 173 [node name="EffectsLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=1426004101] 174 175 [node name="RoofLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=1015287331] 176 177 [node name="WeatherLayer" type="TileMapLayer" parent="ViewLayer/WorldRenderer" unique_id=713630380] 178 179 [node name="ActorFactory" type="Node" parent="ViewLayer" unique_id=2121372968] 180 script = ExtResource("7_4srsv") 181 182 [node name="EnvironmentSync" type="MultiplayerSpawner" parent="ViewLayer/ActorFactory" unique_id=586465435] 183 _spawnable_scenes = PackedStringArray("uid://dd2gpg30tp3ha") 184 spawn_path = NodePath("..") 185 186 [node name="InputLayer" type="Node" parent="." unique_id=997527126] 187 unique_name_in_owner = true 188 189 [node name="InputManager" type="Node" parent="InputLayer" unique_id=401883697] 190 script = ExtResource("8_l5ukw") 191 192 [node name="Cusor" type="Node2D" parent="InputLayer" unique_id=1255590048] 193 194 [node name="Node2D" type="Node2D" parent="InputLayer" unique_id=1641692644] 195 script = ExtResource("9_mf81u") 196 197 [node name="Camera2D" type="Camera2D" parent="InputLayer/Node2D" unique_id=1682660964] 198 anchor_mode = 0 199 200 [node name="GUILayer" type="CanvasLayer" parent="." unique_id=831481271] 201 layer = 2 202 203 [node name="UIRoot" type="Control" parent="GUILayer" unique_id=248219335] 204 unique_name_in_owner = true 205 top_level = true 206 z_index = 3 207 z_as_relative = false 208 layout_mode = 3 209 anchors_preset = 0 210 offset_right = 1920.0 211 offset_bottom = 1080.0 212 script = ExtResource("9_4srsv") 213 214 [node name="SelectionInfo" type="Control" parent="GUILayer" unique_id=435466778] 215 layout_mode = 3 216 anchors_preset = 0 217 offset_right = 40.0 218 offset_bottom = 40.0 219 220 [node name="ThingBoxFloors" type="GridContainer" parent="GUILayer" unique_id=1815893443] 221 visible = false 222 offset_left = 201.0 223 offset_top = 892.0 224 offset_right = 562.0 225 offset_bottom = 1049.0 226 columns = 6 227 228 [node name="ThingBoxBuildings" type="GridContainer" parent="GUILayer" unique_id=1151398471] 229 offset_left = 201.0 230 offset_top = 892.0 231 offset_right = 562.0 232 offset_bottom = 1049.0 233 columns = 6 234 235 [node name="ThingBoxCommands" type="GridContainer" parent="GUILayer" unique_id=1209880597] 236 visible = false 237 offset_left = 201.0 238 offset_top = 892.0 239 offset_right = 562.0 240 offset_bottom = 1049.0 241 columns = 6 242 243 [node name="Work" type="Button" parent="GUILayer/ThingBoxCommands" unique_id=705019630] 244 layout_mode = 2 245 text = "Work" 246 247 [node name="Chop" type="Button" parent="GUILayer/ThingBoxCommands" unique_id=974109946] 248 layout_mode = 2 249 text = "chop 250 " 251 252 [node name="Growing" type="Button" parent="GUILayer/ThingBoxCommands" unique_id=716453273] 253 layout_mode = 2 254 text = "Growing Zone" 255 256 [node name="BottomBarPanel" type="PanelContainer" parent="GUILayer" unique_id=366755611] 257 custom_minimum_size = Vector2(0, 25) 258 anchors_preset = 12 259 anchor_top = 1.0 260 anchor_right = 1.0 261 anchor_bottom = 1.0 262 offset_top = -25.0 263 grow_horizontal = 2 264 grow_vertical = 0 265 266 [node name="BottomBarContainer" type="HBoxContainer" parent="GUILayer/BottomBarPanel" unique_id=2110732493] 267 custom_minimum_size = Vector2(0, 25) 268 layout_mode = 2 269 alignment = 1 270 271 [node name="Build_Command" type="MenuBar" parent="GUILayer/BottomBarPanel/BottomBarContainer" unique_id=694706404] 272 custom_minimum_size = Vector2(100, 25) 273 layout_mode = 2 274 size_flags_horizontal = 3 275 276 [node name="Label" type="Label" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command" unique_id=1800226923] 277 layout_mode = 0 278 offset_right = 40.0 279 offset_bottom = 23.0 280 text = "Build/Command" 281 282 [node name="PanelContainer" type="PanelContainer" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command" unique_id=80017224] 283 layout_mode = 1 284 offset_top = -101.0 285 offset_right = 172.0 286 pivot_offset = Vector2(400, 400) 287 288 [node name="GridContainer" type="GridContainer" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer" unique_id=1842035116] 289 layout_mode = 2 290 columns = 2 291 292 [node name="Button" type="Button" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer" unique_id=454869497] 293 layout_mode = 2 294 text = "Commands" 295 296 [node name="Floors" type="Button" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer" unique_id=259776967] 297 layout_mode = 2 298 text = "Floors" 299 300 [node name="Button3" type="Button" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer" unique_id=264690973] 301 layout_mode = 2 302 text = "Zones" 303 304 [node name="Button4" type="Button" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer" unique_id=382934252] 305 layout_mode = 2 306 text = "misc" 307 308 [node name="Buildings" type="Button" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer" unique_id=1889020543] 309 layout_mode = 2 310 text = "Buildings" 311 312 [node name="Production" type="Button" parent="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer" unique_id=1706819903] 313 layout_mode = 2 314 text = "Production" 315 316 [node name="Jobs" type="MenuBar" parent="GUILayer/BottomBarPanel/BottomBarContainer" unique_id=2141547254] 317 layout_mode = 2 318 size_flags_horizontal = 3 319 320 [node name="Label" type="Label" parent="GUILayer/BottomBarPanel/BottomBarContainer/Jobs" unique_id=511113667] 321 layout_mode = 0 322 offset_right = 40.0 323 offset_bottom = 23.0 324 text = "Jobs" 325 326 [node name="Pawns" type="MenuBar" parent="GUILayer/BottomBarPanel/BottomBarContainer" unique_id=1780876505] 327 custom_minimum_size = Vector2(100, 25) 328 layout_mode = 2 329 size_flags_horizontal = 3 330 331 [node name="Label" type="Label" parent="GUILayer/BottomBarPanel/BottomBarContainer/Pawns" unique_id=85756486] 332 layout_mode = 0 333 offset_right = 40.0 334 offset_bottom = 23.0 335 text = "Pawns" 336 337 [node name="WorkQueue" type="MenuBar" parent="GUILayer/BottomBarPanel/BottomBarContainer" unique_id=1342640990] 338 custom_minimum_size = Vector2(100, 25) 339 layout_mode = 2 340 size_flags_horizontal = 3 341 342 [node name="label" type="Label" parent="GUILayer/BottomBarPanel/BottomBarContainer/WorkQueue" unique_id=686421987] 343 layout_mode = 0 344 offset_right = 40.0 345 offset_bottom = 23.0 346 text = "Work Queue 347 " 348 349 [node name="Spare" type="MenuBar" parent="GUILayer/BottomBarPanel/BottomBarContainer" unique_id=901592576] 350 custom_minimum_size = Vector2(100, 25) 351 layout_mode = 2 352 size_flags_horizontal = 3 353 354 [node name="Label" type="Label" parent="GUILayer/BottomBarPanel/BottomBarContainer/Spare" unique_id=1010274656] 355 layout_mode = 0 356 offset_right = 40.0 357 offset_bottom = 23.0 358 text = "Spare" 359 360 [node name="TopLeftMenu" type="HBoxContainer" parent="GUILayer" unique_id=1506832164] 361 offset_right = 213.0 362 offset_bottom = 51.0 363 364 [node name="HostGame" type="Button" parent="GUILayer/TopLeftMenu" unique_id=805868129] 365 layout_mode = 2 366 text = "~HostGame~" 367 368 [node name="JoinGame" type="Button" parent="GUILayer/TopLeftMenu" unique_id=380304789] 369 layout_mode = 2 370 text = "~JoinGame~" 371 372 [node name="TopCenter" type="PanelContainer" parent="GUILayer" unique_id=300510981] 373 anchors_preset = 5 374 anchor_left = 0.5 375 anchor_right = 0.5 376 offset_left = -20.0 377 offset_right = 20.0 378 offset_bottom = 40.0 379 grow_horizontal = 2 380 381 [node name="MarginContainer" type="MarginContainer" parent="GUILayer/TopCenter" unique_id=212290434] 382 layout_mode = 2 383 384 [node name="HBoxContainer" type="HBoxContainer" parent="GUILayer/TopCenter/MarginContainer" unique_id=779503331] 385 layout_mode = 2 386 387 [connection signal="spawned" from="ViewLayer/ActorFactory/EnvironmentSync" to="ViewLayer/ActorFactory" method="_on_environment_sync_spawned"] 388 [connection signal="pressed" from="GUILayer/ThingBoxCommands/Work" to="InputLayer/InputManager" method="_on_work_pressed"] 389 [connection signal="pressed" from="GUILayer/ThingBoxCommands/Chop" to="InputLayer/InputManager" method="_on_chop_pressed"] 390 [connection signal="pressed" from="GUILayer/ThingBoxCommands/Growing" to="InputLayer/InputManager" method="_on_growing_pressed"] 391 [connection signal="pressed" from="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer/Floors" to="GUILayer/UIRoot" method="_on_floors_pressed"] 392 [connection signal="pressed" from="GUILayer/BottomBarPanel/BottomBarContainer/Build_Command/PanelContainer/GridContainer/Buildings" to="GUILayer/UIRoot" method="_on_buildings_pressed"] 393 [connection signal="pressed" from="GUILayer/TopLeftMenu/HostGame" to="GUILayer/UIRoot" method="_on_host_game_pressed"] 394 [connection signal="pressed" from="GUILayer/TopLeftMenu/JoinGame" to="GUILayer/UIRoot" method="_on_join_game_pressed"]