Initial Commit

Initial commit of Code Base.
This commit is contained in:
Mario Steele 2025-06-12 14:31:14 -05:00
parent 293b1213e1
commit c11a4ebbc2
653 changed files with 36893 additions and 1 deletions

View file

@ -0,0 +1,31 @@
@icon("./scope-icon.svg")
@tool
extends Resource
## Contains the information about a set of scopes.
class_name OAuthScopes
## Called when new scopes was added or removed
signal scopes_changed
@export var used_scopes: Array[StringName] = []:
set(val):
used_scopes = val;
scopes_changed.emit()
## Returns the scopes space separated
func ssv_scopes() -> String:
return " ".join(used_scopes)
func add_scopes(scopes: Array[StringName]) -> void:
for scope in scopes:
if used_scopes.find(scope) != -1: continue
used_scopes.append(scope)
scopes_changed.emit()
func remove_scopes(scopes: Array[StringName]) -> void:
used_scopes = used_scopes.filter(func(s): return scopes.find(s) != -1)
scopes_changed.emit()