Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 8bce870

Browse files
Leo MaihöferLeo Maihöfer
authored andcommitted
implemented Bens export fix
1 parent a32e97a commit 8bce870

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

scenes/levels/ExampleScene.tscn

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17578,13 +17578,14 @@ script = ExtResource("1_pa1ge")
1757817578
_darknessCircleDamage = 1
1757917579
_allyHealthChangeIntervall = 5.0
1758017580

17581-
[node name="Ally" parent="." node_paths=PackedStringArray("_responseField", "_nameLabel", "Chat") instance=ExtResource("6_l8h37")]
17581+
[node name="Ally" parent="." node_paths=PackedStringArray("_responseField", "_nameLabel", "Chat", "_animPlayer") instance=ExtResource("6_l8h37")]
1758217582
position = Vector2(923, 2052)
1758317583
_responseField = NodePath("ResponseField")
1758417584
_nameLabel = NodePath("Label")
1758517585
_visionRadius = 200
1758617586
_interactionRadius = 250
1758717587
Chat = NodePath("Ally1Cam/Ally1Chat")
17588+
_animPlayer = NodePath("AnimationPlayer2")
1758817589

1758917590
[node name="Ally1Cam" type="Camera2D" parent="Ally"]
1759017591
light_mask = 2
@@ -17668,12 +17669,13 @@ shadow_filter = 2
1766817669
shadow_filter_smooth = 2.3
1766917670
texture_scale = 14.0
1767017671

17671-
[node name="Ally2" parent="." node_paths=PackedStringArray("_responseField", "_nameLabel", "Chat") groups=["navigation"] instance=ExtResource("6_l8h37")]
17672+
[node name="Ally2" parent="." node_paths=PackedStringArray("_responseField", "_nameLabel", "Chat", "_animPlayer") groups=["navigation"] instance=ExtResource("6_l8h37")]
1767217673
position = Vector2(289, 2015)
1767317674
_responseField = NodePath("ResponseField")
1767417675
_nameLabel = NodePath("Label")
1767517676
_visionRadius = 200
1767617677
Chat = NodePath("Ally2Cam/Ally2Chat")
17678+
_animPlayer = NodePath("AnimationPlayer2")
1767717679

1767817680
[node name="Ally2Cam" type="Camera2D" parent="Ally2"]
1767917681
light_mask = 2

scenes/prefabs/Ally.tscn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ _data = {
8888
"RESET": SubResource("Animation_0eag6")
8989
}
9090

91-
[node name="Ally" type="CharacterBody2D" node_paths=PackedStringArray("PathFindingMovement") groups=["Entities"]]
91+
[node name="Ally" type="CharacterBody2D" node_paths=PackedStringArray("PathFindingMovement", "_animPlayer") groups=["Entities"]]
9292
z_index = 50
9393
safe_margin = 59.554
9494
script = ExtResource("1_anjrv")
9595
PathFindingMovement = NodePath("PathFindingMovement")
9696
_visionRadius = 600
9797
_interactionRadius = 100
98+
_animPlayer = NodePath("AnimationPlayer")
9899

99100
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
100101
path_max_distance = 20.0

scripts/Ally.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public partial class Ally : CharacterBody2D
4040
private GenerativeAI.Methods.ChatSession? _chat;
4141
private GeminiService? _geminiService;
4242
private readonly List<string> _interactionHistory = [];
43-
AnimationPlayer _animPlayer = null!;
43+
[Export] AnimationPlayer _animPlayer = null!;
4444
private PointLight2D _coreLight = null!;
4545

4646
public Boolean Lit = false;
@@ -115,7 +115,7 @@ public override void _Ready()
115115
GD.PrintErr("PathFindingMovement node is not assigned in the editor!");
116116
}
117117
Chat.ResponseReceived += HandleResponse;
118-
_animPlayer = GetNode<AnimationPlayer>("AnimationPlayer2");
118+
_animPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
119119
_animPlayer.Play("Idle-Left");
120120
}
121121

scripts/Chat.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public async void SendSystemMessage(string systemMessage)
152152

153153
private async void OnTextSubmitted(string input)
154154
{
155-
156155
List<VisibleForAI> visibleItems = _ally.GetCurrentlyVisible().Concat(_ally.AlwaysVisible).ToList();
157156
string visibleItemsFormatted = string.Join<VisibleForAI>("\n", visibleItems);
158157
string alreadySeenFormatted = string.Join<VisibleForAI>("\n", AlreadySeen);

0 commit comments

Comments
 (0)