From ec9dab0790b5eb591d3dceb129a3d1aee3f07390 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 28 Apr 2024 11:23:07 +0200 Subject: [PATCH] Rename `MonsterType` to `Sacrificable` --- behaviours/monster_type.tscn | 6 ------ behaviours/{monster_type.gd => sacrificable.gd} | 4 ++-- behaviours/{monster_type.svg => sacrificable.svg} | 0 .../{monster_type.svg.import => sacrificable.svg.import} | 6 +++--- behaviours/sacrificable.tscn | 6 ++++++ entities/sacrifice_stone.gd | 4 ++-- entities/sheep.tscn | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 behaviours/monster_type.tscn rename behaviours/{monster_type.gd => sacrificable.gd} (83%) rename behaviours/{monster_type.svg => sacrificable.svg} (100%) rename behaviours/{monster_type.svg.import => sacrificable.svg.import} (74%) create mode 100644 behaviours/sacrificable.tscn diff --git a/behaviours/monster_type.tscn b/behaviours/monster_type.tscn deleted file mode 100644 index e99f839..0000000 --- a/behaviours/monster_type.tscn +++ /dev/null @@ -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") diff --git a/behaviours/monster_type.gd b/behaviours/sacrificable.gd similarity index 83% rename from behaviours/monster_type.gd rename to behaviours/sacrificable.gd index 9188adc..6b9d772 100644 --- a/behaviours/monster_type.gd +++ b/behaviours/sacrificable.gd @@ -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]. ## diff --git a/behaviours/monster_type.svg b/behaviours/sacrificable.svg similarity index 100% rename from behaviours/monster_type.svg rename to behaviours/sacrificable.svg diff --git a/behaviours/monster_type.svg.import b/behaviours/sacrificable.svg.import similarity index 74% rename from behaviours/monster_type.svg.import rename to behaviours/sacrificable.svg.import index ddad53c..2eebbe9 100644 --- a/behaviours/monster_type.svg.import +++ b/behaviours/sacrificable.svg.import @@ -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] diff --git a/behaviours/sacrificable.tscn b/behaviours/sacrificable.tscn new file mode 100644 index 0000000..710874e --- /dev/null +++ b/behaviours/sacrificable.tscn @@ -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") diff --git a/entities/sacrifice_stone.gd b/entities/sacrifice_stone.gd index 57f851f..7fe02f4 100644 --- a/entities/sacrifice_stone.gd +++ b/entities/sacrifice_stone.gd @@ -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: diff --git a/entities/sheep.tscn b/entities/sheep.tscn index 4f1563f..f7ab23c 100644 --- a/entities/sheep.tscn +++ b/entities/sheep.tscn @@ -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")]