Skip to content

Commit

Permalink
Fix provisioning of CC under construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Scony committed Nov 7, 2023
1 parent c2af414 commit 0aa4caf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func provision(resources, metadata):
"unexpected amount of resources"
)
_number_of_pending_worker_resource_requests -= 1
if _ccs.is_empty():
if _ccs.is_empty() or _ccs[0].action == null:
return
_ccs[0].action.produce(WorkerScene)
_number_of_pending_workers += 1
Expand Down
20 changes: 16 additions & 4 deletions tests/manual/TestUnitsFightingEachOther.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://tcq8nbsari5i"]
[gd_scene load_steps=20 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"]
Expand All @@ -9,6 +9,7 @@
[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="Shader" path="res://source/shaders/2d/white_transparent.gdshader" id="10_t0wf4"]

[sub_resource type="Resource" id="Resource_ipatj"]
script = ExtResource("3_mmh0x")
Expand Down Expand Up @@ -46,9 +47,17 @@ shader_parameter/texture_units_per_world_unit = 2
shader_parameter/debug_texture_view = false
shader_parameter/world_visibility_texture = SubResource("ViewportTexture_v46ss")

[sub_resource type="ViewportTexture" id="ViewportTexture_38cip"]
[sub_resource type="ViewportTexture" id="ViewportTexture_ysn5a"]
viewport_path = NodePath("FogOfWar/CombinedViewport")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_7blp5"]
resource_local_to_scene = true
shader = ExtResource("10_t0wf4")
shader_parameter/reference_texture = SubResource("ViewportTexture_ysn5a")

[sub_resource type="ViewportTexture" id="ViewportTexture_5lqnb"]
viewport_path = NodePath("HUD/MarginContainer/Minimap/MarginContainer/MinimapViewport")

[node name="Match" instance=ExtResource("1_f87ft")]
script = ExtResource("2_iedaw")
allow_resources_deficit_spending = true
Expand Down Expand Up @@ -111,7 +120,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.37292, 0, 7.08164)
[node name="HUD" parent="." index="11"]
visible = false

[node name="TextureRect" parent="HUD/MarginContainer/Minimap/MarginContainer" index="0"]
texture = SubResource("ViewportTexture_38cip")
[node name="FogOfWarMask" parent="HUD/MarginContainer/Minimap/MarginContainer/MinimapViewport" index="3"]
material = SubResource("ShaderMaterial_7blp5")

[node name="MinimapTextureRect" parent="HUD/MarginContainer/Minimap/MarginContainer" index="1"]
texture = SubResource("ViewportTexture_5lqnb")

[editable path="Map"]

0 comments on commit 0aa4caf

Please sign in to comment.