-
Notifications
You must be signed in to change notification settings - Fork 280
InkCombatRound6: Implement Sequential Filling Mechanic #1865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
russell-cj
wants to merge
9
commits into
main
Choose a base branch
from
issue_1847
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
03608a8
add barrel glow animation assets
russell-cj 566ebec
adjust BarrelGlow offset and initial visibility
russell-cj 4a51929
add BarrelUnlockSequence script
russell-cj d233f85
implement locking capability in FillingBarrel
russell-cj 1c1ec84
integrate sequential barrel mechanic
russell-cj 70c6083
Merge remote-tracking branch 'origin/main' into issue_1847
wjt e8f10d2
Merge branch 'main' of https://github.com/endlessm/threadbare into is…
russell-cj 09829a2
Merge branch 'main' of https://github.com/endlessm/threadbare into is…
russell-cj 713d161
address PR review feedback from wjt
russell-cj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...re_quests/quest_003/2_ink_drinker_levels/components/barrel_glow/barrel_glow.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
40
.../lore_quests/quest_003/2_ink_drinker_levels/components/barrel_glow/barrel_glow.png.import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [remap] | ||
|
|
||
| importer="texture" | ||
| type="CompressedTexture2D" | ||
| uid="uid://brranfy51i56n" | ||
| path="res://.godot/imported/barrel_glow.png-05ec822d59b536030b7c5094e7b8b456.ctex" | ||
| metadata={ | ||
| "vram_texture": false | ||
| } | ||
|
|
||
| [deps] | ||
|
|
||
| source_file="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/barrel_glow/barrel_glow.png" | ||
| dest_files=["res://.godot/imported/barrel_glow.png-05ec822d59b536030b7c5094e7b8b456.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 |
44 changes: 44 additions & 0 deletions
44
...es/quests/lore_quests/quest_003/2_ink_drinker_levels/components/barrel_unlock_sequence.gd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # SPDX-FileCopyrightText: The Threadbare Authors | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| class_name BarrelUnlockSequence | ||
| extends Node | ||
|
|
||
| @export var barrels: Array[FillingBarrel] | ||
| @export var auto_start: bool = true | ||
| @export var randomize_barrel_order: bool = false | ||
|
|
||
| var current_target_index: int = 0 | ||
|
|
||
|
|
||
| func _ready() -> void: | ||
| if auto_start: | ||
| start_sequence.call_deferred() | ||
|
|
||
|
|
||
| func start_sequence() -> void: | ||
| if barrels.is_empty(): | ||
| push_warning("BarrelUnlockSequence: No barrels assigned.") | ||
| return | ||
|
|
||
| if randomize_barrel_order: | ||
| barrels.shuffle() | ||
|
|
||
| for barrel in barrels: | ||
| if not barrel.completed.is_connected(_on_barrel_completed): | ||
| barrel.completed.connect(_on_barrel_completed) | ||
|
|
||
| # Initial state: all locked | ||
| barrel.is_locked = true | ||
|
|
||
| unlock_next_barrel() | ||
|
|
||
|
|
||
| func unlock_next_barrel() -> void: | ||
| if current_target_index < barrels.size(): | ||
| var target: FillingBarrel = barrels[current_target_index] | ||
| target.is_locked = false | ||
|
|
||
|
|
||
| func _on_barrel_completed() -> void: | ||
| current_target_index += 1 | ||
| unlock_next_barrel() |
1 change: 1 addition & 0 deletions
1
...uests/lore_quests/quest_003/2_ink_drinker_levels/components/barrel_unlock_sequence.gd.uid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| uid://en37d2lad0px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.