Skip to content

Commit 3081095

Browse files
committed
Refactor FlowKit actions and conditions for AudioStreamPlayer2D, enhancing functionality and adding new actions
- Added new actions: Pause, Play, Resume, Set Volume, and Stop for AudioStreamPlayer2D. - Updated existing action and condition scripts to include block_id parameter for better context handling. - Improved event handling in the editor UI to maintain insertion positions for comments and events. - Enhanced condition logic for "Only Once When Looped" to track execution state across frames. - Updated resource files to reflect changes in action and condition definitions. - Added default descriptions for various resources to improve clarity.
1 parent 4c00023 commit 3081095

65 files changed

Lines changed: 523 additions & 143 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

addons/flowkit/actions/AudioStreamPlayer/pause.gd renamed to addons/flowkit/actions/AudioStreamPlayer2D/pause.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func get_inputs() -> Array[Dictionary]:
1313
return []
1414

1515
func get_supported_types() -> Array[String]:
16-
return ["AudioStreamPlayer", "AudioStreamPlayer2D", "AudioStreamPlayer3D"]
16+
return ["AudioStreamPlayer2D"]
1717

18-
func execute(node: Node, inputs: Dictionary) -> void:
19-
if node and (node is AudioStreamPlayer or node is AudioStreamPlayer2D or node is AudioStreamPlayer3D):
18+
func execute(node: Node, inputs: Dictionary, block_id: String = "") -> void:
19+
if node and (node is AudioStreamPlayer2D):
2020
node.stream_paused = true

addons/flowkit/actions/AudioStreamPlayer/pause.gd.uid renamed to addons/flowkit/actions/AudioStreamPlayer2D/pause.gd.uid

File renamed without changes.

addons/flowkit/actions/AudioStreamPlayer/play.gd renamed to addons/flowkit/actions/AudioStreamPlayer2D/play.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func get_inputs() -> Array[Dictionary]:
1313
return []
1414

1515
func get_supported_types() -> Array[String]:
16-
return ["AudioStreamPlayer", "AudioStreamPlayer2D", "AudioStreamPlayer3D"]
16+
return ["AudioStreamPlayer2D"]
1717

18-
func execute(node: Node, inputs: Dictionary) -> void:
19-
if node and (node is AudioStreamPlayer or node is AudioStreamPlayer2D or node is AudioStreamPlayer3D):
18+
func execute(node: Node, inputs: Dictionary, block_id: String = "") -> void:
19+
if node and (node is AudioStreamPlayer2D):
2020
node.play()
File renamed without changes.

addons/flowkit/actions/AudioStreamPlayer/resume.gd renamed to addons/flowkit/actions/AudioStreamPlayer2D/resume.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func get_inputs() -> Array[Dictionary]:
1313
return []
1414

1515
func get_supported_types() -> Array[String]:
16-
return ["AudioStreamPlayer", "AudioStreamPlayer2D", "AudioStreamPlayer3D"]
16+
return ["AudioStreamPlayer2D"]
1717

18-
func execute(node: Node, inputs: Dictionary) -> void:
19-
if node and (node is AudioStreamPlayer or node is AudioStreamPlayer2D or node is AudioStreamPlayer3D):
18+
func execute(node: Node, inputs: Dictionary, block_id: String = "") -> void:
19+
if node and (node is AudioStreamPlayer2D):
2020
node.stream_paused = false

addons/flowkit/actions/AudioStreamPlayer/resume.gd.uid renamed to addons/flowkit/actions/AudioStreamPlayer2D/resume.gd.uid

File renamed without changes.

addons/flowkit/actions/AudioStreamPlayer/set_volume.gd renamed to addons/flowkit/actions/AudioStreamPlayer2D/set_volume.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ func get_inputs() -> Array[Dictionary]:
1515
]
1616

1717
func get_supported_types() -> Array[String]:
18-
return ["AudioStreamPlayer", "AudioStreamPlayer2D", "AudioStreamPlayer3D"]
18+
return ["AudioStreamPlayer2D"]
1919

20-
func execute(node: Node, inputs: Dictionary) -> void:
21-
if node and (node is AudioStreamPlayer or node is AudioStreamPlayer2D or node is AudioStreamPlayer3D):
20+
func execute(node: Node, inputs: Dictionary, block_id: String = "") -> void:
21+
if node and (node is AudioStreamPlayer2D):
2222
var volume_db: float = inputs.get("Volume (dB)", 0.0)
2323
node.volume_db = volume_db

addons/flowkit/actions/AudioStreamPlayer/set_volume.gd.uid renamed to addons/flowkit/actions/AudioStreamPlayer2D/set_volume.gd.uid

File renamed without changes.

addons/flowkit/actions/AudioStreamPlayer/stop.gd renamed to addons/flowkit/actions/AudioStreamPlayer2D/stop.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ func get_inputs() -> Array[Dictionary]:
1313
return []
1414

1515
func get_supported_types() -> Array[String]:
16-
return ["AudioStreamPlayer", "AudioStreamPlayer2D", "AudioStreamPlayer3D"]
16+
return ["AudioStreamPlayer2D"]
1717

18-
func execute(node: Node, inputs: Dictionary) -> void:
19-
if node and (node is AudioStreamPlayer or node is AudioStreamPlayer2D or node is AudioStreamPlayer3D):
18+
func execute(node: Node, inputs: Dictionary, block_id: String = "") -> void:
19+
if node and (node is AudioStreamPlayer2D):
2020
node.stop()
File renamed without changes.

0 commit comments

Comments
 (0)