Tutorial triggers

This commit is contained in:
Rob Kelly 2025-07-08 23:13:27 -06:00
parent b5f394f129
commit 54e6679079
20 changed files with 253 additions and 27 deletions

View File

@ -33,6 +33,7 @@ SETTINGS_GAME,Game
SETTINGS_GAME_HEADING,"Game Configuration"
SETTINGS_GAME_ACCESSIBILITY_HEADING,Accessibility
SETTINGS_GAME_INPUT_HEADING,Input
SETTINGS_GAME_TUTORIAL_HEADING,Tutorial
SETTINGS_SCREEN_SHAKE,"Enable Screen Shake"
SETTINGS_HEAD_BOB,"Enable Head Bob"
SETTINGS_SENSITIVITY_X,"Sensitivity, Horizontal"
@ -42,6 +43,8 @@ SETTINGS_INVERT_PITCH,"Invert Pitch"
SETTINGS_HOLD_TO_SNEAK,"Hold to Sneak"
SETTINGS_ROTATION_SENSITIVITY_X,"Object Rotation Sensitivity, Horizontal"
SETTINGS_ROTATION_SENSITIVITY_Y,"Object Rotation Sensitivity, Vertical"
SETTINGS_TUTORIAL_DISABLE,"Disable tutorial messages"
SETTINGS_TUTORIAL_RESET,"Reset tutorial progress (effective on next load)"
SETTINGS_GRAPHICS,Graphics
SETTINGS_GRAPHICS_HEADING,"Graphics & Display"
SETTINGS_GRAPHICS_DISPLAY_HEADING,Display
@ -71,6 +74,7 @@ ACTION_select_point_spray,"Select spot spray"
ACTION_select_wide_spray,"Select wide spray"
ACTION_select_brush,"Select toothbrush"
ACTION_select_mp3_player,"Select MP3 player"
ACTION_select_stickers,"Select sticker pack"
ACTION_select_manual,"Select manual"
ACTION_pause,Pause
,
@ -99,15 +103,16 @@ SWITCH_QUARANTINE_LABEL,"Quarantine Override"
SWITCH_CARGOBAY_LABEL,"Cargo Bay Security Override"
SWITCH_CARGO_LIFT_LABEL,"Cargo Lift Control"
,
TUTORIAL_LOOK,": look"
TUTORIAL_LOOK,": look around"
TUTORIAL_MOVE,": move around"
TUTORIAL_JUMP,": jump"
TUTORIAL_SNEAK,": sneak silently"
TUTORIAL_SPRINT,": sprint"
TUTORIAL_SPRINT,": run"
TUTORIAL_FIRE,": use equipped tool"
TUTORIAL_MODE,": switch tool mode"
TUTORIAL_INTERACT,": interact"
TUTORIAL_PICK_UP,": pick up object"
TUTORIAL_ROTATE,": rotate held object"
TUTORIAL_PICK_UP,": pick up objects"
TUTORIAL_THROW,"while holding an object: throw"
TUTORIAL_ROTATE,"while holding an object: rotate"
TUTORIAL_PREV_NEXT_TOOL,": switch to previous/next tool"
TUTORIAL_SWITCH_TOOL,": switch tools"

