Skip to content

Commit

Permalink
Merge pull request #178 from V-Sekai/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
fire committed Jul 21, 2024
2 parents c08c1b9 + aabc0d2 commit defcf66
Show file tree
Hide file tree
Showing 96 changed files with 4,763 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Run the editor with V-Sekai game macos",
"type": "lldb",
"request": "launch",
"args": ["--path", "/Users/ernest.lee/Documents/godot-merge-game-project", "-e"],
"args": ["--path", "${workspaceFolder}/11_vsekai_game", "-e"],
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/19_godot/bin/godot.macos.editor.double.arm64",
"preLaunchTask": "Godot Engine"
Expand Down
4 changes: 2 additions & 2 deletions 11_vsekai_game/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/V-Sekai/v-sekai-game.git
branch = main
commit = 7d5a7f79b38895a0819f7f7dec057b93edfb34c6
parent = 74fe94c2daa5a664b7c571caa10121bd264af4bc
commit = 3f4d5744d10cbd60e6b8c5ea232d0220c9008b1c
parent = 8e45fd024b8e072ebda6cb5accdd3f8b53a20c02
method = merge
cmdver = 0.4.6
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
gltf/naming_version=0
gltf/embedded_image_handling=1
21 changes: 21 additions & 0 deletions 11_vsekai_game/addons/godot_state_charts/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Jan Thomä

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions 11_vsekai_game/addons/godot_state_charts/all_of_guard.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@tool
@icon("all_of_guard.svg")

## A composite guard that is satisfied when all of its guards are satisfied.
class_name AllOfGuard
extends Guard

## The guards that need to be satisified. When empty, returns true.
@export var guards:Array[Guard] = []

func is_satisfied(context_transition:Transition, context_state:StateChartState) -> bool:
for guard in guards:
if not guard.is_satisfied(context_transition, context_state):
return false
return true
20 changes: 20 additions & 0 deletions 11_vsekai_game/addons/godot_state_charts/all_of_guard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions 11_vsekai_game/addons/godot_state_charts/all_of_guard.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://ux4ia8xhhjrx"
path="res://.godot/imported/all_of_guard.svg-49642db22a4a20844b2d39e67c930c8b.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}

[deps]

source_file="res://addons/godot_state_charts/all_of_guard.svg"
dest_files=["res://.godot/imported/all_of_guard.svg-49642db22a4a20844b2d39e67c930c8b.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
svg/scale=0.5
editor/scale_with_editor_scale=true
editor/convert_colors_with_editor_theme=false
62 changes: 62 additions & 0 deletions 11_vsekai_game/addons/godot_state_charts/animation_player_state.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@tool
@icon("animation_player_state.svg")
class_name AnimationPlayerState
extends AtomicState

## Animation player that this state will use.
@export_node_path("AnimationPlayer") var animation_player: NodePath:
set(value):
animation_player = value
update_configuration_warnings()

## The name of the animation that should be played when this state is entered.
## When this is empty, the name of this state will be used.
@export var animation_name: StringName = ""

## A custom blend time for the animation. The default value of -1.0 will use the
## default blend time of the animation player.
@export var custom_blend: float = -1.0

## A custom speed for the animation. Use negative values to play the animation
## backwards.
@export var custom_speed: float = 1.0

## Whether the animation should be played from the end.
@export var from_end: bool = false

var _animation_player: AnimationPlayer

func _ready():
if Engine.is_editor_hint():
return

super._ready()
_animation_player = get_node_or_null(animation_player)

if not is_instance_valid(_animation_player):
push_error("The animation player is invalid. This node will not work.")

func _state_enter(expect_transition: bool = false):
super._state_enter()

if not is_instance_valid(_animation_player):
return

var target_animation = animation_name
if target_animation == "":
target_animation = get_name()

if _animation_player.current_animation == target_animation and _animation_player.is_playing():
return

_animation_player.play(target_animation, custom_blend, custom_speed, from_end)

func _get_configuration_warnings():
var warnings = super._get_configuration_warnings()

if animation_player.is_empty():
warnings.append("No animation player is set.")
elif get_node_or_null(animation_player) == null:
warnings.append("The animation player path is invalid.")

return warnings
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,38 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://b3m20gsesp4i0"
path="res://.godot/imported/animation_player_state.svg-1acd03c414690dd7446458c5293935cb.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}

[deps]

source_file="res://addons/godot_state_charts/animation_player_state.svg"
dest_files=["res://.godot/imported/animation_player_state.svg-1acd03c414690dd7446458c5293935cb.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
svg/scale=0.5
editor/scale_with_editor_scale=true
editor/convert_colors_with_editor_theme=false
Loading

0 comments on commit defcf66

Please sign in to comment.