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

Commit b8c70fa

Browse files
committed
Small bug fixing
1 parent ea6d251 commit b8c70fa

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

scenes/levels/ExampleScene.tscn

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15125,7 +15125,7 @@ _darknessCircleDamage = 1
1512515125
_allyHealthChangeIntervall = 5.0
1512615126

1512715127
[node name="Ally" parent="." node_paths=PackedStringArray("_responseField", "_nameLabel", "Chat") instance=ExtResource("6_l8h37")]
15128-
position = Vector2(937, 2122)
15128+
position = Vector2(-1309, -7572)
1512915129
_responseField = NodePath("ResponseField")
1513015130
_nameLabel = NodePath("Label")
1513115131
_visionRadius = 300
@@ -15225,7 +15225,7 @@ shadow_filter_smooth = 2.3
1522515225
texture_scale = 14.0
1522615226

1522715227
[node name="Ally2" parent="." node_paths=PackedStringArray("_responseField", "_nameLabel", "Chat") groups=["navigation"] instance=ExtResource("6_l8h37")]
15228-
position = Vector2(179, 2125)
15228+
position = Vector2(-1387, -8894)
1522915229
_responseField = NodePath("ResponseField")
1523015230
_nameLabel = NodePath("Label")
1523115231
_visionRadius = 200
@@ -15752,6 +15752,7 @@ offset_top = 1955.0
1575215752
offset_right = 1457.0
1575315753
offset_bottom = 2618.0
1575415754
_ally = NodePath("../Ally")
15755+
_enableIntroScene = false
1575515756

1575615757
[node name="Landscape" type="Control" parent="."]
1575715758
visible = false
@@ -15997,6 +15998,7 @@ offset_left = 536.0
1599715998
offset_top = 898.0
1599815999
offset_right = 536.0
1599916000
offset_bottom = 898.0
16001+
_enableTutorial = false
1600016002

1600116003
[node name="Tombstone" parent="." instance=ExtResource("13_05imv")]
1600216004
position = Vector2(3836, -1047)
@@ -16064,7 +16066,7 @@ hframes = 5
1606416066
[node name="Scar" parent="." instance=ExtResource("13_05imv")]
1606516067
position = Vector2(5651, -7877)
1606616068
ObjectName = "Scar"
16067-
ObjectDescription = "A big scar on the tree which could be the reason for the tree looking dead. It is not reachable because of the scrub"
16069+
ObjectDescription = "A big scar on the tree which could be the reason for the tree looking dead"
1606816070
CustomOverrideMessage = "The tree seems to have recovered from the injurys and opens up to give the entrance to it's inside."
1606916071
ShowWhileInRadius = true
1607016072

@@ -16100,20 +16102,22 @@ rotation = -1.56804
1610016102
shape = SubResource("CapsuleShape2D_630vn")
1610116103

1610216104
[node name="DoorOpener" parent="." instance=ExtResource("13_05imv")]
16103-
position = Vector2(-1917, -7812)
16105+
position = Vector2(-1875, -7741)
1610416106
ObjectName = "Door opener"
1610516107
ObjectDescription = "Seems like a door can be opened through interacting. There is a timer that starts when the door opens, so there is only a limited amount of time to pass it."
1610616108
RemovedAfter = false
1610716109
CustomOverrideMessage = "Door is now open for 5 seconds"
1610816110

1610916111
[node name="StaticBody2D" type="StaticBody2D" parent="DoorOpener"]
16112+
position = Vector2(-41.6, -70.0005)
1611016113

1611116114
[node name="CaveEntrance1" type="CollisionShape2D" parent="DoorOpener/StaticBody2D"]
1611216115
z_index = 2
1611316116
position = Vector2(-40.25, -967.75)
1611416117
shape = SubResource("RectangleShape2D_6wyny")
1611516118

1611616119
[node name="StaticBody2D2" type="StaticBody2D" parent="DoorOpener"]
16120+
position = Vector2(-41.6, -70.0005)
1611716121

1611816122
[node name="CaveEntrance2" type="CollisionShape2D" parent="DoorOpener/StaticBody2D2"]
1611916123
z_index = 2
@@ -16122,7 +16126,7 @@ shape = SubResource("RectangleShape2D_1a47p")
1612216126

