From 2525a13042422831c8437af6a65bb15f8ca8cd2d Mon Sep 17 00:00:00 2001 From: Pawel Lampe Date: Wed, 13 Dec 2023 22:23:36 +0100 Subject: [PATCH] Simplify map insertion into 'Match', closes #91 --- source/main-menu/Loading.gd | 2 +- source/match/Match.gd | 64 ++++++++++---------- source/match/Match.tscn | 58 +----------------- tests/manual/TestAllUnits.tscn | 15 +---- tests/manual/TestNonQuadraticMap.tscn | 17 +----- tests/manual/TestOneUnit.tscn | 15 +---- tests/manual/TestPlayerVsAI.tscn | 15 +---- tests/manual/TestUnitsFightingEachOther.tscn | 15 +---- 8 files changed, 48 insertions(+), 153 deletions(-) diff --git a/source/main-menu/Loading.gd b/source/main-menu/Loading.gd index 22d9339..e9cb58d 100644 --- a/source/main-menu/Loading.gd +++ b/source/main-menu/Loading.gd @@ -29,7 +29,7 @@ func _ready(): await get_tree().physics_frame var a_match = match_prototype.instantiate() a_match.settings = match_settings - a_match.map_to_plug = map + a_match.map = map _progress_bar.value = 0.9 _label.text = tr("LOADING_STEP_STARTING_MATCH") diff --git a/source/match/Match.gd b/source/match/Match.gd index 9850319..6e3a4bd 100644 --- a/source/match/Match.gd +++ b/source/match/Match.gd @@ -13,9 +13,10 @@ const Drone = preload("res://source/match/units/Drone.tscn") const Worker = preload("res://source/match/units/Worker.tscn") @export var settings: Resource = null -@export var map_to_load_and_plug: PackedScene = null -@export var map_to_plug: Node = null +var map: + set = _set_map, + get = _get_map var players = [] var controlled_player = null: set = _set_controlled_player @@ -25,7 +26,6 @@ var visible_players = null: set = _ignore, get = _get_visible_players -@onready var map = $Map @onready var navigation = $Navigation @onready var fog_of_war = $FogOfWar @@ -35,9 +35,14 @@ var visible_players = null: @onready var _terrain = $Terrain +func _enter_tree(): + assert(settings != null, "match cannot start without settings, see examples in tests/manual/") + assert(map != null, "match cannot start without map, see examples in tests/manual/") + + func _ready(): - _try_setting_up_a_custom_map() MatchSignals.setup_and_spawn_unit.connect(_setup_and_spawn_unit) + _setup_subsystems_dependent_on_map() _create_players() _choose_controlled_player() visible_player = players[settings.visible_player] @@ -55,14 +60,15 @@ func _unhandled_input(event): MatchSignals.deselect_all_units.emit() -func _ignore(_value): - pass +func _set_map(a_map): + assert(get_node_or_null("Map") == null, "map already set") + a_map.name = "Map" + add_child(a_map) + a_map.owner = self -func _get_visible_players(): - if settings.visibility == settings.Visibility.PER_PLAYER: - return [visible_player] - return players +func _get_map(): + return get_node_or_null("Map") func _set_controlled_player(player): @@ -105,20 +111,21 @@ func _set_visible_player(player): visible_player = player -func _try_setting_up_a_custom_map(): - assert( - map_to_load_and_plug == null or map_to_plug == null, - "both 'map_to_load_and_plug' and 'map_to_plug' cannot be set at the same time" - ) - if map_to_load_and_plug == null and map_to_plug == null: - return - var custom_map = map_to_plug if map_to_plug != null else map_to_load_and_plug.instantiate() - if custom_map != null: - _plug_custom_map(custom_map) - _terrain.update_shape(custom_map.find_child("Terrain").mesh) - fog_of_war.resize(custom_map.size) - _recalculate_camera_bounding_planes(custom_map.size) - navigation.rebake(custom_map) +func _ignore(_value): + pass + + +func _get_visible_players(): + if settings.visibility == settings.Visibility.PER_PLAYER: + return [visible_player] + return players + + +func _setup_subsystems_dependent_on_map(): + _terrain.update_shape(map.find_child("Terrain").mesh) + fog_of_war.resize(map.size) + _recalculate_camera_bounding_planes(map.size) + navigation.rebake(map) func _recalculate_camera_bounding_planes(map_size: Vector2): @@ -126,15 +133,6 @@ func _recalculate_camera_bounding_planes(map_size: Vector2): _camera.bounding_planes[3] = Plane(0, 0, -1, -map_size.y) -func _plug_custom_map(custom_map): - map.name = map.name + "1" - map.add_sibling(custom_map) - remove_child(map) - map.queue_free() - map = custom_map - map.owner = self - - func _create_players(): for player_settings in settings.players: var player = Player.new() diff --git a/source/match/Match.tscn b/source/match/Match.tscn index b1f519d..26f66b6 100644 --- a/source/match/Match.tscn +++ b/source/match/Match.tscn @@ -1,13 +1,9 @@ -[gd_scene load_steps=55 format=3 uid="uid://camns8fqod8d4"] +[gd_scene load_steps=44 format=3 uid="uid://camns8fqod8d4"] [ext_resource type="Script" path="res://source/match/Match.gd" id="1_1555u"] [ext_resource type="Script" path="res://source/match/IsometricCamera3D.gd" id="1_qb2ry"] -[ext_resource type="Script" path="res://source/data-model/PlayerSettings.gd" id="2_4dhvm"] -[ext_resource type="Script" path="res://source/data-model/MatchSettings.gd" id="3_wftgs"] [ext_resource type="Script" path="res://source/match/FogOfWar.gd" id="5_eb52t"] [ext_resource type="PackedScene" uid="uid://co800e4shs7bh" path="res://source/generic-scenes-and-nodes/3d/RectangularSelection3D.tscn" id="5_yi0pu"] -[ext_resource type="PackedScene" uid="uid://cbe63rdjw7y4p" path="res://source/match/maps/PlainAndSimple.tscn" id="6_au6gf"] -[ext_resource type="Material" uid="uid://co8vfcoqqs5i8" path="res://source/match/resources/materials/terrain.material.tres" id="6_u47mu"] [ext_resource type="PackedScene" uid="uid://clbjgy724q2si" path="res://source/generic-scenes-and-nodes/2d/DynamicCircle2D.tscn" id="6_ux0ef"] [ext_resource type="Script" path="res://source/match/Terrain.gd" id="7_ccpu4"] [ext_resource type="Script" path="res://source/match/Navigation.gd" id="10_1wfp1"] @@ -33,36 +29,6 @@ [ext_resource type="PackedScene" uid="uid://q5w474dvts3f" path="res://source/match/handlers/StructurePlacementHandler.tscn" id="26_7heso"] [ext_resource type="PackedScene" uid="uid://b8p6lcwubx1tp" path="res://source/match/handlers/UnitVisibilityHandler.tscn" id="32_fci1c"] -[sub_resource type="Resource" id="Resource_hfc6q"] -script = ExtResource("2_4dhvm") -color = Color(0.4, 0.694118, 1, 1) -controller = 1 -spawn_index = -1 - -[sub_resource type="Resource" id="Resource_6k4u7"] -script = ExtResource("2_4dhvm") -color = Color(1, 0.360784, 0.45098, 1) -controller = 2 -spawn_index = -1 - -[sub_resource type="Resource" id="Resource_8ui6d"] -script = ExtResource("2_4dhvm") -color = Color(0.647059, 1, 0.6, 1) -controller = 2 -spawn_index = -1 - -[sub_resource type="Resource" id="Resource_qphv2"] -script = ExtResource("2_4dhvm") -color = Color(0.929412, 0.521569, 1, 1) -controller = 2 -spawn_index = -1 - -[sub_resource type="Resource" id="Resource_frabv"] -script = ExtResource("3_wftgs") -players = Array[Resource]([SubResource("Resource_hfc6q"), SubResource("Resource_6k4u7"), SubResource("Resource_8ui6d"), SubResource("Resource_qphv2")]) -visibility = 1 -visible_player = 0 - [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_ysb0j"] sun_angle_max = 200.0 @@ -81,15 +47,6 @@ fog_density = 0.0016 fog_height = 0.25 fog_height_density = 1.2 -[sub_resource type="PlaneMesh" id="PlaneMesh_fmyt8"] -resource_local_to_scene = true -material = ExtResource("6_u47mu") -size = Vector2(50, 50) -center_offset = Vector3(25, 0, 25) - -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_3sb7f"] -data = PackedVector3Array(50, 0, 50, 0, 0, 50, 50, 0, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0) - [sub_resource type="ShaderMaterial" id="ShaderMaterial_qw0ps"] render_priority = 0 shader = ExtResource("10_weh6c") @@ -130,8 +87,6 @@ size = Vector2(50, 50) center_offset = Vector3(25, 0, 25) [sub_resource type="NavigationMesh" id="NavigationMesh_8emvl"] -vertices = PackedVector3Array(0.8, 2.3, 0.8, 0.8, 2.3, 49.2, 49.2, 2.3, 49.2, 49.2, 2.3, 0.8) -polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1)] geometry_source_geometry_mode = 2 geometry_source_group_name = &"air_navigation_input" cell_size = 0.4 @@ -141,8 +96,6 @@ agent_radius = 0.8 agent_max_climb = 0.0 [sub_resource type="NavigationMesh" id="NavigationMesh_exfwj"] -vertices = PackedVector3Array(1, 0.5, 1, 1, 0.5, 49, 49, 0.5, 49, 49, 0.5, 1) -polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1)] geometry_parsed_geometry_type = 2 geometry_collision_mask = 4278190082 geometry_source_geometry_mode = 2 @@ -164,7 +117,6 @@ viewport_path = NodePath("HUD/MarginContainer/Minimap/MarginContainer/MinimapVie [node name="Match" type="Node3D"] script = ExtResource("1_1555u") -settings = SubResource("Resource_frabv") [node name="IsometricCamera3D" type="Camera3D" parent="."] transform = Transform3D(1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, 49.5996, 12.4465, 65.9216) @@ -190,17 +142,11 @@ environment = SubResource("Environment_qxcnu") [node name="RectangularSelection3D" parent="." instance=ExtResource("5_yi0pu")] -[node name="Map" parent="." instance=ExtResource("6_au6gf")] - -[node name="Terrain" parent="Map/Geometry" index="1"] -mesh = SubResource("PlaneMesh_fmyt8") - [node name="Terrain" type="StaticBody3D" parent="."] collision_mask = 0 script = ExtResource("7_ccpu4") [node name="CollisionShape3D" type="CollisionShape3D" parent="Terrain"] -shape = SubResource("ConcavePolygonShape3D_3sb7f") [node name="Fog" type="MeshInstance3D" parent="."] material_override = SubResource("ShaderMaterial_qw0ps") @@ -476,5 +422,3 @@ rectangular_selection_3d = NodePath("../../RectangularSelection3D") visible = false [node name="UnitVisibilityHandler" parent="Handlers" instance=ExtResource("32_fci1c")] - -[editable path="Map"] diff --git a/tests/manual/TestAllUnits.tscn b/tests/manual/TestAllUnits.tscn index 3989f45..3d3bc98 100644 --- a/tests/manual/TestAllUnits.tscn +++ b/tests/manual/TestAllUnits.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=25 format=3 uid="uid://b65yuqx0iw62f"] +[gd_scene load_steps=24 format=3 uid="uid://b65yuqx0iw62f"] [ext_resource type="PackedScene" uid="uid://camns8fqod8d4" path="res://source/match/Match.tscn" id="1_oiu0k"] [ext_resource type="Script" path="res://tests/manual/Match.gd" id="2_ghr3h"] @@ -11,7 +11,7 @@ [ext_resource type="PackedScene" uid="uid://h5lqor1xl2sf" path="res://source/match/units/VehicleFactory.tscn" id="4_m1xri"] [ext_resource type="Shader" path="res://source/shaders/3d/simple_fog_of_war.gdshader" id="5_f2ny6"] [ext_resource type="PackedScene" uid="uid://b8pckq1xn44ss" path="res://source/match/units/AntiGroundTurret.tscn" id="5_g67iu"] -[ext_resource type="Material" uid="uid://co8vfcoqqs5i8" path="res://source/match/resources/materials/terrain.material.tres" id="5_ki5yw"] +[ext_resource type="PackedScene" uid="uid://cbe63rdjw7y4p" path="res://source/match/maps/PlainAndSimple.tscn" id="5_t3ibh"] [ext_resource type="PackedScene" uid="uid://cfa8cpnpk5pcb" path="res://source/match/units/AntiAirTurret.tscn" id="6_lglnp"] [ext_resource type="PackedScene" uid="uid://i58ffvwxbbwm" path="res://source/match/units/Tank.tscn" id="9_csgr3"] [ext_resource type="PackedScene" uid="uid://bf0r3fovbvf1m" path="res://source/match/units/Worker.tscn" id="10_c3eov"] @@ -29,12 +29,6 @@ players = Array[Resource]([SubResource("Resource_e1xtl")]) visibility = 1 visible_player = 0 -[sub_resource type="PlaneMesh" id="PlaneMesh_yprsb"] -resource_local_to_scene = true -material = ExtResource("5_ki5yw") -size = Vector2(50, 50) -center_offset = Vector3(25, 0, 25) - [sub_resource type="ViewportTexture" id="ViewportTexture_v46ss"] viewport_path = NodePath("FogOfWar/CombinedViewport") @@ -63,8 +57,7 @@ script = ExtResource("2_ghr3h") allow_resources_deficit_spending = true settings = SubResource("Resource_rpdec") -[node name="Terrain" parent="Map/Geometry" index="1"] -mesh = SubResource("PlaneMesh_yprsb") +[node name="Map" parent="." index="0" instance=ExtResource("5_t3ibh")] [node name="ScreenOverlay" parent="FogOfWar" index="1"] material_override = SubResource("ShaderMaterial_67o07") @@ -101,5 +94,3 @@ material = SubResource("ShaderMaterial_i0ai6") [node name="MinimapTextureRect" parent="HUD/MarginContainer/Minimap/MarginContainer" index="1"] texture = SubResource("ViewportTexture_ltqxy") - -[editable path="Map"] diff --git a/tests/manual/TestNonQuadraticMap.tscn b/tests/manual/TestNonQuadraticMap.tscn index 842e1f3..1b94cc8 100644 --- a/tests/manual/TestNonQuadraticMap.tscn +++ b/tests/manual/TestNonQuadraticMap.tscn @@ -1,12 +1,11 @@ -[gd_scene load_steps=17 format=3 uid="uid://c54pjqg0defrj"] +[gd_scene load_steps=15 format=3 uid="uid://c54pjqg0defrj"] [ext_resource type="PackedScene" uid="uid://camns8fqod8d4" path="res://source/match/Match.tscn" id="1_e8lxh"] [ext_resource type="Script" path="res://tests/manual/Match.gd" id="2_2ib5j"] [ext_resource type="Script" path="res://source/data-model/MatchSettings.gd" id="3_52248"] -[ext_resource type="PackedScene" uid="uid://d8wcem3ievht" path="res://tests/manual/maps/NonQuadratic.tscn" id="3_dldkj"] [ext_resource type="Script" path="res://source/data-model/PlayerSettings.gd" id="3_eliam"] -[ext_resource type="Material" uid="uid://co8vfcoqqs5i8" path="res://source/match/resources/materials/terrain.material.tres" id="4_d4g7r"] [ext_resource type="Shader" path="res://source/shaders/3d/simple_fog_of_war.gdshader" id="5_arsbx"] +[ext_resource type="PackedScene" uid="uid://d8wcem3ievht" path="res://tests/manual/maps/NonQuadratic.tscn" id="5_jtm1l"] [ext_resource type="Shader" path="res://source/shaders/2d/white_transparent.gdshader" id="6_2nbfa"] [sub_resource type="Resource" id="Resource_vkdak"] @@ -21,12 +20,6 @@ players = Array[Resource]([SubResource("Resource_vkdak")]) visibility = 0 visible_player = 0 -[sub_resource type="PlaneMesh" id="PlaneMesh_7oss6"] -resource_local_to_scene = true -material = ExtResource("4_d4g7r") -size = Vector2(50, 50) -center_offset = Vector3(25, 0, 25) - [sub_resource type="ViewportTexture" id="ViewportTexture_x0ak8"] viewport_path = NodePath("FogOfWar/CombinedViewport") @@ -54,10 +47,8 @@ viewport_path = NodePath("HUD/MarginContainer/Minimap/MarginContainer/MinimapVie script = ExtResource("2_2ib5j") allow_resources_deficit_spending = true settings = SubResource("Resource_qgn77") -map_to_load_and_plug = ExtResource("3_dldkj") -[node name="Terrain" parent="Map/Geometry" index="1"] -mesh = SubResource("PlaneMesh_7oss6") +[node name="Map" parent="." index="0" instance=ExtResource("5_jtm1l")] [node name="ScreenOverlay" parent="FogOfWar" index="1"] material_override = SubResource("ShaderMaterial_g62le") @@ -67,5 +58,3 @@ material = SubResource("ShaderMaterial_s3a4s") [node name="MinimapTextureRect" parent="HUD/MarginContainer/Minimap/MarginContainer" index="1"] texture = SubResource("ViewportTexture_un6ry") - -[editable path="Map"] diff --git a/tests/manual/TestOneUnit.tscn b/tests/manual/TestOneUnit.tscn index 1c3f281..17f7524 100644 --- a/tests/manual/TestOneUnit.tscn +++ b/tests/manual/TestOneUnit.tscn @@ -1,10 +1,10 @@ -[gd_scene load_steps=17 format=3 uid="uid://qhgcfjxa2ykg"] +[gd_scene load_steps=16 format=3 uid="uid://qhgcfjxa2ykg"] [ext_resource type="PackedScene" uid="uid://camns8fqod8d4" path="res://source/match/Match.tscn" id="1_fe2sx"] [ext_resource type="Script" path="res://tests/manual/Match.gd" id="2_sflin"] [ext_resource type="Script" path="res://source/data-model/PlayerSettings.gd" id="3_3drrn"] [ext_resource type="Script" path="res://source/data-model/MatchSettings.gd" id="4_go41p"] -[ext_resource type="Material" uid="uid://co8vfcoqqs5i8" path="res://source/match/resources/materials/terrain.material.tres" id="5_x8bni"] +[ext_resource type="PackedScene" uid="uid://cbe63rdjw7y4p" path="res://source/match/maps/PlainAndSimple.tscn" id="5_pl4hu"] [ext_resource type="Shader" path="res://source/shaders/2d/white_transparent.gdshader" id="8_fifyq"] [ext_resource type="PackedScene" uid="uid://i58ffvwxbbwm" path="res://source/match/units/Tank.tscn" id="10_tqe5i"] [ext_resource type="Shader" path="res://source/shaders/3d/simple_fog_of_war.gdshader" id="12_ke5ti"] @@ -21,12 +21,6 @@ players = Array[Resource]([SubResource("Resource_aehri")]) visibility = 0 visible_player = 0 -[sub_resource type="PlaneMesh" id="PlaneMesh_vk1ka"] -resource_local_to_scene = true -material = ExtResource("5_x8bni") -size = Vector2(50, 50) -center_offset = Vector3(25, 0, 25) - [sub_resource type="ViewportTexture" id="ViewportTexture_v46ss"] viewport_path = NodePath("FogOfWar/CombinedViewport") @@ -55,8 +49,7 @@ script = ExtResource("2_sflin") allow_resources_deficit_spending = true settings = SubResource("Resource_qqc8i") -[node name="Terrain" parent="Map/Geometry" index="1"] -mesh = SubResource("PlaneMesh_vk1ka") +[node name="Map" parent="." index="0" instance=ExtResource("5_pl4hu")] [node name="ScreenOverlay" parent="FogOfWar" index="1"] material_override = SubResource("ShaderMaterial_67o07") @@ -69,5 +62,3 @@ material = SubResource("ShaderMaterial_kdlxq") [node name="MinimapTextureRect" parent="HUD/MarginContainer/Minimap/MarginContainer" index="1"] texture = SubResource("ViewportTexture_n2lq6") - -[editable path="Map"] diff --git a/tests/manual/TestPlayerVsAI.tscn b/tests/manual/TestPlayerVsAI.tscn index 3d29335..ab29255 100644 --- a/tests/manual/TestPlayerVsAI.tscn +++ b/tests/manual/TestPlayerVsAI.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=27 format=3 uid="uid://dvqwcc562qxs5"] +[gd_scene load_steps=26 format=3 uid="uid://dvqwcc562qxs5"] [ext_resource type="PackedScene" uid="uid://camns8fqod8d4" path="res://source/match/Match.tscn" id="1_cpaaw"] [ext_resource type="Script" path="res://tests/manual/Match.gd" id="2_mi5ae"] @@ -6,8 +6,8 @@ [ext_resource type="PackedScene" uid="uid://ct0ejt0trkhrf" path="res://source/match/units/CommandCenter.tscn" id="3_oqrnv"] [ext_resource type="PackedScene" uid="uid://cxilu6668nda6" path="res://source/match/units/AircraftFactory.tscn" id="4_a0u57"] [ext_resource type="Script" path="res://source/data-model/MatchSettings.gd" id="4_kwjav"] -[ext_resource type="Material" uid="uid://co8vfcoqqs5i8" path="res://source/match/resources/materials/terrain.material.tres" id="5_al0mb"] [ext_resource type="PackedScene" uid="uid://h5lqor1xl2sf" path="res://source/match/units/VehicleFactory.tscn" id="5_imqfl"] +[ext_resource type="PackedScene" uid="uid://cbe63rdjw7y4p" path="res://source/match/maps/PlainAndSimple.tscn" id="5_rbjbk"] [ext_resource type="PackedScene" uid="uid://b8pckq1xn44ss" path="res://source/match/units/AntiGroundTurret.tscn" id="6_i5onm"] [ext_resource type="PackedScene" uid="uid://cfa8cpnpk5pcb" path="res://source/match/units/AntiAirTurret.tscn" id="7_hplpe"] [ext_resource type="PackedScene" uid="uid://0gow0ughqu8u" path="res://source/match/units/Drone.tscn" id="8_8jgl1"] @@ -36,12 +36,6 @@ players = Array[Resource]([SubResource("Resource_sm6ga"), SubResource("Resource_ visibility = 0 visible_player = 0 -[sub_resource type="PlaneMesh" id="PlaneMesh_rdr54"] -resource_local_to_scene = true -material = ExtResource("5_al0mb") -size = Vector2(50, 50) -center_offset = Vector3(25, 0, 25) - [sub_resource type="ViewportTexture" id="ViewportTexture_v46ss"] viewport_path = NodePath("FogOfWar/CombinedViewport") @@ -70,8 +64,7 @@ script = ExtResource("2_mi5ae") allow_resources_deficit_spending = false settings = SubResource("Resource_tnmkt") -[node name="Terrain" parent="Map/Geometry" index="1"] -mesh = SubResource("PlaneMesh_rdr54") +[node name="Map" parent="." index="0" instance=ExtResource("5_rbjbk")] [node name="ScreenOverlay" parent="FogOfWar" index="1"] material_override = SubResource("ShaderMaterial_67o07") @@ -114,5 +107,3 @@ texture = SubResource("ViewportTexture_tly7c") [node name="SimpleClairvoyantAI" parent="Players" index="1" instance=ExtResource("15_6w32d")] primary_offensive_structure = 1 secondary_offensive_structure = 0 - -[editable path="Map"] diff --git a/tests/manual/TestUnitsFightingEachOther.tscn b/tests/manual/TestUnitsFightingEachOther.tscn index 98cdd6f..79c82cf 100644 --- a/tests/manual/TestUnitsFightingEachOther.tscn +++ b/tests/manual/TestUnitsFightingEachOther.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=20 format=3 uid="uid://tcq8nbsari5i"] +[gd_scene load_steps=19 format=3 uid="uid://tcq8nbsari5i"] [ext_resource type="PackedScene" uid="uid://camns8fqod8d4" path="res://source/match/Match.tscn" id="1_f87ft"] [ext_resource type="Script" path="res://tests/manual/Match.gd" id="2_iedaw"] @@ -8,7 +8,7 @@ [ext_resource type="PackedScene" uid="uid://e7tko4kpeiau" path="res://source/match/units/Helicopter.tscn" id="3_vdlcv"] [ext_resource type="PackedScene" uid="uid://0gow0ughqu8u" path="res://source/match/units/Drone.tscn" id="4_g2xty"] [ext_resource type="Script" path="res://source/data-model/MatchSettings.gd" id="4_xj1co"] -[ext_resource type="Material" uid="uid://co8vfcoqqs5i8" path="res://source/match/resources/materials/terrain.material.tres" id="5_djfah"] +[ext_resource type="PackedScene" uid="uid://cbe63rdjw7y4p" path="res://source/match/maps/PlainAndSimple.tscn" id="10_3dtqy"] [ext_resource type="Shader" path="res://source/shaders/2d/white_transparent.gdshader" id="10_t0wf4"] [sub_resource type="Resource" id="Resource_ipatj"] @@ -29,12 +29,6 @@ players = Array[Resource]([SubResource("Resource_ipatj"), SubResource("Resource_ visibility = 1 visible_player = 0 -[sub_resource type="PlaneMesh" id="PlaneMesh_83rft"] -resource_local_to_scene = true -material = ExtResource("5_djfah") -size = Vector2(50, 50) -center_offset = Vector3(25, 0, 25) - [sub_resource type="ViewportTexture" id="ViewportTexture_v46ss"] viewport_path = NodePath("FogOfWar/CombinedViewport") @@ -63,8 +57,7 @@ script = ExtResource("2_iedaw") allow_resources_deficit_spending = true settings = SubResource("Resource_e2qbq") -[node name="Terrain" parent="Map/Geometry" index="1"] -mesh = SubResource("PlaneMesh_83rft") +[node name="Map" parent="." index="0" instance=ExtResource("10_3dtqy")] [node name="ScreenOverlay" parent="FogOfWar" index="1"] material_override = SubResource("ShaderMaterial_67o07") @@ -125,5 +118,3 @@ material = SubResource("ShaderMaterial_7blp5") [node name="MinimapTextureRect" parent="HUD/MarginContainer/Minimap/MarginContainer" index="1"] texture = SubResource("ViewportTexture_5lqnb") - -[editable path="Map"]