Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://1h7luv2b3rwl"
path="res://.godot/imported/cat.png-d91a2ea0fea88ffadcee4c4a4dc5f224.ctex"
uid="uid://cr5n8c0fgllsp"
path="res://.godot/imported/cat-idle.png-00bba386d154e3f9a187d21691b3c8d4.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scenes/game_elements/characters/npcs/cat/components/cat.png"
dest_files=["res://.godot/imported/cat.png-d91a2ea0fea88ffadcee4c4a4dc5f224.ctex"]
source_file="res://scenes/game_elements/characters/npcs/cat/components/cat-idle.png"
dest_files=["res://.godot/imported/cat-idle.png-00bba386d154e3f9a187d21691b3c8d4.ctex"]

[params]

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://b5tal2jyf0sob"
path="res://.godot/imported/cat-walk.png-101ff145a5d2986651fa1755fc537f8e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scenes/game_elements/characters/npcs/cat/components/cat-walk.png"
dest_files=["res://.godot/imported/cat-walk.png-101ff145a5d2986651fa1755fc537f8e.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
3 changes: 0 additions & 3 deletions scenes/game_elements/characters/npcs/cat/components/cat.png

This file was deleted.

143 changes: 127 additions & 16 deletions scenes/game_elements/characters/npcs/cat/components/cat.tres
Original file line number Diff line number Diff line change
@@ -1,46 +1,157 @@
[gd_resource type="SpriteFrames" format=3 uid="uid://caou2u7vffhei"]

[ext_resource type="Texture2D" uid="uid://1h7luv2b3rwl" path="res://scenes/game_elements/characters/npcs/cat/components/cat.png" id="1_qomc8"]
[ext_resource type="Texture2D" uid="uid://dywvbod2hs33q" path="res://scenes/world_map/components/cat-idle.png" id="1_jyuim"]
[ext_resource type="Texture2D" uid="uid://di4qwtf4ioswt" path="res://scenes/world_map/components/cat-walk.png" id="2_166jg"]

[sub_resource type="AtlasTexture" id="AtlasTexture_qomc8"]
atlas = ExtResource("1_qomc8")
[sub_resource type="AtlasTexture" id="AtlasTexture_tenf8"]
atlas = ExtResource("1_jyuim")
region = Rect2(0, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_jyuim"]
atlas = ExtResource("1_qomc8")
[sub_resource type="AtlasTexture" id="AtlasTexture_lo76y"]
atlas = ExtResource("1_jyuim")
region = Rect2(192, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_166jg"]
atlas = ExtResource("1_qomc8")
[sub_resource type="AtlasTexture" id="AtlasTexture_msvi7"]
atlas = ExtResource("1_jyuim")
region = Rect2(384, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_tenf8"]
atlas = ExtResource("1_qomc8")
[sub_resource type="AtlasTexture" id="AtlasTexture_xw0ji"]
atlas = ExtResource("1_jyuim")
region = Rect2(576, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_t5mip"]
atlas = ExtResource("1_jyuim")
region = Rect2(768, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_x13vw"]
atlas = ExtResource("1_jyuim")
region = Rect2(0, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_lo76y"]
atlas = ExtResource("1_qomc8")
[sub_resource type="AtlasTexture" id="AtlasTexture_136u0"]
atlas = ExtResource("1_jyuim")
region = Rect2(192, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_832k4"]
atlas = ExtResource("1_jyuim")
region = Rect2(384, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_eccmn"]
atlas = ExtResource("1_jyuim")
region = Rect2(576, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_digwo"]
atlas = ExtResource("1_jyuim")
region = Rect2(768, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_80j4i"]
atlas = ExtResource("2_166jg")
region = Rect2(0, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_40lpo"]
atlas = ExtResource("2_166jg")
region = Rect2(192, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_k5rrb"]
atlas = ExtResource("2_166jg")
region = Rect2(384, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_6a238"]
atlas = ExtResource("2_166jg")
region = Rect2(576, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_0em1p"]
atlas = ExtResource("2_166jg")
region = Rect2(768, 0, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_njb4j"]
atlas = ExtResource("2_166jg")
region = Rect2(0, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_4g5ks"]
atlas = ExtResource("2_166jg")
region = Rect2(192, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_oky0l"]
atlas = ExtResource("2_166jg")
region = Rect2(384, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_vji4d"]
atlas = ExtResource("2_166jg")
region = Rect2(576, 192, 192, 192)

[sub_resource type="AtlasTexture" id="AtlasTexture_tt2pf"]
atlas = ExtResource("2_166jg")
region = Rect2(768, 192, 192, 192)

[resource]
animations = [{
"frames": [{
"duration": 8.0,
"texture": SubResource("AtlasTexture_qomc8")
"texture": SubResource("AtlasTexture_tenf8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jyuim")
"texture": SubResource("AtlasTexture_lo76y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_166jg")
"texture": SubResource("AtlasTexture_msvi7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tenf8")
"texture": SubResource("AtlasTexture_xw0ji")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lo76y")
"texture": SubResource("AtlasTexture_t5mip")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x13vw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_136u0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_832k4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eccmn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_digwo")
}],
"loop": 1,
"name": &"idle",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_80j4i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_40lpo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k5rrb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6a238")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0em1p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_njb4j")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4g5ks")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_oky0l")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vji4d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tt2pf")
}],
"loop": 1,
"name": &"walk",
"speed": 5.0
}]
22 changes: 16 additions & 6 deletions scenes/game_logic/sequence_puzzle.gd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ func _ready() -> void:
_find_steps(self)

for step: SequencePuzzleStep in steps:
step.hint_sign.demonstrate_sequence.connect(_on_demonstrate_sequence.bind(step))
if step.hint_sign:
step.is_solved = step.hint_sign.is_solved
step.hint_sign.demonstrate_sequence.connect(_on_demonstrate_sequence.bind(step))

_update_current_step()

Expand All @@ -80,7 +82,7 @@ func _update_current_step() -> void:
var previous_step := _current_step
for i in range(_current_step, steps.size()):
# We find the next fire that is not solved, and that's the _current_step
if steps[i].hint_sign.is_solved:
if steps[i].is_solved:
_current_step = i + 1
_position = 0
else:
Expand All @@ -90,7 +92,8 @@ func _update_current_step() -> void:
progress_changed.emit()

if interactive_hints and _current_step < steps.size():
steps[_current_step].hint_sign.interactive_hint = true
if steps[_current_step].hint_sign:
steps[_current_step].hint_sign.interactive_hint = true


func _debug(fmt: String, args: Array = []) -> void:
Expand Down Expand Up @@ -123,7 +126,10 @@ func _on_kicked(object: SequencePuzzleObject) -> void:
return

_debug("Finished sequence")
step.hint_sign.set_solved()
step.is_solved = true

if step.hint_sign:
step.hint_sign.set_solved()

# Emit step_solved signal to allow level designers to react to individual step completion
step_solved.emit(_current_step)
Expand All @@ -145,7 +151,9 @@ func get_progress() -> int:
func set_progress(step: int) -> void:
for i in range(steps.size()):
if i <= step:
steps[i].hint_sign.is_solved = true
steps[i].is_solved = true
if steps[i].hint_sign:
steps[i].hint_sign.is_solved = true

_update_current_step()

Expand All @@ -157,4 +165,6 @@ func is_solved() -> bool:
func _on_demonstrate_sequence(step: SequencePuzzleStep) -> void:
for object in step.sequence:
await object.play()
step.hint_sign.demonstration_finished()

if step.hint_sign:
step.hint_sign.demonstration_finished()
5 changes: 2 additions & 3 deletions scenes/game_logic/sequence_puzzle_step.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ extends Node2D
hint_sign = new_value
update_configuration_warnings()

## Whether this step has been solved.
var is_solved: bool = false

func _get_configuration_warnings() -> PackedStringArray:
var warnings: PackedStringArray
Expand All @@ -25,7 +27,4 @@ func _get_configuration_warnings() -> PackedStringArray:
if sequence.find(null) != -1:
warnings.append("Sequence contains unset elements")

if not hint_sign:
warnings.append("Hint Sign not set")

return warnings
3 changes: 3 additions & 0 deletions scenes/world_map/components/cat-idle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions scenes/world_map/components/cat-idle.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dywvbod2hs33q"
path="res://.godot/imported/cat-idle.png-a525773d1b293488bb10ca8884ae10b7.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://scenes/world_map/components/cat-idle.png"
dest_files=["res://.godot/imported/cat-idle.png-a525773d1b293488bb10ca8884ae10b7.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
3 changes: 3 additions & 0 deletions scenes/world_map/components/cat-walk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading