Prepping cooking
This commit is contained in:
@@ -12,7 +12,7 @@ enum InteractType {
|
||||
NONE,
|
||||
CONVERSATION,
|
||||
ONE_TIME_ITEM,
|
||||
TEST_BATTLE
|
||||
CUTSCENE
|
||||
};
|
||||
|
||||
@export_category("Identification")
|
||||
@@ -29,9 +29,8 @@ var button := func():
|
||||
@export_category("Interactions")
|
||||
@export var interactType:InteractType = InteractType.NONE
|
||||
@export var conversation:Array[ConversationResource] = []
|
||||
|
||||
@export_category("One-Time Item")
|
||||
@export var oneTimeItem:ItemResource = null
|
||||
@export var cutscene:CutsceneResource = null
|
||||
|
||||
# TEST BATTLE
|
||||
@export_category("Test Battle")
|
||||
|
||||
@@ -11,10 +11,15 @@ func isInteractable() -> bool:
|
||||
return false
|
||||
|
||||
if entity.interactType == Entity.InteractType.CONVERSATION:
|
||||
if entity.conversation.size() != 0:
|
||||
return true
|
||||
if entity.conversation.size() == 0:
|
||||
return false
|
||||
return true
|
||||
|
||||
if entity.interactType == Entity.InteractType.TEST_BATTLE:
|
||||
if entity.interactType == Entity.InteractType.CUTSCENE:
|
||||
if entity.cutscene == null:
|
||||
return false
|
||||
if !entity.cutscene.canRun():
|
||||
return false
|
||||
return true
|
||||
|
||||
if entity.interactType == Entity.InteractType.ONE_TIME_ITEM:
|
||||
@@ -53,11 +58,9 @@ func onInteract(other:Entity) -> void:
|
||||
_onItemInteract(other)
|
||||
return
|
||||
|
||||
Entity.InteractType.TEST_BATTLE:
|
||||
Entity.InteractType.CUTSCENE:
|
||||
var cutscene:Cutscene = Cutscene.new()
|
||||
cutscene.addCallable(BattleStartAction.getStartBattleCallable({
|
||||
BATTLE.BattlePosition.RIGHT_TOP_FRONT: PartySingleton.PARTY_JOHN,
|
||||
}))
|
||||
entity.cutscene.queue(cutscene)
|
||||
cutscene.start()
|
||||
return
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://d0ywgijpuqy0r"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://d0ywgijpuqy0r"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://xe6pcuq741xi" path="res://overworld/map/TestMap.gd" id="1_6ms5s"]
|
||||
[ext_resource type="PackedScene" uid="uid://cluuhtfjeodwb" path="res://overworld/map/TestMapBase.tscn" id="1_ox0si"]
|
||||
[ext_resource type="PackedScene" uid="uid://by4a0r2hp0w6s" path="res://overworld/entity/Entity.tscn" id="2_jmygs"]
|
||||
[ext_resource type="Script" uid="uid://yn7kxdargafx" path="res://cutscene/conversation/ConversationResource.gd" id="3_p7git"]
|
||||
[ext_resource type="Script" uid="uid://38ya6vphm5bu" path="res://item/ItemResource.gd" id="4_xf0pb"]
|
||||
[ext_resource type="Script" uid="uid://b5c8g5frishjs" path="res://cutscene/cutscene/TestCutscene.gd" id="5_125nt"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xf0pb"]
|
||||
script = ExtResource("3_p7git")
|
||||
@@ -18,6 +19,10 @@ item = 1
|
||||
quantity = 1
|
||||
metadata/_custom_type_script = "uid://38ya6vphm5bu"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tr4a0"]
|
||||
script = ExtResource("5_125nt")
|
||||
metadata/_custom_type_script = "uid://b5c8g5frishjs"
|
||||
|
||||
[node name="TestMap" type="Node3D"]
|
||||
script = ExtResource("1_6ms5s")
|
||||
|
||||
@@ -33,6 +38,12 @@ entityId = "ad5a1504-7fbf-45d6-b1bf-6e7af6314066"
|
||||
interactType = 2
|
||||
oneTimeItem = SubResource("Resource_125nt")
|
||||
|
||||
[node name="NotPlayer3" parent="." instance=ExtResource("2_jmygs")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.29413, 1.11219, 1.45094)
|
||||
entityId = "ad5a1504-7fbf-45d6-b1bf-6e7af6314066"
|
||||
interactType = 3
|
||||
cutscene = SubResource("Resource_tr4a0")
|
||||
|
||||
[node name="TestMapBase" parent="." instance=ExtResource("1_ox0si")]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("2_jmygs")]
|
||||
|
||||
Reference in New Issue
Block a user