InitCommit

update 1.4.2 source code
This commit is contained in:
kaia
2024-02-03 18:36:09 -06:00
commit ece4ffd123
216 changed files with 79783 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2023 The Godot Engine community
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.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
[configuration]
entry_symbol = "git_plugin_init"
compatibility_minimum = "4.1.0"
[libraries]
macos.editor = "macos/libgit_plugin.macos.editor.universal.dylib"
windows.editor.x86_64 = "win64/libgit_plugin.windows.editor.x86_64.dll"
linux.editor.x86_64 = "linux/libgit_plugin.linux.editor.x86_64.so"
linux.editor.arm64 = "linux/libgit_plugin.linux.editor.arm64.so"
linux.editor.rv64 = ""

View File

@@ -0,0 +1,7 @@
[plugin]
name="Godot Git Plugin"
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki"
author="twaritwaikar"
version="v3.1.0"
script="godot-git-plugin.gd"

View File

@@ -0,0 +1,7 @@
[plugin]
name="ElgatoStreamDeck"
description="A plugin to interface with Elgato Stream Deck devices."
author="Boyne Games"
version="1.0.0"
script="plugin.gd"

View File

@@ -0,0 +1,12 @@
@tool
extends EditorPlugin
const AUTOLOAD_NAME = "ElgatoStreamDeck"
func _enter_tree():
add_autoload_singleton(AUTOLOAD_NAME, "res://addons/godot-streamdeck-addon/singleton.gd")
pass
func _exit_tree():
remove_autoload_singleton(AUTOLOAD_NAME)
pass

View File

@@ -0,0 +1,84 @@
extends Node
const ButtonAction = {
EMIT_SIGNAL = "games.boyne.godot.emitsignal",
SWITCH_SCENE = "games.boyne.godot.switchscene",
RELOAD_SCENE = "games.boyne.godot.reloadscene",
}
const ButtonEvent = {
KEY_UP = "keyUp",
KEY_DOWN = "keyDown"
}
signal on_key_up
signal on_key_down
const PLUGIN_NAME = "games.boyne.godot.sdPlugin"
const WEBSOCKET_URL = "127.0.0.1:%s/ws"
var _socket := WebSocketPeer.new()
var _config := ConfigFile.new()
func _ready() -> void:
if Saving.settings.has("useStreamDeck"):
if !Saving.settings["useStreamDeck"]:
return
else:
return
_load_config(_get_config_path())
_socket.connect_to_url(_get_websocket_url())
func _process(delta) -> void:
_socket.poll()
var state = _socket.get_ready_state()
match state:
WebSocketPeer.STATE_OPEN:
while _socket.get_available_packet_count():
var data = JSON.parse_string(_socket.get_packet().get_string_from_utf8())
if !(data.event == ButtonEvent.KEY_DOWN || data.event == ButtonEvent.KEY_UP):
return
if data != null && data.has("action") && data.has("payload"):
match data.action:
ButtonAction.EMIT_SIGNAL:
var signalInput = ""
if data.payload.settings.has("signalInput"):
signalInput = data.payload.settings.signalInput
match data.event:
ButtonEvent.KEY_UP:
on_key_up.emit(signalInput)
ButtonEvent.KEY_DOWN:
on_key_down.emit(signalInput)
ButtonAction.SWITCH_SCENE:
if data.payload.settings.has("scenePath"):
var scenePath = data.payload.settings.scenePath
get_tree().change_scene_to_file(scenePath)
ButtonAction.RELOAD_SCENE:
get_tree().reload_current_scene()
WebSocketPeer.STATE_CLOSING:
pass
WebSocketPeer.STATE_CLOSED:
set_process(false)
func _get_websocket_url() -> String:
return WEBSOCKET_URL % _config.get_value("bridge", "port", "8080")
func _get_config_path() -> String:
match OS.get_name():
"Windows":
return "%s/Elgato/StreamDeck/Plugins/%s/plugin.ini" % [OS.get_config_dir(), PLUGIN_NAME]
"macOS":
return "%s/com.elgato.StreamDeck/Plugins/%s/plugin.ini" % [OS.get_config_dir(), PLUGIN_NAME]
return ""
func _load_config(path: String) -> void:
var file = FileAccess.open(path, FileAccess.READ)
_config.parse(file.get_as_text())