Recommiting glbs for LFS
Deploy Promiscuity Auth API / deploy (push) Successful in 1m59s
Deploy Promiscuity Character API / deploy (push) Successful in 1m16s
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
Deploy Promiscuity Auth API / deploy (push) Successful in 1m59s
Deploy Promiscuity Character API / deploy (push) Successful in 1m16s
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
This commit is contained in:
@@ -3,6 +3,9 @@ extends Area3D
|
||||
@export_file("*.tscn") var target_scene_path := "res://scenes/Levels/transportation_level.tscn"
|
||||
@export var target_group: StringName = &"player"
|
||||
@export var one_shot := true
|
||||
@export var target_spawn_name: StringName = &""
|
||||
@export var quest_event_name: StringName = &""
|
||||
@export var quest_id_filter: String = ""
|
||||
|
||||
var _is_transitioning := false
|
||||
|
||||
@@ -22,6 +25,9 @@ func _on_body_entered(body: Node) -> void:
|
||||
if not ResourceLoader.exists(target_scene_path):
|
||||
push_warning("Teleporter target scene does not exist: %s" % target_scene_path)
|
||||
return
|
||||
_emit_quest_event(body)
|
||||
if TeleportState != null:
|
||||
TeleportState.request_spawn(target_spawn_name)
|
||||
|
||||
_is_transitioning = true
|
||||
if one_shot:
|
||||
@@ -29,6 +35,17 @@ func _on_body_entered(body: Node) -> void:
|
||||
call_deferred("_deferred_change_scene")
|
||||
|
||||
|
||||
func _emit_quest_event(body: Node) -> void:
|
||||
if quest_event_name == StringName() or QuestManager == null:
|
||||
return
|
||||
if quest_id_filter.strip_edges() != "" and QuestManager.get_active_quest_id() != StringName(quest_id_filter):
|
||||
return
|
||||
QuestManager.emit_event(quest_event_name, {
|
||||
"body": body,
|
||||
"source": self,
|
||||
})
|
||||
|
||||
|
||||
func _deferred_change_scene() -> void:
|
||||
var err := get_tree().change_scene_to_file(target_scene_path)
|
||||
if err == OK:
|
||||
|
||||
Reference in New Issue
Block a user