1612316127
[node name="AnimatedSprite2D" type="Sprite2D" parent="DoorOpener"]
1612416128
z_index = 2
16125-
position = Vector2(-39.6, -967.8)
16129+
position = Vector2(-81.2, -1037.8)
1612616130
scale = Vector2(3.84999, 3.84999)
1612716131
texture = ExtResource("58_vqwoj")
1612816132
hframes = 5
@@ -16134,7 +16138,7 @@ libraries = {
1613416138

1613516139
[node name="AnimatedSprite2D2" type="Sprite2D" parent="DoorOpener"]
1613616140
z_index = 2
16137-
position = Vector2(-548, -965)
16141+
position = Vector2(-589.6, -1035)
1613816142
scale = Vector2(3.84999, 3.84999)
1613916143
texture = ExtResource("58_vqwoj")
1614016144
hframes = 5

scripts/Ally.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public override void _Ready()
7575
//SsInventory.AddItem(new Itemstack(Items.Material.FestiveStaff, 1));
7676
// SsInventory.AddItem(new Itemstack(Items.Material.Copper, 1));
7777
//SsInventory.AddItem(new Itemstack(Items.Material.BucketWater, 1));
78-
//SsInventory.AddItem(new Itemstack(Items.Material.Chipcard, 1));
78+
SsInventory.AddItem(new Itemstack(Items.Material.Chipcard, 1));
7979
_torch = GetNode<PointLight2D>("AllyTorch");
8080
_ally1ResponseField = GetNode<RichTextLabel>("ResponseField");
8181
_ally2ResponseField = GetNode<RichTextLabel>("ResponseField");

scripts/Interaction/Interactable.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ public partial class Interactable : Node2D
1111
{
1212
public const string GroupName = "Interactable";
1313
public static bool TreeCured = false;
14+
15+
public static bool ScrubRemoved = false;
1416
[Signal] public delegate void InteractFromNodeEventHandler(Node caller);
1517
[Signal] public delegate void InteractEventHandler();
1618

1719
public string? SystemMessageForAlly;
1820
private CollisionShape2D _caveEntrance1 = null!;
21+
private CollisionShape2D _scrub = null!;
1922
private CollisionShape2D _caveEntrance2 = null!;
2023
private float _doorDuration = 5.0f;
2124
private AiNode _scar = null!;
@@ -29,6 +32,7 @@ public override void _Ready()
2932
AddToGroup(GroupName);
3033
_caveEntrance1 = GetTree().Root.GetNode<CollisionShape2D>("Node2D/DoorOpener/StaticBody2D/CaveEntrance1");
3134
_caveEntrance2 = GetTree().Root.GetNode<CollisionShape2D>("Node2D/DoorOpener/StaticBody2D2/CaveEntrance2");
35+
_scrub = GetTree().Root.GetNode<CollisionShape2D>("Node2D/Big Tree/StaticBody2D/CollisionShape2D");
3236
_animTree = GetTree().Root.GetNode<AnimationPlayer>("Node2D/Node2D/AnimationPlayer");
3337
_animEntrance = GetTree().Root.GetNode<AnimationPlayer>("Node2D/CaveEntranceTerminal/AnimationPlayer");
3438
_animDoorOpener = GetTree().Root.GetNode<AnimationPlayer>("Node2D/DoorOpener/AnimationPlayer");
@@ -84,8 +88,9 @@ public async Task Trigger(Node caller)
8488
ally.AnimPlayer.Play("Fill-Bucket");
8589
}
8690
//Remove scrub with Jones
87-
if (GetParent<AiNode>().Name.Equals("Big Tree") && caller.Name.ToString().Equals("Ally2"))
91+
if (GetParent<AiNode>().Name.Equals("Big Tree") && caller.Name.ToString().Equals("Ally2") && !ScrubRemoved)
8892
{
93+
ScrubRemoved = true;
8994
Ally? jones = caller as Ally;
9095
Chat jonesChat = jones!.Chat;
9196
jonesChat.SendSystemMessage("You've successfully removed the scrub from the tree and a big hideous scar appears underneath it", new Ally());
@@ -98,6 +103,7 @@ public async Task Trigger(Node caller)
98103
};
99104
_scar.AddChild(scarVisibileForAI, false);
100105
GD.Print("Scar VFAI added");
106+
_scrub.SetDeferred("disabled", true);
101107
EmitSignal(SignalName.Interact);
102108
EmitSignal(SignalName.InteractFromNode, caller);
103109
}

0 commit comments

Comments
 (0)