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:
@@ -21,8 +21,10 @@ func _toggle_menu():
|
||||
_animate_menu(false)
|
||||
|
||||
func _arrange_buttons():
|
||||
var buttons = get_children()
|
||||
var buttons = get_children().filter(func(child): return child is Control)
|
||||
var count = buttons.size()
|
||||
if count == 0:
|
||||
return
|
||||
|
||||
for i in range(count):
|
||||
# Calculate the angle for each button in radians
|
||||
@@ -36,7 +38,7 @@ func _arrange_buttons():
|
||||
|
||||
func _animate_menu(opening: bool):
|
||||
var tween = create_tween().set_parallel(true)
|
||||
for button in get_children():
|
||||
for button in get_children().filter(func(child): return child is Control):
|
||||
var final_scale = Vector2.ONE if opening else Vector2.ZERO
|
||||
tween.tween_property(button, "scale", final_scale, transition_speed).from(Vector2.ZERO if opening else Vector2.ONE)
|
||||
|
||||
|
||||
@@ -16,6 +16,21 @@ extends Node3D
|
||||
one_shot = value
|
||||
_sync_teleporter()
|
||||
|
||||
@export var target_spawn_name: StringName = &"":
|
||||
set(value):
|
||||
target_spawn_name = value
|
||||
_sync_teleporter()
|
||||
|
||||
@export var quest_event_name: StringName = &"":
|
||||
set(value):
|
||||
quest_event_name = value
|
||||
_sync_teleporter()
|
||||
|
||||
@export var quest_id_filter: String = "":
|
||||
set(value):
|
||||
quest_id_filter = value
|
||||
_sync_teleporter()
|
||||
|
||||
@onready var teleporter: Area3D = $Teleporter
|
||||
|
||||
|
||||
@@ -29,3 +44,6 @@ func _sync_teleporter() -> void:
|
||||
teleporter.set("target_scene_path", target_scene_path)
|
||||
teleporter.set("target_group", target_group)
|
||||
teleporter.set("one_shot", one_shot)
|
||||
teleporter.set("target_spawn_name", target_spawn_name)
|
||||
teleporter.set("quest_event_name", quest_event_name)
|
||||
teleporter.set("quest_id_filter", quest_id_filter)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
extends Node
|
||||
|
||||
var _requested_spawn_name: StringName = &""
|
||||
|
||||
|
||||
func request_spawn(spawn_name: StringName) -> void:
|
||||
_requested_spawn_name = spawn_name
|
||||
|
||||
|
||||
func consume_spawn_name() -> StringName:
|
||||
var spawn_name := _requested_spawn_name
|
||||
_requested_spawn_name = &""
|
||||
return spawn_name
|
||||
@@ -0,0 +1 @@
|
||||
uid://ds35gqf0obsxf
|
||||
Reference in New Issue
Block a user