tiger-cleanup #1
|
|
@ -921,7 +921,6 @@ size = Vector2i(400, 350)
|
|||
render_target_update_mode = 4
|
||||
|
||||
[node name="CollectableUi" parent="BoardTrigger/UiWrapper/UiSprite/SubViewport" instance=ExtResource("5_ln5pp")]
|
||||
is_board = true
|
||||
|
||||
[node name="HoverDetect" type="CollisionShape3D" parent="BoardTrigger"]
|
||||
transform = Transform3D(1, 0, 2.9802656e-08, 0, 1, 0, -2.9802656e-08, 0, 1, 0, -0.015731215, 0)
|
||||
|
|
@ -936,4 +935,3 @@ shape = SubResource("CapsuleShape3D_80jyn")
|
|||
[connection signal="input_event" from="Collectables/AutismMemento/UiWrapper" to="Collectables/AutismMemento/UiWrapper" method="_on_input_event"]
|
||||
[connection signal="input_event" from="Collectables/UniversityMemento/UiWrapper" to="Collectables/UniversityMemento/UiWrapper" method="_on_input_event"]
|
||||
[connection signal="input_event" from="BoardTrigger/UiWrapper" to="BoardTrigger/UiWrapper" method="_on_input_event"]
|
||||
[connection signal="open_board" from="BoardTrigger/UiWrapper/UiSprite/SubViewport/CollectableUi" to="UI/Board" method="claim_focus"]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
class_name InteractiveSprite extends Area3D
|
||||
|
||||
@export var interaction_ui: PackedScene = null
|
||||
@export var is_board: bool = false
|
||||
|
||||
@onready var pass_to_actor: = $UiWrapper/UiSprite/SubViewport/CollectableUi
|
||||
@onready var wrapper := $UiWrapper
|
||||
|
|
@ -42,9 +41,12 @@ func _ready():
|
|||
%CanvasLayer.add_child(interaction_ui.instantiate())
|
||||
|
||||
ui.canvas_layer = %CanvasLayer
|
||||
# Find and wire the StoryPlayable if not already set
|
||||
# Find and wire the interaction UI (StoryPlayable or CardBoard)
|
||||
for child in %CanvasLayer.get_children():
|
||||
if child is Control:
|
||||
if child is CardBoard:
|
||||
ui.interaction_ui = child
|
||||
break
|
||||
elif child is Control:
|
||||
ui.interaction_ui = child
|
||||
break
|
||||
|
||||
|
|
|
|||
|
|
@ -1895,7 +1895,6 @@ unique_name_in_owner = true
|
|||
transform = Transform3D(-4.3711374e-08, 0, 0.9999984, 0, 1, 0, -0.9999984, 0, -4.3711374e-08, -0.907206, 1.17661, 1.74337)
|
||||
visible = false
|
||||
interaction_ui = ExtResource("4_gyjxx")
|
||||
is_board = true
|
||||
|
||||
[node name="Door" parent="logic" instance=ExtResource("30_ypa88")]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
|||
|
|
@ -263,8 +263,7 @@ func attach_sticky_note(sticky_note: StickyNote) -> bool:
|
|||
return true
|
||||
|
||||
func remove_sticky_note() -> StickyNote:
|
||||
if not is_instance_valid(current_sticky_note): return null
|
||||
var former_child:StickyNote = current_sticky_note
|
||||
var former_child:StickyNote = get_attached_sticky_note()
|
||||
current_sticky_note = null
|
||||
former_child.reparent(get_parent())
|
||||
former_child.owner = self.owner
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ class_name CollectableUi
|
|||
|
||||
@onready var canvas_layer: CanvasLayer = %CanvasLayer
|
||||
|
||||
signal open_board
|
||||
signal exit_room
|
||||
signal playback_finished
|
||||
|
||||
|
|
@ -22,7 +21,7 @@ var interaction_ui: Control
|
|||
@export var scene: Scenes.id = Scenes.id.YOUTH_DRAVEN:
|
||||
set(id):
|
||||
scene = id
|
||||
if is_inside_tree() and not is_board:
|
||||
if is_inside_tree():
|
||||
match id:
|
||||
Scenes.id.YOUTH_DRAVEN:
|
||||
# FIXME: this explicit translation should not be nessecary
|
||||
|
|
@ -69,24 +68,21 @@ var interaction_ui: Control
|
|||
is_collected = value
|
||||
if is_inside_tree():
|
||||
collected_box.button_pressed = value
|
||||
if is_collected and not is_board:
|
||||
if is_collected:
|
||||
%CollectLabel.text = "listen again"
|
||||
else:
|
||||
if not is_board:
|
||||
%CollectLabel.text = "MementoLabel_collect"
|
||||
else:
|
||||
%CollectLabel.text = "find connections"
|
||||
@onready var collected_box: CheckBox = %CheckBox
|
||||
@export var title_override: String = "":
|
||||
set(value):
|
||||
title_override = value
|
||||
if is_inside_tree() and not is_board:
|
||||
if is_inside_tree():
|
||||
title_label.text = value
|
||||
@onready var title_label: Label = %TitleLabel
|
||||
@export var subtitle_override: String = "":
|
||||
set(value):
|
||||
subtitle_override = value
|
||||
if is_inside_tree() and not is_board:
|
||||
if is_inside_tree():
|
||||
cn_label.text = value
|
||||
@onready var cn_label: RichTextLabel = %ContentNoteLabel
|
||||
@onready var animation_player: AnimationPlayer = %AnimationPlayer
|
||||
|
|
@ -104,28 +100,6 @@ var interaction_ui: Control
|
|||
return
|
||||
@export var was_skipped: bool = false
|
||||
|
||||
@export var is_board:bool = false:
|
||||
set(board):
|
||||
is_board = board
|
||||
if is_inside_tree():
|
||||
if board:
|
||||
if title_override == "": title_label.text = "Mind Board"
|
||||
collected_box.hide()
|
||||
# Not room agnostic yet!
|
||||
if not Engine.is_editor_hint():
|
||||
match Scenes.get_completed_total():
|
||||
1:
|
||||
if subtitle_override == "": cn_label.text = "Find all three Mementos to collect all thoughts."
|
||||
2:
|
||||
if subtitle_override == "": cn_label.text = "Find two more Mementos to get all cards."
|
||||
3:
|
||||
if subtitle_override == "": cn_label.text = "Find the last remaining Memento."
|
||||
4:
|
||||
if subtitle_override == "": cn_label.text = "Use this to find a Frame of Mind."
|
||||
else:
|
||||
scene = scene
|
||||
collected_box.show()
|
||||
|
||||
@export var is_exit:bool = false:
|
||||
set(exit):
|
||||
is_exit = exit
|
||||
|
|
@ -150,13 +124,12 @@ func _on_context_updated() -> void:
|
|||
%SkipButton.visible = State.allow_skipping
|
||||
%SummaryButton.visible = State.provide_summaries
|
||||
%ReadStory.visible = is_collected
|
||||
%OptionPrompt.visible = State.allow_skipping or State.provide_summaries or is_collected and not is_board
|
||||
%OptionsLabel.visible = State.allow_skipping or State.provide_summaries or is_collected and not is_board
|
||||
%OptionPrompt.visible = State.allow_skipping or State.provide_summaries or is_collected
|
||||
%OptionsLabel.visible = State.allow_skipping or State.provide_summaries or is_collected
|
||||
cn_label.visible = true if State.show_content_notes else false
|
||||
|
||||
func update_state() -> void:
|
||||
scene = scene
|
||||
is_board = is_board
|
||||
is_exit = is_exit
|
||||
_on_context_updated()
|
||||
|
||||
|
|
@ -173,14 +146,11 @@ func try_reveal() -> bool:
|
|||
func _input(event: InputEvent) -> void:
|
||||
if not visible: return
|
||||
if event.is_action_pressed("collect_memento_ui"):
|
||||
if not is_board:
|
||||
collect_memento()
|
||||
get_viewport().set_input_as_handled()
|
||||
else:
|
||||
if is_board:
|
||||
open_board.emit()
|
||||
if is_exit:
|
||||
exit_room.emit()
|
||||
else:
|
||||
collect_memento()
|
||||
get_viewport().set_input_as_handled()
|
||||
elif event.is_action_pressed("option_memento_ui"):
|
||||
is_expanded = true
|
||||
get_viewport().set_input_as_handled()
|
||||
|
|
|
|||
Loading…
Reference in New Issue