diff --git a/Zennysoft.Game.Ma/src/dialog/Dialogue.dialogue b/Zennysoft.Game.Ma/src/dialog/Dialogue.dialogue index 092c4d06..6b684056 100644 --- a/Zennysoft.Game.Ma/src/dialog/Dialogue.dialogue +++ b/Zennysoft.Game.Ma/src/dialog/Dialogue.dialogue @@ -8,4 +8,8 @@ I haven't had a script added yet. ~ hit Yep, hitting me does work though. +=> END + +~ get_item +ooo yum => END \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/map/overworld/Overworld.tscn b/Zennysoft.Game.Ma/src/map/overworld/Overworld.tscn index 99684586..e11875ad 100644 --- a/Zennysoft.Game.Ma/src/map/overworld/Overworld.tscn +++ b/Zennysoft.Game.Ma/src/map/overworld/Overworld.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=254 format=4 uid="uid://dvnc26rebk6o0"] +[gd_scene load_steps=257 format=4 uid="uid://dvnc26rebk6o0"] [ext_resource type="Script" uid="uid://cuhfkyh3d7noa" path="res://src/map/dungeon/code/Overworld.cs" id="1_5hmt3"] [ext_resource type="Texture2D" uid="uid://co6h8vyi11sl2" path="res://src/map/overworld/Models/Overworld_CLOUD_RINGS_INNER_63.png" id="2_g6b7b"] @@ -68,6 +68,9 @@ [ext_resource type="Texture2D" uid="uid://wqbflec631rm" path="res://src/map/overworld/Models/Overworld_optimized_Pass 1_BANYAN_LEAVES.png" id="66_plu1v"] [ext_resource type="Texture2D" uid="uid://ck2milaawr3ef" path="res://src/map/overworld/Models/Overworld_optimized_Pass 1_BANYAN_LEAVES2.png" id="67_shdaj"] [ext_resource type="Texture2D" uid="uid://c5jloiaiy7iug" path="res://src/map/overworld/Models/Overworld_optimized_Pass 1_BANYAN_LEAVES_3.png" id="68_8o0x4"] +[ext_resource type="PackedScene" uid="uid://jds3hr41coal" path="res://src/npc/Ran/Ran.tscn" id="69_g6b7b"] +[ext_resource type="PackedScene" uid="uid://db206brufi83s" path="res://src/items/weapons/Weapon.tscn" id="70_r8r3k"] +[ext_resource type="Resource" uid="uid://cfhwlpa0d7wb4" path="res://src/items/weapons/resources/MysteryRod.tres" id="71_t71yg"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_peugn"] resource_name = "CLOUDS1" @@ -8264,10 +8267,6 @@ skeleton = NodePath("") unique_name_in_owner = true transform = Transform3D(-0.0104718, 0, 0.999945, 0, 1, 0, -0.999945, 0, -0.0104718, -241.939, 2.09173, 42.6114) -[node name="ExitSpawnPoint" type="Marker3D" parent="Spawn Points"] -unique_name_in_owner = true -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -222.479, 0.9708, 17.5532) - [node name="Exit" type="Area3D" parent="Spawn Points"] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -99.0174, 4.81592, 93.6446) @@ -8277,3 +8276,10 @@ collision_mask = 256 [node name="CollisionShape3D" type="CollisionShape3D" parent="Spawn Points/Exit"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13.5815, -2.1779, -3.80354) shape = SubResource("BoxShape3D_b53dq") + +[node name="Ran" parent="." instance=ExtResource("69_g6b7b")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -230.292, 4.34026, 49.3324) + +[node name="Weapon" parent="Ran" instance=ExtResource("70_r8r3k")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.451996, -1.48021, -8.76553) +Stats = ExtResource("71_t71yg") diff --git a/Zennysoft.Game.Ma/src/npc/Clalo/Clalo.tscn b/Zennysoft.Game.Ma/src/npc/Clalo/Clalo.tscn index bc7c8626..830bba40 100644 --- a/Zennysoft.Game.Ma/src/npc/Clalo/Clalo.tscn +++ b/Zennysoft.Game.Ma/src/npc/Clalo/Clalo.tscn @@ -27,8 +27,8 @@ texture = ExtResource("2_rop5q") [node name="DialogueZone" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 2 -collision_mask = 2 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="DialogueZone"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00131226, 0, -0.00723076) diff --git a/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii.tscn b/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii.tscn index d6743cd7..e91d54e2 100644 --- a/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii.tscn +++ b/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii.tscn @@ -49,8 +49,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii2.tscn b/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii2.tscn index 66904e58..d488d34d 100644 --- a/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii2.tscn +++ b/Zennysoft.Game.Ma/src/npc/Gesthesemii/Gesthemii2.tscn @@ -50,8 +50,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/npc/Npc.cs b/Zennysoft.Game.Ma/src/npc/Npc.cs index 58ab454c..6c87eb35 100644 --- a/Zennysoft.Game.Ma/src/npc/Npc.cs +++ b/Zennysoft.Game.Ma/src/npc/Npc.cs @@ -20,45 +20,53 @@ public partial class Npc : Node3D public void OnReady() { - SetPhysicsProcess(true); - DialogueZone.BodyEntered += DialogueZone_BodyEntered; - DialogueZone.BodyExited += DialogueZone_BodyExited; - Hitbox.AreaEntered += Hitbox_AreaEntered; + SetPhysicsProcess(true); + DialogueZone.BodyEntered += DialogueZone_BodyEntered; + DialogueZone.BodyExited += DialogueZone_BodyExited; + Hitbox.AreaEntered += Hitbox_AreaEntered; } private void Hitbox_AreaEntered(Area3D area) { - DialogueController.ShowDialogue(Dialogue, "hit"); + if (area.GetOwner() is ThrownItem thrownItem) + { + DialogueController.ShowDialogue(Dialogue, "get_item"); + thrownItem.QueueFree(); + } + else + { + DialogueController.ShowDialogue(Dialogue, "hit"); + } } private void Hitbox_BodyEntered(Node body) { - DialogueController.ShowDialogue(Dialogue, "hit"); + DialogueController.ShowDialogue(Dialogue, "hit"); } private void DialogueZone_BodyExited(Node3D body) { - _isInDialogueZone = false; - DialogueController.Interrupt(); + _isInDialogueZone = false; + DialogueController.Interrupt(); } private void DialogueZone_BodyEntered(Node3D body) { - _isInDialogueZone = true; + _isInDialogueZone = true; } public override void _UnhandledInput(InputEvent @event) { - if (@event.IsActionPressed(GameInputs.Interact) && _isInDialogueZone) - { - if (_isIntroductionComplete) - DialogueController.ShowDialogue(Dialogue, "general"); - else - { - DialogueController.ShowDialogue(Dialogue, "introduction"); - _isIntroductionComplete = true; - } - } + if (@event.IsActionPressed(GameInputs.Interact) && _isInDialogueZone) + { + if (_isIntroductionComplete) + DialogueController.ShowDialogue(Dialogue, "general"); + else + { + DialogueController.ShowDialogue(Dialogue, "introduction"); + _isIntroductionComplete = true; + } + } } } diff --git a/Zennysoft.Game.Ma/src/npc/Proscenium/Proscenium.tscn b/Zennysoft.Game.Ma/src/npc/Proscenium/Proscenium.tscn index d64be730..d8bbfa4d 100644 --- a/Zennysoft.Game.Ma/src/npc/Proscenium/Proscenium.tscn +++ b/Zennysoft.Game.Ma/src/npc/Proscenium/Proscenium.tscn @@ -46,8 +46,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/npc/Puer/Puer.tscn b/Zennysoft.Game.Ma/src/npc/Puer/Puer.tscn index ecf15b68..06f617d1 100644 --- a/Zennysoft.Game.Ma/src/npc/Puer/Puer.tscn +++ b/Zennysoft.Game.Ma/src/npc/Puer/Puer.tscn @@ -48,8 +48,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/npc/Ran/Ran.tscn b/Zennysoft.Game.Ma/src/npc/Ran/Ran.tscn index 8efc378a..29c03284 100644 --- a/Zennysoft.Game.Ma/src/npc/Ran/Ran.tscn +++ b/Zennysoft.Game.Ma/src/npc/Ran/Ran.tscn @@ -277,7 +277,7 @@ animation = &"idle" [node name="DialogueZone" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 2 +collision_layer = 0 collision_mask = 2 [node name="CollisionShape3D" type="CollisionShape3D" parent="DialogueZone"] @@ -295,8 +295,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/npc/Ran/ran.dialogue b/Zennysoft.Game.Ma/src/npc/Ran/ran.dialogue index abb7905b..99622ffa 100644 --- a/Zennysoft.Game.Ma/src/npc/Ran/ran.dialogue +++ b/Zennysoft.Game.Ma/src/npc/Ran/ran.dialogue @@ -10,3 +10,7 @@ Rӑn: okay...... Rӑn: hey ow => END +~ get_item +Rӑn: ooo yum +=> END + diff --git a/Zennysoft.Game.Ma/src/npc/Rat/Rat.tscn b/Zennysoft.Game.Ma/src/npc/Rat/Rat.tscn index b08abb61..5624163c 100644 --- a/Zennysoft.Game.Ma/src/npc/Rat/Rat.tscn +++ b/Zennysoft.Game.Ma/src/npc/Rat/Rat.tscn @@ -47,8 +47,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/npc/Rat/ratdialogue.dialogue b/Zennysoft.Game.Ma/src/npc/Rat/ratdialogue.dialogue index 3a4c7c8c..ad9da90a 100644 --- a/Zennysoft.Game.Ma/src/npc/Rat/ratdialogue.dialogue +++ b/Zennysoft.Game.Ma/src/npc/Rat/ratdialogue.dialogue @@ -46,3 +46,7 @@ Royal Rat Princep, Tekohcyo: The walls of the Tower may deceive you. Royal Rat Princep, Tekohcyo: I suppose in the end, any end is, relievingly, an end. => END +~ get_item +Royal Rat Princep, Tekohcyo: ooo yum +=> END + diff --git a/Zennysoft.Game.Ma/src/npc/Seshat/Seshat.tscn b/Zennysoft.Game.Ma/src/npc/Seshat/Seshat.tscn index bbc6bdac..196cc99d 100644 --- a/Zennysoft.Game.Ma/src/npc/Seshat/Seshat.tscn +++ b/Zennysoft.Game.Ma/src/npc/Seshat/Seshat.tscn @@ -50,8 +50,8 @@ shape = SubResource("CapsuleShape3D_kg3qv") [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true -collision_layer = 16 -collision_mask = 16 +collision_layer = 0 +collision_mask = 2068 [node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"] shape = SubResource("CylinderShape3D_nwuwj") diff --git a/Zennysoft.Game.Ma/src/player/Player.tscn b/Zennysoft.Game.Ma/src/player/Player.tscn index 90db5460..489322d6 100644 --- a/Zennysoft.Game.Ma/src/player/Player.tscn +++ b/Zennysoft.Game.Ma/src/player/Player.tscn @@ -486,7 +486,7 @@ size = Vector3(1.94531, 3.38623, 1.50671) height = 1.6909 [node name="Player" type="CharacterBody3D"] -collision_layer = 806 +collision_layer = 802 collision_mask = 775 script = ExtResource("1_xcol5") _playerStatResource = SubResource("Resource_bj1ma") @@ -587,7 +587,7 @@ disabled = true [node name="CollisionDetector" type="Area3D" parent="Collision"] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.126903, 0) -collision_layer = 452 +collision_layer = 448 collision_mask = 452 [node name="CollisionShape3D" type="CollisionShape3D" parent="Collision/CollisionDetector"]