mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Make imps sacrificable
This commit is contained in:
parent
63c16c27fb
commit
9faaddbcc9
2 changed files with 44 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=30 format=3 uid="uid://4d3ksr3171x4"]
|
||||
[gd_scene load_steps=32 format=3 uid="uid://4d3ksr3171x4"]
|
||||
|
||||
[ext_resource type="Script" path="res://entities/imp.gd" id="1_dixpc"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxbjfev0lhwws" path="res://behaviours/sprite_left_right.tscn" id="2_eqcdi"]
|
||||
|
@ -9,6 +9,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://uoxwjpmgg27a" path="res://entities/gold.tscn" id="5_yrfoq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dudq4p8owrpsa" path="res://entities/imp_drag_right.png" id="6_1cw6p"]
|
||||
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="7_ech8d"]
|
||||
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="7_gg20m"]
|
||||
[ext_resource type="PackedScene" uid="uid://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="8_ffcw0"]
|
||||
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="9_2wb1b"]
|
||||
[ext_resource type="PackedScene" uid="uid://g8t6dt0ye6n3" path="res://behaviours/timer_stddev.tscn" id="10_phvea"]
|
||||
|
@ -214,6 +215,9 @@ _data = {
|
|||
[sub_resource type="CircleShape2D" id="CircleShape2D_1bmhf"]
|
||||
radius = 256.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_swh57"]
|
||||
radius = 25.19
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_50iad"]
|
||||
radius = 32.0
|
||||
|
||||
|
@ -244,6 +248,9 @@ libraries = {
|
|||
next/drag_loop = &"drag_loop"
|
||||
next/drag_start = &"drag_loop"
|
||||
|
||||
[node name="Sacrificable" parent="." instance=ExtResource("7_gg20m")]
|
||||
kind = &"Imp"
|
||||
|
||||
[node name="GoldSpawner" parent="." instance=ExtResource("4_d8lgm")]
|
||||
scene = ExtResource("5_yrfoq")
|
||||
|
||||
|
@ -288,6 +295,24 @@ debug_color = Color(1, 0.498039, 0, 0)
|
|||
[node name="TargetPicker" parent="MovementHunt/TrackerMeat" node_paths=PackedStringArray("tracker") instance=ExtResource("13_mwxuf")]
|
||||
tracker = NodePath("..")
|
||||
|
||||
[node name="MovementTrap" parent="." instance=ExtResource("11_4ra22")]
|
||||
speed = 600.0
|
||||
enabled = false
|
||||
|
||||
[node name="TrapPriority" parent="MovementTrap" instance=ExtResource("9_2wb1b")]
|
||||
alternative_priority = 45
|
||||
|
||||
[node name="TrackerTrap" parent="MovementTrap" instance=ExtResource("12_dr2oe")]
|
||||
collision_mask = 8
|
||||
acceptable_diets = Array[StringName]([&"Trap"])
|
||||
|
||||
[node name="Shape" type="CollisionShape2D" parent="MovementTrap/TrackerTrap"]
|
||||
shape = SubResource("CircleShape2D_swh57")
|
||||
debug_color = Color(1, 0.498039, 0, 0)
|
||||
|
||||
[node name="TargetPicker" parent="MovementTrap/TrackerTrap" node_paths=PackedStringArray("tracker") instance=ExtResource("13_mwxuf")]
|
||||
tracker = NodePath("..")
|
||||
|
||||
[node name="MovementDrag" parent="." instance=ExtResource("14_p3w0g")]
|
||||
enabled = false
|
||||
|
||||
|
@ -327,6 +352,14 @@ stream = ExtResource("19_7la6c")
|
|||
[connection signal="untracked" from="MovementHunt/TrackerMeat" to="MovementHunt/TrackerMeat/TargetPicker" method="clear_if_target"]
|
||||
[connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt" method="set_target" unbinds=1]
|
||||
[connection signal="target_changed" from="MovementHunt/TrackerMeat/TargetPicker" to="MovementHunt/TrackerMeat/TargetPicker" method="sample_target_if_null" unbinds=2]
|
||||
[connection signal="changed_target" from="MovementTrap" to="MovementTrap/TrapPriority" method="priority_conditional"]
|
||||
[connection signal="move" from="MovementTrap" to="." method="_on_move"]
|
||||
[connection signal="area_entered" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap" method="check_diet_then_track"]
|
||||
[connection signal="area_exited" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap" method="untrack"]
|
||||
[connection signal="tracked" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap/TargetPicker" method="sample_target_if_null" unbinds=1]
|
||||
[connection signal="untracked" from="MovementTrap/TrackerTrap" to="MovementTrap/TrackerTrap/TargetPicker" method="clear_if_target"]
|
||||
[connection signal="target_changed" from="MovementTrap/TrackerTrap/TargetPicker" to="MovementTrap" method="set_target" unbinds=1]
|
||||
[connection signal="target_changed" from="MovementTrap/TrackerTrap/TargetPicker" to="MovementTrap/TrackerTrap/TargetPicker" method="sample_target_if_null" unbinds=2]
|
||||
[connection signal="dragged" from="MovementDrag" to="." method="_on_dragged"]
|
||||
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragPriority" method="priority_alternative" unbinds=1]
|
||||
[connection signal="dragged" from="MovementDrag" to="MovementDrag/DragSound" method="play" unbinds=1]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://cgpwig0rd08vh"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cgpwig0rd08vh"]
|
||||
|
||||
[ext_resource type="Script" path="res://behaviours/summoning_circle.gd" id="1_l5mec"]
|
||||
[ext_resource type="PackedScene" uid="uid://tx1qi6ahlxjp" path="res://behaviours/spawner.tscn" id="2_xq0wr"]
|
||||
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://ddpo03rb6068c" path="res://entities/sacrifice_stone.tscn" id="4_qyef2"]
|
||||
[ext_resource type="PackedScene" uid="uid://ufjnfj3itypj" path="res://behaviours/summoning_recipe.tscn" id="5_jbk35"]
|
||||
[ext_resource type="PackedScene" uid="uid://4d3ksr3171x4" path="res://entities/imp.tscn" id="6_utwxo"]
|
||||
[ext_resource type="PackedScene" uid="uid://cmemgijh6nfmk" path="res://entities/chupacabra.tscn" id="7_a2sha"]
|
||||
|
||||
[node name="SummoningCirclePentagram" type="Node2D"]
|
||||
script = ExtResource("1_l5mec")
|
||||
|
@ -38,9 +39,17 @@ position = Vector2(75, 30)
|
|||
mode = 2
|
||||
ingredients = Array[StringName]([&"Sheep", &"Sheep", &"Sheep", &"Sheep", &"Sheep"])
|
||||
|
||||
[node name="FiveImps" parent="Recipes" instance=ExtResource("5_jbk35")]
|
||||
mode = 2
|
||||
ingredients = Array[StringName]([&"Imp", &"Imp", &"Imp", &"Imp", &"Imp"])
|
||||
|
||||
[node name="Spawners" type="Node2D" parent="."]
|
||||
|
||||
[node name="Imp" parent="Spawners" instance=ExtResource("2_xq0wr")]
|
||||
scene = ExtResource("6_utwxo")
|
||||
|
||||
[node name="Chupacabra" parent="Spawners" instance=ExtResource("2_xq0wr")]
|
||||
scene = ExtResource("7_a2sha")
|
||||
|
||||
[connection signal="matched" from="Recipes/FiveSheep" to="Spawners/Imp" method="spawn" unbinds=1]
|
||||
[connection signal="matched" from="Recipes/FiveImps" to="Spawners/Chupacabra" method="spawn" unbinds=1]
|
||||
|
|
Loading…
Reference in a new issue