1 keys en
33 SETTINGS_GAME_HEADING Game Configuration
34 SETTINGS_GAME_ACCESSIBILITY_HEADING Accessibility
35 SETTINGS_GAME_INPUT_HEADING Input
36 SETTINGS_GAME_TUTORIAL_HEADING Tutorial
37 SETTINGS_SCREEN_SHAKE Enable Screen Shake
38 SETTINGS_HEAD_BOB Enable Head Bob
39 SETTINGS_SENSITIVITY_X Sensitivity, Horizontal
43 SETTINGS_HOLD_TO_SNEAK Hold to Sneak
44 SETTINGS_ROTATION_SENSITIVITY_X Object Rotation Sensitivity, Horizontal
45 SETTINGS_ROTATION_SENSITIVITY_Y Object Rotation Sensitivity, Vertical
46 SETTINGS_TUTORIAL_DISABLE Disable tutorial messages
47 SETTINGS_TUTORIAL_RESET Reset tutorial progress (effective on next load)
48 SETTINGS_GRAPHICS Graphics
49 SETTINGS_GRAPHICS_HEADING Graphics & Display
50 SETTINGS_GRAPHICS_DISPLAY_HEADING Display
74 ACTION_select_wide_spray Select wide spray
75 ACTION_select_brush Select toothbrush
76 ACTION_select_mp3_player Select MP3 player
77 ACTION_select_stickers Select sticker pack
78 ACTION_select_manual Select manual
79 ACTION_pause Pause
80
103 SWITCH_CARGOBAY_LABEL Cargo Bay Security Override
104 SWITCH_CARGO_LIFT_LABEL Cargo Lift Control
105
106 TUTORIAL_LOOK : look : look around
107 TUTORIAL_MOVE : move around
108 TUTORIAL_JUMP : jump
109 TUTORIAL_SNEAK : sneak silently
110 TUTORIAL_SPRINT : sprint : run
111 TUTORIAL_FIRE : use equipped tool
112 TUTORIAL_MODE : switch tool mode
113 TUTORIAL_INTERACT : interact
114 TUTORIAL_PICK_UP : pick up object : pick up objects
115 TUTORIAL_ROTATE TUTORIAL_THROW : rotate held object while holding an object: throw
116 TUTORIAL_ROTATE while holding an object: rotate
117 TUTORIAL_PREV_NEXT_TOOL : switch to previous/next tool
118 TUTORIAL_SWITCH_TOOL : switch tools

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=65 format=3 uid="uid://cwhmn3w8hoads"]
[gd_scene load_steps=67 format=3 uid="uid://cwhmn3w8hoads"]
[ext_resource type="ArrayMesh" uid="uid://dpr5cgq743f4s" path="res://assets/level/floor/floor_9x9.mesh" id="1_isxnv"]
[ext_resource type="PackedScene" uid="uid://cdi5sl60mw1po" path="res://src/world/gunkable/gunkable.tscn" id="2_si4vj"]
@ -33,6 +33,7 @@
[ext_resource type="PackedScene" uid="uid://30o8ltnnxpxo" path="res://src/effects/floating_dust.tscn" id="29_ib88w"]
[ext_resource type="Texture2D" uid="uid://c1v1sj6b8rwrl" path="res://levels/ghost_ship/level/airlock/overhead_light_airlock_mask_C.png" id="31_2dnfr"]
[ext_resource type="Script" uid="uid://c3i315cnqikok" path="res://src/game/tutorial/tutorial_area.gd" id="33_a8g8h"]
[ext_resource type="Script" uid="uid://dg55jdoyctdq6" path="res://src/game/tutorial/tutorial_timer.gd" id="34_cd8k0"]
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_yvipw"]
data = PackedVector3Array(4.5, 0, 4.5, -4.5, 0, 4.5, 4.5, 0, -4.5, 4.5, 0, -4.5, -4.5, 0, 4.5, -4.5, 0, -4.5)
@ -190,6 +191,9 @@ turbulence_influence_min = 0.0
[sub_resource type="BoxShape3D" id="BoxShape3D_2dnfr"]
size = Vector3(9, 3, 8.7)
[sub_resource type="BoxShape3D" id="BoxShape3D_cd8k0"]
size = Vector3(9, 3, 4.2)
[node name="Airlock" type="Node3D"]
[node name="Bounds" type="Node3D" parent="."]
@ -405,7 +409,7 @@ shape = SubResource("ConcavePolygonShape3D_isly2")
transform = Transform3D(0.866025, 0, 0.5, 0, 1, 0, -0.5, 0, 0.866025, 3.33603, 0.25, 3.53907)
collision_layer = 71
collision_mask = 73
mass = 200.0
mass = 60.0
sleeping = true
[node name="MeshInstance3D" type="MeshInstance3D" parent="Props/CrateLong"]
@ -424,7 +428,7 @@ metadata/_custom_type_script = "uid://040xta01xqxd"
transform = Transform3D(0.612372, 0.612373, 0.5, -0.707107, 0.707106, 1.98952e-13, -0.353553, -0.353553, 0.866025, 3.71304, 0.441942, 2.81688)
collision_layer = 71
collision_mask = 73
mass = 200.0
mass = 60.0
sleeping = true
[node name="MeshInstance3D" type="MeshInstance3D" parent="Props/CrateLong2"]
@ -472,4 +476,23 @@ tutorial_key = &"game/tutorial/progress/fire"
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15)
shape = SubResource("BoxShape3D_2dnfr")
[node name="ToolSwitchTutorialArea" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
collision_layer = 0
collision_mask = 8
script = ExtResource("33_a8g8h")
tutorial_key = &"game/tutorial/progress/tool_switch"
[node name="CollisionShape3D" type="CollisionShape3D" parent="ToolSwitchTutorialArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.4)
shape = SubResource("BoxShape3D_cd8k0")
[node name="ToolPrevNextTutorialTimer" type="Timer" parent="."]
wait_time = 1.6
one_shot = true
script = ExtResource("34_cd8k0")
tutorial_key = &"game/tutorial/progress/tool_prev_next"
[connection signal="body_entered" from="ToolSwitchTutorialArea" to="ToolPrevNextTutorialTimer" method="start" unbinds=1]
[editable path="Props/EmptySuitChamber"]

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=35 format=4 uid="uid://ddmgqfhiv3aag"]
[gd_scene load_steps=37 format=4 uid="uid://ddmgqfhiv3aag"]
[ext_resource type="ArrayMesh" uid="uid://cqd0a7ousx01n" path="res://assets/level/hallway/hallway_1.mesh" id="1_ckpmb"]
[ext_resource type="PackedScene" uid="uid://cdi5sl60mw1po" path="res://src/world/gunkable/gunkable.tscn" id="3_s4vba"]
[ext_resource type="PackedScene" uid="uid://drm5dspi48pf5" path="res://src/props/crate_long/phys_crate_long.tscn" id="4_vc8nj"]
[ext_resource type="Material" uid="uid://cqjr3cbxtfg2j" path="res://assets/materials/gunk.material" id="5_hwbyh"]
[ext_resource type="PackedScene" uid="uid://30o8ltnnxpxo" path="res://src/effects/floating_dust.tscn" id="8_t14hf"]
[ext_resource type="Script" uid="uid://c3i315cnqikok" path="res://src/game/tutorial/tutorial_area.gd" id="9_20ek7"]
[ext_resource type="PackedScene" uid="uid://d2feet02a603e" path="res://src/props/overhead_light/overhead_light.tscn" id="9_vwa0l"]
[ext_resource type="Material" uid="uid://dmolqtdktqdsl" path="res://levels/ghost_ship/guide_sign/airlock_sign.material" id="10_5qwf5"]
[ext_resource type="Material" uid="uid://dutkfm4ek0ysh" path="res://assets/materials/gunk_bright.material" id="11_i2ry3"]
@ -96,6 +97,9 @@ shadow_mesh = SubResource("ArrayMesh_al0j5")
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ojd88"]
data = PackedVector3Array(-1, 0, 0.2, -1, -0.4, 0, -1, 0, -0.2, -1, 0, -0.2, -1, -0.4, 0, 1, 0, -0.2, 1, 0, -0.2, -1, -0.4, 0, 1, -0.4, 0, 1, 0, -0.2, 1, -0.4, 0, 1, 0, 0.2, 1, 0, 0.2, 1, -0.4, 0, -1, 0, 0.2, -1, 0, 0.2, 1, -0.4, 0, -1, -0.4, 0, -1, 0, -0.2, 1, 0, -0.2, -1, 0, 0.2, -1, 0, 0.2, 1, 0, -0.2, 1, 0, 0.2)
[sub_resource type="BoxShape3D" id="BoxShape3D_vc8nj"]
size = Vector3(3, 3, 3)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_if0c2"]
data = PackedVector3Array(-1.5, 0, -1.5, -1.5, 0, 1.5, -1.5, 3, -1.5, -1.5, 3, -1.5, -1.5, 0, 1.5, -1.5, 3, 1.5, -1.5, 0, 1.5, -1.5, 0, -1.5, 1.5, 0, 1.5, 1.5, 0, 1.5, -1.5, 0, -1.5, 1.5, 0, -1.5, 1.5, 3, 1.5, 1.5, 3, -1.5, -1.5, 3, 1.5, -1.5, 3, 1.5, 1.5, 3, -1.5, -1.5, 3, -1.5)
@ -127,15 +131,15 @@ mesh_instance = NodePath("../..")
source_gunk_material = ExtResource("5_hwbyh")
[node name="PhysCrateLong" parent="Hallway1" instance=ExtResource("4_vc8nj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0.25, -5.9)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0.25, -2.9)
sleeping = true
[node name="PhysCrateLong2" parent="Hallway1" instance=ExtResource("4_vc8nj")]
transform = Transform3D(0.258819, -0.965926, 0, 0.965926, 0.258819, 0, 0, 0, 1, 1.2, 0.426927, -3.9)
transform = Transform3D(0.857697, 0, -0.514155, 0, 1, 0, 0.514155, 0, 0.857697, -0.462458, 0.25, -2.85781)
sleeping = true
[node name="PhysCrateLong3" parent="Hallway1" instance=ExtResource("4_vc8nj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0.75, -5.9)
transform = Transform3D(0.999619, 0, 0.0276076, 0, 1, 0, -0.0276076, 0, 0.999619, 0.971434, 0.75, -2.88767)
sleeping = true
[node name="FloatingDust" parent="Hallway1" instance=ExtResource("8_t14hf")]
@ -164,6 +168,28 @@ body = NodePath("..")
mesh_instance = NodePath("../..")
source_gunk_material = ExtResource("11_i2ry3")
[node name="JumpTutorialArea" type="Area3D" parent="Hallway1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 3.3)
collision_layer = 0
collision_mask = 8
script = ExtResource("9_20ek7")
tutorial_key = &"game/tutorial/progress/jump"
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hallway1/JumpTutorialArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.3)
shape = SubResource("BoxShape3D_vc8nj")
[node name="SprintTutorialArea" type="Area3D" parent="Hallway1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -7.2)
collision_layer = 0
collision_mask = 8
script = ExtResource("9_20ek7")
tutorial_key = &"game/tutorial/progress/sprint"
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hallway1/SprintTutorialArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.3)
shape = SubResource("BoxShape3D_vc8nj")
[node name="T-Junction1" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, -7.5)
mesh = ExtResource("12_3ls22")

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=48 format=4 uid="uid://6mggsi84ok1n"]
[gd_scene load_steps=50 format=4 uid="uid://6mggsi84ok1n"]
[ext_resource type="ArrayMesh" uid="uid://c4klxlj1oop7t" path="res://assets/level/hallway/hallway_4.mesh" id="1_ka7sa"]
[ext_resource type="PackedScene" uid="uid://cdi5sl60mw1po" path="res://src/world/gunkable/gunkable.tscn" id="2_osdhu"]
@ -12,6 +12,7 @@
[ext_resource type="Texture2D" uid="uid://cjm8vlxnejx3w" path="res://assets/props/guide_sign/guide_sign_R.png" id="10_ikww0"]
[ext_resource type="Material" uid="uid://dutkfm4ek0ysh" path="res://assets/materials/gunk_bright.material" id="11_iefrw"]
[ext_resource type="PackedScene" uid="uid://bpsiwx1517pk1" path="res://src/props/tarp_crate/tarp_crate.tscn" id="12_vtfca"]
[ext_resource type="Script" uid="uid://c3i315cnqikok" path="res://src/game/tutorial/tutorial_area.gd" id="14_6qtqj"]
[ext_resource type="ArrayMesh" uid="uid://b17naqcl4ie21" path="res://assets/level/floor/floor_1.mesh" id="14_ihtb8"]
[ext_resource type="PackedScene" uid="uid://d2feet02a603e" path="res://src/props/overhead_light/overhead_light.tscn" id="14_tgb37"]
[ext_resource type="Material" uid="uid://dt73a25l7h8if" path="res://levels/ghost_ship/guide_sign/crew_quarters_sign.material" id="15_ygcwo"]
@ -114,6 +115,9 @@ texture_filter = 4
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_2ft6k"]
data = PackedVector3Array(-0.7, 0, 0.14, -0.7, -0.28, 0, -0.7, 0, -0.14, -0.7, 0, -0.14, -0.7, -0.28, 0, 0.7, 0, -0.14, 0.7, 0, -0.14, -0.7, -0.28, 0, 0.7, -0.28, 0, 0.7, 0, -0.14, 0.7, -0.28, 0, 0.7, 0, 0.14, 0.7, 0, 0.14, 0.7, -0.28, 0, -0.7, 0, 0.14, -0.7, 0, 0.14, 0.7, -0.28, 0, -0.7, -0.28, 0, -0.7, 0, -0.14, 0.7, 0, -0.14, -0.7, 0, 0.14, -0.7, 0, 0.14, 0.7, 0, -0.14, 0.7, 0, 0.14)
[sub_resource type="BoxShape3D" id="BoxShape3D_650i1"]
size = Vector3(3, 3, 3)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_arxka"]
data = PackedVector3Array(1.5, 0, 1.5, -1.5, 0, 1.5, 1.5, 0, -1.5, 1.5, 0, -1.5, -1.5, 0, 1.5, -1.5, 0, -1.5)
@ -233,6 +237,17 @@ source_gunk_material = ExtResource("11_iefrw")
[node name="TarpCrate" parent="Hallway1" instance=ExtResource("12_vtfca")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0.8, -0.33)
[node name="SprintTutorialArea" type="Area3D" parent="Hallway1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.88495e-07, 1.5, -3.9)
collision_layer = 0
collision_mask = 8
script = ExtResource("14_6qtqj")
tutorial_key = &"game/tutorial/progress/sneak"
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hallway1/SprintTutorialArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.3)
shape = SubResource("BoxShape3D_650i1")
[node name="ShortHallway6" type="Node3D" parent="."]
transform = Transform3D(1, 0, 1.06581e-14, 0, 1, 0, -1.06581e-14, 0, 1, 3, 0, -12)

View File

@ -96,6 +96,7 @@ tutorial/progress/mode_switch=false
tutorial/progress/interact=false
tutorial/progress/pick_up=false
tutorial/progress/rotate=false
tutorial/progress/throw=false
[global_group]

View File

@ -70,3 +70,7 @@ func _spray() -> void:
func _on_animation_finished(anim_name: StringName) -> void:
if anim_name == "rotate":
_busy = false
func on_equip() -> void:
Tutorial.manager.activate("game/tutorial/progress/mode_switch")

View File

@ -33,7 +33,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("HBoxContainer/InfoIcon:modulate")
tracks/2/path = NodePath("HBoxContainer/Control/CanvasGroup:self_modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@ -96,7 +96,7 @@ tracks/1/keys = {
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("HBoxContainer/InfoIcon:modulate")
tracks/2/path = NodePath("HBoxContainer/Control/CanvasGroup:self_modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
@ -205,7 +205,7 @@ loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("HBoxContainer/InfoIcon:modulate")
tracks/0/path = NodePath("HBoxContainer/Control/CanvasGroup:self_modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
@ -337,9 +337,18 @@ grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 16
[node name="InfoIcon" type="Label" parent="HBoxContainer"]
[node name="Control" type="Control" parent="HBoxContainer"]
custom_minimum_size = Vector2(74, 43)
layout_mode = 2
[node name="CanvasGroup" type="CanvasGroup" parent="HBoxContainer/Control"]
[node name="InfoIcon" type="Label" parent="HBoxContainer/Control/CanvasGroup"]
offset_right = 74.0
offset_bottom = 43.0
theme = ExtResource("1_b0qfw")
theme_override_colors/font_color = Color(0.223529, 0.627451, 0.929412, 1)
theme_override_constants/outline_size = 10
theme_override_fonts/font = ExtResource("2_81007")
theme_override_font_sizes/font_size = 42
text = "  "
@ -347,6 +356,8 @@ text = "  "
[node name="MessageContainer" type="HBoxContainer" parent="HBoxContainer"]
visible = false
layout_mode = 2
theme_override_constants/separation = 16
alignment = 1
[node name="Message" type="Label" parent="HBoxContainer/MessageContainer"]
layout_mode = 2
@ -364,7 +375,6 @@ tree_root = SubResource("AnimationNodeStateMachine_o3pjn")
anim_player = NodePath("..")
[node name="FadeOutTimer" type="Timer" parent="."]
wait_time = 12.0
wait_time = 7.0
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
[connection signal="timeout" from="FadeOutTimer" to="." method="fade_out"]

View File

@ -3,15 +3,45 @@ class_name TutorialManagerType extends Node
signal disable_all
const TUTORIAL_KEY_PREFIX := "game/tutorial/progress/"
func activate(key: StringName) -> void:
func activate(key: String) -> void:
ProjectSettings.set_setting(key, true)
Game.settings.write()
func is_active(key: String) -> bool:
return ProjectSettings.get_setting(key)
func get_tutorial_keys() -> Array[String]:
# XXX is there a better way to iterate settings keys?
var arr: Array[String] = []
arr.assign(
(
ProjectSettings
. get_property_list()
. map(func(d: Dictionary) -> String: return d["name"])
. filter(func(s: String) -> bool: return s.begins_with(TUTORIAL_KEY_PREFIX))
)
)
return arr
func tutorial_started() -> bool:
return get_tutorial_keys().any(is_active)
func tutorial_finished() -> bool:
return get_tutorial_keys().all(is_active)
func reset_tutorial() -> void:
# TODO how to iterate through all settings keys in a path?
pass
# XXX is there a better way to iterate settings keys?
for key: String in get_tutorial_keys():
ProjectSettings.set_setting(key, false)
Game.settings.write()
func disable_tutorial() -> void:

View File

@ -5,6 +5,7 @@ signal held
signal dropped
const ROTATION_SCALE_FACTOR := 10.0 * TAU
const THROW_TUTORIAL_DELAY := 6.0
## Held object position lerp acceleration.
@export var hold_accel := 20.0
@ -55,6 +56,9 @@ func attach(prop: RigidBody3D, hold_distance: float) -> void:
held.emit()
Tutorial.manager.activate("game/tutorial/progress/rotate")
get_tree().create_timer(THROW_TUTORIAL_DELAY).timeout.connect(
Tutorial.manager.activate.bind("game/tutorial/progress/throw")
)
func drop() -> void:

View File

@ -813,12 +813,14 @@ script = ExtResource("36_phdu6")
[node name="LookTutorialTimer" type="Timer" parent="."]
wait_time = 3.0
one_shot = true
autostart = true
script = ExtResource("38_evlgt")
tutorial_key = &"game/tutorial/progress/look"
[node name="MoveTutorialTimer" type="Timer" parent="."]
wait_time = 5.0
one_shot = true
autostart = true
script = ExtResource("38_evlgt")
tutorial_key = &"game/tutorial/progress/move"

View File

@ -3,7 +3,7 @@ extends Label
## A prompt with the input symbol bound to the given action.
const PROMPT_FORMAT := "{0} - {1}"
const HOLD_FORMAT := "{0} {1}"
const HOLD_FORMAT := "{1} {0}"
const UNKNOWN_LABEL_SYM := "[unknown]"

View File

@ -429,10 +429,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -18.4746
offset_top = -23.3094
offset_right = -18.4746
offset_bottom = -23.3094
offset_left = -19.7154
offset_top = -19.6578
offset_right = -19.7154
offset_bottom = -19.6578
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("4_ud8na")
@ -569,6 +569,7 @@ tutorial_key = &"game/tutorial/progress/look"
[node name="Mouse" type="Label" parent="TutorialContainer/VBoxContainer/LookTutorial/HBoxContainer/MessageContainer" index="0"]
layout_mode = 2
size_flags_vertical = 8
theme = ExtResource("10_c1hvd")
theme_type_variation = &"InputPrompt"
text = "⟼"
@ -582,6 +583,7 @@ tutorial_key = &"game/tutorial/progress/move"
[node name="WASD" type="Label" parent="TutorialContainer/VBoxContainer/MoveTutorial/HBoxContainer/MessageContainer" index="0"]
layout_mode = 2
size_flags_vertical = 8
theme = ExtResource("10_c1hvd")
theme_type_variation = &"InputPrompt"
text = "␣"
@ -595,6 +597,7 @@ tutorial_key = &"game/tutorial/progress/jump"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/JumpTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"jump"
show_name = false
@ -608,6 +611,7 @@ tutorial_key = &"game/tutorial/progress/sneak"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/SneakTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓ ACTION_HOLD_MODIFIER"
action = &"sneak"
hold = true
@ -622,6 +626,7 @@ tutorial_key = &"game/tutorial/progress/sprint"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/SprintTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓ ACTION_HOLD_MODIFIER"
action = &"sprint"
hold = true
@ -636,6 +641,7 @@ tutorial_key = &"game/tutorial/progress/fire"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/FireTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓ ACTION_HOLD_MODIFIER"
action = &"fire"
hold = true
@ -650,18 +656,21 @@ tutorial_key = &"game/tutorial/progress/tool_switch"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/ToolSwitchTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"select_point_spray"
show_name = false
[node name="InputPrompt2" parent="TutorialContainer/VBoxContainer/ToolSwitchTutorial/HBoxContainer/MessageContainer" index="1" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"select_wide_spray"
show_name = false
[node name="etc" type="Label" parent="TutorialContainer/VBoxContainer/ToolSwitchTutorial/HBoxContainer/MessageContainer" index="2"]
layout_mode = 2
size_flags_vertical = 8
theme = ExtResource("10_c1hvd")
theme_type_variation = &"InputPrompt"
text = "UI_ETC"
@ -675,18 +684,21 @@ tutorial_key = &"game/tutorial/progress/tool_prev_next"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/ToolPrevNextTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"select_prev_tool"
show_name = false
[node name="slash" type="Label" parent="TutorialContainer/VBoxContainer/ToolPrevNextTutorial/HBoxContainer/MessageContainer" index="1"]
layout_mode = 2
size_flags_vertical = 8
theme = ExtResource("10_c1hvd")
theme_type_variation = &"InputPrompt"
text = "/"
[node name="InputPrompt2" parent="TutorialContainer/VBoxContainer/ToolPrevNextTutorial/HBoxContainer/MessageContainer" index="2" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"select_next_tool"
show_name = false
@ -700,6 +712,7 @@ tutorial_key = &"game/tutorial/progress/mode_switch"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/ModeSwitchTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"switch_mode"
show_name = false
@ -713,6 +726,7 @@ tutorial_key = &"game/tutorial/progress/interact"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/InteractTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"interact"
show_name = false
@ -726,6 +740,7 @@ tutorial_key = &"game/tutorial/progress/pick_up"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/PickUpTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"interact"
show_name = false
@ -739,6 +754,7 @@ tutorial_key = &"game/tutorial/progress/rotate"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/RotateTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓ ACTION_HOLD_MODIFIER"
action = &"rotate_object"
hold = true
@ -747,6 +763,20 @@ show_name = false
[node name="Message" parent="TutorialContainer/VBoxContainer/RotateTutorial/HBoxContainer/MessageContainer" index="1"]
text = "TUTORIAL_ROTATE"
[node name="ThrowTutorial" parent="TutorialContainer/VBoxContainer" instance=ExtResource("9_8np55")]
layout_mode = 2
tutorial_key = &"game/tutorial/progress/throw"
[node name="InputPrompt" parent="TutorialContainer/VBoxContainer/ThrowTutorial/HBoxContainer/MessageContainer" index="0" instance=ExtResource("4_iwjh7")]
layout_mode = 2
size_flags_vertical = 8
text = "❓"
action = &"fire"
show_name = false
[node name="Message" parent="TutorialContainer/VBoxContainer/ThrowTutorial/HBoxContainer/MessageContainer" index="1"]
text = "TUTORIAL_THROW"
[editable path="TutorialContainer/VBoxContainer/LookTutorial"]
[editable path="TutorialContainer/VBoxContainer/MoveTutorial"]
[editable path="TutorialContainer/VBoxContainer/JumpTutorial"]
@ -759,3 +789,4 @@ text = "TUTORIAL_ROTATE"
[editable path="TutorialContainer/VBoxContainer/InteractTutorial"]
[editable path="TutorialContainer/VBoxContainer/PickUpTutorial"]
[editable path="TutorialContainer/VBoxContainer/RotateTutorial"]
[editable path="TutorialContainer/VBoxContainer/ThrowTutorial"]

View File

@ -0,0 +1,10 @@
extends Button
func _ready() -> void:
disabled = Tutorial.manager.tutorial_finished()
func _on_pressed() -> void:
Tutorial.manager.disable_tutorial()
disabled = true

View File

@ -0,0 +1 @@
uid://c3a127y0x8qod

View File

@ -0,0 +1,10 @@
extends Button
func _ready() -> void:
disabled = not Tutorial.manager.tutorial_started()
func _on_pressed() -> void:
Tutorial.manager.reset_tutorial()
disabled = true

View File

@ -0,0 +1 @@
uid://cchqp66wig3wa

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://d3eaqw2rdurct"]
[gd_scene load_steps=10 format=3 uid="uid://d3eaqw2rdurct"]
[ext_resource type="Script" uid="uid://dyb8cwai3cyw2" path="res://src/ui/menus/settings_menu/settings_menu.gd" id="1_lbcn7"]
[ext_resource type="Theme" uid="uid://doq7ay6f7dgfo" path="res://src/ui/menus/menu.theme" id="1_vuur6"]
@ -7,6 +7,8 @@
[ext_resource type="PackedScene" uid="uid://d2ya6ly01724l" path="res://src/ui/menus/settings_menu/volume_slider/volume_slider.tscn" id="3_vuur6"]
[ext_resource type="PackedScene" uid="uid://dwvpddd7id1h" path="res://src/ui/menus/settings_menu/control_binding/control_binding.tscn" id="4_6bmd3"]
[ext_resource type="Script" uid="uid://wlo8hxahp1x7" path="res://src/ui/menus/settings_menu/settings/checkbox_setting/fullscreen_setting.gd" id="4_ug1id"]
[ext_resource type="Script" uid="uid://cchqp66wig3wa" path="res://src/ui/menus/settings_menu/reset_tutorial_button.gd" id="7_ftg2j"]
[ext_resource type="Script" uid="uid://c3a127y0x8qod" path="res://src/ui/menus/settings_menu/disable_tutorial_button.gd" id="8_stv84"]
[node name="SettingsMenu" type="MarginContainer"]
anchors_preset = 15
@ -182,6 +184,42 @@ physics_interpolation_mode = 0
max_value = 1.0
step = 0.01
[node name="TutorialHeading" type="HBoxContainer" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList"]
layout_mode = 2
[node name="Label" type="Label" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/TutorialHeading"]
layout_mode = 2
theme_type_variation = &"HeaderMedium"
text = "SETTINGS_TUTORIAL_HEADING"
[node name="HSeparator" type="HSeparator" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/TutorialHeading"]
layout_mode = 2
size_flags_horizontal = 3
[node name="ResetTutorial" type="HBoxContainer" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList"]
layout_mode = 2
[node name="Spacer" type="HSeparator" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/ResetTutorial"]
custom_minimum_size = Vector2(32, 0)
layout_mode = 2
[node name="ResetTutorialButton" type="Button" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/ResetTutorial"]
layout_mode = 2
text = "SETTINGS_TUTORIAL_RESET"
script = ExtResource("7_ftg2j")
[node name="DisableTutorial" type="HBoxContainer" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList"]
layout_mode = 2
[node name="Spacer" type="HSeparator" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DisableTutorial"]
custom_minimum_size = Vector2(32, 0)
layout_mode = 2
[node name="DisableTutorialButton" type="Button" parent="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DisableTutorial"]
layout_mode = 2
text = "SETTINGS_TUTORIAL_DISABLE"
script = ExtResource("8_stv84")
[node name="SETTINGS_GRAPHICS" type="MarginContainer" parent="TabContainer"]
visible = false
layout_mode = 2
@ -357,6 +395,8 @@ layout_mode = 2
theme_type_variation = &"AlertButton"
text = "UI_ACCEPT"
[connection signal="pressed" from="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/ResetTutorial/ResetTutorialButton" to="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/ResetTutorial/ResetTutorialButton" method="_on_pressed"]
[connection signal="pressed" from="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DisableTutorial/DisableTutorialButton" to="TabContainer/SETTINGS_GAME/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DisableTutorial/DisableTutorialButton" method="_on_pressed"]
[connection signal="pressed" from="SouthEast/HBoxContainer/CancelButton" to="." method="cancel"]
[connection signal="pressed" from="SouthEast/HBoxContainer/AcceptButton" to="." method="accept"]

View File

@ -0,0 +1,6 @@
extends Node
func _ready() -> void:
print("PROJECT SETTINGS")
print(ProjectSettings.get_property_list())

View File

@ -0,0 +1 @@
uid://duegbpkukv4e

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://db8w8eljku535"]
[ext_resource type="Script" uid="uid://duegbpkukv4e" path="res://utilities/sandbox/sandbox.gd" id="1_mxso2"]
[node name="Sandbox" type="Node"]
script = ExtResource("1_mxso2")