Updated interaction area setups to avoid nullrefs
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://d4m5iy5mwqpq3"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://d4m5iy5mwqpq3"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="1_tp1yj"]
|
||||
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="2_c6u1a"]
|
||||
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/intaractable_outline.tres" id="2_pdgar"]
|
||||
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="3_b5av1"]
|
||||
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="4_yav45"]
|
||||
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="5_pdgar"]
|
||||
@@ -12,16 +13,18 @@
|
||||
[ext_resource type="Script" uid="uid://dnipeibppjirs" path="res://scripts/CSharp/Common/NPC/DialogicOverlayStarter.cs" id="10_yav45"]
|
||||
[ext_resource type="Script" uid="uid://drle5aies8ye4" path="res://scripts/GdScript/dialogic_event_forward.gd" id="11_yav45"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_tp1yj"]
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_a35l4"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
[node name="BaseField" type="Node2D"]
|
||||
|
||||
[node name="InteractionArea2" parent="." instance=ExtResource("1_tp1yj")]
|
||||
[node name="InteractionArea2" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("1_tp1yj")]
|
||||
visible = false
|
||||
z_index = 1
|
||||
scale = Vector2(2.225, 2.225)
|
||||
_outlineMaterial = ExtResource("2_pdgar")
|
||||
_spriteToOutline = NodePath("../FieldBehaviour/MaskedField")
|
||||
|
||||
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_growingCollider")]
|
||||
z_index = -1
|
||||
@@ -50,8 +53,8 @@ _field = NodePath("..")
|
||||
[node name="01" parent="FieldBehaviour/BeetRoot/BigPlant" index="0"]
|
||||
visible = true
|
||||
|
||||
[node name="CollisionShape3D" parent="FieldBehaviour/BeetRoot/ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_tp1yj")
|
||||
[node name="CollisionShape3D" parent="FieldBehaviour/BeetRoot/ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_a35l4")
|
||||
|
||||
[node name="01" parent="FieldBehaviour/BeetRoot/ReadyPlantInventoryItem/ReadyPlant" index="0"]
|
||||
scale = Vector2(3, 3)
|
||||
@@ -84,4 +87,4 @@ eventName = "MagicWord"
|
||||
|
||||
[editable path="FieldBehaviour/BeetRoot"]
|
||||
[editable path="FieldBehaviour/BeetRoot/ReadyPlantInventoryItem"]
|
||||
[editable path="FieldBehaviour/BeetRoot/ReadyPlantInventoryItem/InteractionArea2"]
|
||||
[editable path="FieldBehaviour/BeetRoot/ReadyPlantInventoryItem/PickupInteractionArea"]
|
||||
|
||||
@@ -20,7 +20,7 @@ shader_parameter/distortion = 0.0
|
||||
shader_parameter/heightOffset = 0.635
|
||||
shader_parameter/offset = 0.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2tt5u"]
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_rvwu0"]
|
||||
resource_local_to_scene = true
|
||||
radius = 300.0
|
||||
|
||||
@@ -126,6 +126,8 @@ region_rect = Rect2(18, 311, 129, 142)
|
||||
|
||||
[node name="InteractionArea" parent="." instance=ExtResource("4_cfgyx")]
|
||||
position = Vector2(0, 2.3)
|
||||
_useOutline = false
|
||||
_useSprite = false
|
||||
|
||||
[node name="ReadyPlantInventoryItem" parent="." instance=ExtResource("5_25lcb")]
|
||||
position = Vector2(0, 2.3)
|
||||
@@ -140,8 +142,8 @@ visible = false
|
||||
[node name="PickupErrorLabel" parent="ReadyPlantInventoryItem" index="2"]
|
||||
visible = false
|
||||
|
||||
[node name="CollisionShape3D" parent="ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_2tt5u")
|
||||
[node name="CollisionShape3D" parent="ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_rvwu0")
|
||||
|
||||
[node name="Icon" parent="ReadyPlantInventoryItem" index="4"]
|
||||
visible = false
|
||||
@@ -202,4 +204,4 @@ hue_variation_max = 0.4
|
||||
[connection signal="Interacted" from="InteractionArea" to="." method="Grow"]
|
||||
|
||||
[editable path="ReadyPlantInventoryItem"]
|
||||
[editable path="ReadyPlantInventoryItem/InteractionArea2"]
|
||||
[editable path="ReadyPlantInventoryItem/PickupInteractionArea"]
|
||||
|
||||
@@ -30,22 +30,16 @@ Watered = ExtResource("7_f504p")
|
||||
_growingCollider = NodePath("BasePlant2/GrowingInteractionArea")
|
||||
|
||||
[node name="BasePlant2" parent="FieldBehaviour" node_paths=PackedStringArray("_field") groups=["PlantGrowing"] instance=ExtResource("8_jrdc4")]
|
||||
visible = false
|
||||
_field = NodePath("..")
|
||||
_magicWordNeeded = false
|
||||
|
||||
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/GrowingInteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_jrdc4")
|
||||
|
||||
[node name="Label" parent="FieldBehaviour/BasePlant2/GrowingInteractionArea" index="1"]
|
||||
text = "[E] Grow
|
||||
"
|
||||
|
||||
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_l0vvv")
|
||||
|
||||
[node name="Label" parent="FieldBehaviour/BasePlant2/ReadyPlantInventoryItem/PickupInteractionArea" index="1"]
|
||||
text = "[E] Harvest"
|
||||
|
||||
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
|
||||
clip_children = 1
|
||||
scale = Vector2(1.5, 1.5)
|
||||
|
||||
@@ -140,13 +140,12 @@ region_rect = Rect2(546, 697, 535, 687)
|
||||
|
||||
[node name="GrowingInteractionArea" parent="." instance=ExtResource("5_3j24b")]
|
||||
position = Vector2(0, 2.3)
|
||||
_useOutline = false
|
||||
_useSprite = false
|
||||
|
||||
[node name="CollisionShape3D" parent="GrowingInteractionArea/Area2D" index="0"]
|
||||
shape = SubResource("CircleShape2D_vjw4j")
|
||||
|
||||
[node name="Label" parent="GrowingInteractionArea" index="1"]
|
||||
text = "[E] Grow"
|
||||
|
||||
[node name="ReadyPlantInventoryItem" parent="." instance=ExtResource("6_gdrin")]
|
||||
position = Vector2(0, 2.3)
|
||||
IsActive = false
|
||||
|
||||
Reference in New Issue
Block a user