From 86573b0a2cd269a1c55011c0ec6a9aa6a8b84507 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 9 Jan 2023 12:39:20 +0100 Subject: [PATCH] Move sinking-related scenes to `island/sinking` --- island/Island.tscn | 6 +++--- island/Pineapple.tscn | 4 ++-- island/{ => sinking}/CanSink.gd | 0 island/{ => sinking}/CanSink.tscn | 4 ++-- island/{ => sinking}/Sea.gdshader | 0 island/{ => sinking}/Sea.tscn | 10 +++++----- island/{ => sinking}/SeaMesh.tscn | 4 ++-- island/{ => sinking}/SinkArea.gd | 4 ++-- player/Player.tscn | 4 ++-- project.godot | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) rename island/{ => sinking}/CanSink.gd (100%) rename island/{ => sinking}/CanSink.tscn (67%) rename island/{ => sinking}/Sea.gdshader (100%) rename island/{ => sinking}/Sea.tscn (61%) rename island/{ => sinking}/SeaMesh.tscn (81%) rename island/{ => sinking}/SinkArea.gd (65%) diff --git a/island/Island.tscn b/island/Island.tscn index 0caaaca..aa66ab8 100644 --- a/island/Island.tscn +++ b/island/Island.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=18 format=3 uid="uid://bg88gc1w1gw5m"] -[ext_resource type="PackedScene" uid="uid://dh5blytk6vmdu" path="res://island/Sea.tscn" id="1_e0hpm"] -[ext_resource type="PackedScene" uid="uid://b5i1sqd88wlle" path="res://player/Player.tscn" id="3_5378m"] +[ext_resource type="PackedScene" uid="uid://dh5blytk6vmdu" path="res://island/sinking/Sea.tscn" id="1_e0hpm"] +[ext_resource type="PackedScene" path="res://player/Player.tscn" id="3_5378m"] [ext_resource type="PackedScene" uid="uid://cyuqnp5bfan4y" path="res://island/IslandMesh.tscn" id="3_g5ug0"] [ext_resource type="PackedScene" uid="uid://tahdk48hqxis" path="res://island/HillMesh.tscn" id="4_5ll24"] [ext_resource type="PackedScene" uid="uid://cxa5irr1atgke" path="res://island/PyramidSmallMesh.tscn" id="5_uf8hd"] @@ -10,7 +10,7 @@ [ext_resource type="PackedScene" uid="uid://cwf11kdk7t64k" path="res://island/HoppityMesh.tscn" id="8_5pio0"] [ext_resource type="PackedScene" uid="uid://dp3n3j0r2ufhw" path="res://island/Temple.tscn" id="8_11ig5"] [ext_resource type="PackedScene" uid="uid://dutcugv574855" path="res://island/Leafpile.tscn" id="9_472aa"] -[ext_resource type="PackedScene" uid="uid://v7bv81krh12e" path="res://island/Pineapple.tscn" id="10_dlxm4"] +[ext_resource type="PackedScene" path="res://island/Pineapple.tscn" id="10_dlxm4"] [ext_resource type="PackedScene" uid="uid://wdj878sbi44n" path="res://island/BhopelagoMesh.tscn" id="10_wmo6y"] [sub_resource type="Gradient" id="Gradient_shcpx"] diff --git a/island/Pineapple.tscn b/island/Pineapple.tscn index 0e2a83a..089453e 100644 --- a/island/Pineapple.tscn +++ b/island/Pineapple.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://cpqebnfkv5ee"] +[gd_scene load_steps=9 format=3] [ext_resource type="PackedScene" uid="uid://bwwpi0itor6cw" path="res://island/PineappleMesh.tscn" id="1_ndmmp"] [ext_resource type="Script" path="res://island/Pineapple.gd" id="1_sbec5"] @@ -6,7 +6,7 @@ [ext_resource type="Script" path="res://island/Pop.gd" id="4_rn5e2"] [ext_resource type="PackedScene" uid="uid://cvou86mnmtloe" path="res://island/MoveTowardsPlayer.tscn" id="4_xnsun"] [ext_resource type="PackedScene" uid="uid://ci0hy0d4d1476" path="res://island/CollectibleByPlayer.tscn" id="5_yps0c"] -[ext_resource type="PackedScene" uid="uid://c6opu8v6xd660" path="res://island/CanSink.tscn" id="7_la8g5"] +[ext_resource type="PackedScene" path="res://island/sinking/CanSink.tscn" id="7_la8g5"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_8v3m4"] height = 0.9 diff --git a/island/CanSink.gd b/island/sinking/CanSink.gd similarity index 100% rename from island/CanSink.gd rename to island/sinking/CanSink.gd diff --git a/island/CanSink.tscn b/island/sinking/CanSink.tscn similarity index 67% rename from island/CanSink.tscn rename to island/sinking/CanSink.tscn index 0272afb..ad5bf27 100644 --- a/island/CanSink.tscn +++ b/island/sinking/CanSink.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=3 format=3 uid="uid://c6opu8v6xd660"] +[gd_scene load_steps=3 format=3] -[ext_resource type="Script" path="res://island/CanSink.gd" id="1_bap2m"] +[ext_resource type="Script" path="res://island/sinking/CanSink.gd" id="1_bap2m"] [ext_resource type="AudioStream" uid="uid://xretxahxbqdr" path="res://assets/splash.ogg" id="2_xqjos"] [node name="CanSink" type="Node"] diff --git a/island/Sea.gdshader b/island/sinking/Sea.gdshader similarity index 100% rename from island/Sea.gdshader rename to island/sinking/Sea.gdshader diff --git a/island/Sea.tscn b/island/sinking/Sea.tscn similarity index 61% rename from island/Sea.tscn rename to island/sinking/Sea.tscn index 87f7957..2b70cb4 100644 --- a/island/Sea.tscn +++ b/island/sinking/Sea.tscn @@ -1,16 +1,16 @@ -[gd_scene load_steps=4 format=3 uid="uid://dh5blytk6vmdu"] +[gd_scene load_steps=4 format=3] -[ext_resource type="PackedScene" uid="uid://c7lblmilr3gob" path="res://island/SeaMesh.tscn" id="1_ej5r1"] -[ext_resource type="Script" path="res://island/SinkArea.gd" id="3_0nuyu"] +[ext_resource type="PackedScene" uid="uid://c7lblmilr3gob" path="res://island/sinking/SeaMesh.tscn" id="1_6je2t"] +[ext_resource type="Script" path="res://island/sinking/SinkArea.gd" id="2_ethjj"] [sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_hpkdw"] [node name="Sea" type="Node3D"] -[node name="SeaMesh" parent="." instance=ExtResource("1_ej5r1")] +[node name="SeaMesh" parent="." instance=ExtResource("1_6je2t")] [node name="SinkArea" type="Area3D" parent="."] -script = ExtResource("3_0nuyu") +script = ExtResource("2_ethjj") [node name="Shape" type="CollisionShape3D" parent="SinkArea"] shape = SubResource("WorldBoundaryShape3D_hpkdw") diff --git a/island/SeaMesh.tscn b/island/sinking/SeaMesh.tscn similarity index 81% rename from island/SeaMesh.tscn rename to island/sinking/SeaMesh.tscn index eed8e7d..ba61d0f 100644 --- a/island/SeaMesh.tscn +++ b/island/sinking/SeaMesh.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=5 format=3 uid="uid://c7lblmilr3gob"] +[gd_scene load_steps=5 format=3] -[ext_resource type="Shader" path="res://island/Sea.gdshader" id="1_tu2de"] +[ext_resource type="Shader" path="res://island/sinking/Sea.gdshader" id="1_tu2de"] [ext_resource type="Texture2D" uid="uid://bdoifsf6k0qb8" path="res://assets/water_tile.png" id="2_c8qvh"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_3uyyi"] diff --git a/island/SinkArea.gd b/island/sinking/SinkArea.gd similarity index 65% rename from island/SinkArea.gd rename to island/sinking/SinkArea.gd index b626d55..58e84dd 100644 --- a/island/SinkArea.gd +++ b/island/sinking/SinkArea.gd @@ -4,11 +4,11 @@ class_name SinkArea ## A node fell in the water. ## Triggers after CanSink.sunk . -signal has_sunk(splasher: CanSink) +signal has_sunk(sinkable: CanSink) func _on_body_entered(body: Node3D): - var sinkables: Array[CanSink] = body.find_children("*", "CanSink", false, false) + var sinkables = body.find_children("*", "CanSink", false, false) for sinkable in sinkables: sinkable.sink() emit_signal("has_sunk", sinkable) diff --git a/player/Player.tscn b/player/Player.tscn index 384b971..ab56e63 100644 --- a/player/Player.tscn +++ b/player/Player.tscn @@ -1,11 +1,11 @@ -[gd_scene load_steps=14 format=3 uid="uid://btjp3g623h4y0"] +[gd_scene load_steps=14 format=3] [ext_resource type="Script" path="res://player/Player.gd" id="1_rujcr"] [ext_resource type="Script" path="res://player/Head.gd" id="2_ohlgu"] [ext_resource type="Script" path="res://player/OnHand.gd" id="3_3rcjl"] [ext_resource type="Theme" uid="uid://c5a1nyqumj46j" path="res://menu/menu_theme.tres" id="4_d7ru6"] [ext_resource type="Shader" path="res://player/crosshair.gdshader" id="4_dut1p"] -[ext_resource type="PackedScene" uid="uid://c6opu8v6xd660" path="res://island/CanSink.tscn" id="6_c0n0a"] +[ext_resource type="PackedScene" path="res://island/sinking/CanSink.tscn" id="6_c0n0a"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_aqp8x"] metallic_specular = 0.0 diff --git a/project.godot b/project.godot index 7488bc6..a73f9d8 100644 --- a/project.godot +++ b/project.godot @@ -22,7 +22,7 @@ _global_script_classes=[{ "base": "Node", "class": &"CanSink", "language": &"GDScript", -"path": "res://island/CanSink.gd" +"path": "res://island/sinking/CanSink.gd" }, { "base": "Node3D", "class": &"CropTile", @@ -47,7 +47,7 @@ _global_script_classes=[{ "base": "Area3D", "class": &"SinkArea", "language": &"GDScript", -"path": "res://island/SinkArea.gd" +"path": "res://island/sinking/SinkArea.gd" }] _global_script_class_icons={ "BaseScene": "",