mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Rename MonsterType
to Sacrificable
This commit is contained in:
parent
06712538fe
commit
ec9dab0790
7 changed files with 15 additions and 15 deletions
|
@ -1,6 +0,0 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://ccul07w0h36nu"]
|
||||
|
||||
[ext_resource type="Script" path="res://behaviours/monster_type.gd" id="1_6jq3j"]
|
||||
|
||||
[node name="MonsterType" type="Node"]
|
||||
script = ExtResource("1_6jq3j")
|
|
@ -1,6 +1,6 @@
|
|||
@icon("res://behaviours/monster_type.svg")
|
||||
@icon("res://behaviours/sacrificable.svg")
|
||||
extends Node
|
||||
class_name MonsterType
|
||||
class_name Sacrificable
|
||||
|
||||
## Emits [signal eaten] when eaten by an [Eater] whose acceptable diets contain this node's [field diet].
|
||||
##
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bn6ajsseo41hc"
|
||||
path="res://.godot/imported/monster_type.svg-24460790d952e9b4d6c59fbb0b9171ec.ctex"
|
||||
path="res://.godot/imported/sacrificable.svg-8ae09773f9c3a487046b57fc078cd018.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://behaviours/monster_type.svg"
|
||||
dest_files=["res://.godot/imported/monster_type.svg-24460790d952e9b4d6c59fbb0b9171ec.ctex"]
|
||||
source_file="res://behaviours/sacrificable.svg"
|
||||
dest_files=["res://.godot/imported/sacrificable.svg-8ae09773f9c3a487046b57fc078cd018.ctex"]
|
||||
|
||||
[params]
|
||||
|
6
behaviours/sacrificable.tscn
Normal file
6
behaviours/sacrificable.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://ccul07w0h36nu"]
|
||||
|
||||
[ext_resource type="Script" path="res://behaviours/sacrificable.gd" id="1_6rupd"]
|
||||
|
||||
[node name="Sacrificable" type="Node"]
|
||||
script = ExtResource("1_6rupd")
|
|
@ -14,7 +14,7 @@ func _on_tracked(body: PhysicsBody2D):
|
|||
Log.w(self, "Captured two entities")
|
||||
return
|
||||
|
||||
var types: Array = body.find_children("*", "MonsterType", false, false)
|
||||
var types: Array = body.find_children("*", "Sacrificable", false, false)
|
||||
for type in types:
|
||||
current_monster = body
|
||||
current_type = type.type
|
||||
|
@ -22,7 +22,7 @@ func _on_tracked(body: PhysicsBody2D):
|
|||
break
|
||||
|
||||
if current_monster == null:
|
||||
Log.w(self, "Captured entity with no MonsterType")
|
||||
Log.w(self, "Captured entity with no Sacrificable")
|
||||
|
||||
func _on_untracked(body: PhysicsBody2D):
|
||||
if body == current_monster:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://cfduc7cdorasr" path="res://entities/sheep_drag_left.png" id="5_gh6h6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfdr3e32lohq" path="res://behaviours/edible.tscn" id="6_3odsh"]
|
||||
[ext_resource type="Texture2D" uid="uid://m5bebwb06kqe" path="res://entities/sheep_drag_right.png" id="6_x4fsj"]
|
||||
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/monster_type.tscn" id="8_poavy"]
|
||||
[ext_resource type="PackedScene" uid="uid://ccul07w0h36nu" path="res://behaviours/sacrificable.tscn" id="8_43m1b"]
|
||||
[ext_resource type="PackedScene" uid="uid://djcwis8ycrq85" path="res://behaviours/sampler_priority.tscn" id="9_s5lod"]
|
||||
[ext_resource type="PackedScene" uid="uid://dk1ipq7dhkhf3" path="res://behaviours/move_straight.tscn" id="10_05kcd"]
|
||||
[ext_resource type="PackedScene" uid="uid://cm67ko1k6kn4u" path="res://behaviours/priority.tscn" id="11_0jlmk"]
|
||||
|
@ -228,7 +228,7 @@ blend_times = [&"drag_start", &"drag_loop", 0.5]
|
|||
[node name="Edible" parent="." instance=ExtResource("6_3odsh")]
|
||||
diet = &"Meat"
|
||||
|
||||
[node name="MonsterType" parent="." instance=ExtResource("8_poavy")]
|
||||
[node name="Sacrificable" parent="." instance=ExtResource("8_43m1b")]
|
||||
|
||||
[node name="MovementSampler" parent="." instance=ExtResource("9_s5lod")]
|
||||
|
||||
|
|
Loading…
Reference in a new issue