diff --git a/Globals/StageProducer.cs b/Globals/StageProducer.cs index c3a01789..b2d42723 100644 --- a/Globals/StageProducer.cs +++ b/Globals/StageProducer.cs @@ -1,8 +1,7 @@ -using System; using System.Threading.Tasks; using FunkEngine; -using FunkEngine.Classes.MidiMaestro; using Godot; +using GodotSteam; /** * StageProducer: Handles scene transitions and persistent gameplay data. @@ -240,7 +239,7 @@ public override void _Input(InputEvent @event) { //Consume controller input, if window out of focus. //This handles ui_input, other scenes need to consume their own. - if (!GetWindow().HasFocus()) + if (ControlSettings.IsOutOfFocus(this)) { GetViewport().SetInputAsHandled(); return; diff --git a/Globals/SteamWhisperer.cs b/Globals/SteamWhisperer.cs new file mode 100644 index 00000000..569ad152 --- /dev/null +++ b/Globals/SteamWhisperer.cs @@ -0,0 +1,99 @@ +using Godot; +using GodotSteam; + +public partial class SteamWhisperer : Node +{ + private const uint AppId = 3647600; + + public static bool IsOverlayActive = false; + + private static int placedNotes = 0; + + public override void _EnterTree() + { + OS.SetEnvironment("SteamAppId", AppId.ToString()); + OS.SetEnvironment("SteamGameId", AppId.ToString()); + } + + public override void _ExitTree() + { + if (!Steam.IsSteamRunning()) + return; + Steam.StoreStats(); + GD.Print("SW: Steam shut down."); + } + + public override void _Ready() + { + if (!Steam.SteamInit(AppId, true)) + { + GD.PrintErr( + "SW: here was an error initializing Steam. No Steam features will be available." + ); + return; + } + + GD.Print("SW: Steam initialized successfully."); + Steam.OverlayToggled += (active, _, _) => + { + IsOverlayActive = active; + }; + + //Pull in stats + placedNotes = Steam.GetStatInt("NotesPlaced"); + GD.Print($"SW: Placed notes: {placedNotes}"); + + //Uncomment this to reset your achievements/stats. There's no confirmation so... + //ResetAll(); + } + + //TODO: This might fail sometimes? IDK, need to look into it + public static bool PopAchievement(string id) + { + if (!Steam.IsSteamRunning()) + { + return false; + } + + if (Steam.SetAchievement(id) && Steam.StoreStats()) + { + GD.Print($"SW: Unlocked {id}."); + return true; + } + + GD.PrintErr($"SW: Failed to set achievement {id}."); + return false; + } + + //Should make this more generic, but we only have one stat + public static bool IncrementNoteCount() + { + if (!Steam.IsSteamRunning()) + { + return false; + } + + placedNotes++; + + if (Steam.SetStatInt("NotesPlaced", placedNotes) && Steam.StoreStats()) + { + GD.Print($"SW: Incremented placed notes to {placedNotes}."); + return true; + } + GD.PrintErr($"SW: Failed to increment placed notes to {placedNotes}."); + return false; + } + + //For Debugging purposes. Resets all stats/ achievements + private static void ResetAll() + { + if (!Steam.IsSteamRunning()) + { + return; + } + + Steam.ResetAllStats(true); + Steam.StoreStats(); + GD.Print("SW: All stats reset."); + } +} diff --git a/Globals/SteamWhisperer.cs.uid b/Globals/SteamWhisperer.cs.uid new file mode 100644 index 00000000..529be054 --- /dev/null +++ b/Globals/SteamWhisperer.cs.uid @@ -0,0 +1 @@ +uid://bt4f7m5qx106a diff --git a/Scenes/BattleDirector/Scripts/BattleDirector.cs b/Scenes/BattleDirector/Scripts/BattleDirector.cs index 4a228c1f..b43993fa 100644 --- a/Scenes/BattleDirector/Scripts/BattleDirector.cs +++ b/Scenes/BattleDirector/Scripts/BattleDirector.cs @@ -558,6 +558,7 @@ public class NoteHitArgs(BattleDirector bd, Note note, Timing timing) : BattleEv public void InvokeNotePlaced(ArrowData data) { + SteamWhisperer.IncrementNoteCount(); NotePlaced?.Invoke(new NoteEventArgs(_curDirector, data)); } diff --git a/Scenes/Maps/Scripts/Cartographer.cs b/Scenes/Maps/Scripts/Cartographer.cs index b60a8a17..40ee25be 100644 --- a/Scenes/Maps/Scripts/Cartographer.cs +++ b/Scenes/Maps/Scripts/Cartographer.cs @@ -174,6 +174,12 @@ private void WinArea() return; } + //Achievement code for emptyPockets + if (StageProducer.PlayerStats.CurRelics.Length == 0) + { + SteamWhisperer.PopAchievement("emptyPockets"); + } + EndScreen es = GD.Load(EndScreen.LoadPath).Instantiate(); AddChild(es); es.TopLabel.Text = Tr("BATTLE_ROOM_WIN"); diff --git a/Scenes/Puppets/Enemies/BossBlood/P_BossBlood.cs b/Scenes/Puppets/Enemies/BossBlood/P_BossBlood.cs index 632287ae..0e2154ad 100644 --- a/Scenes/Puppets/Enemies/BossBlood/P_BossBlood.cs +++ b/Scenes/Puppets/Enemies/BossBlood/P_BossBlood.cs @@ -31,6 +31,23 @@ public override void _Ready() eff.Owner.Heal(val); } ), + new EnemyEffect( + this, + BattleEffectTrigger.OnDamageInstance, + 1, + (e, eff, val) => + { + if (e is not BattleDirector.Harbinger.OnDamageInstanceArgs dArgs) + return; + if ( + dArgs.Dmg.Target == this + && dArgs.Dmg.Target.GetCurrentHealth() <= dArgs.Dmg.Damage + ) + { + SteamWhisperer.PopAchievement("actOneComp"); + } + } + ), }; } } diff --git a/Scenes/Puppets/Enemies/Strawman/P_Strawman.cs b/Scenes/Puppets/Enemies/Strawman/P_Strawman.cs index 9cf1c985..564f9a08 100644 --- a/Scenes/Puppets/Enemies/Strawman/P_Strawman.cs +++ b/Scenes/Puppets/Enemies/Strawman/P_Strawman.cs @@ -102,6 +102,7 @@ public override void _Ready() ) { SaveSystem.UpdateConfig(SaveSystem.ConfigSettings.FirstTime, false); + SteamWhisperer.PopAchievement("tutorial"); } } ), diff --git a/Scenes/Puppets/Scripts/PlayerStats.cs b/Scenes/Puppets/Scripts/PlayerStats.cs index 237aa5ca..b42d979a 100644 --- a/Scenes/Puppets/Scripts/PlayerStats.cs +++ b/Scenes/Puppets/Scripts/PlayerStats.cs @@ -44,6 +44,15 @@ public void AddRelic(RelicTemplate relic) public void AddNote(Note nSelection) { + //If the note is vampire, check to see if we already have 2 of them + if ( + nSelection.Name == "PlayerVampire" + && CurNotes.Count(note => note.Name == "PlayerVampire") >= 2 + ) + { + SteamWhisperer.PopAchievement("vampire"); + } + CurNotes = CurNotes.Append(nSelection).ToArray(); } } diff --git a/Scenes/UI/Options/Scripts/HowToPlay.cs b/Scenes/UI/Options/Scripts/HowToPlay.cs index 8e157664..9fae60c5 100644 --- a/Scenes/UI/Options/Scripts/HowToPlay.cs +++ b/Scenes/UI/Options/Scripts/HowToPlay.cs @@ -52,7 +52,7 @@ private void DoTutorial() public override void _Input(InputEvent @event) { - if (!GetWindow().HasFocus()) + if (ControlSettings.IsOutOfFocus(this)) { GetViewport().SetInputAsHandled(); return; diff --git a/Scenes/UI/Options/Scripts/OptionsMenu.cs b/Scenes/UI/Options/Scripts/OptionsMenu.cs index 22eeb316..0748aeec 100644 --- a/Scenes/UI/Options/Scripts/OptionsMenu.cs +++ b/Scenes/UI/Options/Scripts/OptionsMenu.cs @@ -50,7 +50,7 @@ public override void _Ready() public override void _Input(InputEvent @event) { - if (!GetWindow().HasFocus()) + if (ControlSettings.IsOutOfFocus(this)) { GetViewport().SetInputAsHandled(); return; diff --git a/Scenes/UI/Remapping/ControlSettings.cs b/Scenes/UI/Remapping/ControlSettings.cs index fad7176b..180e9e6d 100644 --- a/Scenes/UI/Remapping/ControlSettings.cs +++ b/Scenes/UI/Remapping/ControlSettings.cs @@ -3,6 +3,7 @@ using System.Globalization; using FunkEngine; using Godot; +using GodotSteam; public partial class ControlSettings : Node2D, IFocusableMenu { //TODO: Add messages when an invalid key is attempted to be set. @@ -465,4 +466,9 @@ evt is InputEventKey keyEvent } return true; } + + public static bool IsOutOfFocus(Node asker) + { + return !asker.GetWindow().HasFocus() || SteamWhisperer.IsOverlayActive; + } } diff --git a/Scenes/UI/Scripts/Inventory.cs b/Scenes/UI/Scripts/Inventory.cs index e27cff85..71dd4d93 100644 --- a/Scenes/UI/Scripts/Inventory.cs +++ b/Scenes/UI/Scripts/Inventory.cs @@ -55,7 +55,7 @@ public override void _Process(double delta) public override void _Input(InputEvent @event) { - if (!GetWindow().HasFocus()) + if (ControlSettings.IsOutOfFocus(this)) { GetViewport().SetInputAsHandled(); return; diff --git a/Scenes/UI/Scripts/MenuModule.cs b/Scenes/UI/Scripts/MenuModule.cs index 1af6a348..03986660 100644 --- a/Scenes/UI/Scripts/MenuModule.cs +++ b/Scenes/UI/Scripts/MenuModule.cs @@ -1,5 +1,6 @@ using FunkEngine; using Godot; +using GodotSteam; /** * Simple system for any scene which should display pause and inventory screen. @@ -19,6 +20,12 @@ public override void _Ready() OpenPauseMenu(); //Pause on disconnection }; GetTree().GetRoot().FocusExited += OpenPauseMenu; + Steam.OverlayToggled += OpenPauseMenu; + } + + public override void _ExitTree() + { + Steam.OverlayToggled -= OpenPauseMenu; } public void ResumeFocus() @@ -49,7 +56,7 @@ public void ReturnToPrev() public override void _Input(InputEvent @event) { - if (!GetWindow().HasFocus()) + if (ControlSettings.IsOutOfFocus(this)) { GetViewport().SetInputAsHandled(); return; @@ -69,6 +76,12 @@ public override void _Input(InputEvent @event) } } + private void OpenPauseMenu(bool active, bool initiated = false, uint id = 0) + { + if (active) + OpenPauseMenu(); + } + private void OpenPauseMenu() { if (CurSceneNode.ProcessMode == ProcessModeEnum.Disabled) diff --git a/Scenes/UI/Scripts/PauseMenu.cs b/Scenes/UI/Scripts/PauseMenu.cs index afe5b95f..6fe23493 100644 --- a/Scenes/UI/Scripts/PauseMenu.cs +++ b/Scenes/UI/Scripts/PauseMenu.cs @@ -29,7 +29,7 @@ private void OpenOptions() public override void _Input(InputEvent @event) { - if (!GetWindow().HasFocus()) + if (ControlSettings.IsOutOfFocus(this)) { GetViewport().SetInputAsHandled(); return; diff --git a/Scenes/UI/Scripts/ScoringScreen.cs b/Scenes/UI/Scripts/ScoringScreen.cs index 8aa47176..a37d24e2 100644 --- a/Scenes/UI/Scripts/ScoringScreen.cs +++ b/Scenes/UI/Scripts/ScoringScreen.cs @@ -154,6 +154,13 @@ private void DrawScoreLabels() private void FinishScoring() { StageProducer.PlayerStats.Money += FinalMoney; + + //Achievement check for 1k money + if (StageProducer.PlayerStats.Money >= 1000) + { + SteamWhisperer.PopAchievement("money"); + } + Finished?.Invoke(); QueueFree(); } diff --git a/addons/godotsteam/godotsteam.gdextension b/addons/godotsteam/godotsteam.gdextension new file mode 100644 index 00000000..5917bede --- /dev/null +++ b/addons/godotsteam/godotsteam.gdextension @@ -0,0 +1,22 @@ +[configuration] +entry_symbol = "godotsteam_init" +compatibility_minimum = "4.4" + +[libraries] +macos.debug = "res://addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework" +macos.release = "res://addons/godotsteam/osx/libgodotsteam.macos.template_release.framework" +windows.debug.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll" +windows.debug.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll" +windows.release.x86_64 = "res://addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll" +windows.release.x86_32 = "res://addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll" +linux.debug.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so" +linux.debug.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so" +linux.release.x86_64 = "res://addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so" +linux.release.x86_32 = "res://addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so" + +[dependencies] +macos.universal = { "res://addons/godotsteam/osx/libsteam_api.dylib": "" } +windows.x86_64 = { "res://addons/godotsteam/win64/steam_api64.dll": "" } +windows.x86_32 = { "res://addons/godotsteam/win32/steam_api.dll": "" } +linux.x86_64 = { "res://addons/godotsteam/linux64/libsteam_api.so": "" } +linux.x86_32 = { "res://addons/godotsteam/linux32/libsteam_api.so": "" } diff --git a/addons/godotsteam/godotsteam.gdextension.uid b/addons/godotsteam/godotsteam.gdextension.uid new file mode 100644 index 00000000..17b1dc04 --- /dev/null +++ b/addons/godotsteam/godotsteam.gdextension.uid @@ -0,0 +1 @@ +uid://ue83e761t35n diff --git a/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so b/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so new file mode 100644 index 00000000..00be7c5f Binary files /dev/null and b/addons/godotsteam/linux32/libgodotsteam.linux.template_debug.x86_32.so differ diff --git a/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so b/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so new file mode 100644 index 00000000..658694b1 Binary files /dev/null and b/addons/godotsteam/linux32/libgodotsteam.linux.template_release.x86_32.so differ diff --git a/addons/godotsteam/linux32/libsteam_api.so b/addons/godotsteam/linux32/libsteam_api.so new file mode 100644 index 00000000..2d9e8a72 Binary files /dev/null and b/addons/godotsteam/linux32/libsteam_api.so differ diff --git a/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so b/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so new file mode 100644 index 00000000..045b00d6 Binary files /dev/null and b/addons/godotsteam/linux64/libgodotsteam.linux.template_debug.x86_64.so differ diff --git a/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so b/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so new file mode 100644 index 00000000..b273ec79 Binary files /dev/null and b/addons/godotsteam/linux64/libgodotsteam.linux.template_release.x86_64.so differ diff --git a/addons/godotsteam/linux64/libsteam_api.so b/addons/godotsteam/linux64/libsteam_api.so new file mode 100644 index 00000000..8783570d Binary files /dev/null and b/addons/godotsteam/linux64/libsteam_api.so differ diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/Resources/Info.plist b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/Resources/Info.plist new file mode 100644 index 00000000..68caf2bb --- /dev/null +++ b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + libgodotsteam.debug + CFBundleIdentifier + org.godotsteam.godotsteam + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + libgodotsteam.debug + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.15 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 4.15 + LSMinimumSystemVersion + 10.12 + + \ No newline at end of file diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libgodotsteam.macos.template_debug b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libgodotsteam.macos.template_debug new file mode 100644 index 00000000..8a8b2b7b Binary files /dev/null and b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libgodotsteam.macos.template_debug differ diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libsteam_api.dylib b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libsteam_api.dylib new file mode 100644 index 00000000..c493b2b5 Binary files /dev/null and b/addons/godotsteam/osx/libgodotsteam.macos.template_debug.framework/libsteam_api.dylib differ diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/Resources/Info.plist b/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/Resources/Info.plist new file mode 100644 index 00000000..e3e8dac1 --- /dev/null +++ b/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + libgodotsteam + CFBundleIdentifier + org.godotsteam.godotsteam + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + libgodotsteam + CFBundlePackageType + FMWK + CFBundleShortVersionString + 4.15 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 4.15 + LSMinimumSystemVersion + 10.12 + + \ No newline at end of file diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libgodotsteam.macos.template_release b/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libgodotsteam.macos.template_release new file mode 100644 index 00000000..ce91b3e3 Binary files /dev/null and b/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libgodotsteam.macos.template_release differ diff --git a/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libsteam_api.dylib b/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libsteam_api.dylib new file mode 100644 index 00000000..c493b2b5 Binary files /dev/null and b/addons/godotsteam/osx/libgodotsteam.macos.template_release.framework/libsteam_api.dylib differ diff --git a/addons/godotsteam/osx/libsteam_api.dylib b/addons/godotsteam/osx/libsteam_api.dylib new file mode 100644 index 00000000..c493b2b5 Binary files /dev/null and b/addons/godotsteam/osx/libsteam_api.dylib differ diff --git a/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll b/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll new file mode 100644 index 00000000..cebcc9bd Binary files /dev/null and b/addons/godotsteam/win32/libgodotsteam.windows.template_debug.x86_32.dll differ diff --git a/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll b/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll new file mode 100644 index 00000000..21c3a1ef Binary files /dev/null and b/addons/godotsteam/win32/libgodotsteam.windows.template_release.x86_32.dll differ diff --git a/addons/godotsteam/win32/steam_api.dll b/addons/godotsteam/win32/steam_api.dll new file mode 100644 index 00000000..2372ab1f Binary files /dev/null and b/addons/godotsteam/win32/steam_api.dll differ diff --git a/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll b/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll new file mode 100644 index 00000000..3d028484 Binary files /dev/null and b/addons/godotsteam/win64/libgodotsteam.windows.template_debug.x86_64.dll differ diff --git a/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll b/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll new file mode 100644 index 00000000..6bb49b3c Binary files /dev/null and b/addons/godotsteam/win64/libgodotsteam.windows.template_release.x86_64.dll differ diff --git a/addons/godotsteam/win64/steam_api64.dll b/addons/godotsteam/win64/steam_api64.dll new file mode 100644 index 00000000..6d118254 Binary files /dev/null and b/addons/godotsteam/win64/steam_api64.dll differ diff --git a/addons/godotsteam_csharpbindings/Apps/Dlc.cs b/addons/godotsteam_csharpbindings/Apps/Dlc.cs new file mode 100644 index 00000000..4b8ff667 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/Dlc.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public class Dlc +{ + public uint AppId { get; set; } + public bool Available { get; set; } + public string Name { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Apps/Dlc.cs.uid b/addons/godotsteam_csharpbindings/Apps/Dlc.cs.uid new file mode 100644 index 00000000..938503fc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/Dlc.cs.uid @@ -0,0 +1 @@ +uid://ck0g3t7wpau3w diff --git a/addons/godotsteam_csharpbindings/Apps/DlcDownloadProgress.cs b/addons/godotsteam_csharpbindings/Apps/DlcDownloadProgress.cs new file mode 100644 index 00000000..2d288d2c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/DlcDownloadProgress.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public class DlcDownloadProgress +{ + public bool Ret { get; set; } + public ulong Downloaded { get; set; } + public ulong Total { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Apps/DlcDownloadProgress.cs.uid b/addons/godotsteam_csharpbindings/Apps/DlcDownloadProgress.cs.uid new file mode 100644 index 00000000..37eb740a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/DlcDownloadProgress.cs.uid @@ -0,0 +1 @@ +uid://5rddlaexp6hq diff --git a/addons/godotsteam_csharpbindings/Apps/InstalledApps.cs b/addons/godotsteam_csharpbindings/Apps/InstalledApps.cs new file mode 100644 index 00000000..b2951745 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/InstalledApps.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class InstalledApps +{ + public string Directory { get; set; } + public uint InstallSize { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Apps/InstalledApps.cs.uid b/addons/godotsteam_csharpbindings/Apps/InstalledApps.cs.uid new file mode 100644 index 00000000..e3864e67 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/InstalledApps.cs.uid @@ -0,0 +1 @@ +uid://bljidrnl07rcs diff --git a/addons/godotsteam_csharpbindings/Apps/TimedTrial.cs b/addons/godotsteam_csharpbindings/Apps/TimedTrial.cs new file mode 100644 index 00000000..879092bf --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/TimedTrial.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class TimedTrial +{ + public uint SecondsAllowed { get; set; } + public uint SecondsPlayed { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Apps/TimedTrial.cs.uid b/addons/godotsteam_csharpbindings/Apps/TimedTrial.cs.uid new file mode 100644 index 00000000..99d1023d --- /dev/null +++ b/addons/godotsteam_csharpbindings/Apps/TimedTrial.cs.uid @@ -0,0 +1 @@ +uid://b7c4do2nj0fsk diff --git a/addons/godotsteam_csharpbindings/Friends/AvatarSize.cs b/addons/godotsteam_csharpbindings/Friends/AvatarSize.cs new file mode 100644 index 00000000..3ac505d4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/AvatarSize.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public enum AvatarSize +{ + Small = 1, + Medium = 2, + Large = 3, +} diff --git a/addons/godotsteam_csharpbindings/Friends/AvatarSize.cs.uid b/addons/godotsteam_csharpbindings/Friends/AvatarSize.cs.uid new file mode 100644 index 00000000..b0494b62 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/AvatarSize.cs.uid @@ -0,0 +1 @@ +uid://bj8pu5fcyh1p4 diff --git a/addons/godotsteam_csharpbindings/Friends/ChatRoomEnterResponse.cs b/addons/godotsteam_csharpbindings/Friends/ChatRoomEnterResponse.cs new file mode 100644 index 00000000..dd689958 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ChatRoomEnterResponse.cs @@ -0,0 +1,17 @@ +namespace GodotSteam; + +public enum ChatRoomEnterResponse +{ + Success = 1, + DoesntExist = 2, + NotAllowed = 3, + Full = 4, + Error = 5, + Banned = 6, + Limited = 7, + ClanDisabled = 8, + CommunityBan = 9, + MemberBlockedYou = 10, + YouBlockedMember = 11, + RateLimitExceeded = 15, +} diff --git a/addons/godotsteam_csharpbindings/Friends/ChatRoomEnterResponse.cs.uid b/addons/godotsteam_csharpbindings/Friends/ChatRoomEnterResponse.cs.uid new file mode 100644 index 00000000..e5539d9f --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ChatRoomEnterResponse.cs.uid @@ -0,0 +1 @@ +uid://brocvjixqno6o diff --git a/addons/godotsteam_csharpbindings/Friends/ClanActivityCounts.cs b/addons/godotsteam_csharpbindings/Friends/ClanActivityCounts.cs new file mode 100644 index 00000000..2d04d72b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanActivityCounts.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public class ClanActivityCounts +{ + public ulong Clan { get; set; } + public int Online { get; set; } + public int Ingame { get; set; } + public int Chatting { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/ClanActivityCounts.cs.uid b/addons/godotsteam_csharpbindings/Friends/ClanActivityCounts.cs.uid new file mode 100644 index 00000000..af3259f4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanActivityCounts.cs.uid @@ -0,0 +1 @@ +uid://cweigqo0cyi0k diff --git a/addons/godotsteam_csharpbindings/Friends/ClanChatMessage.cs b/addons/godotsteam_csharpbindings/Friends/ClanChatMessage.cs new file mode 100644 index 00000000..2acd941b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanChatMessage.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public class ClanChatMessage +{ + public bool Ret { get; set; } + public string Text { get; set; } + public ClanChatMessageType Type { get; set; } + public ulong Chatter { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/ClanChatMessage.cs.uid b/addons/godotsteam_csharpbindings/Friends/ClanChatMessage.cs.uid new file mode 100644 index 00000000..409f76f2 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanChatMessage.cs.uid @@ -0,0 +1 @@ +uid://v7tlrri6l22c diff --git a/addons/godotsteam_csharpbindings/Friends/ClanChatMessageType.cs b/addons/godotsteam_csharpbindings/Friends/ClanChatMessageType.cs new file mode 100644 index 00000000..e0ab923b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanChatMessageType.cs @@ -0,0 +1,17 @@ +namespace GodotSteam; + +public enum ClanChatMessageType +{ + Invalid = 0, + ChatMessage = 1, + Typing = 2, + InviteGame = 3, + Emote = 4, + LeftConversation = 6, + Entered = 7, + WasKicked = 8, + WasBanned = 9, + Disconnected = 10, + HistoricalChat = 11, + LinkBlocked = 14, +} diff --git a/addons/godotsteam_csharpbindings/Friends/ClanChatMessageType.cs.uid b/addons/godotsteam_csharpbindings/Friends/ClanChatMessageType.cs.uid new file mode 100644 index 00000000..59dbacee --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanChatMessageType.cs.uid @@ -0,0 +1 @@ +uid://cwbj36arl2ifh diff --git a/addons/godotsteam_csharpbindings/Friends/ClanOfficer.cs b/addons/godotsteam_csharpbindings/Friends/ClanOfficer.cs new file mode 100644 index 00000000..c311e4aa --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanOfficer.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class ClanOfficer +{ + public ulong Id { get; set; } + public string Name { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/ClanOfficer.cs.uid b/addons/godotsteam_csharpbindings/Friends/ClanOfficer.cs.uid new file mode 100644 index 00000000..edd4f0b7 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ClanOfficer.cs.uid @@ -0,0 +1 @@ +uid://wr36i3odho8q diff --git a/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemProperty.cs b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemProperty.cs new file mode 100644 index 00000000..e73713c8 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemProperty.cs @@ -0,0 +1,17 @@ +namespace GodotSteam; + +public enum CommunityProfileItemProperty +{ + ImageSmall = 0, + ImageLarge = 1, + InternalName = 2, + Title = 3, + Description = 4, + AppId = 5, + TypeId = 6, + Class = 7, + MovieWebm = 8, + MovieMp4 = 9, + MovieWebmSmall = 10, + MovieMp4Small = 11, +} diff --git a/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemProperty.cs.uid b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemProperty.cs.uid new file mode 100644 index 00000000..13a72b2a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemProperty.cs.uid @@ -0,0 +1 @@ +uid://ddk3sfcg0hewu diff --git a/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemType.cs b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemType.cs new file mode 100644 index 00000000..3882fd90 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemType.cs @@ -0,0 +1,10 @@ +namespace GodotSteam; + +public enum CommunityProfileItemType +{ + AnimatedAvatar = 0, + AvatarFrame = 1, + ProfileModifier = 2, + ProfileBackground = 3, + MiniProfileBackground = 4, +} diff --git a/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemType.cs.uid b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemType.cs.uid new file mode 100644 index 00000000..5773636d --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/CommunityProfileItemType.cs.uid @@ -0,0 +1 @@ +uid://ceej0eif4homl diff --git a/addons/godotsteam_csharpbindings/Friends/Follow.cs b/addons/godotsteam_csharpbindings/Friends/Follow.cs new file mode 100644 index 00000000..14ff9185 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/Follow.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class Follow +{ + public int Num { get; set; } + public ulong Id { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/Follow.cs.uid b/addons/godotsteam_csharpbindings/Friends/Follow.cs.uid new file mode 100644 index 00000000..af7c2a7f --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/Follow.cs.uid @@ -0,0 +1 @@ +uid://eii8sbrpa1se diff --git a/addons/godotsteam_csharpbindings/Friends/Friend.cs b/addons/godotsteam_csharpbindings/Friends/Friend.cs new file mode 100644 index 00000000..37623ab7 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/Friend.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public class Friend +{ + public ulong Id { get; set; } + public string Name { get; set; } + public PersonaState Status { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/Friend.cs.uid b/addons/godotsteam_csharpbindings/Friends/Friend.cs.uid new file mode 100644 index 00000000..1751ce91 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/Friend.cs.uid @@ -0,0 +1 @@ +uid://bsuq1hrqmfdm2 diff --git a/addons/godotsteam_csharpbindings/Friends/FriendFlag.cs b/addons/godotsteam_csharpbindings/Friends/FriendFlag.cs new file mode 100644 index 00000000..1f5e4fbb --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/FriendFlag.cs @@ -0,0 +1,18 @@ +namespace GodotSteam; + +[System.Flags] +public enum FriendFlag +{ + None = 0x00, + Blocked = 0x01, + FriendshipRequested = 0x02, + Immediate = 0x04, + ClanMember = 0x08, + OnGameServer = 0x10, + RequestingFriendship = 0x80, + RequestingInfo = 0x100, + Ignored = 0x200, + IgnoredFriend = 0x400, + ChatMember = 0x0000, + All = 0xFFFF, +} diff --git a/addons/godotsteam_csharpbindings/Friends/FriendFlag.cs.uid b/addons/godotsteam_csharpbindings/Friends/FriendFlag.cs.uid new file mode 100644 index 00000000..300c36ea --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/FriendFlag.cs.uid @@ -0,0 +1 @@ +uid://dtcarpwof1t4c diff --git a/addons/godotsteam_csharpbindings/Friends/FriendGroup.cs b/addons/godotsteam_csharpbindings/Friends/FriendGroup.cs new file mode 100644 index 00000000..92d87249 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/FriendGroup.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public class FriendGroup +{ + public short Id { get; set; } + public string Name { get; set; } + public int Members { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/FriendGroup.cs.uid b/addons/godotsteam_csharpbindings/Friends/FriendGroup.cs.uid new file mode 100644 index 00000000..69599e2e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/FriendGroup.cs.uid @@ -0,0 +1 @@ +uid://ovo8uaggl5sv diff --git a/addons/godotsteam_csharpbindings/Friends/FriendRelationship.cs b/addons/godotsteam_csharpbindings/Friends/FriendRelationship.cs new file mode 100644 index 00000000..2f65ba71 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/FriendRelationship.cs @@ -0,0 +1,14 @@ +namespace GodotSteam; + +public enum FriendRelationship +{ + None = 0, + Blocked = 1, + RequestRecipient = 2, + Friend = 3, + RequestInitiator = 4, + Ignored = 5, + IgnoredFriend = 6, + Suggested = 7, + Max = 8, +} diff --git a/addons/godotsteam_csharpbindings/Friends/FriendRelationship.cs.uid b/addons/godotsteam_csharpbindings/Friends/FriendRelationship.cs.uid new file mode 100644 index 00000000..915dcdbe --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/FriendRelationship.cs.uid @@ -0,0 +1 @@ +uid://byfft28eek76g diff --git a/addons/godotsteam_csharpbindings/Friends/GameOverlayType.cs b/addons/godotsteam_csharpbindings/Friends/GameOverlayType.cs new file mode 100644 index 00000000..d32de4dc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/GameOverlayType.cs @@ -0,0 +1,36 @@ +using System; + +namespace GodotSteam; + +public enum GameOverlayType +{ + Default, + Friends, + Community, + Players, + Settings, + OfficalGameGroup, + Stats, + Achievements, + LobbyInvite, +} + +public static class GameOverlayTypeExtensions +{ + public static string ToGodotSteam(this GameOverlayType type) + { + return type switch + { + GameOverlayType.Default => "", + GameOverlayType.Friends => "Friends", + GameOverlayType.Community => "Community", + GameOverlayType.Players => "Players", + GameOverlayType.Settings => "Settings", + GameOverlayType.OfficalGameGroup => "OfficalGameGroup", + GameOverlayType.Stats => "Stats", + GameOverlayType.Achievements => "Achievements", + GameOverlayType.LobbyInvite => "LobbyInvite", + _ => throw new ArgumentException("Invalid GameOverlayType"), + }; + } +} diff --git a/addons/godotsteam_csharpbindings/Friends/GameOverlayType.cs.uid b/addons/godotsteam_csharpbindings/Friends/GameOverlayType.cs.uid new file mode 100644 index 00000000..53769a74 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/GameOverlayType.cs.uid @@ -0,0 +1 @@ +uid://diaxsml10ay8k diff --git a/addons/godotsteam_csharpbindings/Friends/GameOverlayUserType.cs b/addons/godotsteam_csharpbindings/Friends/GameOverlayUserType.cs new file mode 100644 index 00000000..074d1de5 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/GameOverlayUserType.cs @@ -0,0 +1,36 @@ +using System; + +namespace GodotSteam; + +public enum GameOverlayUserType +{ + SteamId, + Chat, + JoinTrade, + Stats, + Achievements, + FriendAdd, + FriendRemove, + FriendRequestAccept, + FriendRequestIgnore, +} + +public static class GameOverlayUserTypeExtensions +{ + public static string ToGodotSteam(this GameOverlayUserType type) + { + return type switch + { + GameOverlayUserType.SteamId => "steamid", + GameOverlayUserType.Chat => "chat", + GameOverlayUserType.JoinTrade => "jointrade", + GameOverlayUserType.Stats => "stats", + GameOverlayUserType.Achievements => "achievements", + GameOverlayUserType.FriendAdd => "friendadd", + GameOverlayUserType.FriendRemove => "friendremove", + GameOverlayUserType.FriendRequestAccept => "friendrequestaccept", + GameOverlayUserType.FriendRequestIgnore => "friendrequestignore", + _ => throw new ArgumentException("Invalid GameOverlayUserType"), + }; + } +} diff --git a/addons/godotsteam_csharpbindings/Friends/GameOverlayUserType.cs.uid b/addons/godotsteam_csharpbindings/Friends/GameOverlayUserType.cs.uid new file mode 100644 index 00000000..722cdb9b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/GameOverlayUserType.cs.uid @@ -0,0 +1 @@ +uid://h1ymuuuyq5th diff --git a/addons/godotsteam_csharpbindings/Friends/PersonaChange.cs b/addons/godotsteam_csharpbindings/Friends/PersonaChange.cs new file mode 100644 index 00000000..6a5b586c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/PersonaChange.cs @@ -0,0 +1,21 @@ +namespace GodotSteam; + +[System.Flags] +public enum PersonaChange +{ + Name = 0x0001, + Status = 0x0002, + ComeOnline = 0x0004, + GoneOffline = 0x0008, + GamePlayed = 0x0010, + GameServer = 0x0020, + Avatar = 0x0040, + JoinedSource = 0x0080, + LeftSource = 0x0100, + RelationshipChanged = 0x0200, + NameFirstSet = 0x0400, + FacebookInfo = 0x0800, + Nickname = 0x1000, + SteamLevel = 0x2000, + RichPresence = 0x4000, +} diff --git a/addons/godotsteam_csharpbindings/Friends/PersonaChange.cs.uid b/addons/godotsteam_csharpbindings/Friends/PersonaChange.cs.uid new file mode 100644 index 00000000..a0d008b2 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/PersonaChange.cs.uid @@ -0,0 +1 @@ +uid://ccn0erf17jpb3 diff --git a/addons/godotsteam_csharpbindings/Friends/PersonaState.cs b/addons/godotsteam_csharpbindings/Friends/PersonaState.cs new file mode 100644 index 00000000..50421b86 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/PersonaState.cs @@ -0,0 +1,14 @@ +namespace GodotSteam; + +public enum PersonaState +{ + Offline = 0, + Online = 1, + Busy = 2, + Away = 3, + Snooze = 4, + LookingToTrade = 5, + LookingToPlay = 6, + Invisible = 7, + Max = 8, +} diff --git a/addons/godotsteam_csharpbindings/Friends/PersonaState.cs.uid b/addons/godotsteam_csharpbindings/Friends/PersonaState.cs.uid new file mode 100644 index 00000000..fa3af002 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/PersonaState.cs.uid @@ -0,0 +1 @@ +uid://ccesradiwpwcj diff --git a/addons/godotsteam_csharpbindings/Friends/ProfileData.cs b/addons/godotsteam_csharpbindings/Friends/ProfileData.cs new file mode 100644 index 00000000..0b21a6fc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ProfileData.cs @@ -0,0 +1,10 @@ +namespace GodotSteam; + +public class ProfileData +{ + public bool AvatarAnimated { get; set; } + public bool AvatarFrame { get; set; } + public bool ProfileModifier { get; set; } + public bool ProfileBackground { get; set; } + public bool ProfileMiniBackground { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/ProfileData.cs.uid b/addons/godotsteam_csharpbindings/Friends/ProfileData.cs.uid new file mode 100644 index 00000000..af642f1c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/ProfileData.cs.uid @@ -0,0 +1 @@ +uid://bpeckwjb4oxq7 diff --git a/addons/godotsteam_csharpbindings/Friends/RecentPlayer.cs b/addons/godotsteam_csharpbindings/Friends/RecentPlayer.cs new file mode 100644 index 00000000..c7b7caa6 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/RecentPlayer.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public class RecentPlayer +{ + public ulong Id { get; set; } + public string Name { get; set; } + public int Time { get; set; } + public PersonaState Status { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/RecentPlayer.cs.uid b/addons/godotsteam_csharpbindings/Friends/RecentPlayer.cs.uid new file mode 100644 index 00000000..84f31800 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/RecentPlayer.cs.uid @@ -0,0 +1 @@ +uid://blcypic65via3 diff --git a/addons/godotsteam_csharpbindings/Friends/RichPresenceKeys.cs b/addons/godotsteam_csharpbindings/Friends/RichPresenceKeys.cs new file mode 100644 index 00000000..de565ea1 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/RichPresenceKeys.cs @@ -0,0 +1,13 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static class RichPresenceKeys +{ + public static readonly StringName Status = "status"; + public static readonly StringName Connect = "connect"; + public static readonly StringName SteamDisplay = "steam_display"; + public static readonly StringName SteamPlayerGroup = "steam_player_group"; + public static readonly StringName SteamPlayerGroupSize = "steam_player_group_size"; +} diff --git a/addons/godotsteam_csharpbindings/Friends/RichPresenceKeys.cs.uid b/addons/godotsteam_csharpbindings/Friends/RichPresenceKeys.cs.uid new file mode 100644 index 00000000..63acabf9 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/RichPresenceKeys.cs.uid @@ -0,0 +1 @@ +uid://yh3dss1lib5x diff --git a/addons/godotsteam_csharpbindings/Friends/SteamGroup.cs b/addons/godotsteam_csharpbindings/Friends/SteamGroup.cs new file mode 100644 index 00000000..e990ae0d --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/SteamGroup.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public class SteamGroup +{ + public ulong Id { get; set; } + public string Name { get; set; } + public string Tag { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Friends/SteamGroup.cs.uid b/addons/godotsteam_csharpbindings/Friends/SteamGroup.cs.uid new file mode 100644 index 00000000..5210690f --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/SteamGroup.cs.uid @@ -0,0 +1 @@ +uid://c3umkk5p6exq4 diff --git a/addons/godotsteam_csharpbindings/Friends/UserRestriction.cs b/addons/godotsteam_csharpbindings/Friends/UserRestriction.cs new file mode 100644 index 00000000..1afa77c8 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/UserRestriction.cs @@ -0,0 +1,14 @@ +namespace GodotSteam; + +[System.Flags] +public enum UserRestriction +{ + None = 0, + Unknown = 1, + AnyChat = 2, + VoiceChat = 4, + GroupChat = 8, + Rating = 16, + GameInvites = 32, + Trading = 64, +} diff --git a/addons/godotsteam_csharpbindings/Friends/UserRestriction.cs.uid b/addons/godotsteam_csharpbindings/Friends/UserRestriction.cs.uid new file mode 100644 index 00000000..e7e7a136 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Friends/UserRestriction.cs.uid @@ -0,0 +1 @@ +uid://fs4inqa3xfqy diff --git a/addons/godotsteam_csharpbindings/GameSearch/PlayerData.cs b/addons/godotsteam_csharpbindings/GameSearch/PlayerData.cs new file mode 100644 index 00000000..f1eddf4d --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/PlayerData.cs @@ -0,0 +1,13 @@ +namespace GodotSteam; + +public class PlayerData +{ + public ulong PlayerId { get; set; } + public ulong LobbyId { get; set; } + public int PlayerAcceptState { get; set; } // TODO: Check if Enum + public int PlayerIndex { get; set; } + public int TotalPlayers { get; set; } + public int TotalPlayersAcceptedGame { get; set; } + public int SuggestedTeamIndex { get; set; } + public ulong UniqueGameId { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/GameSearch/PlayerData.cs.uid b/addons/godotsteam_csharpbindings/GameSearch/PlayerData.cs.uid new file mode 100644 index 00000000..60e8f18c --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/PlayerData.cs.uid @@ -0,0 +1 @@ +uid://d0b0vguyn6gw2 diff --git a/addons/godotsteam_csharpbindings/GameSearch/PlayerResult.cs b/addons/godotsteam_csharpbindings/GameSearch/PlayerResult.cs new file mode 100644 index 00000000..ee21bbf3 --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/PlayerResult.cs @@ -0,0 +1,10 @@ +namespace GodotSteam; + +public enum PlayerResult +{ + FailedToConnect = 1, + Abandoned = 2, + Kicked = 3, + Incomplete = 4, + Completed = 5, +} diff --git a/addons/godotsteam_csharpbindings/GameSearch/PlayerResult.cs.uid b/addons/godotsteam_csharpbindings/GameSearch/PlayerResult.cs.uid new file mode 100644 index 00000000..b14a0a89 --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/PlayerResult.cs.uid @@ -0,0 +1 @@ +uid://b0vs3a2usr84q diff --git a/addons/godotsteam_csharpbindings/GameSearch/SearchProgress.cs b/addons/godotsteam_csharpbindings/GameSearch/SearchProgress.cs new file mode 100644 index 00000000..fd0f6ab5 --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/SearchProgress.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public class SearchProgress +{ + public ulong LobbyId { get; set; } + public ulong EndedSearchId { get; set; } + public int SecondsRemainingEstimate { get; set; } + public int PlayersSearching { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/GameSearch/SearchProgress.cs.uid b/addons/godotsteam_csharpbindings/GameSearch/SearchProgress.cs.uid new file mode 100644 index 00000000..68862a79 --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/SearchProgress.cs.uid @@ -0,0 +1 @@ +uid://hkdoknh0hg16 diff --git a/addons/godotsteam_csharpbindings/GameSearch/SearchResult.cs b/addons/godotsteam_csharpbindings/GameSearch/SearchResult.cs new file mode 100644 index 00000000..ae334b0e --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/SearchResult.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public class SearchResult +{ + public int CountPlayersIngame { get; set; } + public int CountAcceptedGame { get; set; } + public ulong HostId { get; set; } + public bool FinalCallback { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/GameSearch/SearchResult.cs.uid b/addons/godotsteam_csharpbindings/GameSearch/SearchResult.cs.uid new file mode 100644 index 00000000..29e20fac --- /dev/null +++ b/addons/godotsteam_csharpbindings/GameSearch/SearchResult.cs.uid @@ -0,0 +1 @@ +uid://b6xdm8m3j8g1j diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlKeyModifiers.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlKeyModifiers.cs new file mode 100644 index 00000000..61559517 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlKeyModifiers.cs @@ -0,0 +1,10 @@ +namespace GodotSteam; + +[System.Flags] +public enum HtmlKeyModifiers +{ + None = 0, + AltDown = 1, + CtrlDown = 2, + ShiftDown = 4, +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlKeyModifiers.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlKeyModifiers.cs.uid new file mode 100644 index 00000000..0d0899e9 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlKeyModifiers.cs.uid @@ -0,0 +1 @@ +uid://df61g7jsh3ups diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlLinkData.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlLinkData.cs new file mode 100644 index 00000000..ce676ae4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlLinkData.cs @@ -0,0 +1,12 @@ +using System; + +namespace GodotSteam; + +public class HtmlLinkData +{ + public uint X { get; set; } + public uint Y { get; set; } + public Uri Url { get; set; } + public bool Input { get; set; } + public bool LiveLink { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlLinkData.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlLinkData.cs.uid new file mode 100644 index 00000000..014fa01e --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlLinkData.cs.uid @@ -0,0 +1 @@ +uid://bi0eri2eobb2 diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseButton.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseButton.cs new file mode 100644 index 00000000..7b3e6a34 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseButton.cs @@ -0,0 +1,8 @@ +namespace GodotSteam; + +public enum HtmlMouseButton +{ + Left = 0, + Right = 1, + Middle = 2, +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseButton.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseButton.cs.uid new file mode 100644 index 00000000..a808c4dc --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseButton.cs.uid @@ -0,0 +1 @@ +uid://ds0jvl5uotr6q diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseCursor.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseCursor.cs new file mode 100644 index 00000000..d8ae08cb --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseCursor.cs @@ -0,0 +1,47 @@ +namespace GodotSteam; + +public enum HtmlMouseCursor +{ + User = 0, + None = 1, + Arrow = 2, + Ibeam = 3, + HourGlass = 4, + WaitArrow = 5, + Crosshair = 6, + Up = 7, + SizeNw = 8, + SizeSe = 9, + SizeNe = 10, + SizeSw = 11, + SizeW = 12, + SizeE = 13, + SizeN = 14, + SizeS = 15, + SizeWe = 16, + SizeNs = 17, + SizeAll = 18, + No = 19, + Hand = 20, + Blank = 21, + MiddlePan = 22, + NorthPan = 23, + NorthEastPan = 24, + EastPan = 25, + SouthEastPan = 26, + SouthPan = 27, + SouthWestPan = 28, + WestPan = 29, + NorthWestPan = 30, + Alias = 31, + Cell = 32, + ColResize = 33, + CopyCur = 34, + VerticalText = 35, + RowResize = 36, + ZoomIn = 37, + ZoomOut = 38, + Help = 39, + Custom = 40, + Last = 41, +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseCursor.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseCursor.cs.uid new file mode 100644 index 00000000..a67799be --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlMouseCursor.cs.uid @@ -0,0 +1 @@ +uid://3kjwru52okfs diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlPageData.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlPageData.cs new file mode 100644 index 00000000..1e247bfe --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlPageData.cs @@ -0,0 +1,16 @@ +namespace GodotSteam; + +public class HtmlPageData +{ + public string Bgra { get; set; } + public uint Wide { get; set; } + public uint Tall { get; set; } + public uint UpdateX { get; set; } + public uint UpdateY { get; set; } + public uint UpdateWide { get; set; } + public uint UpdateTall { get; set; } + public uint ScrollX { get; set; } + public uint ScrollY { get; set; } + public float PageScale { get; set; } + public uint PageSerial { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlPageData.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlPageData.cs.uid new file mode 100644 index 00000000..bcfc4871 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlPageData.cs.uid @@ -0,0 +1 @@ +uid://2hwis0agec34 diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlScrollData.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlScrollData.cs new file mode 100644 index 00000000..8945e3c4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlScrollData.cs @@ -0,0 +1,10 @@ +namespace GodotSteam; + +public class HtmlScrollData +{ + public uint ScrollMax { get; set; } + public uint ScrollCurrent { get; set; } + public float PageScale { get; set; } + public bool Visible { get; set; } + public uint PageSize { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlScrollData.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlScrollData.cs.uid new file mode 100644 index 00000000..c5edb45c --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlScrollData.cs.uid @@ -0,0 +1 @@ +uid://q26dio7sxrhn diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlUrlData.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlUrlData.cs new file mode 100644 index 00000000..e84d4591 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlUrlData.cs @@ -0,0 +1,12 @@ +using System; + +namespace GodotSteam; + +public class HtmlUrlData +{ + public Uri Url { get; set; } + public string PostData { get; set; } + public bool Redirect { get; set; } + public string Title { get; set; } + public bool NewNavigation { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlUrlData.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlUrlData.cs.uid new file mode 100644 index 00000000..e9a7eb41 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlUrlData.cs.uid @@ -0,0 +1 @@ +uid://csy1ygrcmmbex diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlWindowData.cs b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlWindowData.cs new file mode 100644 index 00000000..6dc05660 --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlWindowData.cs @@ -0,0 +1,13 @@ +using System; + +namespace GodotSteam; + +public class HtmlWindowData +{ + public Uri Url { get; set; } + public uint X { get; set; } + public uint Y { get; set; } + public uint Wide { get; set; } + public uint Tall { get; set; } + public uint NewHandle { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/HTMLSurface/HtmlWindowData.cs.uid b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlWindowData.cs.uid new file mode 100644 index 00000000..8f8081fe --- /dev/null +++ b/addons/godotsteam_csharpbindings/HTMLSurface/HtmlWindowData.cs.uid @@ -0,0 +1 @@ +uid://bwsbr20488yhh diff --git a/addons/godotsteam_csharpbindings/Methods.cs b/addons/godotsteam_csharpbindings/Methods.cs new file mode 100644 index 00000000..6252715b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Methods.cs @@ -0,0 +1,794 @@ +using Godot; + +namespace GodotSteam; + +public static class Methods +{ + public static readonly StringName IsSteamRunning = "isSteamRunning"; + public static readonly StringName RunCallbacks = "run_callbacks"; + public static readonly StringName RestartAppIfNecessary = "restartAppIfNecessary"; + public static readonly StringName SteamInit = "steamInit"; + public static readonly StringName SteamInitEx = "steamInitEx"; + public static readonly StringName SteamShutdown = "steamShutdown"; + public static readonly StringName GetDLCDataByIndex = "getDLCDataByIndex"; + public static readonly StringName IsAppInstalled = "isAppInstalled"; + public static readonly StringName IsCybercafe = "isCybercafe"; + public static readonly StringName IsDLCInstalled = "isDLCInstalled"; + public static readonly StringName IsLowViolence = "isLowViolence"; + public static readonly StringName IsSubscribed = "isSubscribed"; + public static readonly StringName IsSubscribedApp = "isSubscribedApp"; + public static readonly StringName IsSubscribedFromFamilySharing = + "isSubscribedFromFamilySharing"; + public static readonly StringName IsSubscribedFromFreeWeekend = "isSubscribedFromFreeWeekend"; + public static readonly StringName IsTimedTrial = "isTimedTrial"; + public static readonly StringName IsVACBanned = "isVACBanned"; + public static readonly StringName GetAppBuildId = "getAppBuildId"; + public static readonly StringName GetAppInstallDir = "getAppInstallDir"; + public static readonly StringName GetAppOwner = "getAppOwner"; + public static readonly StringName GetAvailableGameLanguages = "getAvailableGameLanguages"; + public static readonly StringName GetCurrentBetaName = "getCurrentBetaName"; + public static readonly StringName GetCurrentGameLanguage = "getCurrentGameLanguage"; + public static readonly StringName GetDLCCount = "getDLCCount"; + public static readonly StringName GetDLCDownloadProgress = "getDLCDownloadProgress"; + public static readonly StringName GetEarliestPurchaseUnixTime = "getEarliestPurchaseUnixTime"; + public static readonly StringName GetFileDetails = "getFileDetails"; + public static readonly StringName GetInstalledDepots = "getInstalledDepots"; + public static readonly StringName GetLaunchCommandLine = "getLaunchCommandLine"; + public static readonly StringName GetLaunchQueryParam = "getLaunchQueryParam"; + public static readonly StringName InstallDLC = "installDLC"; + public static readonly StringName MarkContentCorrupt = "markContentCorrupt"; + public static readonly StringName SetDLCContext = "setDLCContext"; + public static readonly StringName UninstallDLC = "uninstallDLC"; + public static readonly StringName GetNumInstalledApps = "getNumInstalledApps"; + public static readonly StringName GetInstalledApps = "getInstalledApps"; + public static readonly StringName GetAppName = "getAppName"; + public static readonly StringName GetAppListInstallDir = "getAppListInstallDir"; + public static readonly StringName GetAppListBuildId = "getAppListBuildId"; + public static readonly StringName ActivateGameOverlay = "activateGameOverlay"; + public static readonly StringName ActivateGameOverlayInviteDialog = + "activateGameOverlayInviteDialog"; + public static readonly StringName ActivateGameOverlayInviteDialogConnectString = + "activateGameOverlayInviteDialogConnectString"; + public static readonly StringName ActivateGameOverlayToStore = "activateGameOverlayToStore"; + public static readonly StringName ActivateGameOverlayToUser = "activateGameOverlayToUser"; + public static readonly StringName ActivateGameOverlayToWebPage = "activateGameOverlayToWebPage"; + public static readonly StringName ClearRichPresence = "clearRichPresence"; + public static readonly StringName CloseClanChatWindowInSteam = "closeClanChatWindowInSteam"; + public static readonly StringName DownloadClanActivityCounts = "downloadClanActivityCounts"; + public static readonly StringName EnumerateFollowingList = "enumerateFollowingList"; + public static readonly StringName GetChatMemberByIndex = "getChatMemberByIndex"; + public static readonly StringName GetClanActivityCounts = "getClanActivityCounts"; + public static readonly StringName GetClanByIndex = "getClanByIndex"; + public static readonly StringName GetClanChatMemberCount = "getClanChatMemberCount"; + public static readonly StringName GetClanChatMessage = "getClanChatMessage"; + public static readonly StringName GetClanCount = "getClanCount"; + public static readonly StringName GetClanName = "getClanName"; + public static readonly StringName GetClanOfficerByIndex = "getClanOfficerByIndex"; + public static readonly StringName GetClanOfficerCount = "getClanOfficerCount"; + public static readonly StringName GetClanOwner = "getClanOwner"; + public static readonly StringName GetClanTag = "getClanTag"; + public static readonly StringName GetCoplayFriend = "getCoplayFriend"; + public static readonly StringName GetCoplayFriendCount = "getCoplayFriendCount"; + public static readonly StringName GetFollowerCount = "getFollowerCount"; + public static readonly StringName GetFriendByIndex = "getFriendByIndex"; + public static readonly StringName GetFriendCoplayGame = "getFriendCoplayGame"; + public static readonly StringName GetFriendCoplayTime = "getFriendCoplayTime"; + public static readonly StringName GetFriendCount = "getFriendCount"; + public static readonly StringName GetFriendCountFromSource = "getFriendCountFromSource"; + public static readonly StringName GetFriendFromSourceByIndex = "getFriendFromSourceByIndex"; + public static readonly StringName GetFriendGamePlayed = "getFriendGamePlayed"; + public static readonly StringName GetFriendMessage = "getFriendMessage"; + public static readonly StringName GetFriendPersonaName = "getFriendPersonaName"; + public static readonly StringName GetFriendPersonaNameHistory = "getFriendPersonaNameHistory"; + public static readonly StringName GetFriendPersonaState = "getFriendPersonaState"; + public static readonly StringName GetFriendRelationship = "getFriendRelationship"; + public static readonly StringName GetFriendRichPresence = "getFriendRichPresence"; + public static readonly StringName GetFriendRichPresenceKeyCount = + "getFriendRichPresenceKeyCount"; + public static readonly StringName GetFriendRichPresenceKeyByIndex = + "getFriendRichPresenceKeyByIndex"; + public static readonly StringName GetFriendsGroupCount = "getFriendsGroupCount"; + public static readonly StringName GetFriendsGroupIDByIndex = "getFriendsGroupIDByIndex"; + public static readonly StringName GetFriendsGroupMembersCount = "getFriendsGroupMembersCount"; + public static readonly StringName GetFriendsGroupMembersList = "getFriendsGroupMembersList"; + public static readonly StringName GetFriendsGroupName = "getFriendsGroupName"; + public static readonly StringName GetFriendSteamLevel = "getFriendSteamLevel"; + public static readonly StringName GetLargeFriendAvatar = "getLargeFriendAvatar"; + public static readonly StringName GetMediumFriendAvatar = "getMediumFriendAvatar"; + public static readonly StringName GetPersonaName = "getPersonaName"; + public static readonly StringName GetPersonaState = "getPersonaState"; + public static readonly StringName GetPlayerAvatar = "getPlayerAvatar"; + public static readonly StringName GetPlayerNickname = "getPlayerNickname"; + public static readonly StringName GetProfileItemPropertyString = "getProfileItemPropertyString"; + public static readonly StringName GetProfileItemPropertyInt = "getProfileItemPropertyInt"; + public static readonly StringName GetRecentPlayers = "getRecentPlayers"; + public static readonly StringName GetSmallFriendAvatar = "getSmallFriendAvatar"; + public static readonly StringName GetUserFriendsGroups = "getUserFriendsGroups"; + public static readonly StringName GetUserRestrictions = "getUserRestrictions"; + public static readonly StringName GetUserSteamFriends = "getUserSteamFriends"; + public static readonly StringName GetUserSteamGroups = "getUserSteamGroups"; + public static readonly StringName HasEquippedProfileItem = "hasEquippedProfileItem"; + public static readonly StringName HasFriend = "hasFriend"; + public static readonly StringName InviteUserToGame = "inviteUserToGame"; + public static readonly StringName IsClanChatAdmin = "isClanChatAdmin"; + public static readonly StringName IsClanPublic = "isClanPublic"; + public static readonly StringName IsClanOfficialGameGroup = "isClanOfficialGameGroup"; + public static readonly StringName IsClanChatWindowOpenInSteam = "isClanChatWindowOpenInSteam"; + public static readonly StringName IsFollowing = "isFollowing"; + public static readonly StringName IsUserInSource = "isUserInSource"; + public static readonly StringName JoinClanChatRoom = "joinClanChatRoom"; + public static readonly StringName LeaveClanChatRoom = "leaveClanChatRoom"; + public static readonly StringName OpenClanChatWindowInSteam = "openClanChatWindowInSteam"; + public static readonly StringName RegisterProtocolInOverlayBrowser = + "registerProtocolInOverlayBrowser"; + public static readonly StringName ReplyToFriendMessage = "replyToFriendMessage"; + public static readonly StringName RequestClanOfficerList = "requestClanOfficerList"; + public static readonly StringName RequestEquippedProfileItems = "requestEquippedProfileItems"; + public static readonly StringName RequestFriendRichPresence = "requestFriendRichPresence"; + public static readonly StringName RequestUserInformation = "requestUserInformation"; + public static readonly StringName SendClanChatMessage = "sendClanChatMessage"; + public static readonly StringName SetInGameVoiceSpeaking = "setInGameVoiceSpeaking"; + public static readonly StringName SetListenForFriendsMessages = "setListenForFriendsMessages"; + public static readonly StringName SetPersonaName = "setPersonaName"; + public static readonly StringName SetPlayedWith = "setPlayedWith"; + public static readonly StringName SetRichPresence = "setRichPresence"; + public static readonly StringName AddGameSearchParams = "addGameSearchParams"; + public static readonly StringName SearchForGameWithLobby = "searchForGameWithLobby"; + public static readonly StringName SearchForGameSolo = "searchForGameSolo"; + public static readonly StringName AcceptGame = "acceptGame"; + public static readonly StringName DeclineGame = "declineGame"; + public static readonly StringName RetrieveConnectionDetails = "retrieveConnectionDetails"; + public static readonly StringName EndGameSearch = "endGameSearch"; + public static readonly StringName SetGameHostParams = "setGameHostParams"; + public static readonly StringName SetConnectionDetails = "setConnectionDetails"; + public static readonly StringName RequestPlayersForGame = "requestPlayersForGame"; + public static readonly StringName HostConfirmGameStart = "hostConfirmGameStart"; + public static readonly StringName CancelRequestPlayersForGame = "cancelRequestPlayersForGame"; + public static readonly StringName SubmitPlayerResult = "submitPlayerResult"; + public static readonly StringName EndGame = "endGame"; + public static readonly StringName AddHeader = "addHeader"; + public static readonly StringName AllowStartRequest = "allowStartRequest"; + public static readonly StringName CopyToClipboard = "copyToClipboard"; + public static readonly StringName CreateBrowser = "createBrowser"; + public static readonly StringName ExecuteJavascript = "executeJavascript"; + public static readonly StringName Find = "find"; + public static readonly StringName GetLinkAtPosition = "getLinkAtPosition"; + public static readonly StringName GoBack = "goBack"; + public static readonly StringName GoForward = "goForward"; + public static readonly StringName HtmlInit = "htmlInit"; + public static readonly StringName JsDialogResponse = "jsDialogResponse"; + public static readonly StringName KeyChar = "keyChar"; + public static readonly StringName KeyDown = "keyDown"; + public static readonly StringName KeyUp = "keyUp"; + public static readonly StringName LoadURL = "loadURL"; + public static readonly StringName MouseDoubleClick = "mouseDoubleClick"; + public static readonly StringName MouseDown = "mouseDown"; + public static readonly StringName MouseMove = "mouseMove"; + public static readonly StringName MouseUp = "mouseUp"; + public static readonly StringName MouseWheel = "mouseWheel"; + public static readonly StringName PasteFromClipboard = "pasteFromClipboard"; + public static readonly StringName Reload = "reload"; + public static readonly StringName RemoveBrowser = "removeBrowser"; + public static readonly StringName SetBackgroundMode = "setBackgroundMode"; + public static readonly StringName SetCookie = "setCookie"; + public static readonly StringName SetHorizontalScroll = "setHorizontalScroll"; + public static readonly StringName SetKeyFocus = "setKeyFocus"; + public static readonly StringName SetPageScaleFactor = "setPageScaleFactor"; + public static readonly StringName SetSize = "setSize"; + public static readonly StringName SetVerticalScroll = "setVerticalScroll"; + public static readonly StringName HtmlShutdown = "htmlShutdown"; + public static readonly StringName StopFind = "stopFind"; + public static readonly StringName StopLoad = "stopLoad"; + public static readonly StringName ViewSource = "viewSource"; + public static readonly StringName CreateCookieContainer = "createCookieContainer"; + public static readonly StringName CreateHTTPRequest = "createHTTPRequest"; + public static readonly StringName DeferHTTPRequest = "deferHTTPRequest"; + public static readonly StringName GetHTTPDownloadProgressPct = "getHTTPDownloadProgressPct"; + public static readonly StringName GetHTTPRequestWasTimedOut = "getHTTPRequestWasTimedOut"; + public static readonly StringName GetHTTPResponseBodyData = "getHTTPResponseBodyData"; + public static readonly StringName GetHTTPResponseBodySize = "getHTTPResponseBodySize"; + public static readonly StringName GetHTTPResponseHeaderSize = "getHTTPResponseHeaderSize"; + public static readonly StringName GetHTTPResponseHeaderValue = "getHTTPResponseHeaderValue"; + public static readonly StringName GetHTTPStreamingResponseBodyData = + "getHTTPStreamingResponseBodyData"; + public static readonly StringName PrioritizeHTTPRequest = "prioritizeHTTPRequest"; + public static readonly StringName ReleaseCookieContainer = "releaseCookieContainer"; + public static readonly StringName ReleaseHTTPRequest = "releaseHTTPRequest"; + public static readonly StringName SendHTTPRequest = "sendHTTPRequest"; + public static readonly StringName SendHTTPRequestAndStreamResponse = + "sendHTTPRequestAndStreamResponse"; + public static readonly StringName SetHTTPCookie = "setHTTPCookie"; + public static readonly StringName SetHTTPRequestAbsoluteTimeoutMS = + "setHTTPRequestAbsoluteTimeoutMS"; + public static readonly StringName SetHTTPRequestContextValue = "setHTTPRequestContextValue"; + public static readonly StringName SetHTTPRequestCookieContainer = + "setHTTPRequestCookieContainer"; + public static readonly StringName SetHTTPRequestGetOrPostParameter = + "setHTTPRequestGetOrPostParameter"; + public static readonly StringName SetHTTPRequestHeaderValue = "setHTTPRequestHeaderValue"; + public static readonly StringName SetHTTPRequestNetworkActivityTimeout = + "setHTTPRequestNetworkActivityTimeout"; + public static readonly StringName SetHTTPRequestRawPostBody = "setHTTPRequestRawPostBody"; + public static readonly StringName SetHTTPRequestRequiresVerifiedCertificate = + "setHTTPRequestRequiresVerifiedCertificate"; + public static readonly StringName SetHTTPRequestUserAgentInfo = "setHTTPRequestUserAgentInfo"; + public static readonly StringName ActivateActionSet = "activateActionSet"; + public static readonly StringName ActivateActionSetLayer = "activateActionSetLayer"; + public static readonly StringName DeactivateActionSetLayer = "deactivateActionSetLayer"; + public static readonly StringName DeactivateAllActionSetLayers = "deactivateAllActionSetLayers"; + public static readonly StringName GetActionSetHandle = "getActionSetHandle"; + public static readonly StringName GetActionOriginFromXboxOrigin = + "getActionOriginFromXboxOrigin"; + public static readonly StringName GetActiveActionSetLayers = "getActiveActionSetLayers"; + public static readonly StringName GetAnalogActionData = "getAnalogActionData"; + public static readonly StringName GetAnalogActionHandle = "getAnalogActionHandle"; + public static readonly StringName GetAnalogActionOrigins = "getAnalogActionOrigins"; + public static readonly StringName GetConnectedControllers = "getConnectedControllers"; + public static readonly StringName GetControllerForGamepadIndex = "getControllerForGamepadIndex"; + public static readonly StringName GetCurrentActionSet = "getCurrentActionSet"; + public static readonly StringName GetDeviceBindingRevision = "getDeviceBindingRevision"; + public static readonly StringName GetDigitalActionData = "getDigitalActionData"; + public static readonly StringName GetDigitalActionHandle = "getDigitalActionHandle"; + public static readonly StringName GetDigitalActionOrigins = "getDigitalActionOrigins"; + public static readonly StringName GetGamepadIndexForController = "getGamepadIndexForController"; + public static readonly StringName GetGlyphForActionOrigin = "getGlyphForActionOrigin"; + public static readonly StringName GetInputTypeForHandle = "getInputTypeForHandle"; + public static readonly StringName GetMotionData = "getMotionData"; + public static readonly StringName GetRemotePlaySessionID = "getRemotePlaySessionID"; + public static readonly StringName GetStringForActionOrigin = "getStringForActionOrigin"; + public static readonly StringName InputInit = "inputInit"; + public static readonly StringName InputShutdown = "inputShutdown"; + public static readonly StringName RunFrame = "runFrame"; + public static readonly StringName SetLEDColor = "setLEDColor"; + public static readonly StringName ShowBindingPanel = "showBindingPanel"; + public static readonly StringName StopAnalogActionMomentum = "stopAnalogActionMomentum"; + public static readonly StringName TranslateActionOrigin = "translateActionOrigin"; + public static readonly StringName TriggerHapticPulse = "triggerHapticPulse"; + public static readonly StringName TriggerRepeatedHapticPulse = "triggerRepeatedHapticPulse"; + public static readonly StringName TriggerVibration = "triggerVibration"; + public static readonly StringName SetInputActionManifestFilePath = + "setInputActionManifestFilePath"; + public static readonly StringName SetDualSenseTriggerEffect = "setDualSenseTriggerEffect"; + public static readonly StringName WaitForData = "waitForData"; + public static readonly StringName NewDataAvailable = "newDataAvailable"; + public static readonly StringName EnableDeviceCallbacks = "enableDeviceCallbacks"; + public static readonly StringName GetGlyphPNGForActionOrigin = "getGlyphPNGForActionOrigin"; + public static readonly StringName GetGlyphSVGForActionOrigin = "getGlyphSVGForActionOrigin"; + public static readonly StringName TriggerVibrationExtended = "triggerVibrationExtended"; + public static readonly StringName TriggerSimpleHapticEvent = "triggerSimpleHapticEvent"; + public static readonly StringName GetStringForXboxOrigin = "getStringForXboxOrigin"; + public static readonly StringName GetGlyphForXboxOrigin = "getGlyphForXboxOrigin"; + public static readonly StringName GetSessionInputConfigurationSettings = + "getSessionInputConfigurationSettings"; + public static readonly StringName GetStringForDigitalActionName = + "getStringForDigitalActionName"; + public static readonly StringName GetStringForAnalogActionName = "getStringForAnalogActionName"; + public static readonly StringName AddPromoItem = "addPromoItem"; + public static readonly StringName AddPromoItems = "addPromoItems"; + public static readonly StringName CheckResultSteamID = "checkResultSteamID"; + public static readonly StringName ConsumeItem = "consumeItem"; + public static readonly StringName DeserializeResult = "deserializeResult"; + public static readonly StringName DestroyResult = "destroyResult"; + public static readonly StringName ExchangeItems = "exchangeItems"; + public static readonly StringName GenerateItems = "generateItems"; + public static readonly StringName GetAllItems = "getAllItems"; + public static readonly StringName GetItemDefinitionProperty = "getItemDefinitionProperty"; + public static readonly StringName GetItemsByID = "getItemsByID"; + public static readonly StringName GetItemPrice = "getItemPrice"; + public static readonly StringName GetItemsWithPrices = "getItemsWithPrices"; + public static readonly StringName GetNumItemsWithPrices = "getNumItemsWithPrices"; + public static readonly StringName GetResultItemProperty = "getResultItemProperty"; + public static readonly StringName GetResultItems = "getResultItems"; + public static readonly StringName GetResultStatus = "getResultStatus"; + public static readonly StringName GetResultTimestamp = "getResultTimestamp"; + public static readonly StringName GrantPromoItems = "grantPromoItems"; + public static readonly StringName LoadItemDefinitions = "loadItemDefinitions"; + public static readonly StringName RequestEligiblePromoItemDefinitionsIDs = + "requestEligiblePromoItemDefinitionsIDs"; + public static readonly StringName RequestPrices = "requestPrices"; + public static readonly StringName SerializeResult = "serializeResult"; + public static readonly StringName StartPurchase = "startPurchase"; + public static readonly StringName TransferItemQuantity = "transferItemQuantity"; + public static readonly StringName TriggerItemDrop = "triggerItemDrop"; + public static readonly StringName StartUpdateProperties = "startUpdateProperties"; + public static readonly StringName SubmitUpdateProperties = "submitUpdateProperties"; + public static readonly StringName RemoveProperty = "removeProperty"; + public static readonly StringName SetPropertyString = "setPropertyString"; + public static readonly StringName SetPropertyBool = "setPropertyBool"; + public static readonly StringName SetPropertyInt = "setPropertyInt"; + public static readonly StringName SetPropertyFloat = "setPropertyFloat"; + public static readonly StringName GetFavoriteGames = "getFavoriteGames"; + public static readonly StringName AddFavoriteGame = "addFavoriteGame"; + public static readonly StringName RemoveFavoriteGame = "removeFavoriteGame"; + public static readonly StringName RequestLobbyList = "requestLobbyList"; + public static readonly StringName AddRequestLobbyListStringFilter = + "addRequestLobbyListStringFilter"; + public static readonly StringName AddRequestLobbyListNumericalFilter = + "addRequestLobbyListNumericalFilter"; + public static readonly StringName AddRequestLobbyListNearValueFilter = + "addRequestLobbyListNearValueFilter"; + public static readonly StringName AddRequestLobbyListFilterSlotsAvailable = + "addRequestLobbyListFilterSlotsAvailable"; + public static readonly StringName AddRequestLobbyListDistanceFilter = + "addRequestLobbyListDistanceFilter"; + public static readonly StringName AddRequestLobbyListResultCountFilter = + "addRequestLobbyListResultCountFilter"; + public static readonly StringName CreateLobby = "createLobby"; + public static readonly StringName JoinLobby = "joinLobby"; + public static readonly StringName LeaveLobby = "leaveLobby"; + public static readonly StringName InviteUserToLobby = "inviteUserToLobby"; + public static readonly StringName GetNumLobbyMembers = "getNumLobbyMembers"; + public static readonly StringName GetLobbyMemberByIndex = "getLobbyMemberByIndex"; + public static readonly StringName GetLobbyData = "getLobbyData"; + public static readonly StringName SetLobbyData = "setLobbyData"; + public static readonly StringName GetAllLobbyData = "getAllLobbyData"; + public static readonly StringName DeleteLobbyData = "deleteLobbyData"; + public static readonly StringName GetLobbyMemberData = "getLobbyMemberData"; + public static readonly StringName SetLobbyMemberData = "setLobbyMemberData"; + public static readonly StringName SendLobbyChatMsg = "sendLobbyChatMsg"; + public static readonly StringName RequestLobbyData = "requestLobbyData"; + public static readonly StringName SetLobbyGameServer = "setLobbyGameServer"; + public static readonly StringName GetLobbyGameServer = "getLobbyGameServer"; + public static readonly StringName SetLobbyMemberLimit = "setLobbyMemberLimit"; + public static readonly StringName GetLobbyMemberLimit = "getLobbyMemberLimit"; + public static readonly StringName SetLobbyType = "setLobbyType"; + public static readonly StringName SetLobbyJoinable = "setLobbyJoinable"; + public static readonly StringName GetLobbyOwner = "getLobbyOwner"; + public static readonly StringName SetLobbyOwner = "setLobbyOwner"; + public static readonly StringName CancelQuery = "cancelQuery"; + public static readonly StringName CancelServerQuery = "cancelServerQuery"; + public static readonly StringName GetServerCount = "getServerCount"; + public static readonly StringName GetServerDetails = "getServerDetails"; + public static readonly StringName IsRefreshing = "isRefreshing"; + public static readonly StringName PingServer = "pingServer"; + public static readonly StringName PlayerDetails = "playerDetails"; + public static readonly StringName RefreshQuery = "refreshQuery"; + public static readonly StringName RefreshServer = "refreshServer"; + public static readonly StringName ReleaseRequest = "releaseRequest"; + public static readonly StringName RequestFavoritesServerList = "requestFavoritesServerList"; + public static readonly StringName RequestFriendsServerList = "requestFriendsServerList"; + public static readonly StringName RequestHistoryServerList = "requestHistoryServerList"; + public static readonly StringName RequestInternetServerList = "requestInternetServerList"; + public static readonly StringName RequestLANServerList = "requestLANServerList"; + public static readonly StringName RequestSpectatorServerList = "requestSpectatorServerList"; + public static readonly StringName ServerRules = "serverRules"; + public static readonly StringName MusicIsEnabled = "musicIsEnabled"; + public static readonly StringName MusicIsPlaying = "musicIsPlaying"; + public static readonly StringName GetPlaybackStatus = "getPlaybackStatus"; + public static readonly StringName MusicGetVolume = "musicGetVolume"; + public static readonly StringName MusicPause = "musicPause"; + public static readonly StringName MusicPlay = "musicPlay"; + public static readonly StringName MusicPlayNext = "musicPlayNext"; + public static readonly StringName MusicPlayPrev = "musicPlayPrev"; + public static readonly StringName MusicSetVolume = "musicSetVolume"; + public static readonly StringName ActivationSuccess = "activationSuccess"; + public static readonly StringName IsCurrentMusicRemote = "isCurrentMusicRemote"; + public static readonly StringName CurrentEntryDidChange = "currentEntryDidChange"; + public static readonly StringName CurrentEntryIsAvailable = "currentEntryIsAvailable"; + public static readonly StringName CurrentEntryWillChange = "currentEntryWillChange"; + public static readonly StringName DeregisterSteamMusicRemote = "deregisterSteamMusicRemote"; + public static readonly StringName EnableLooped = "enableLooped"; + public static readonly StringName EnablePlaylists = "enablePlaylists"; + public static readonly StringName EnablePlayNext = "enablePlayNext"; + public static readonly StringName EnablePlayPrevious = "enablePlayPrevious"; + public static readonly StringName EnableQueue = "enableQueue"; + public static readonly StringName EnableShuffled = "enableShuffled"; + public static readonly StringName PlaylistDidChange = "playlistDidChange"; + public static readonly StringName PlaylistWillChange = "playlistWillChange"; + public static readonly StringName QueueDidChange = "queueDidChange"; + public static readonly StringName QueueWillChange = "queueWillChange"; + public static readonly StringName RegisterSteamMusicRemote = "registerSteamMusicRemote"; + public static readonly StringName ResetPlaylistEntries = "resetPlaylistEntries"; + public static readonly StringName ResetQueueEntries = "resetQueueEntries"; + public static readonly StringName SetCurrentPlaylistEntry = "setCurrentPlaylistEntry"; + public static readonly StringName SetCurrentQueueEntry = "setCurrentQueueEntry"; + public static readonly StringName SetDisplayName = "setDisplayName"; + public static readonly StringName SetPlaylistEntry = "setPlaylistEntry"; + public static readonly StringName SetPNGIcon64X64 = "setPNGIcon64x64"; + public static readonly StringName SetQueueEntry = "setQueueEntry"; + public static readonly StringName UpdateCurrentEntryCoverArt = "updateCurrentEntryCoverArt"; + public static readonly StringName UpdateCurrentEntryElapsedSeconds = + "updateCurrentEntryElapsedSeconds"; + public static readonly StringName UpdateCurrentEntryText = "updateCurrentEntryText"; + public static readonly StringName UpdateLooped = "updateLooped"; + public static readonly StringName UpdatePlaybackStatus = "updatePlaybackStatus"; + public static readonly StringName UpdateShuffled = "updateShuffled"; + public static readonly StringName UpdateVolume = "updateVolume"; + public static readonly StringName AcceptP2PSessionWithUser = "acceptP2PSessionWithUser"; + public static readonly StringName AllowP2PPacketRelay = "allowP2PPacketRelay"; + public static readonly StringName CloseP2PChannelWithUser = "closeP2PChannelWithUser"; + public static readonly StringName CloseP2PSessionWithUser = "closeP2PSessionWithUser"; + public static readonly StringName GetP2PSessionState = "getP2PSessionState"; + public static readonly StringName GetAvailableP2PPacketSize = "getAvailableP2PPacketSize"; + public static readonly StringName ReadP2PPacket = "readP2PPacket"; + public static readonly StringName SendP2PPacket = "sendP2PPacket"; + public static readonly StringName AcceptSessionWithUser = "acceptSessionWithUser"; + public static readonly StringName CloseChannelWithUser = "closeChannelWithUser"; + public static readonly StringName CloseSessionWithUser = "closeSessionWithUser"; + public static readonly StringName GetSessionConnectionInfo = "getSessionConnectionInfo"; + public static readonly StringName ReceiveMessagesOnChannel = "receiveMessagesOnChannel"; + public static readonly StringName SendMessageToUser = "sendMessageToUser"; + public static readonly StringName AcceptConnection = "acceptConnection"; + public static readonly StringName BeginAsyncRequestFakeIP = "beginAsyncRequestFakeIP"; + public static readonly StringName CloseConnection = "closeConnection"; + public static readonly StringName CloseListenSocket = "closeListenSocket"; + public static readonly StringName ConfigureConnectionLanes = "configureConnectionLanes"; + public static readonly StringName ConnectP2P = "connectP2P"; + public static readonly StringName ConnectByIPAddress = "connectByIPAddress"; + public static readonly StringName ConnectToHostedDedicatedServer = + "connectToHostedDedicatedServer"; + public static readonly StringName CreateFakeUDPPort = "createFakeUDPPort"; + public static readonly StringName CreateHostedDedicatedServerListenSocket = + "createHostedDedicatedServerListenSocket"; + public static readonly StringName CreateListenSocketIP = "createListenSocketIP"; + public static readonly StringName CreateListenSocketP2P = "createListenSocketP2P"; + public static readonly StringName CreateListenSocketP2PFakeIP = "createListenSocketP2PFakeIP"; + public static readonly StringName CreatePollGroup = "createPollGroup"; + public static readonly StringName CreateSocketPair = "createSocketPair"; + public static readonly StringName DestroyPollGroup = "destroyPollGroup"; + public static readonly StringName FlushMessagesOnConnection = "flushMessagesOnConnection"; + public static readonly StringName GetAuthenticationStatus = "getAuthenticationStatus"; + public static readonly StringName GetCertificateRequest = "getCertificateRequest"; + public static readonly StringName GetConnectionInfo = "getConnectionInfo"; + public static readonly StringName GetConnectionName = "getConnectionName"; + public static readonly StringName GetConnectionRealTimeStatus = "getConnectionRealTimeStatus"; + public static readonly StringName GetConnectionUserData = "getConnectionUserData"; + public static readonly StringName GetDetailedConnectionStatus = "getDetailedConnectionStatus"; + public static readonly StringName GetFakeIP = "getFakeIP"; + public static readonly StringName GetHostedDedicatedServerPOPId = + "getHostedDedicatedServerPOPId"; + public static readonly StringName GetHostedDedicatedServerPort = "getHostedDedicatedServerPort"; + public static readonly StringName GetListenSocketAddress = "getListenSocketAddress"; + public static readonly StringName GetIdentity = "getIdentity"; + public static readonly StringName GetRemoteFakeIPForConnection = "getRemoteFakeIPForConnection"; + public static readonly StringName InitAuthentication = "initAuthentication"; + public static readonly StringName ReceiveMessagesOnConnection = "receiveMessagesOnConnection"; + public static readonly StringName ReceiveMessagesOnPollGroup = "receiveMessagesOnPollGroup"; + public static readonly StringName ResetIdentity = "resetIdentity"; + public static readonly StringName RunNetworkingCallbacks = "runNetworkingCallbacks"; + public static readonly StringName SendMessages = "sendMessages"; + public static readonly StringName SendMessageToConnection = "sendMessageToConnection"; + public static readonly StringName SetCertificate = "setCertificate"; + public static readonly StringName SetConnectionPollGroup = "setConnectionPollGroup"; + public static readonly StringName SetConnectionName = "setConnectionName"; + public static readonly StringName AddIdentity = "addIdentity"; + public static readonly StringName AddIPAddress = "addIPAddress"; + public static readonly StringName ClearIdentity = "clearIdentity"; + public static readonly StringName ClearIPAddress = "clearIPAddress"; + public static readonly StringName GetGenericBytes = "getGenericBytes"; + public static readonly StringName GetGenericString = "getGenericString"; + public static readonly StringName GetIdentities = "getIdentities"; + public static readonly StringName GetIdentityIPAddr = "getIdentityIPAddr"; + public static readonly StringName GetIdentitySteamID = "getIdentitySteamID"; + public static readonly StringName GetIdentitySteamID64 = "getIdentitySteamID64"; + public static readonly StringName GetIPAddresses = "getIPAddresses"; + public static readonly StringName GetIPv4 = "getIPv4"; + public static readonly StringName GetPSNID = "getPSNID"; + public static readonly StringName GetStadiaID = "getStadiaID"; + public static readonly StringName GetXboxPairwiseID = "getXboxPairwiseID"; + public static readonly StringName IsAddressLocalHost = "isAddressLocalHost"; + public static readonly StringName IsIdentityInvalid = "isIdentityInvalid"; + public static readonly StringName IsIdentityLocalHost = "isIdentityLocalHost"; + public static readonly StringName IsIPv4 = "isIPv4"; + public static readonly StringName IsIPv6AllZeros = "isIPv6AllZeros"; + public static readonly StringName ParseIdentityString = "parseIdentityString"; + public static readonly StringName ParseIPAddressString = "parseIPAddressString"; + public static readonly StringName SetGenericBytes = "setGenericBytes"; + public static readonly StringName SetGenericString = "setGenericString"; + public static readonly StringName SetIdentityIPAddr = "setIdentityIPAddr"; + public static readonly StringName SetIdentityLocalHost = "setIdentityLocalHost"; + public static readonly StringName SetIdentitySteamID = "setIdentitySteamID"; + public static readonly StringName SetIdentitySteamID64 = "setIdentitySteamID64"; + public static readonly StringName SetIPv4 = "setIPv4"; + public static readonly StringName SetIPv6 = "setIPv6"; + public static readonly StringName SetIPv6LocalHost = "setIPv6LocalHost"; + public static readonly StringName SetPSNID = "setPSNID"; + public static readonly StringName SetStadiaID = "setStadiaID"; + public static readonly StringName SetXboxPairwiseID = "setXboxPairwiseID"; + public static readonly StringName ToIdentityString = "toIdentityString"; + public static readonly StringName ToIPAddressString = "toIPAddressString"; + public static readonly StringName CheckPingDataUpToDate = "checkPingDataUpToDate"; + public static readonly StringName ConvertPingLocationToString = "convertPingLocationToString"; + public static readonly StringName EstimatePingTimeBetweenTwoLocations = + "estimatePingTimeBetweenTwoLocations"; + public static readonly StringName EstimatePingTimeFromLocalHost = + "estimatePingTimeFromLocalHost"; + public static readonly StringName GetConfigValue = "getConfigValue"; + public static readonly StringName GetConfigValueInfo = "getConfigValueInfo"; + public static readonly StringName GetDirectPingToPOP = "getDirectPingToPOP"; + public static readonly StringName GetLocalPingLocation = "getLocalPingLocation"; + public static readonly StringName GetLocalTimestamp = "getLocalTimestamp"; + public static readonly StringName GetPingToDataCenter = "getPingToDataCenter"; + public static readonly StringName GetPOPCount = "getPOPCount"; + public static readonly StringName GetPOPList = "getPOPList"; + public static readonly StringName GetRelayNetworkStatus = "getRelayNetworkStatus"; + public static readonly StringName InitRelayNetworkAccess = "initRelayNetworkAccess"; + public static readonly StringName ParsePingLocationString = "parsePingLocationString"; + public static readonly StringName SetConnectionConfigValueFloat = + "setConnectionConfigValueFloat"; + public static readonly StringName SetConnectionConfigValueInt32 = + "setConnectionConfigValueInt32"; + public static readonly StringName SetConnectionConfigValueString = + "setConnectionConfigValueString"; + public static readonly StringName SetGlobalConfigValueFloat = "setGlobalConfigValueFloat"; + public static readonly StringName SetGlobalConfigValueInt32 = "setGlobalConfigValueInt32"; + public static readonly StringName SetGlobalConfigValueString = "setGlobalConfigValueString"; + public static readonly StringName IsParentalLockEnabled = "isParentalLockEnabled"; + public static readonly StringName IsParentalLockLocked = "isParentalLockLocked"; + public static readonly StringName IsAppBlocked = "isAppBlocked"; + public static readonly StringName IsAppInBlockList = "isAppInBlockList"; + public static readonly StringName IsFeatureBlocked = "isFeatureBlocked"; + public static readonly StringName IsFeatureInBlockList = "isFeatureInBlockList"; + public static readonly StringName CancelReservation = "cancelReservation"; + public static readonly StringName ChangeNumOpenSlots = "changeNumOpenSlots"; + public static readonly StringName CreateBeacon = "createBeacon"; + public static readonly StringName DestroyBeacon = "destroyBeacon"; + public static readonly StringName GetAvailableBeaconLocations = "getAvailableBeaconLocations"; + public static readonly StringName GetBeaconByIndex = "getBeaconByIndex"; + public static readonly StringName GetBeaconDetails = "getBeaconDetails"; + public static readonly StringName GetBeaconLocationData = "getBeaconLocationData"; + public static readonly StringName GetNumActiveBeacons = "getNumActiveBeacons"; + public static readonly StringName JoinParty = "joinParty"; + public static readonly StringName OnReservationCompleted = "onReservationCompleted"; + public static readonly StringName GetSessionCount = "getSessionCount"; + public static readonly StringName GetSessionID = "getSessionID"; + public static readonly StringName GetSessionSteamID = "getSessionSteamID"; + public static readonly StringName GetSessionClientName = "getSessionClientName"; + public static readonly StringName GetSessionClientFormFactor = "getSessionClientFormFactor"; + public static readonly StringName GetSessionClientResolution = "getSessionClientResolution"; + public static readonly StringName SendRemotePlayTogetherInvite = "sendRemotePlayTogetherInvite"; + public static readonly StringName StartRemotePlayTogether = "startRemotePlayTogether"; + public static readonly StringName BeginFileWriteBatch = "beginFileWriteBatch"; + public static readonly StringName EndFileWriteBatch = "endFileWriteBatch"; + public static readonly StringName FileDelete = "fileDelete"; + public static readonly StringName FileExists = "fileExists"; + public static readonly StringName FileForget = "fileForget"; + public static readonly StringName FilePersisted = "filePersisted"; + public static readonly StringName FileRead = "fileRead"; + public static readonly StringName FileReadAsync = "fileReadAsync"; + public static readonly StringName FileShare = "fileShare"; + public static readonly StringName FileWrite = "fileWrite"; + public static readonly StringName FileWriteAsync = "fileWriteAsync"; + public static readonly StringName FileWriteStreamCancel = "fileWriteStreamCancel"; + public static readonly StringName FileWriteStreamClose = "fileWriteStreamClose"; + public static readonly StringName FileWriteStreamOpen = "fileWriteStreamOpen"; + public static readonly StringName FileWriteStreamWriteChunk = "fileWriteStreamWriteChunk"; + public static readonly StringName GetCachedUGCCount = "getCachedUGCCount"; + public static readonly StringName GetCachedUGCHandle = "getCachedUGCHandle"; + public static readonly StringName GetFileCount = "getFileCount"; + public static readonly StringName GetFileNameAndSize = "getFileNameAndSize"; + public static readonly StringName GetFileSize = "getFileSize"; + public static readonly StringName GetFileTimestamp = "getFileTimestamp"; + public static readonly StringName GetLocalFileChange = "getLocalFileChange"; + public static readonly StringName GetLocalFileChangeCount = "getLocalFileChangeCount"; + public static readonly StringName GetQuota = "getQuota"; + public static readonly StringName GetSyncPlatforms = "getSyncPlatforms"; + public static readonly StringName GetUGCDetails = "getUGCDetails"; + public static readonly StringName GetUGCDownloadProgress = "getUGCDownloadProgress"; + public static readonly StringName IsCloudEnabledForAccount = "isCloudEnabledForAccount"; + public static readonly StringName IsCloudEnabledForApp = "isCloudEnabledForApp"; + public static readonly StringName SetCloudEnabledForApp = "setCloudEnabledForApp"; + public static readonly StringName SetSyncPlatforms = "setSyncPlatforms"; + public static readonly StringName UgcDownload = "ugcDownload"; + public static readonly StringName UgcDownloadToLocation = "ugcDownloadToLocation"; + public static readonly StringName UgcRead = "ugcRead"; + public static readonly StringName AddScreenshotToLibrary = "addScreenshotToLibrary"; + public static readonly StringName AddVRScreenshotToLibrary = "addVRScreenshotToLibrary"; + public static readonly StringName HookScreenshots = "hookScreenshots"; + public static readonly StringName IsScreenshotsHooked = "isScreenshotsHooked"; + public static readonly StringName SetLocation = "setLocation"; + public static readonly StringName TagPublishedFile = "tagPublishedFile"; + public static readonly StringName TagUser = "tagUser"; + public static readonly StringName TriggerScreenshot = "triggerScreenshot"; + public static readonly StringName WriteScreenshot = "writeScreenshot"; + public static readonly StringName AddAppDependency = "addAppDependency"; + public static readonly StringName AddContentDescriptor = "addContentDescriptor"; + public static readonly StringName AddDependency = "addDependency"; + public static readonly StringName AddExcludedTag = "addExcludedTag"; + public static readonly StringName AddItemKeyValueTag = "addItemKeyValueTag"; + public static readonly StringName AddItemPreviewFile = "addItemPreviewFile"; + public static readonly StringName AddItemPreviewVideo = "addItemPreviewVideo"; + public static readonly StringName AddItemToFavorites = "addItemToFavorites"; + public static readonly StringName AddRequiredKeyValueTag = "addRequiredKeyValueTag"; + public static readonly StringName AddRequiredTag = "addRequiredTag"; + public static readonly StringName AddRequiredTagGroup = "addRequiredTagGroup"; + public static readonly StringName InitWorkshopForGameServer = "initWorkshopForGameServer"; + public static readonly StringName CreateItem = "createItem"; + public static readonly StringName CreateQueryAllUGCRequest = "createQueryAllUGCRequest"; + public static readonly StringName CreateQueryUGCDetailsRequest = "createQueryUGCDetailsRequest"; + public static readonly StringName CreateQueryUserUGCRequest = "createQueryUserUGCRequest"; + public static readonly StringName DeleteItem = "deleteItem"; + public static readonly StringName DownloadItem = "downloadItem"; + public static readonly StringName GetItemDownloadInfo = "getItemDownloadInfo"; + public static readonly StringName GetItemInstallInfo = "getItemInstallInfo"; + public static readonly StringName GetItemState = "getItemState"; + public static readonly StringName GetItemUpdateProgress = "getItemUpdateProgress"; + public static readonly StringName GetNumSubscribedItems = "getNumSubscribedItems"; + public static readonly StringName GetQueryUGCAdditionalPreview = "getQueryUGCAdditionalPreview"; + public static readonly StringName GetQueryUGCChildren = "getQueryUGCChildren"; + public static readonly StringName GetQueryUGCContentDescriptors = + "getQueryUGCContentDescriptors"; + public static readonly StringName GetQueryUGCKeyValueTag = "getQueryUGCKeyValueTag"; + public static readonly StringName GetQueryUGCMetadata = "getQueryUGCMetadata"; + public static readonly StringName GetQueryUGCNumAdditionalPreviews = + "getQueryUGCNumAdditionalPreviews"; + public static readonly StringName GetQueryUGCNumKeyValueTags = "getQueryUGCNumKeyValueTags"; + public static readonly StringName GetQueryUGCNumTags = "getQueryUGCNumTags"; + public static readonly StringName GetQueryUGCPreviewURL = "getQueryUGCPreviewURL"; + public static readonly StringName GetQueryUGCResult = "getQueryUGCResult"; + public static readonly StringName GetQueryUGCStatistic = "getQueryUGCStatistic"; + public static readonly StringName GetQueryUGCTag = "getQueryUGCTag"; + public static readonly StringName GetQueryUGCTagDisplayName = "getQueryUGCTagDisplayName"; + public static readonly StringName GetSubscribedItems = "getSubscribedItems"; + public static readonly StringName GetUserContentDescriptorPreferences = + "getUserContentDescriptorPreferences"; + public static readonly StringName GetUserItemVote = "getUserItemVote"; + public static readonly StringName ReleaseQueryUGCRequest = "releaseQueryUGCRequest"; + public static readonly StringName RemoveAppDependency = "removeAppDependency"; + public static readonly StringName RemoveContentDescriptor = "removeContentDescriptor"; + public static readonly StringName RemoveDependency = "removeDependency"; + public static readonly StringName RemoveItemFromFavorites = "removeItemFromFavorites"; + public static readonly StringName RemoveItemKeyValueTags = "removeItemKeyValueTags"; + public static readonly StringName RemoveItemPreview = "removeItemPreview"; + public static readonly StringName SendQueryUGCRequest = "sendQueryUGCRequest"; + public static readonly StringName SetAllowCachedResponse = "setAllowCachedResponse"; + public static readonly StringName SetCloudFileNameFilter = "setCloudFileNameFilter"; + public static readonly StringName SetItemContent = "setItemContent"; + public static readonly StringName SetItemDescription = "setItemDescription"; + public static readonly StringName SetItemMetadata = "setItemMetadata"; + public static readonly StringName SetItemPreview = "setItemPreview"; + public static readonly StringName SetItemTags = "setItemTags"; + public static readonly StringName SetItemTitle = "setItemTitle"; + public static readonly StringName SetItemUpdateLanguage = "setItemUpdateLanguage"; + public static readonly StringName SetItemVisibility = "setItemVisibility"; + public static readonly StringName SetLanguage = "setLanguage"; + public static readonly StringName SetMatchAnyTag = "setMatchAnyTag"; + public static readonly StringName SetRankedByTrendDays = "setRankedByTrendDays"; + public static readonly StringName SetReturnAdditionalPreviews = "setReturnAdditionalPreviews"; + public static readonly StringName SetReturnChildren = "setReturnChildren"; + public static readonly StringName SetReturnKeyValueTags = "setReturnKeyValueTags"; + public static readonly StringName SetReturnLongDescription = "setReturnLongDescription"; + public static readonly StringName SetReturnMetadata = "setReturnMetadata"; + public static readonly StringName SetReturnOnlyIDs = "setReturnOnlyIDs"; + public static readonly StringName SetReturnPlaytimeStats = "setReturnPlaytimeStats"; + public static readonly StringName SetReturnTotalOnly = "setReturnTotalOnly"; + public static readonly StringName SetSearchText = "setSearchText"; + public static readonly StringName SetUserItemVote = "setUserItemVote"; + public static readonly StringName StartItemUpdate = "startItemUpdate"; + public static readonly StringName StartPlaytimeTracking = "startPlaytimeTracking"; + public static readonly StringName StopPlaytimeTracking = "stopPlaytimeTracking"; + public static readonly StringName StopPlaytimeTrackingForAllItems = + "stopPlaytimeTrackingForAllItems"; + public static readonly StringName GetAppDependencies = "getAppDependencies"; + public static readonly StringName SubmitItemUpdate = "submitItemUpdate"; + public static readonly StringName SubscribeItem = "subscribeItem"; + public static readonly StringName SuspendDownloads = "suspendDownloads"; + public static readonly StringName UnsubscribeItem = "unsubscribeItem"; + public static readonly StringName UpdateItemPreviewFile = "updateItemPreviewFile"; + public static readonly StringName UpdateItemPreviewVideo = "updateItemPreviewVideo"; + public static readonly StringName ShowWorkshopEULA = "showWorkshopEULA"; + public static readonly StringName GetWorkshopEULAStatus = "getWorkshopEULAStatus"; + public static readonly StringName SetTimeCreatedDateRange = "setTimeCreatedDateRange"; + public static readonly StringName SetTimeUpdatedDateRange = "setTimeUpdatedDateRange"; + public static readonly StringName AdvertiseGame = "advertiseGame"; + public static readonly StringName BeginAuthSession = "beginAuthSession"; + public static readonly StringName CancelAuthTicket = "cancelAuthTicket"; + public static readonly StringName DecompressVoice = "decompressVoice"; + public static readonly StringName EndAuthSession = "endAuthSession"; + public static readonly StringName GetAuthSessionTicket = "getAuthSessionTicket"; + public static readonly StringName GetAuthTicketForWebApi = "getAuthTicketForWebApi"; + public static readonly StringName GetAvailableVoice = "getAvailableVoice"; + public static readonly StringName GetDurationControl = "getDurationControl"; + public static readonly StringName GetEncryptedAppTicket = "getEncryptedAppTicket"; + public static readonly StringName GetGameBadgeLevel = "getGameBadgeLevel"; + public static readonly StringName GetPlayerSteamLevel = "getPlayerSteamLevel"; + public static readonly StringName GetSteamID = "getSteamID"; + public static readonly StringName GetVoice = "getVoice"; + public static readonly StringName GetVoiceOptimalSampleRate = "getVoiceOptimalSampleRate"; + public static readonly StringName InitiateGameConnection = "initiateGameConnection"; + public static readonly StringName IsBehindNAT = "isBehindNAT"; + public static readonly StringName IsPhoneIdentifying = "isPhoneIdentifying"; + public static readonly StringName IsPhoneRequiringVerification = "isPhoneRequiringVerification"; + public static readonly StringName IsPhoneVerified = "isPhoneVerified"; + public static readonly StringName IsTwoFactorEnabled = "isTwoFactorEnabled"; + public static readonly StringName LoggedOn = "loggedOn"; + public static readonly StringName RequestEncryptedAppTicket = "requestEncryptedAppTicket"; + public static readonly StringName RequestStoreAuthURL = "requestStoreAuthURL"; + public static readonly StringName StartVoiceRecording = "startVoiceRecording"; + public static readonly StringName SetDurationControlOnlineState = + "setDurationControlOnlineState"; + public static readonly StringName StopVoiceRecording = "stopVoiceRecording"; + public static readonly StringName TerminateGameConnection = "terminateGameConnection"; + public static readonly StringName UserHasLicenseForApp = "userHasLicenseForApp"; + public static readonly StringName AttachLeaderboardUGC = "attachLeaderboardUGC"; + public static readonly StringName ClearAchievement = "clearAchievement"; + public static readonly StringName DownloadLeaderboardEntries = "downloadLeaderboardEntries"; + public static readonly StringName DownloadLeaderboardEntriesForUsers = + "downloadLeaderboardEntriesForUsers"; + public static readonly StringName FindLeaderboard = "findLeaderboard"; + public static readonly StringName FindOrCreateLeaderboard = "findOrCreateLeaderboard"; + public static readonly StringName GetAchievement = "getAchievement"; + public static readonly StringName GetAchievementAchievedPercent = + "getAchievementAchievedPercent"; + public static readonly StringName GetAchievementAndUnlockTime = "getAchievementAndUnlockTime"; + public static readonly StringName GetAchievementDisplayAttribute = + "getAchievementDisplayAttribute"; + public static readonly StringName GetAchievementIcon = "getAchievementIcon"; + public static readonly StringName GetAchievementName = "getAchievementName"; + public static readonly StringName GetAchievementProgressLimitsInt = + "getAchievementProgressLimitsInt"; + public static readonly StringName GetAchievementProgressLimitsFloat = + "getAchievementProgressLimitsFloat"; + public static readonly StringName GetGlobalStatInt = "getGlobalStatInt"; + public static readonly StringName GetGlobalStatFloat = "getGlobalStatFloat"; + public static readonly StringName GetGlobalStatIntHistory = "getGlobalStatIntHistory"; + public static readonly StringName GetGlobalStatFloatHistory = "getGlobalStatFloatHistory"; + public static readonly StringName GetLeaderboardDisplayType = "getLeaderboardDisplayType"; + public static readonly StringName GetLeaderboardEntryCount = "getLeaderboardEntryCount"; + public static readonly StringName GetLeaderboardName = "getLeaderboardName"; + public static readonly StringName GetLeaderboardSortMethod = "getLeaderboardSortMethod"; + public static readonly StringName GetMostAchievedAchievementInfo = + "getMostAchievedAchievementInfo"; + public static readonly StringName GetNextMostAchievedAchievementInfo = + "getNextMostAchievedAchievementInfo"; + public static readonly StringName GetNumAchievements = "getNumAchievements"; + public static readonly StringName GetNumberOfCurrentPlayers = "getNumberOfCurrentPlayers"; + public static readonly StringName GetStatFloat = "getStatFloat"; + public static readonly StringName GetStatInt = "getStatInt"; + public static readonly StringName GetUserAchievement = "getUserAchievement"; + public static readonly StringName GetUserAchievementAndUnlockTime = + "getUserAchievementAndUnlockTime"; + public static readonly StringName GetUserStatFloat = "getUserStatFloat"; + public static readonly StringName GetUserStatInt = "getUserStatInt"; + public static readonly StringName IndicateAchievementProgress = "indicateAchievementProgress"; + public static readonly StringName RequestCurrentStats = "requestCurrentStats"; + public static readonly StringName RequestGlobalAchievementPercentages = + "requestGlobalAchievementPercentages"; + public static readonly StringName RequestGlobalStats = "requestGlobalStats"; + public static readonly StringName RequestUserStats = "requestUserStats"; + public static readonly StringName ResetAllStats = "resetAllStats"; + public static readonly StringName SetAchievement = "setAchievement"; + public static readonly StringName SetLeaderboardDetailsMax = "setLeaderboardDetailsMax"; + public static readonly StringName SetStatFloat = "setStatFloat"; + public static readonly StringName SetStatInt = "setStatInt"; + public static readonly StringName StoreStats = "storeStats"; + public static readonly StringName UpdateAvgRateStat = "updateAvgRateStat"; + public static readonly StringName UploadLeaderboardScore = "uploadLeaderboardScore"; + public static readonly StringName GetLeaderboardEntries = "getLeaderboardEntries"; + public static readonly StringName FilterText = "filterText"; + public static readonly StringName GetAPICallFailureReason = "getAPICallFailureReason"; + public static readonly StringName GetAppID = "getAppID"; + public static readonly StringName GetCurrentBatteryPower = "getCurrentBatteryPower"; + public static readonly StringName GetImageRGBA = "getImageRGBA"; + public static readonly StringName GetImageSize = "getImageSize"; + public static readonly StringName GetIPCCallCount = "getIPCCallCount"; + public static readonly StringName GetIPCountry = "getIPCountry"; + public static readonly StringName GetSecondsSinceAppActive = "getSecondsSinceAppActive"; + public static readonly StringName GetSecondsSinceComputerActive = + "getSecondsSinceComputerActive"; + public static readonly StringName GetServerRealTime = "getServerRealTime"; + public static readonly StringName GetSteamUILanguage = "getSteamUILanguage"; + public static readonly StringName InitFilterText = "initFilterText"; + public static readonly StringName IsAPICallCompleted = "isAPICallCompleted"; + public static readonly StringName IsOverlayEnabled = "isOverlayEnabled"; + public static readonly StringName IsSteamChinaLauncher = "isSteamChinaLauncher"; + public static readonly StringName IsSteamInBigPictureMode = "isSteamInBigPictureMode"; + public static readonly StringName IsSteamRunningInVR = "isSteamRunningInVR"; + public static readonly StringName IsVRHeadsetStreamingEnabled = "isVRHeadsetStreamingEnabled"; + public static readonly StringName OverlayNeedsPresent = "overlayNeedsPresent"; + public static readonly StringName SetOverlayNotificationInset = "setOverlayNotificationInset"; + public static readonly StringName SetOverlayNotificationPosition = + "setOverlayNotificationPosition"; + public static readonly StringName SetVRHeadsetStreamingEnabled = "setVRHeadsetStreamingEnabled"; + public static readonly StringName ShowGamepadTextInput = "showGamepadTextInput"; + public static readonly StringName ShowFloatingGamepadTextInput = "showFloatingGamepadTextInput"; + public static readonly StringName SetGameLauncherMode = "setGameLauncherMode"; + public static readonly StringName StartVRDashboard = "startVRDashboard"; + public static readonly StringName IsSteamRunningOnSteamDeck = "isSteamRunningOnSteamDeck"; + public static readonly StringName DismissFloatingGamepadTextInput = + "dismissFloatingGamepadTextInput"; + public static readonly StringName GetOPFSettings = "getOPFSettings"; + public static readonly StringName GetOPFStringForApp = "getOPFStringForApp"; + public static readonly StringName GetVideoURL = "getVideoURL"; + public static readonly StringName IsBroadcasting = "isBroadcasting"; +} diff --git a/addons/godotsteam_csharpbindings/Methods.cs.uid b/addons/godotsteam_csharpbindings/Methods.cs.uid new file mode 100644 index 00000000..42c0c6aa --- /dev/null +++ b/addons/godotsteam_csharpbindings/Methods.cs.uid @@ -0,0 +1 @@ +uid://ct6pjscay5oub diff --git a/addons/godotsteam_csharpbindings/Screenshots/VRScreenshotType.cs b/addons/godotsteam_csharpbindings/Screenshots/VRScreenshotType.cs new file mode 100644 index 00000000..4b9172e4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Screenshots/VRScreenshotType.cs @@ -0,0 +1,11 @@ +namespace GodotSteam; + +public enum VRScreenshotType +{ + None = 0, + Mono = 1, + Stereo = 2, + MonoCubeMap = 3, + MonoPanorama = 4, + StereoPanorama = 5, +} diff --git a/addons/godotsteam_csharpbindings/Screenshots/VRScreenshotType.cs.uid b/addons/godotsteam_csharpbindings/Screenshots/VRScreenshotType.cs.uid new file mode 100644 index 00000000..b68f1ce2 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Screenshots/VRScreenshotType.cs.uid @@ -0,0 +1 @@ +uid://dqqlllkead4ol diff --git a/addons/godotsteam_csharpbindings/Signals.cs b/addons/godotsteam_csharpbindings/Signals.cs new file mode 100644 index 00000000..062b1428 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Signals.cs @@ -0,0 +1,213 @@ +using Godot; + +namespace GodotSteam; + +public static class Signals +{ + public static readonly StringName SteamworksError = "steamworks_error"; + public static readonly StringName FileDetailsResult = "file_details_result"; + public static readonly StringName DlcInstalled = "dlc_installed"; + public static readonly StringName NewLaunchUrlParameters = "new_launch_url_parameters"; + public static readonly StringName TimedTrialStatus = "timed_trial_status"; + public static readonly StringName AppInstalled = "app_installed"; + public static readonly StringName AppUninstalled = "app_uninstalled"; + public static readonly StringName AvatarLoaded = "avatar_loaded"; + public static readonly StringName AvatarImageLoaded = "avatar_image_loaded"; + public static readonly StringName RequestClanOfficerListSignal = "request_clan_officer_list"; + public static readonly StringName ClanActivityDownloaded = "clan_activity_downloaded"; + public static readonly StringName FriendRichPresenceUpdate = "friend_rich_presence_update"; + public static readonly StringName EnumerateFollowingListSignal = "enumerate_following_list"; + public static readonly StringName GetFollowerCountSignal = "get_follower_count"; + public static readonly StringName IsFollowingSignal = "is_following"; + public static readonly StringName ConnectedChatJoin = "connected_chat_join"; + public static readonly StringName ConnectedChatLeave = "connected_chat_leave"; + public static readonly StringName ConnectedClanChatMessage = "connected_clan_chat_message"; + public static readonly StringName ConnectedFriendChatMessage = "connected_friend_chat_message"; + public static readonly StringName JoinRequested = "join_requested"; + public static readonly StringName OverlayToggled = "overlay_toggled"; + public static readonly StringName JoinGameRequested = "join_game_requested"; + public static readonly StringName ChangeServerRequested = "change_server_requested"; + public static readonly StringName JoinClanChatComplete = "join_clan_chat_complete"; + public static readonly StringName PersonaStateChange = "persona_state_change"; + public static readonly StringName NameChanged = "name_changed"; + public static readonly StringName OverlayBrowserProtocol = "overlay_browser_protocol"; + public static readonly StringName UnreadChatMessagesChanged = "unread_chat_messages_changed"; + public static readonly StringName EquippedProfileItemsChanged = + "equipped_profile_items_changed"; + public static readonly StringName EquippedProfileItems = "equipped_profile_items"; + public static readonly StringName SearchForGameProgress = "search_for_game_progress"; + public static readonly StringName SearchForGameResult = "search_for_game_result"; + public static readonly StringName RequestPlayersForGameProgress = + "request_players_for_game_progress"; + public static readonly StringName RequestPlayersForGameResult = + "request_players_for_game_result"; + public static readonly StringName RequestPlayersForGameFinalResult = + "request_players_for_game_final_result"; + public static readonly StringName SubmitPlayerResultSignal = "submit_player_result"; + public static readonly StringName EndGameResult = "end_game_result"; + public static readonly StringName HtmlBrowserReady = "html_browser_ready"; + public static readonly StringName HtmlCanGoBackandforward = "html_can_go_backandforward"; + public static readonly StringName HtmlChangedTitle = "html_changed_title"; + public static readonly StringName HtmlCloseBrowser = "html_close_browser"; + public static readonly StringName HtmlFileOpenDialog = "html_file_open_dialog"; + public static readonly StringName HtmlFinishedRequest = "html_finished_request"; + public static readonly StringName HtmlHideTooltip = "html_hide_tooltip"; + public static readonly StringName HtmlHorizontalScroll = "html_horizontal_scroll"; + public static readonly StringName HtmlJsAlert = "html_js_alert"; + public static readonly StringName HtmlJsConfirm = "html_js_confirm"; + public static readonly StringName HtmlLinkAtPosition = "html_link_at_position"; + public static readonly StringName HtmlNeedsPaint = "html_needs_paint"; + public static readonly StringName HtmlNewWindow = "html_new_window"; + public static readonly StringName HtmlOpenLinkInNewTab = "html_open_link_in_new_tab"; + public static readonly StringName HtmlSearchResults = "html_search_results"; + public static readonly StringName HtmlSetCursor = "html_set_cursor"; + public static readonly StringName HtmlShowTooltip = "html_show_tooltip"; + public static readonly StringName HtmlStartRequest = "html_start_request"; + public static readonly StringName HtmlStatusText = "html_status_text"; + public static readonly StringName HtmlUpdateTooltip = "html_update_tooltip"; + public static readonly StringName HtmlUrlChanged = "html_url_changed"; + public static readonly StringName HtmlVerticalScroll = "html_vertical_scroll"; + public static readonly StringName HttpRequestCompleted = "http_request_completed"; + public static readonly StringName HttpRequestDataReceived = "http_request_data_received"; + public static readonly StringName HttpRequestHeadersReceived = "http_request_headers_received"; + public static readonly StringName InputActionEvent = "input_action_event"; + public static readonly StringName InputDeviceConnected = "input_device_connected"; + public static readonly StringName InputDeviceDisconnected = "input_device_disconnected"; + public static readonly StringName InputConfigurationLoaded = "input_configuration_loaded"; + public static readonly StringName InputGamepadSlotChange = "input_gamepad_slot_change"; + public static readonly StringName InventoryDefinitionUpdate = "inventory_definition_update"; + public static readonly StringName InventoryEligiblePromoItem = "inventory_eligible_promo_item"; + public static readonly StringName InventoryFullUpdate = "inventory_full_update"; + public static readonly StringName InventoryResultReady = "inventory_result_ready"; + public static readonly StringName InventoryStartPurchaseResult = + "inventory_start_purchase_result"; + public static readonly StringName InventoryRequestPricesResult = + "inventory_request_prices_result"; + public static readonly StringName FavoritesListAccountsUpdated = + "favorites_list_accounts_updated"; + public static readonly StringName FavoritesListChanged = "favorites_list_changed"; + public static readonly StringName LobbyMessage = "lobby_message"; + public static readonly StringName LobbyChatUpdate = "lobby_chat_update"; + public static readonly StringName LobbyCreated = "lobby_created"; + public static readonly StringName LobbyDataUpdate = "lobby_data_update"; + public static readonly StringName LobbyJoined = "lobby_joined"; + public static readonly StringName LobbyGameCreated = "lobby_game_created"; + public static readonly StringName LobbyInvite = "lobby_invite"; + public static readonly StringName LobbyMatchList = "lobby_match_list"; + public static readonly StringName LobbyKicked = "lobby_kicked"; + public static readonly StringName ServerResponded = "server_responded"; + public static readonly StringName ServerFailedToRespond = "server_failed_to_respond"; + public static readonly StringName MusicPlayerRemoteToFront = "music_player_remote_to_front"; + public static readonly StringName MusicPlayerRemoteWillActivate = + "music_player_remote_will_activate"; + public static readonly StringName MusicPlayerRemoteWillDeactivate = + "music_player_remote_will_deactivate"; + public static readonly StringName MusicPlayerSelectsPlaylistEntry = + "music_player_selects_playlist_entry"; + public static readonly StringName MusicPlayerSelectsQueueEntry = + "music_player_selects_queue_entry"; + public static readonly StringName MusicPlayerWantsLooped = "music_player_wants_looped"; + public static readonly StringName MusicPlayerWantsPause = "music_player_wants_pause"; + public static readonly StringName MusicPlayerWantsPlayingRepeatStatus = + "music_player_wants_playing_repeat_status"; + public static readonly StringName MusicPlayerWantsPlayNext = "music_player_wants_play_next"; + public static readonly StringName MusicPlayerWantsPlayPrevious = + "music_player_wants_play_previous"; + public static readonly StringName MusicPlayerWantsPlay = "music_player_wants_play"; + public static readonly StringName MusicPlayerWantsShuffled = "music_player_wants_shuffled"; + public static readonly StringName MusicPlayerWantsVolume = "music_player_wants_volume"; + public static readonly StringName MusicPlayerWillQuit = "music_player_will_quit"; + public static readonly StringName P2PSessionRequest = "p2p_session_request"; + public static readonly StringName P2PSessionConnectFail = "p2p_session_connect_fail"; + public static readonly StringName NetworkMessagesSessionRequest = + "network_messages_session_request"; + public static readonly StringName NetworkMessagesSessionFailed = + "network_messages_session_failed"; + public static readonly StringName NetworkConnectionStatusChanged = + "network_connection_status_changed"; + public static readonly StringName NetworkAuthenticationStatus = "network_authentication_status"; + public static readonly StringName FakeIPResult = "fake_ip_result"; + public static readonly StringName RelayNetworkStatus = "relay_network_status"; + public static readonly StringName ParentalSettingChanged = "parental_setting_changed"; + public static readonly StringName JoinPartySignal = "join_party"; + public static readonly StringName CreateBeaconSignal = "create_beacon"; + public static readonly StringName ReservationNotification = "reservation_notification"; + public static readonly StringName ChangeNumOpenSlotsSignal = "change_num_open_slots"; + public static readonly StringName AvailableBeaconLocationsUpdated = + "available_beacon_locations_updated"; + public static readonly StringName ActiveBeaconsUpdated = "active_beacons_updated"; + public static readonly StringName RemotePlaySessionConnected = "remote_play_session_connected"; + public static readonly StringName RemotePlaySessionDisconnected = + "remote_play_session_disconnected"; + public static readonly StringName FileReadAsyncComplete = "file_read_async_complete"; + public static readonly StringName FileShareResult = "file_share_result"; + public static readonly StringName FileWriteAsyncComplete = "file_write_async_complete"; + public static readonly StringName DownloadUgcResult = "download_ugc_result"; + public static readonly StringName UnsubscribeItemSignal = "unsubscribe_item"; + public static readonly StringName SubscribeItemSignal = "subscribe_item"; + public static readonly StringName LocalFileChanged = "local_file_changed"; + public static readonly StringName ScreenshotReady = "screenshot_ready"; + public static readonly StringName ScreenshotRequested = "screenshot_requested"; + public static readonly StringName AddAppDependencyResult = "add_app_dependency_result"; + public static readonly StringName AddUgcDependencyResult = "add_ugc_dependency_result"; + public static readonly StringName ItemCreated = "item_created"; + public static readonly StringName ItemDownloaded = "item_downloaded"; + public static readonly StringName GetAppDependenciesResult = "get_app_dependencies_result"; + public static readonly StringName ItemDeleted = "item_deleted"; + public static readonly StringName GetItemVoteResult = "get_item_vote_result"; + public static readonly StringName ItemInstalled = "item_installed"; + public static readonly StringName RemoveAppDependencyResult = "remove_app_dependency_result"; + public static readonly StringName RemoveUgcDependencyResult = "remove_ugc_dependency_result"; + public static readonly StringName SetUserItemVoteSignal = "set_user_item_vote"; + public static readonly StringName StartPlaytimeTrackingSignal = "start_playtime_tracking"; + public static readonly StringName UgcQueryCompleted = "ugc_query_completed"; + public static readonly StringName StopPlaytimeTrackingSignal = "stop_playtime_tracking"; + public static readonly StringName ItemUpdated = "item_updated"; + public static readonly StringName UserFavoriteItemsListChanged = + "user_favorite_items_list_changed"; + public static readonly StringName WorkshopEulaStatus = "workshop_eula_status"; + public static readonly StringName UserSubscribedItemsListChanged = + "user_subscribed_items_list_changed"; + public static readonly StringName ClientGameServerDeny = "client_game_server_deny"; + public static readonly StringName DurationControl = "duration_control"; + public static readonly StringName EncryptedAppTicketResponse = "encrypted_app_ticket_response"; + public static readonly StringName GameWebCallback = "game_web_callback"; + public static readonly StringName GetAuthSessionTicketResponse = + "get_auth_session_ticket_response"; + public static readonly StringName GetTicketForWebApi = "get_ticket_for_web_api"; + public static readonly StringName IpcFailure = "ipc_failure"; + public static readonly StringName LicensesUpdated = "licenses_updated"; + public static readonly StringName MicrotransactionAuthResponse = + "microtransaction_auth_response"; + public static readonly StringName SteamServerConnectFailed = "steam_server_connect_failed"; + public static readonly StringName SteamServerConnected = "steam_server_connected"; + public static readonly StringName SteamServerDisconnected = "steam_server_disconnected"; + public static readonly StringName StoreAuthUrlResponse = "store_auth_url_response"; + public static readonly StringName ValidateAuthTicketResponse = "validate_auth_ticket_response"; + public static readonly StringName GlobalAchievementPercentagesReady = + "global_achievement_percentages_ready"; + public static readonly StringName GlobalStatsReceived = "global_stats_received"; + public static readonly StringName LeaderboardFindResult = "leaderboard_find_result"; + public static readonly StringName LeaderboardScoresDownloaded = "leaderboard_scores_downloaded"; + public static readonly StringName LeaderboardScoreUploaded = "leaderboard_score_uploaded"; + public static readonly StringName LeaderboardUgcSet = "leaderboard_ugc_set"; + public static readonly StringName NumberOfCurrentPlayers = "number_of_current_players"; + public static readonly StringName UserAchievementStored = "user_achievement_stored"; + public static readonly StringName CurrentStatsReceived = "current_stats_received"; + public static readonly StringName UserStatsReceived = "user_stats_received"; + public static readonly StringName UserStatsStored = "user_stats_stored"; + public static readonly StringName UserStatsUnloaded = "user_stats_unloaded"; + public static readonly StringName CheckFileSignature = "check_file_signature"; + public static readonly StringName GamepadTextInputDismissed = "gamepad_text_input_dismissed"; + public static readonly StringName IPCountry = "ip_country"; + public static readonly StringName LowPower = "low_power"; + public static readonly StringName SteamApiCallCompleted = "steam_api_call_completed"; + public static readonly StringName SteamShutdownSignal = "steam_shutdown"; + public static readonly StringName AppResumingFromSuspend = "app_resuming_from_suspend"; + public static readonly StringName FloatingGamepadTextInputDismissed = + "floating_gamepad_text_input_dismissed"; + public static readonly StringName FilterTextDictionaryChanged = + "filter_text_dictionary_changed"; + public static readonly StringName GetOpfSettingsResult = "get_opf_settings_result"; + public static readonly StringName GetVideoResult = "get_video_result"; +} diff --git a/addons/godotsteam_csharpbindings/Signals.cs.uid b/addons/godotsteam_csharpbindings/Signals.cs.uid new file mode 100644 index 00000000..6ecbb614 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Signals.cs.uid @@ -0,0 +1 @@ +uid://dy812x34p1upx diff --git a/addons/godotsteam_csharpbindings/Steam.AppLists.Signals.cs b/addons/godotsteam_csharpbindings/Steam.AppLists.Signals.cs new file mode 100644 index 00000000..53d2e70e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.AppLists.Signals.cs @@ -0,0 +1,60 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void AppInstalledEventHandler(uint appId, uint installFolderIndex); + private static event AppInstalledEventHandler AppInstalledEvent; + static Action _appInstalledAction = (appId, installFolderIndex) => + { + AppInstalledEvent?.Invoke(appId, installFolderIndex); + }; + public static event AppInstalledEventHandler AppInstalled + { + add + { + if (AppInstalledEvent == null) + { + GetInstance().Connect(Signals.AppInstalled, Callable.From(_appInstalledAction)); + } + AppInstalledEvent += value; + } + remove + { + AppInstalledEvent -= value; + if (AppInstalledEvent == null) + { + GetInstance().Disconnect(Signals.AppInstalled, Callable.From(_appInstalledAction)); + } + } + } + + public delegate void AppUninstalledEventHandler(uint appId, uint installFolderIndex); + private static event AppUninstalledEventHandler AppUninstalledEvent; + static Action _appUninstalledAction = (appId, installFolderIndex) => + { + AppUninstalledEvent?.Invoke(appId, installFolderIndex); + }; + public static event AppUninstalledEventHandler AppUninstalled + { + add + { + if (AppUninstalledEvent == null) + { + GetInstance().Connect(Signals.AppUninstalled, Callable.From(_appUninstalledAction)); + } + AppUninstalledEvent += value; + } + remove + { + AppUninstalledEvent -= value; + if (AppUninstalledEvent == null) + { + GetInstance() + .Disconnect(Signals.AppUninstalled, Callable.From(_appUninstalledAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.AppLists.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.AppLists.Signals.cs.uid new file mode 100644 index 00000000..8d95a4f5 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.AppLists.Signals.cs.uid @@ -0,0 +1 @@ +uid://bvregkp0xpd6w diff --git a/addons/godotsteam_csharpbindings/Steam.AppLists.cs b/addons/godotsteam_csharpbindings/Steam.AppLists.cs new file mode 100644 index 00000000..09adcb09 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.AppLists.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.Linq; +using Godot.Collections; + +namespace GodotSteam; + +public static partial class Steam +{ + public static List GetInstalledApps(uint maxAppIds) + { + var raw = GetInstance().Call(Methods.GetInstalledApps, maxAppIds).AsGodotArray(); + + return raw.Select(x => x.AsUInt32()).ToList(); + } + + public static string GetAppName(uint appId, int nameMax) + { + return GetInstance().Call(Methods.GetAppName, appId, nameMax).AsString(); + } + + public static string GetAppListInstallDir(uint appId, int nameMax) + { + return GetInstance().Call(Methods.GetAppListInstallDir, appId, nameMax).AsString(); + } + + public static int GetAppListBuildId(uint appId) + { + return GetInstance().Call(Methods.GetAppListBuildId, appId).AsInt32(); + } + + public static long GetNumInstalledApps() + { + return GetInstance().Call(Methods.GetNumInstalledApps).AsInt64(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.AppLists.cs.uid b/addons/godotsteam_csharpbindings/Steam.AppLists.cs.uid new file mode 100644 index 00000000..9dfb0c2f --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.AppLists.cs.uid @@ -0,0 +1 @@ +uid://cv1pfcxcfe8qs diff --git a/addons/godotsteam_csharpbindings/Steam.Apps.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Apps.Signals.cs new file mode 100644 index 00000000..9798cdcf --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Apps.Signals.cs @@ -0,0 +1,142 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void DlcInstalledEventHandler(uint appId); + private static event DlcInstalledEventHandler DlcInstalledEvent; + static Action _dlcInstalledAction = (appId) => + { + DlcInstalledEvent?.Invoke(appId); + }; + public static event DlcInstalledEventHandler DlcInstalled + { + add + { + if (DlcInstalledEvent == null) + { + GetInstance().Connect(Signals.DlcInstalled, Callable.From(_dlcInstalledAction)); + } + DlcInstalledEvent += value; + } + remove + { + DlcInstalledEvent -= value; + if (DlcInstalledEvent == null) + { + GetInstance().Disconnect(Signals.DlcInstalled, Callable.From(_dlcInstalledAction)); + } + } + } + + public delegate void FileDetailsResultEventHandler( + ErrorResult result, + ulong fileSize, + sbyte fileHash, + uint flags + ); + private static event FileDetailsResultEventHandler FileDetailsResultEvent; + static Action _fileDetailsResultAction = ( + result, + fileSize, + fileHash, + flags + ) => + { + FileDetailsResultEvent?.Invoke((ErrorResult)result, fileSize, fileHash, flags); + }; + public static event FileDetailsResultEventHandler FileDetailsResult + { + add + { + if (FileDetailsResultEvent == null) + { + GetInstance() + .Connect(Signals.FileDetailsResult, Callable.From(_fileDetailsResultAction)); + } + FileDetailsResultEvent += value; + } + remove + { + FileDetailsResultEvent -= value; + if (FileDetailsResultEvent == null) + { + GetInstance() + .Disconnect(Signals.FileDetailsResult, Callable.From(_fileDetailsResultAction)); + } + } + } + + private static event Action NewLaunchUrlParametersEvent; + static Action _newLaunchUrlParametersAction = () => + { + NewLaunchUrlParametersEvent?.Invoke(); + }; + public static event Action NewLaunchUrlParameters + { + add + { + if (NewLaunchUrlParametersEvent == null) + { + GetInstance() + .Connect( + Signals.NewLaunchUrlParameters, + Callable.From(_newLaunchUrlParametersAction) + ); + } + NewLaunchUrlParametersEvent += value; + } + remove + { + NewLaunchUrlParametersEvent -= value; + if (NewLaunchUrlParametersEvent == null) + { + GetInstance() + .Disconnect( + Signals.NewLaunchUrlParameters, + Callable.From(_newLaunchUrlParametersAction) + ); + } + } + } + + public delegate void TimedTrialStatusEventHandler( + uint appId, + bool isOffline, + uint secondsAllowed, + uint secondsPlayed + ); + private static event TimedTrialStatusEventHandler TimedTrialStatusEvent; + static Action _timeTrialStatusAction = ( + appId, + isOffline, + secondsAllowed, + secondsPlayed + ) => + { + TimedTrialStatusEvent?.Invoke(appId, isOffline, secondsAllowed, secondsPlayed); + }; + public static event TimedTrialStatusEventHandler TimedTrialStatus + { + add + { + if (TimedTrialStatusEvent == null) + { + GetInstance() + .Connect(Signals.TimedTrialStatus, Callable.From(_timeTrialStatusAction)); + } + TimedTrialStatusEvent += value; + } + remove + { + TimedTrialStatusEvent -= value; + if (TimedTrialStatusEvent == null) + { + GetInstance() + .Disconnect(Signals.TimedTrialStatus, Callable.From(_timeTrialStatusAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Apps.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Apps.Signals.cs.uid new file mode 100644 index 00000000..08108d34 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Apps.Signals.cs.uid @@ -0,0 +1 @@ +uid://22n4u8d7g7hx diff --git a/addons/godotsteam_csharpbindings/Steam.Apps.cs b/addons/godotsteam_csharpbindings/Steam.Apps.cs new file mode 100644 index 00000000..74fcb324 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Apps.cs @@ -0,0 +1,184 @@ +using System.Collections.Generic; +using System.Linq; +using Godot; +using Godot.Collections; + +namespace GodotSteam; + +public static partial class Steam +{ + public static bool IsAppInstalled(uint appId) + { + return GetInstance().Call(Methods.IsAppInstalled, appId).AsBool(); + } + + public static int GetAppBuildId() + { + return GetInstance().Call(Methods.GetAppBuildId).AsInt32(); + } + + public static InstalledApps GetAppInstallDir(uint appId) + { + var raw = GetInstance().Call(Methods.GetAppInstallDir, appId).AsGodotDictionary(); + + return new InstalledApps + { + Directory = raw["directory"].AsString(), + InstallSize = raw["install_size"].AsUInt32(), + }; + } + + public static ulong GetAppOwner() + { + return GetInstance().Call(Methods.GetAppOwner).AsUInt64(); + } + + public static string GetAvailableGameLanguages() + { + return GetInstance().Call(Methods.GetAvailableGameLanguages).AsString(); + } + + public static string GetCurrentBetaName() + { + return GetInstance().Call(Methods.GetCurrentBetaName).AsString(); + } + + public static string GetCurrentGameLanguage() + { + return GetInstance().Call(Methods.GetCurrentGameLanguage).AsString(); + } + + public static uint GetEarliestPurchaseUnixTime(uint appId) + { + return GetInstance().Call(Methods.GetEarliestPurchaseUnixTime, appId).AsUInt32(); + } + + public static void GetFileDetails(string fileName) + { + GetInstance().Call(Methods.GetFileDetails, fileName); + } + + public static List GetInstalledDepots(uint appId) + { + var raw = GetInstance().Call(Methods.GetInstalledDepots, appId).AsGodotArray(); + + return raw.Select(x => x.AsUInt32()).ToList(); + } + + public static string GetLaunchCommandLine() + { + return GetInstance().Call(Methods.GetLaunchCommandLine).AsString(); + } + + public static string GetLaunchQueryParam(string key) + { + return GetInstance().Call(Methods.GetLaunchQueryParam, key).AsString(); + } + + public static List GetDLCDataByIndex() + { + var raw = GetInstance().Call(Methods.GetDLCDataByIndex).AsGodotArray(); + + return raw.Select(rawDlc => rawDlc.AsGodotDictionary()) + .Select(dlcDictionary => new Dlc + { + AppId = dlcDictionary["app_id"].AsUInt32(), + Available = dlcDictionary["available"].AsBool(), + Name = dlcDictionary["name"].AsString(), + }) + .ToList(); + } + + public static bool IsDLCInstalled(uint dlcId) + { + return GetInstance().Call(Methods.IsDLCInstalled, dlcId).AsBool(); + } + + public static int GetDLCCount() + { + return GetInstance().Call(Methods.GetDLCCount).AsInt32(); + } + + public static DlcDownloadProgress GetDLCDownloadProgress(uint dlcId) + { + var raw = GetInstance().Call(Methods.GetDLCDownloadProgress, dlcId).AsGodotDictionary(); + + if (!raw.ContainsKey("ret") || !raw.ContainsKey("downloaded") || !raw.ContainsKey("total")) + { + return null; + } + + return new DlcDownloadProgress + { + Ret = raw["ret"].AsBool(), + Downloaded = raw["downloaded"].AsUInt64(), + Total = raw["total"].AsUInt64(), + }; + } + + public static void InstallDLC(uint dlcId) + { + GetInstance().Call(Methods.InstallDLC, dlcId); + } + + public static bool MarkContentCorrupt(bool missingFilesOnly) + { + return GetInstance().Call(Methods.MarkContentCorrupt, missingFilesOnly).AsBool(); + } + + public static bool SetDLCContext(uint appId) + { + return GetInstance().Call(Methods.SetDLCContext, appId).AsBool(); + } + + public static void UninstallDLC(uint dlcId) + { + GetInstance().Call(Methods.UninstallDLC, dlcId); + } + + public static bool IsLowViolence() + { + return GetInstance().Call(Methods.IsLowViolence).AsBool(); + } + + public static bool IsSubscribed() + { + return GetInstance().Call(Methods.IsSubscribed).AsBool(); + } + + public static bool IsSubscribedApp(uint appId) + { + return GetInstance().Call(Methods.IsSubscribedApp, appId).AsBool(); + } + + public static bool IsSubscribedFromFamilySharing() + { + return GetInstance().Call(Methods.IsSubscribedFromFamilySharing).AsBool(); + } + + public static bool IsSubscribedFromFreeWeekend() + { + return GetInstance().Call(Methods.IsSubscribedFromFreeWeekend).AsBool(); + } + + public static TimedTrial IsTimedTrial() + { + var raw = GetInstance().Call(Methods.IsTimedTrial).AsGodotDictionary(); + + if (!raw.ContainsKey("seconds_allowed") || !raw.ContainsKey("seconds_played")) + { + return null; + } + + return new TimedTrial + { + SecondsAllowed = raw["seconds_allowed"].AsUInt32(), + SecondsPlayed = raw["seconds_played"].AsUInt32(), + }; + } + + public static bool IsVACBanned() + { + return GetInstance().Call(Methods.IsVACBanned).AsBool(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Apps.cs.uid b/addons/godotsteam_csharpbindings/Steam.Apps.cs.uid new file mode 100644 index 00000000..5526ef12 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Apps.cs.uid @@ -0,0 +1 @@ +uid://dnmvwnkk5w3va diff --git a/addons/godotsteam_csharpbindings/Steam.Friends.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Friends.Signals.cs new file mode 100644 index 00000000..e05e2f95 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Friends.Signals.cs @@ -0,0 +1,826 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void AvatarLoadedEventHandler(ulong avatarId, int width, byte[] data); + private static event AvatarLoadedEventHandler AvatarLoadedEvent; + static Action _avatarLoadedAction = (avatarId, width, data) => + { + AvatarLoadedEvent?.Invoke(avatarId, width, data); + }; + public static event AvatarLoadedEventHandler AvatarLoaded + { + add + { + if (AvatarLoadedEvent == null) + { + GetInstance().Connect(Signals.AvatarLoaded, Callable.From(_avatarLoadedAction)); + } + AvatarLoadedEvent += value; + } + remove + { + AvatarLoadedEvent -= value; + if (AvatarLoadedEvent == null) + { + GetInstance().Disconnect(Signals.AvatarLoaded, Callable.From(_avatarLoadedAction)); + } + } + } + + public delegate void AvatarImageLoadedEventHandler( + ulong avatarId, + uint avatarIndex, + uint width, + uint height + ); + private static event AvatarImageLoadedEventHandler AvatarImageLoadedEvent; + static Action _avatarImageLoadedAction = ( + avatarId, + avatarIndex, + width, + height + ) => + { + AvatarImageLoadedEvent?.Invoke(avatarId, avatarIndex, width, height); + }; + public static event AvatarImageLoadedEventHandler AvatarImageLoaded + { + add + { + if (AvatarImageLoadedEvent == null) + { + GetInstance() + .Connect(Signals.AvatarImageLoaded, Callable.From(_avatarImageLoadedAction)); + } + AvatarImageLoadedEvent += value; + } + remove + { + AvatarImageLoadedEvent -= value; + if (AvatarImageLoadedEvent == null) + { + GetInstance() + .Disconnect(Signals.AvatarImageLoaded, Callable.From(_avatarImageLoadedAction)); + } + } + } + + public delegate void ChangeServerRequestedEventHandler(string server, string password); + private static event ChangeServerRequestedEventHandler ChangeServerRequestedEvent; + static Action _changeServerRequestedAction = (server, password) => + { + ChangeServerRequestedEvent?.Invoke(server, password); + }; + public static event ChangeServerRequestedEventHandler ChangeServerRequested + { + add + { + if (ChangeServerRequestedEvent == null) + { + GetInstance() + .Connect( + Signals.ChangeServerRequested, + Callable.From(_changeServerRequestedAction) + ); + } + ChangeServerRequestedEvent += value; + } + remove + { + ChangeServerRequestedEvent -= value; + if (ChangeServerRequestedEvent == null) + { + GetInstance() + .Disconnect( + Signals.ChangeServerRequested, + Callable.From(_changeServerRequestedAction) + ); + } + } + } + + public delegate void ClanActivityDownloadedEventHandler(int online, int ingame, int chatting); + private static event ClanActivityDownloadedEventHandler ClanActivityDownloadedEvent; + static Action _clanActivityDownloadedAction = (online, ingame, chatting) => + { + ClanActivityDownloadedEvent?.Invoke(online, ingame, chatting); + }; + public static event ClanActivityDownloadedEventHandler ClanActivityDownloaded + { + add + { + if (ClanActivityDownloadedEvent == null) + { + GetInstance() + .Connect( + Signals.ClanActivityDownloaded, + Callable.From(_clanActivityDownloadedAction) + ); + } + ClanActivityDownloadedEvent += value; + } + remove + { + ClanActivityDownloadedEvent -= value; + if (ClanActivityDownloadedEvent == null) + { + GetInstance() + .Disconnect( + Signals.ClanActivityDownloaded, + Callable.From(_clanActivityDownloadedAction) + ); + } + } + } + + public delegate void ConnectedChatJoinEventHandler(ulong chatId, ulong steamId); + private static event ConnectedChatJoinEventHandler ConnectedChatJoinEvent; + static Action _connectedChatJoinAction = (chatId, steamId) => + { + ConnectedChatJoinEvent?.Invoke(chatId, steamId); + }; + public static event ConnectedChatJoinEventHandler ConnectedChatJoin + { + add + { + if (ConnectedChatJoinEvent == null) + { + GetInstance() + .Connect(Signals.ConnectedChatJoin, Callable.From(_connectedChatJoinAction)); + } + ConnectedChatJoinEvent += value; + } + remove + { + ConnectedChatJoinEvent -= value; + if (ConnectedChatJoinEvent == null) + { + GetInstance() + .Disconnect(Signals.ConnectedChatJoin, Callable.From(_connectedChatJoinAction)); + } + } + } + + public delegate void ConnectedChatLeaveEventHandler( + ulong chatId, + ulong steamId, + bool kicked, + bool dropped + ); + private static event ConnectedChatLeaveEventHandler ConnectedChatLeaveEvent; + static Action _connectedChatLeaveAction = ( + chatId, + steamId, + kicked, + dropped + ) => + { + ConnectedChatLeaveEvent?.Invoke(chatId, steamId, kicked, dropped); + }; + public static event ConnectedChatLeaveEventHandler ConnectedChatLeave + { + add + { + if (ConnectedChatLeaveEvent == null) + { + GetInstance() + .Connect(Signals.ConnectedChatLeave, Callable.From(_connectedChatLeaveAction)); + } + ConnectedChatLeaveEvent += value; + } + remove + { + ConnectedChatLeaveEvent -= value; + if (ConnectedChatLeaveEvent == null) + { + GetInstance() + .Disconnect( + Signals.ConnectedChatLeave, + Callable.From(_connectedChatLeaveAction) + ); + } + } + } + + public delegate void ConnectedClanChatMessageEventHandler( + int ret, + string text, + string type, + ulong chatter + ); + private static event ConnectedClanChatMessageEventHandler ConnectedClanChatMessageEvent; + static Action _connectedClanChatMessageAction = (raw) => + { + ConnectedClanChatMessageEvent?.Invoke( + raw["ret"].AsInt32(), + raw["text"].AsString(), + raw["type"].AsString(), + raw["chatter"].AsUInt64() + ); + }; + public static event ConnectedClanChatMessageEventHandler ConnectedClanChatMessage + { + add + { + if (ConnectedClanChatMessageEvent == null) + { + GetInstance() + .Connect( + Signals.ConnectedClanChatMessage, + Callable.From(_connectedClanChatMessageAction) + ); + } + ConnectedClanChatMessageEvent += value; + } + remove + { + ConnectedClanChatMessageEvent -= value; + if (ConnectedClanChatMessageEvent == null) + { + GetInstance() + .Disconnect( + Signals.ConnectedClanChatMessage, + Callable.From(_connectedClanChatMessageAction) + ); + } + } + } + + public delegate void ConnectedFriendChatMessageEventHandler(int ret, string text); + private static event ConnectedFriendChatMessageEventHandler ConnectedFriendChatMessageEvent; + static Action _connectedFriendChatMessageAction = (raw) => + { + ConnectedFriendChatMessageEvent?.Invoke(raw["ret"].AsInt32(), raw["text"].AsString()); + }; + public static event ConnectedFriendChatMessageEventHandler ConnectedFriendChatMessage + { + add + { + if (ConnectedFriendChatMessageEvent == null) + { + GetInstance() + .Connect( + Signals.ConnectedFriendChatMessage, + Callable.From(_connectedFriendChatMessageAction) + ); + } + ConnectedFriendChatMessageEvent += value; + } + remove + { + ConnectedFriendChatMessageEvent -= value; + if (ConnectedFriendChatMessageEvent == null) + { + GetInstance() + .Disconnect( + Signals.ConnectedFriendChatMessage, + Callable.From(_connectedFriendChatMessageAction) + ); + } + } + } + + public delegate void EnumerateFollowingListSignalEventHandler( + string message, + List following + ); + private static event EnumerateFollowingListSignalEventHandler EnumerateFollowingListSignalEvent; + static Action _enumerateFollowingListSignalAction = ( + message, + following + ) => + { + EnumerateFollowingListSignalEvent?.Invoke( + message, + following + .Select(rawFollow => rawFollow.AsGodotDictionary()) + .Select(followDictionary => new Follow + { + Num = followDictionary["num"].AsInt32(), + Id = followDictionary["id"].AsUInt64(), + }) + .ToList() + ); + }; + public static event EnumerateFollowingListSignalEventHandler EnumerateFollowingListSignal + { + add + { + if (EnumerateFollowingListSignalEvent == null) + { + GetInstance() + .Connect( + Signals.EnumerateFollowingListSignal, + Callable.From(_enumerateFollowingListSignalAction) + ); + } + EnumerateFollowingListSignalEvent += value; + } + remove + { + EnumerateFollowingListSignalEvent -= value; + if (EnumerateFollowingListSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.EnumerateFollowingListSignal, + Callable.From(_enumerateFollowingListSignalAction) + ); + } + } + } + + public delegate void EquippedProfileItemsChangedEventHandler(ulong steamId); + private static event EquippedProfileItemsChangedEventHandler EquippedProfileItemsChangedEvent; + static Action _equippedProfileItemsChangedAction = (steamId) => + { + EquippedProfileItemsChangedEvent?.Invoke(steamId); + }; + public static event EquippedProfileItemsChangedEventHandler EquippedProfileItemsChanged + { + add + { + if (EquippedProfileItemsChangedEvent == null) + { + GetInstance() + .Connect( + Signals.EquippedProfileItemsChanged, + Callable.From(_equippedProfileItemsChangedAction) + ); + } + EquippedProfileItemsChangedEvent += value; + } + remove + { + EquippedProfileItemsChangedEvent -= value; + if (EquippedProfileItemsChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.EquippedProfileItemsChanged, + Callable.From(_equippedProfileItemsChangedAction) + ); + } + } + } + + public delegate void EquippedProfileItemsEventHandler( + ErrorResult result, + ulong steamId, + ProfileData profileData + ); + private static event EquippedProfileItemsEventHandler EquippedProfileItemsEvent; + static Action _equippedProfileItemsAction = ( + result, + steamId, + profileData + ) => + { + EquippedProfileItemsEvent?.Invoke( + (ErrorResult)result, + steamId, + new ProfileData + { + AvatarAnimated = profileData["avatar_animated"].AsBool(), + AvatarFrame = profileData["avatar_frame"].AsBool(), + ProfileModifier = profileData["profile_modifier"].AsBool(), + ProfileBackground = profileData["profile_background"].AsBool(), + ProfileMiniBackground = profileData["profile_mini_background"].AsBool(), + } + ); + }; + public static event EquippedProfileItemsEventHandler EquippedProfileItems + { + add + { + if (EquippedProfileItemsEvent == null) + { + GetInstance() + .Connect( + Signals.EquippedProfileItems, + Callable.From(_equippedProfileItemsAction) + ); + } + EquippedProfileItemsEvent += value; + } + remove + { + EquippedProfileItemsEvent -= value; + if (EquippedProfileItemsEvent == null) + { + GetInstance() + .Disconnect( + Signals.EquippedProfileItems, + Callable.From(_equippedProfileItemsAction) + ); + } + } + } + + public delegate void FriendRichPresenceUpdateEventHandler(ulong steamId, uint appId); + private static event FriendRichPresenceUpdateEventHandler FriendRichPresenceUpdateEvent; + static Action _friendRichPresenceUpdateAction = (steamId, appId) => + { + FriendRichPresenceUpdateEvent?.Invoke(steamId, appId); + }; + public static event FriendRichPresenceUpdateEventHandler FriendRichPresenceUpdate + { + add + { + if (FriendRichPresenceUpdateEvent == null) + { + GetInstance() + .Connect( + Signals.FriendRichPresenceUpdate, + Callable.From(_friendRichPresenceUpdateAction) + ); + } + FriendRichPresenceUpdateEvent += value; + } + remove + { + FriendRichPresenceUpdateEvent -= value; + if (FriendRichPresenceUpdateEvent == null) + { + GetInstance() + .Disconnect( + Signals.FriendRichPresenceUpdate, + Callable.From(_friendRichPresenceUpdateAction) + ); + } + } + } + + public delegate void GetFollowerCountSignalEventHandler( + ErrorResult result, + ulong steamId, + int count + ); + private static event GetFollowerCountSignalEventHandler GetFollowerCountSignalEvent; + static Action _getFollowerCountSignalAction = (result, steamId, count) => + { + GetFollowerCountSignalEvent?.Invoke((ErrorResult)result, steamId, count); + }; + public static event GetFollowerCountSignalEventHandler GetFollowerCountSignal + { + add + { + if (GetFollowerCountSignalEvent == null) + { + GetInstance() + .Connect( + Signals.GetFollowerCountSignal, + Callable.From(_getFollowerCountSignalAction) + ); + } + GetFollowerCountSignalEvent += value; + } + remove + { + GetFollowerCountSignalEvent -= value; + if (GetFollowerCountSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.GetFollowerCountSignal, + Callable.From(_getFollowerCountSignalAction) + ); + } + } + } + + public delegate void IsFollowingSignalEventHandler( + ErrorResult result, + ulong steamId, + bool following + ); + private static event IsFollowingSignalEventHandler IsFollowingSignalEvent; + static Action _isFollowingSignalAction = (result, steamId, following) => + { + IsFollowingSignalEvent?.Invoke((ErrorResult)result, steamId, following); + }; + public static event IsFollowingSignalEventHandler IsFollowingSignal + { + add + { + if (IsFollowingSignalEvent == null) + { + GetInstance() + .Connect(Signals.IsFollowingSignal, Callable.From(_isFollowingSignalAction)); + } + IsFollowingSignalEvent += value; + } + remove + { + IsFollowingSignalEvent -= value; + if (IsFollowingSignalEvent == null) + { + GetInstance() + .Disconnect(Signals.IsFollowingSignal, Callable.From(_isFollowingSignalAction)); + } + } + } + + public delegate void JoinClanChatCompleteEventHandler( + ulong chatId, + ChatRoomEnterResponse response + ); + private static event JoinClanChatCompleteEventHandler JoinClanChatCompleteEvent; + static Action _joinClanChatCompleteAction = (chatId, response) => + { + JoinClanChatCompleteEvent?.Invoke(chatId, (ChatRoomEnterResponse)response); + }; + public static event JoinClanChatCompleteEventHandler JoinClanChatComplete + { + add + { + if (JoinClanChatCompleteEvent == null) + { + GetInstance() + .Connect( + Signals.JoinClanChatComplete, + Callable.From(_joinClanChatCompleteAction) + ); + } + JoinClanChatCompleteEvent += value; + } + remove + { + JoinClanChatCompleteEvent -= value; + if (JoinClanChatCompleteEvent == null) + { + GetInstance() + .Disconnect( + Signals.JoinClanChatComplete, + Callable.From(_joinClanChatCompleteAction) + ); + } + } + } + + public delegate void JoinGameRequestedEventHandler(ulong user, string connect); + private static event JoinGameRequestedEventHandler JoinGameRequestedEvent; + static Action _joinGameRequestedAction = (user, connect) => + { + JoinGameRequestedEvent?.Invoke(user, connect); + }; + public static event JoinGameRequestedEventHandler JoinGameRequested + { + add + { + if (JoinGameRequestedEvent == null) + { + GetInstance() + .Connect(Signals.JoinGameRequested, Callable.From(_joinGameRequestedAction)); + } + JoinGameRequestedEvent += value; + } + remove + { + JoinGameRequestedEvent -= value; + if (JoinGameRequestedEvent == null) + { + GetInstance() + .Disconnect(Signals.JoinGameRequested, Callable.From(_joinGameRequestedAction)); + } + } + } + + public delegate void JoinRequestedEventHandler(ulong lobbyId, ulong steamId); + private static event JoinRequestedEventHandler JoinRequestedEvent; + static Action _joinRequestedAction = (lobbyId, steamId) => + { + JoinRequestedEvent?.Invoke(lobbyId, steamId); + }; + public static event JoinRequestedEventHandler JoinRequested + { + add + { + if (JoinRequestedEvent == null) + { + GetInstance().Connect(Signals.JoinRequested, Callable.From(_joinRequestedAction)); + } + JoinRequestedEvent += value; + } + remove + { + JoinRequestedEvent -= value; + if (JoinRequestedEvent == null) + { + GetInstance() + .Disconnect(Signals.JoinRequested, Callable.From(_joinRequestedAction)); + } + } + } + + public delegate void NameChangedEventHandler( + bool success, + bool localSuccess, + ErrorResult result + ); + private static event NameChangedEventHandler NameChangedEvent; + static Action _nameChangedAction = (success, localSuccess, result) => + { + NameChangedEvent?.Invoke(success, localSuccess, (ErrorResult)result); + }; + public static event NameChangedEventHandler NameChanged + { + add + { + if (NameChangedEvent == null) + { + GetInstance().Connect(Signals.NameChanged, Callable.From(_nameChangedAction)); + } + NameChangedEvent += value; + } + remove + { + NameChangedEvent -= value; + if (NameChangedEvent == null) + { + GetInstance().Disconnect(Signals.NameChanged, Callable.From(_nameChangedAction)); + } + } + } + + public delegate void OverlayBrowserProtocolEventHandler(Uri uri); + private static event OverlayBrowserProtocolEventHandler OverlayBrowserProtocolEvent; + static Action _overlayBrowserProtocolAction = (uri) => + { + OverlayBrowserProtocolEvent?.Invoke(new Uri(uri)); + }; + public static event OverlayBrowserProtocolEventHandler OverlayBrowserProtocol + { + add + { + if (OverlayBrowserProtocolEvent == null) + { + GetInstance() + .Connect( + Signals.OverlayBrowserProtocol, + Callable.From(_overlayBrowserProtocolAction) + ); + } + OverlayBrowserProtocolEvent += value; + } + remove + { + OverlayBrowserProtocolEvent -= value; + if (OverlayBrowserProtocolEvent == null) + { + GetInstance() + .Disconnect( + Signals.OverlayBrowserProtocol, + Callable.From(_overlayBrowserProtocolAction) + ); + } + } + } + + public delegate void OverlayToggledEventHandler(bool active, bool userInitiated, uint appId); + private static event OverlayToggledEventHandler OverlayToggledEvent; + static Action _overlayToggledAction = (active, userInitiated, appId) => + { + OverlayToggledEvent?.Invoke(active, userInitiated, appId); + }; + public static event OverlayToggledEventHandler OverlayToggled + { + add + { + if (OverlayToggledEvent == null) + { + GetInstance().Connect(Signals.OverlayToggled, Callable.From(_overlayToggledAction)); + } + OverlayToggledEvent += value; + } + remove + { + OverlayToggledEvent -= value; + if (OverlayToggledEvent == null) + { + GetInstance() + .Disconnect(Signals.OverlayToggled, Callable.From(_overlayToggledAction)); + } + } + } + + public delegate void PersonaStateChangeEventHandler(ulong steamId, PersonaChange flags); + private static event PersonaStateChangeEventHandler PersonaStateChangeEvent; + static Action _personaStateChangeAction = (steamId, flags) => + { + PersonaStateChangeEvent?.Invoke(steamId, (PersonaChange)flags); + }; + public static event PersonaStateChangeEventHandler PersonaStateChange + { + add + { + if (PersonaStateChangeEvent == null) + { + GetInstance() + .Connect(Signals.PersonaStateChange, Callable.From(_personaStateChangeAction)); + } + PersonaStateChangeEvent += value; + } + remove + { + PersonaStateChangeEvent -= value; + if (PersonaStateChangeEvent == null) + { + GetInstance() + .Disconnect( + Signals.PersonaStateChange, + Callable.From(_personaStateChangeAction) + ); + } + } + } + + public delegate void RequestClanOfficerListSignalEventHandler( + string message, + List officerList + ); + private static event RequestClanOfficerListSignalEventHandler RequestClanOfficerListSignalEvent; + static Action _requestClanOfficerListSignalAction = ( + message, + officerList + ) => + { + RequestClanOfficerListSignalEvent?.Invoke( + message, + officerList + .Select(rawOfficer => rawOfficer.AsGodotDictionary()) + .Select(officerDictionary => new ClanOfficer + { + Id = officerDictionary["id"].AsUInt64(), + Name = officerDictionary["name"].AsString(), + }) + .ToList() + ); + }; + public static event RequestClanOfficerListSignalEventHandler RequestClanOfficerListSignal + { + add + { + if (RequestClanOfficerListSignalEvent == null) + { + GetInstance() + .Connect( + Signals.RequestClanOfficerListSignal, + Callable.From(_requestClanOfficerListSignalAction) + ); + } + RequestClanOfficerListSignalEvent += value; + } + remove + { + RequestClanOfficerListSignalEvent -= value; + if (RequestClanOfficerListSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.RequestClanOfficerListSignal, + Callable.From(_requestClanOfficerListSignalAction) + ); + } + } + } + + private static event Action UnreadChatMessagesChangedEvent; + static Action _unreadChatMessagesChangedAction = () => + { + UnreadChatMessagesChangedEvent?.Invoke(); + }; + public static event Action UnreadChatMessagesChanged + { + add + { + if (UnreadChatMessagesChangedEvent == null) + { + GetInstance() + .Connect( + Signals.UnreadChatMessagesChanged, + Callable.From(_unreadChatMessagesChangedAction) + ); + } + UnreadChatMessagesChangedEvent += value; + } + remove + { + UnreadChatMessagesChangedEvent -= value; + if (UnreadChatMessagesChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.UnreadChatMessagesChanged, + Callable.From(_unreadChatMessagesChangedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Friends.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Friends.Signals.cs.uid new file mode 100644 index 00000000..5de9acc2 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Friends.Signals.cs.uid @@ -0,0 +1 @@ +uid://b0d4cx08c5cyv diff --git a/addons/godotsteam_csharpbindings/Steam.Friends.cs b/addons/godotsteam_csharpbindings/Steam.Friends.cs new file mode 100644 index 00000000..288aed7e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Friends.cs @@ -0,0 +1,536 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Godot; +using Godot.Collections; +using Godot.NativeInterop; + +namespace GodotSteam; + +public static partial class Steam +{ + public static void ActivateGameOverlay(GameOverlayType type) + { + GetInstance().Call(Methods.ActivateGameOverlay, type.ToGodotSteam()); + } + + public static void ActivateGameOverlayInviteDialog(ulong steamId) + { + GetInstance().Call(Methods.ActivateGameOverlayInviteDialog, steamId); + } + + public static void ActivateGameOverlayInviteDialogConnectString(string connectString) + { + GetInstance().Call(Methods.ActivateGameOverlayInviteDialogConnectString, connectString); + } + + public static void ActivateGameOverlayToStore(uint appId = 0) + { + GetInstance().Call(Methods.ActivateGameOverlayToStore, appId); + } + + public static void ActivateGameOverlayToUser(GameOverlayUserType type, ulong steamId = 0) + { + GetInstance().Call(Methods.ActivateGameOverlayToUser, type.ToGodotSteam(), steamId); + } + + public static void ActivateGameOverlayToWebPage(string url) + { + GetInstance().Call(Methods.ActivateGameOverlayToWebPage, url); + } + + public static void GetFollowerCount(ulong steamId) + { + GetInstance().Call(Methods.GetFollowerCount, steamId); + } + + public static ulong GetFriendByIndex(int friendNumber, FriendFlag friendFlags) + { + return GetInstance() + .Call(Methods.GetFriendByIndex, friendNumber, (int)friendFlags) + .AsUInt64(); + } + + public static uint GetFriendCoplayGame(ulong friendId) + { + return GetInstance().Call(Methods.GetFriendCoplayGame, friendId).AsUInt32(); + } + + public static int GetFriendCoplayTime(ulong friendId) + { + return GetInstance().Call(Methods.GetFriendCoplayTime, friendId).AsInt32(); + } + + public static int GetFriendCount(FriendFlag friendFlags = FriendFlag.Immediate) + { + return GetInstance().Call(Methods.GetFriendCount, (int)friendFlags).AsInt32(); + } + + public static int GetFriendCountFromSource(long sourceId) + { + return GetInstance().Call(Methods.GetFriendCountFromSource, sourceId).AsInt32(); + } + + public static ulong GetFriendFromSourceByIndex(ulong sourceId, long friendNumber) + { + return GetInstance() + .Call(Methods.GetFriendFromSourceByIndex, sourceId, friendNumber) + .AsUInt64(); + } + + public static Godot.Collections.Dictionary GetFriendGamePlayed(ulong steamId) + { + return GetInstance().Call(Methods.GetFriendGamePlayed, steamId).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetFriendMessage(ulong friendId, long message) + { + return GetInstance().Call(Methods.GetFriendMessage, friendId, message).AsGodotDictionary(); + } + + public static string GetFriendPersonaName(ulong steamId) + { + return GetInstance().Call(Methods.GetFriendPersonaName, steamId).AsString(); + } + + public static string GetFriendPersonaNameHistory(ulong steamId, long nameHistory) + { + return GetInstance() + .Call(Methods.GetFriendPersonaNameHistory, steamId, nameHistory) + .AsString(); + } + + public static PersonaState GetFriendPersonaState(ulong steamId) + { + return (PersonaState)GetInstance().Call(Methods.GetFriendPersonaState, steamId).AsInt64(); + } + + public static FriendRelationship GetFriendRelationship(ulong steamId) + { + return (FriendRelationship) + GetInstance().Call(Methods.GetFriendRelationship, steamId).AsInt64(); + } + + public static string GetFriendRichPresence(ulong friendId, string key) + { + return GetInstance().Call(Methods.GetFriendRichPresence, friendId, key).AsString(); + } + + public static int GetFriendRichPresenceKeyCount(ulong friendId) + { + return GetInstance().Call(Methods.GetFriendRichPresenceKeyCount, friendId).AsInt32(); + } + + public static string GetFriendRichPresenceKeyByIndex(ulong friendId, int key) + { + return GetInstance() + .Call(Methods.GetFriendRichPresenceKeyByIndex, friendId, key) + .AsString(); + } + + public static int GetFriendsGroupCount() + { + return GetInstance().Call(Methods.GetFriendsGroupCount).AsInt32(); + } + + public static short GetFriendsGroupIDByIndex(short friendGroup) + { + return GetInstance().Call(Methods.GetFriendsGroupIDByIndex, friendGroup).AsInt16(); + } + + public static int GetFriendsGroupMembersCount(short friendGroup) + { + return GetInstance().Call(Methods.GetFriendsGroupMembersCount, friendGroup).AsInt32(); + } + + public static List GetFriendsGroupMembersList(short friendGroup, long memberCount) + { + var raw = GetInstance() + .Call(Methods.GetFriendsGroupMembersList, friendGroup, memberCount) + .AsGodotArray(); + + return raw.Select(x => x.AsUInt64()).ToList(); + } + + public static string GetFriendsGroupName(short friendGroup) + { + return GetInstance().Call(Methods.GetFriendsGroupName, friendGroup).AsString(); + } + + public static int GetFriendSteamLevel(ulong steamId) + { + return GetInstance().Call(Methods.GetFriendSteamLevel, steamId).AsInt32(); + } + + public static int GetLargeFriendAvatar(ulong steamId) + { + return GetInstance().Call(Methods.GetLargeFriendAvatar, steamId).AsInt32(); + } + + public static int GetMediumFriendAvatar(ulong steamId) + { + return GetInstance().Call(Methods.GetMediumFriendAvatar, steamId).AsInt32(); + } + + public static int GetSmallFriendAvatar(ulong steamId) + { + return GetInstance().Call(Methods.GetSmallFriendAvatar, steamId).AsInt32(); + } + + public static bool ReplyToFriendMessage(ulong steamId, string message) + { + return GetInstance().Call(Methods.ReplyToFriendMessage, steamId, message).AsBool(); + } + + public static void RequestFriendRichPresence(ulong friendId) + { + GetInstance().Call(Methods.RequestFriendRichPresence, friendId); + } + + public static bool SetListenForFriendsMessages(bool intercept) + { + return GetInstance().Call(Methods.SetListenForFriendsMessages, intercept).AsBool(); + } + + public static ulong GetCoplayFriend(int friendNumber) + { + return GetInstance().Call(Methods.GetCoplayFriend, friendNumber).AsUInt64(); + } + + public static int GetCoplayFriendCount() + { + return GetInstance().Call(Methods.GetCoplayFriendCount).AsInt32(); + } + + public static bool CloseClanChatWindowInSteam(ulong chatId) + { + return GetInstance().Call(Methods.CloseClanChatWindowInSteam, chatId).AsBool(); + } + + public static void DownloadClanActivityCounts(ulong chatId, int clansToRequest) + { + GetInstance().Call(Methods.DownloadClanActivityCounts, chatId, clansToRequest); + } + + public static void EnumerateFollowingList(uint startIndex) + { + GetInstance().Call(Methods.EnumerateFollowingList, startIndex); + } + + public static ulong GetChatMemberByIndex(ulong clanId, long user) + { + return GetInstance().Call(Methods.GetChatMemberByIndex, clanId, user).AsUInt64(); + } + + public static ClanActivityCounts GetClanActivityCounts(ulong clanId) + { + var raw = GetInstance().Call(Methods.GetClanActivityCounts, clanId).AsGodotDictionary(); + + if ( + !raw.ContainsKey("clan") + || !raw.ContainsKey("online") + || !raw.ContainsKey("ingame") + || !raw.ContainsKey("chatting") + ) + { + return null; + } + + return new ClanActivityCounts + { + Clan = raw["clan"].AsUInt64(), + Online = raw["online"].AsInt32(), + Ingame = raw["ingame"].AsInt32(), + Chatting = raw["chatting"].AsInt32(), + }; + } + + public static ulong GetClanByIndex(int clan) + { + return GetInstance().Call(Methods.GetClanByIndex, clan).AsUInt64(); + } + + public static int GetClanChatMemberCount(ulong clanId) + { + return GetInstance().Call(Methods.GetClanChatMemberCount, clanId).AsInt32(); + } + + public static ClanChatMessage GetClanChatMessage(ulong chatId, long message) + { + var raw = GetInstance() + .Call(Methods.GetClanChatMessage, chatId, message) + .AsGodotDictionary(); + + if (!raw.ContainsKey("ret")) + { + return null; + } + + return new ClanChatMessage + { + Ret = raw["ret"].AsBool(), + Text = raw["text"].AsString(), + Type = (ClanChatMessageType)raw["type"].AsInt32(), + Chatter = raw["chatter"].AsUInt64(), + }; + } + + public static int GetClanCount() + { + return GetInstance().Call(Methods.GetClanCount).AsInt32(); + } + + public static string GetClanName(ulong clanId) + { + return GetInstance().Call(Methods.GetClanName, clanId).AsString(); + } + + public static ulong GetClanOfficerByIndex(ulong clanId, int officer) + { + return GetInstance().Call(Methods.GetClanOfficerByIndex, clanId, officer).AsUInt64(); + } + + public static int GetClanOfficerCount(ulong clanId) + { + return GetInstance().Call(Methods.GetClanOfficerCount, clanId).AsInt32(); + } + + public static ulong GetClanOwner(ulong clanId) + { + return GetInstance().Call(Methods.GetClanOwner, clanId).AsUInt64(); + } + + public static string GetClanTag(ulong clanId) + { + return GetInstance().Call(Methods.GetClanTag, clanId).AsString(); + } + + public static bool IsClanChatAdmin(ulong chatId, ulong steamId) + { + return GetInstance().Call(Methods.IsClanChatAdmin, chatId, steamId).AsBool(); + } + + public static bool IsClanPublic(ulong clanId) + { + return GetInstance().Call(Methods.IsClanPublic, clanId).AsBool(); + } + + public static bool IsClanOfficialGameGroup(ulong clanId) + { + return GetInstance().Call(Methods.IsClanOfficialGameGroup, clanId).AsBool(); + } + + public static bool IsClanChatWindowOpenInSteam(ulong chatId) + { + return GetInstance().Call(Methods.IsClanChatWindowOpenInSteam, chatId).AsBool(); + } + + public static void JoinClanChatRoom(ulong clanId) + { + GetInstance().Call(Methods.JoinClanChatRoom, clanId); + } + + public static bool LeaveClanChatRoom(ulong clanId) + { + return GetInstance().Call(Methods.LeaveClanChatRoom, clanId).AsBool(); + } + + public static bool OpenClanChatWindowInSteam(ulong chatId) + { + return GetInstance().Call(Methods.OpenClanChatWindowInSteam, chatId).AsBool(); + } + + public static void RequestClanOfficerList(ulong clanId) + { + GetInstance().Call(Methods.RequestClanOfficerList, clanId); + } + + public static bool SendClanChatMessage(ulong chatId, string text) + { + return GetInstance().Call(Methods.SendClanChatMessage, chatId, text).AsBool(); + } + + public static string GetPersonaName() + { + return GetInstance().Call(Methods.GetPersonaName).AsString(); + } + + public static PersonaState GetPersonaState() + { + return (PersonaState)GetInstance().Call(Methods.GetPersonaState).AsInt64(); + } + + public static void GetPlayerAvatar(AvatarSize size = AvatarSize.Medium, ulong steamId = 0) + { + GetInstance().Call(Methods.GetPlayerAvatar, (int)size, steamId); + } + + public static string GetPlayerNickname(ulong steamId) + { + return GetInstance().Call(Methods.GetPlayerNickname, steamId).AsString(); + } + + public static string GetProfileItemPropertyString( + ulong steamId, + CommunityProfileItemType itemType, + CommunityProfileItemProperty itemProperty + ) + { + return GetInstance() + .Call(Methods.GetProfileItemPropertyString, steamId, (int)itemType, (int)itemProperty) + .AsString(); + } + + public static uint GetProfileItemPropertyInt( + ulong steamId, + CommunityProfileItemType itemType, + CommunityProfileItemProperty itemProperty + ) + { + return GetInstance() + .Call(Methods.GetProfileItemPropertyInt, steamId, (int)itemType, (int)itemProperty) + .AsUInt32(); + } + + public static List GetRecentPlayers() + { + var raw = GetInstance().Call(Methods.GetRecentPlayers).AsGodotArray(); + + return raw.Select(rawPlayer => rawPlayer.AsGodotDictionary()) + .Select(playerDictionary => new RecentPlayer + { + Id = playerDictionary["id"].AsUInt64(), + Name = playerDictionary["name"].AsString(), + Time = playerDictionary["time"].AsInt32(), + Status = (PersonaState)playerDictionary["status"].AsInt32(), + }) + .ToList(); + } + + public static List GetUserFriendsGroups() + { + var raw = GetInstance().Call(Methods.GetUserFriendsGroups).AsGodotArray(); + + return raw.Select(rawFriendGroup => rawFriendGroup.AsGodotDictionary()) + .Select(friendGroupDictionary => new FriendGroup + { + Id = friendGroupDictionary["id"].AsInt16(), + Name = friendGroupDictionary["name"].AsString(), + Members = friendGroupDictionary["time"].AsInt32(), + }) + .ToList(); + } + + public static UserRestriction GetUserRestrictions() + { + return (UserRestriction)GetInstance().Call(Methods.GetUserRestrictions).AsUInt32(); + } + + public static List GetUserSteamFriends() + { + var raw = GetInstance().Call(Methods.GetUserSteamFriends).AsGodotArray(); + + return raw.Select(rawFriend => rawFriend.AsGodotDictionary()) + .Select(friendDictionary => new Friend + { + Id = friendDictionary["id"].AsUInt64(), + Name = friendDictionary["name"].AsString(), + Status = (PersonaState)friendDictionary["status"].AsInt32(), + }) + .ToList(); + } + + public static List GetUserSteamGroups() + { + var raw = GetInstance().Call(Methods.GetUserSteamGroups).AsGodotArray(); + + return raw.Select(rawGroups => rawGroups.AsGodotDictionary()) + .Select(groupDictionary => new SteamGroup + { + Id = groupDictionary["id"].AsUInt64(), + Name = groupDictionary["name"].AsString(), + Tag = groupDictionary["tag"].AsString(), + }) + .ToList(); + } + + public static bool HasEquippedProfileItem(ulong steamId, CommunityProfileItemType itemType) + { + return GetInstance().Call(Methods.HasEquippedProfileItem, steamId, (long)itemType).AsBool(); + } + + public static bool HasFriend(ulong steamId, FriendFlag friendFlags) + { + return GetInstance().Call(Methods.HasFriend, steamId, (int)friendFlags).AsBool(); + } + + public static bool InviteUserToGame(ulong friendId, string connectString) + { + return GetInstance().Call(Methods.InviteUserToGame, friendId, connectString).AsBool(); + } + + public static void IsFollowing(ulong steamId) + { + GetInstance().Call(Methods.IsFollowing, steamId); + } + + public static bool IsUserInSource(ulong steamId, ulong sourceId) + { + return GetInstance().Call(Methods.IsUserInSource, steamId, sourceId).AsBool(); + } + + public static void RequestEquippedProfileItems(ulong steamId) + { + GetInstance().Call(Methods.RequestEquippedProfileItems, steamId); + } + + public static bool RequestUserInformation(ulong steamId, bool requireNameOnly) + { + return GetInstance() + .Call(Methods.RequestUserInformation, steamId, requireNameOnly) + .AsBool(); + } + + public static void SetPersonaName(string name) + { + GetInstance().Call(Methods.SetPersonaName, name); + } + + public static void SetPlayedWith(ulong steamId) + { + GetInstance().Call(Methods.SetPlayedWith, steamId); + } + + public static bool SetRichPresence(string richPresenceKey, string value) + { + return GetInstance().Call(Methods.SetRichPresence, richPresenceKey, value).AsBool(); + } + + public static void SetInGameVoiceSpeaking(ulong steamId, bool speaking) + { + GetInstance().Call(Methods.SetInGameVoiceSpeaking, steamId, speaking); + } + + public static void ClearRichPresence() + { + GetInstance().Call(Methods.ClearRichPresence); + } + + public static bool RegisterProtocolInOverlayBrowser(string protocol) + { + return GetInstance().Call(Methods.RegisterProtocolInOverlayBrowser, protocol).AsBool(); + } + + public enum OverlayToStoreFlag : long + { + None = 0, + AddToCart = 1, + AndToCartAndShow = 2, + } + + public enum OverlayToWebPageMode : long + { + Default = 0, + Modal = 1, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Friends.cs.uid b/addons/godotsteam_csharpbindings/Steam.Friends.cs.uid new file mode 100644 index 00000000..a7921146 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Friends.cs.uid @@ -0,0 +1 @@ +uid://4ubxcddlrnq1 diff --git a/addons/godotsteam_csharpbindings/Steam.GameSearch.Signals.cs b/addons/godotsteam_csharpbindings/Steam.GameSearch.Signals.cs new file mode 100644 index 00000000..80cc1665 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.GameSearch.Signals.cs @@ -0,0 +1,311 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void EndGameResultEventHandler(ErrorResult result, ulong gameId); + private static event EndGameResultEventHandler EndGameResultEvent; + static Action _endGameResultAction = (result, gameId) => + { + EndGameResultEvent?.Invoke((ErrorResult)result, gameId); + }; + public static event EndGameResultEventHandler EndGameResult + { + add + { + if (EndGameResultEvent == null) + { + GetInstance().Connect(Signals.EndGameResult, Callable.From(_endGameResultAction)); + } + EndGameResultEvent += value; + } + remove + { + EndGameResultEvent -= value; + if (EndGameResultEvent == null) + { + GetInstance() + .Disconnect(Signals.EndGameResult, Callable.From(_endGameResultAction)); + } + } + } + + public delegate void RequestPlayersForGameFinalResultEventHandler( + ErrorResult result, + ulong searchId, + ulong gameId + ); + private static event RequestPlayersForGameFinalResultEventHandler RequestPlayersForGameFinalResultEvent; + static Action _requestPlayersForGameFinalResultAction = ( + result, + searchId, + gameId + ) => + { + RequestPlayersForGameFinalResultEvent?.Invoke((ErrorResult)result, searchId, gameId); + }; + public static event RequestPlayersForGameFinalResultEventHandler RequestPlayersForGameFinalResult + { + add + { + if (RequestPlayersForGameFinalResultEvent == null) + { + GetInstance() + .Connect( + Signals.RequestPlayersForGameFinalResult, + Callable.From(_requestPlayersForGameFinalResultAction) + ); + } + RequestPlayersForGameFinalResultEvent += value; + } + remove + { + RequestPlayersForGameFinalResultEvent -= value; + if (RequestPlayersForGameFinalResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.RequestPlayersForGameFinalResult, + Callable.From(_requestPlayersForGameFinalResultAction) + ); + } + } + } + + public delegate void RequestPlayersForGameProgressEventHandler( + ErrorResult result, + ulong searchId + ); + private static event RequestPlayersForGameProgressEventHandler RequestPlayersForGameProgressEvent; + static Action _requestPlayersForGameProgressAction = (result, searchId) => + { + RequestPlayersForGameProgressEvent?.Invoke((ErrorResult)result, searchId); + }; + public static event RequestPlayersForGameProgressEventHandler RequestPlayersForGameProgress + { + add + { + if (RequestPlayersForGameProgressEvent == null) + { + GetInstance() + .Connect( + Signals.RequestPlayersForGameProgress, + Callable.From(_requestPlayersForGameProgressAction) + ); + } + RequestPlayersForGameProgressEvent += value; + } + remove + { + RequestPlayersForGameProgressEvent -= value; + if (RequestPlayersForGameProgressEvent == null) + { + GetInstance() + .Disconnect( + Signals.RequestPlayersForGameProgress, + Callable.From(_requestPlayersForGameProgressAction) + ); + } + } + } + + public delegate void RequestPlayersForGameResultEventHandler( + ErrorResult result, + ulong searchId, + PlayerData playerData + ); + private static event RequestPlayersForGameResultEventHandler RequestPlayersForGameResultEvent; + static Action _requestPlayersForGameResultAction = ( + result, + searchId, + playerData + ) => + { + RequestPlayersForGameResultEvent?.Invoke( + (ErrorResult)result, + searchId, + new PlayerData + { + PlayerId = playerData["player_id"].AsUInt64(), + LobbyId = playerData["lobby_id"].AsUInt64(), + PlayerAcceptState = playerData["player_accept_state"].AsInt32(), + PlayerIndex = playerData["player_index"].AsInt32(), + TotalPlayers = playerData["total_players"].AsInt32(), + TotalPlayersAcceptedGame = playerData["total_players_accepted_game"].AsInt32(), + SuggestedTeamIndex = playerData["suggested_team_index"].AsInt32(), + UniqueGameId = playerData["unique_game_id"].AsUInt64(), + } + ); + }; + public static event RequestPlayersForGameResultEventHandler RequestPlayersForGameResult + { + add + { + if (RequestPlayersForGameResultEvent == null) + { + GetInstance() + .Connect( + Signals.RequestPlayersForGameResult, + Callable.From(_requestPlayersForGameResultAction) + ); + } + RequestPlayersForGameResultEvent += value; + } + remove + { + RequestPlayersForGameResultEvent -= value; + if (RequestPlayersForGameResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.RequestPlayersForGameResult, + Callable.From(_requestPlayersForGameResultAction) + ); + } + } + } + + public delegate void SearchForGameProgressEventHandler( + ErrorResult result, + long searchId, + SearchProgress searchProgress + ); + private static event SearchForGameProgressEventHandler SearchForGameProgressEvent; + static Action _searchForGameProgressAction = ( + result, + searchId, + searchProgress + ) => + { + SearchForGameProgressEvent?.Invoke( + (ErrorResult)result, + searchId, + new SearchProgress + { + LobbyId = searchProgress["lobby_id"].AsUInt64(), + EndedSearchId = searchProgress["lobby_id"].AsUInt64(), + SecondsRemainingEstimate = searchProgress["seconds_remaining_estimate"].AsInt32(), + PlayersSearching = searchProgress["players_searching"].AsInt32(), + } + ); + }; + public static event SearchForGameProgressEventHandler SearchForGameProgress + { + add + { + if (SearchForGameProgressEvent == null) + { + GetInstance() + .Connect( + Signals.SearchForGameProgress, + Callable.From(_searchForGameProgressAction) + ); + } + SearchForGameProgressEvent += value; + } + remove + { + SearchForGameProgressEvent -= value; + if (SearchForGameProgressEvent == null) + { + GetInstance() + .Disconnect( + Signals.SearchForGameProgress, + Callable.From(_searchForGameProgressAction) + ); + } + } + } + + public delegate void SearchForGameResultEventHandler( + ErrorResult result, + ulong searchId, + SearchResult searchResult + ); + private static event SearchForGameResultEventHandler SearchForGameResultEvent; + static Action _searchForGameResultAction = ( + result, + searchId, + searchResult + ) => + { + SearchForGameResultEvent?.Invoke( + (ErrorResult)result, + searchId, + new SearchResult + { + CountPlayersIngame = searchResult["count_players_ingame"].AsInt32(), + CountAcceptedGame = searchResult["count_accepted_game"].AsInt32(), + HostId = searchResult["host_id"].AsUInt64(), + FinalCallback = searchResult["final_callback"].AsBool(), + } + ); + }; + public static event SearchForGameResultEventHandler SearchForGameResult + { + add + { + if (SearchForGameResultEvent == null) + { + GetInstance() + .Connect( + Signals.SearchForGameResult, + Callable.From(_searchForGameResultAction) + ); + } + SearchForGameResultEvent += value; + } + remove + { + SearchForGameResultEvent -= value; + if (SearchForGameResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.SearchForGameResult, + Callable.From(_searchForGameResultAction) + ); + } + } + } + + public delegate void SubmitPlayerResultSignalEventHandler( + ErrorResult result, + ulong gameId, + ulong playerId + ); + private static event SubmitPlayerResultSignalEventHandler SubmitPlayerResultSignalEvent; + static Action _submitPlayerResultSignalAction = (result, gameId, playerId) => + { + SubmitPlayerResultSignalEvent?.Invoke((ErrorResult)result, gameId, playerId); + }; + public static event SubmitPlayerResultSignalEventHandler SubmitPlayerResultSignal + { + add + { + if (SubmitPlayerResultSignalEvent == null) + { + GetInstance() + .Connect( + Signals.SubmitPlayerResultSignal, + Callable.From(_submitPlayerResultSignalAction) + ); + } + SubmitPlayerResultSignalEvent += value; + } + remove + { + SubmitPlayerResultSignalEvent -= value; + if (SubmitPlayerResultSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.SubmitPlayerResultSignal, + Callable.From(_submitPlayerResultSignalAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.GameSearch.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.GameSearch.Signals.cs.uid new file mode 100644 index 00000000..aa8dfefa --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.GameSearch.Signals.cs.uid @@ -0,0 +1 @@ +uid://rsejto4lkgw7 diff --git a/addons/godotsteam_csharpbindings/Steam.GameSearch.cs b/addons/godotsteam_csharpbindings/Steam.GameSearch.cs new file mode 100644 index 00000000..8175dabe --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.GameSearch.cs @@ -0,0 +1,87 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static int AddGameSearchParams(string key, string values) + { + return GetInstance().Call(Methods.AddGameSearchParams, key, values).AsInt32(); + } + + public static int SearchForGameWithLobby(ulong lobbyId, int playerMin, int playerMax) + { + return GetInstance() + .Call(Methods.SearchForGameWithLobby, lobbyId, playerMin, playerMax) + .AsInt32(); + } + + public static int SearchForGameSolo(int playerMin, int playerMax) + { + return GetInstance().Call(Methods.SearchForGameSolo, playerMin, playerMax).AsInt32(); + } + + public static int AcceptGame() + { + return GetInstance().Call(Methods.AcceptGame).AsInt32(); + } + + public static int DeclineGame() + { + return GetInstance().Call(Methods.DeclineGame).AsInt32(); + } + + public static string RetrieveConnectionDetails(ulong hostId) + { + return GetInstance().Call(Methods.RetrieveConnectionDetails, hostId).AsString(); + } + + public static int EndGameSearch() + { + return GetInstance().Call(Methods.EndGameSearch).AsInt32(); + } + + public static int SetGameHostParams(string key, string value) + { + return GetInstance().Call(Methods.SetGameHostParams, key, value).AsInt32(); + } + + public static int SetConnectionDetails(string details, int connectionDetails) + { + return GetInstance() + .Call(Methods.SetConnectionDetails, details, connectionDetails) + .AsInt32(); + } + + public static int RequestPlayersForGame(int playerMin, int playerMax, int maxTeamSize) + { + return GetInstance() + .Call(Methods.RequestPlayersForGame, playerMin, playerMax, maxTeamSize) + .AsInt32(); + } + + public static int HostConfirmGameStart(ulong gameId) + { + return GetInstance().Call(Methods.HostConfirmGameStart, gameId).AsInt32(); + } + + public static int CancelRequestPlayersForGame() + { + return GetInstance().Call(Methods.CancelRequestPlayersForGame).AsInt32(); + } + + public static PlayerResult SubmitPlayerResult( + ulong gameId, + ulong playerId, + PlayerResult playerResult + ) + { + return (PlayerResult) + GetInstance() + .Call(Methods.SubmitPlayerResult, gameId, playerId, (int)playerResult) + .AsInt32(); + } + + public static int EndGame(ulong gameId) + { + return GetInstance().Call(Methods.EndGame, gameId).AsInt32(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.GameSearch.cs.uid b/addons/godotsteam_csharpbindings/Steam.GameSearch.cs.uid new file mode 100644 index 00000000..09a2ca37 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.GameSearch.cs.uid @@ -0,0 +1 @@ +uid://dhuv7mhp0h6cg diff --git a/addons/godotsteam_csharpbindings/Steam.Generated.Data.cs b/addons/godotsteam_csharpbindings/Steam.Generated.Data.cs new file mode 100644 index 00000000..9df0c652 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Generated.Data.cs @@ -0,0 +1,224 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public const long ApiCallInvalid = 0; + public const long AppIdInvalid = 0; + public const long AuthTicketInvalid = 0; + public const long DepotIdInvalid = 0; + public const long GameExtraInfoMax = 64; + public const long InvalidBreakpadHandle = 0; + public const long SteamAccountIdMask = 4294967295; + public const long SteamAccountInstanceMask = 1048575; + public const long SteamBufferSize = 255; + public const long SteamLargeBufferSize = 8160; + public const long SteamMaxErrorMessage = 1024; + public const long SteamUserConsoleInstance = 2; + public const long SteamUserDesktopInstance = 1; + public const long SteamUserWebInstance = 4; + public const long QueryPortError = 65534; + public const long QueryPortNotInitialized = 65535; + public const long ChatMetadataMax = 8192; + public const long EnumeratedFollowersMax = 50; + public const long FriendsGroupLimit = 100; + public const long InvalidFriendGroupId = -1; + public const long MaxFriendsGroupName = 64; + public const long MaxRichPresenceKeyLength = 64; + public const long MaxRichPresenceKeys = 20; + public const long MaxRichPresenceValueLenth = 256; + public const long PersonaNameMaxUtf8 = 128; + public const long PersonaNameMaxUtf16 = 32; + public const long InvalidHtmlbrowser = 0; + public const long InvalidHttpcookieHandle = 0; + public const long InvalidHttprequestHandle = 0; + public const long InputMaxAnalogActions = 24; + public const long InputMaxAnalogActionData = 1; + public const long InputMaxCount = 16; + public const long InputMaxDigitalActions = 256; + public const long InputMaxOrigins = 8; + public const long InputMinAnalogActionData = -1; + public const long InventoryResultInvalid = -1; + public const long ItemInstanceIdInvalid = 0; + public const long ServerQueryInvalid = 4294967295; + public const long MaxLobbyKeyLength = 255; + public const long FavoriteFlagFavorite = 1; + public const long FavoriteFlagHistory = 2; + public const long FavoriteFlagNone = 0; + public const long MaxGameServerGameData = 2048; + public const long MaxGameServerGameDescription = 64; + public const long MaxGameServerGameDir = 32; + public const long MaxGameServerMapName = 32; + public const long MaxGameServerName = 64; + public const long MaxGameServerTags = 128; + public const long MusicNameMaxLength = 255; + public const long MusicPngMaxLength = 65535; + public const long NetworkingSendUnreliable = 0; + public const long NetworkingSendNoNagle = 1; + public const long NetworkingSendNoDelay = 4; + public const long NetworkingSendReliable = 8; + public const long DeviceFormFactorUnknown = 0; + public const long DeviceFormFactorPhone = 1; + public const long DeviceFormFactorTablet = 2; + public const long DeviceFormFactorComputer = 3; + public const long DeviceFormFactorTv = 4; + public const long FileNameMax = 1024; + public const long PublishedDocumentChangeDescriptionMax = 8000; + public const long PublishedDocumentDescriptionMax = 8000; + public const long PublishedDocumentTitleMax = 129; + public const long PublishedFileUrlMax = 256; + public const long TagListMax = 1025; + public const long PublishedFileIdInvalid = 0; + public const long PublishedFileUpdateHandleInvalid = 0; + public const long UgcFileStreamHandleInvalid = 0; + public const long UgcHandleInvalid = 0; + public const long EnumeratePublishedFilesMaxResults = 50; + public const long MaxCloudFileChunkSize = 104857600; + public const long InvalidScreenshotHandle = 0; + public const long UfsTagTypeMax = 255; + public const long UfsTagValueMax = 255; + public const long MaxTaggedPublishedFiles = 32; + public const long MaxTaggedUsers = 32; + public const long ScreenshotThumbWidth = 200; + public const long NumUgcResultsPerPage = 50; + public const long DeveloperMetadataMax = 5000; + public const long UgcQueryHandleInvalid = 0; + public const long UgcUpdateHandleInvalid = 0; + public const long LeaderboardDetailMax = 64; + public const long LeaderboardNameMax = 128; + public const long StatNameMax = 128; + + public enum ControllerHapticLocation : long + { + Left = 1, + Right = 2, + Both = 3, + } + + public enum ControllerHapticType : long + { + Off = 0, + Tick = 1, + Click = 2, + } + + public enum ControllerPad : long + { + Left = 0, + Right = 1, + } + + public enum DeviceFormFactor : long + { + Unknown = 0, + Phone = 1, + Tablet = 2, + Computer = 3, + Tv = 4, + } + + public enum DurationControlOnlineState : long + { + Invalid = 0, + Offline = 1, + Online = 2, + OnlineHighPriority = 3, + } + + public enum GameSearchErrorCode : long + { + Ok = 1, + SearchAreadyInProgress = 2, + NoSearchInProgress = 3, + NotLobbyLeader = 4, + NoHostAvailable = 5, + SearchParamsInvalid = 6, + Offline = 7, + NotAuthorized = 8, + UnknownError = 9, + } + + public enum IPType : long + { + Ipv4 = 0, + Ipv6 = 1, + } + + public enum IPv6ConnectivityProtocol : long + { + Invalid = 0, + Http = 1, + Udp = 2, + } + + public enum IPv6ConnectivityState : long + { + Unknown = 0, + Good = 1, + Bad = 2, + } + + public enum MarketNotAllowedReasonFlags : long + { + None = 0, + TemporaryFailure = 1, + AccountDisabled = 2, + AccountLockedDown = 4, + AccountLimited = 8, + TradeBanned = 16, + AccountNotTrusted = 32, + SteamGuardNotEnabled = 64, + SteamGaurdOnlyRecentlyEnabled = 128, + RecentPasswordReset = 256, + NewPaymentMethod = 512, + InvalidCookie = 1024, + UsingNewDevice = 2048, + RecentSelfRefund = 4096, + NewPaymentMethodCannotBeVerified = 8192, + NoRecentPurchases = 16384, + AcceptedWalletGift = 32768, + } + + public enum ScePadTriggerEffectMode : long + { + Off = 0, + Feedback = 1, + Weapon = 2, + Vibration = 3, + MultiplePositionFeedback = 4, + SlopeFeedback = 5, + MultiplePositionVibration = 6, + } + + public enum XboxOrigin : long + { + A = 0, + B = 1, + X = 2, + Y = 3, + LeftBumper = 4, + RightBumper = 5, + Menu = 6, + View = 7, + LeftTriggerPull = 8, + LeftTriggerClick = 9, + RightTriggerPull = 10, + RightTriggerClick = 11, + LeftStickMove = 12, + LeftStickClick = 13, + LeftStickDpadNorth = 14, + LeftStickDpadSouth = 15, + LeftStickDpadWest = 16, + LeftStickDpadEat = 17, + RightStickMove = 18, + RightStickClick = 19, + RightStickDpadNorth = 20, + RightStickDpadSouth = 21, + RightStickDpadWest = 22, + RightStickDpadEast = 23, + DpadNorth = 24, + DpadSouth = 25, + DpadWest = 26, + DpadEast = 27, + Count = 28, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Generated.Data.cs.uid b/addons/godotsteam_csharpbindings/Steam.Generated.Data.cs.uid new file mode 100644 index 00000000..25594d9e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Generated.Data.cs.uid @@ -0,0 +1 @@ +uid://be35e1qokhyiq diff --git a/addons/godotsteam_csharpbindings/Steam.HTMLSurface.Signals.cs b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.Signals.cs new file mode 100644 index 00000000..32f8b133 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.Signals.cs @@ -0,0 +1,779 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void HtmlBrowserReadyEventHandler(uint browserHandle); + private static event HtmlBrowserReadyEventHandler HtmlBrowserReadyEvent; + static Action _htmlBrowserReadyAction = (browserHandle) => + { + HtmlBrowserReadyEvent?.Invoke(browserHandle); + }; + public static event HtmlBrowserReadyEventHandler HtmlBrowserReady + { + add + { + if (HtmlBrowserReadyEvent == null) + { + GetInstance() + .Connect(Signals.HtmlBrowserReady, Callable.From(_htmlBrowserReadyAction)); + } + HtmlBrowserReadyEvent += value; + } + remove + { + HtmlBrowserReadyEvent -= value; + if (HtmlBrowserReadyEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlBrowserReady, Callable.From(_htmlBrowserReadyAction)); + } + } + } + + public delegate void HtmlCanGoBackandforwardEventHandler( + uint browserHandle, + bool goBack, + bool goForward + ); + private static event HtmlCanGoBackandforwardEventHandler HtmlCanGoBackandforwardEvent; + static Action _htmlCanGoBackandforwardAction = ( + browserHandle, + goBack, + goForward + ) => + { + HtmlCanGoBackandforwardEvent?.Invoke(browserHandle, goBack, goForward); + }; + public static event HtmlCanGoBackandforwardEventHandler HtmlCanGoBackandforward + { + add + { + if (HtmlCanGoBackandforwardEvent == null) + { + GetInstance() + .Connect( + Signals.HtmlCanGoBackandforward, + Callable.From(_htmlCanGoBackandforwardAction) + ); + } + HtmlCanGoBackandforwardEvent += value; + } + remove + { + HtmlCanGoBackandforwardEvent -= value; + if (HtmlCanGoBackandforwardEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlCanGoBackandforward, + Callable.From(_htmlCanGoBackandforwardAction) + ); + } + } + } + + public delegate void HtmlChangedTitleEventHandler(uint browserHandle, string title); + private static event HtmlChangedTitleEventHandler HtmlChangedTitleEvent; + static Action _htmlChangedTitleAction = (browserHandle, title) => + { + HtmlChangedTitleEvent?.Invoke(browserHandle, title); + }; + public static event HtmlChangedTitleEventHandler HtmlChangedTitle + { + add + { + if (HtmlChangedTitleEvent == null) + { + GetInstance() + .Connect(Signals.HtmlChangedTitle, Callable.From(_htmlChangedTitleAction)); + } + HtmlChangedTitleEvent += value; + } + remove + { + HtmlChangedTitleEvent -= value; + if (HtmlChangedTitleEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlChangedTitle, Callable.From(_htmlChangedTitleAction)); + } + } + } + + public delegate void HtmlCloseBrowserEventHandler(uint browserHandle); + private static event HtmlCloseBrowserEventHandler HtmlCloseBrowserEvent; + static Action _htmlCloseBrowserAction = (browserHandle) => + { + HtmlCloseBrowserEvent?.Invoke(browserHandle); + }; + public static event HtmlCloseBrowserEventHandler HtmlCloseBrowser + { + add + { + if (HtmlCloseBrowserEvent == null) + { + GetInstance() + .Connect(Signals.HtmlCloseBrowser, Callable.From(_htmlCloseBrowserAction)); + } + HtmlCloseBrowserEvent += value; + } + remove + { + HtmlCloseBrowserEvent -= value; + if (HtmlCloseBrowserEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlCloseBrowser, Callable.From(_htmlCloseBrowserAction)); + } + } + } + + public delegate void HtmlFileOpenDialogEventHandler( + uint browserHandle, + string title, + string initialFile + ); + private static event HtmlFileOpenDialogEventHandler HtmlFileOpenDialogEvent; + static Action _htmlFileOpenDialogAction = ( + browserHandle, + title, + initialFile + ) => + { + HtmlFileOpenDialogEvent?.Invoke(browserHandle, title, initialFile); + }; + public static event HtmlFileOpenDialogEventHandler HtmlFileOpenDialog + { + add + { + if (HtmlFileOpenDialogEvent == null) + { + GetInstance() + .Connect(Signals.HtmlFileOpenDialog, Callable.From(_htmlFileOpenDialogAction)); + } + HtmlFileOpenDialogEvent += value; + } + remove + { + HtmlFileOpenDialogEvent -= value; + if (HtmlFileOpenDialogEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlFileOpenDialog, + Callable.From(_htmlFileOpenDialogAction) + ); + } + } + } + + public delegate void HtmlFinishedRequestEventHandler( + uint browserHandle, + string url, + string title + ); + private static event HtmlFinishedRequestEventHandler HtmlFinishedRequestEvent; + static Action _htmlFinishedRequestAction = (browserHandle, url, title) => + { + HtmlFinishedRequestEvent?.Invoke(browserHandle, url, title); + }; + public static event HtmlFinishedRequestEventHandler HtmlFinishedRequest + { + add + { + if (HtmlFinishedRequestEvent == null) + { + GetInstance() + .Connect( + Signals.HtmlFinishedRequest, + Callable.From(_htmlFinishedRequestAction) + ); + } + HtmlFinishedRequestEvent += value; + } + remove + { + HtmlFinishedRequestEvent -= value; + if (HtmlFinishedRequestEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlFinishedRequest, + Callable.From(_htmlFinishedRequestAction) + ); + } + } + } + + public delegate void HtmlHideTooltipEventHandler(uint browserHandle); + private static event HtmlHideTooltipEventHandler HtmlHideTooltipEvent; + static Action _htmlHideTooltipAction = (browserHandle) => + { + HtmlHideTooltipEvent?.Invoke(browserHandle); + }; + public static event HtmlHideTooltipEventHandler HtmlHideTooltip + { + add + { + if (HtmlHideTooltipEvent == null) + { + GetInstance() + .Connect(Signals.HtmlHideTooltip, Callable.From(_htmlHideTooltipAction)); + } + HtmlHideTooltipEvent += value; + } + remove + { + HtmlHideTooltipEvent -= value; + if (HtmlHideTooltipEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlHideTooltip, Callable.From(_htmlHideTooltipAction)); + } + } + } + + public delegate void HtmlHorizontalScrollEventHandler( + uint browserHandle, + HtmlScrollData scrollData + ); + private static event HtmlHorizontalScrollEventHandler HtmlHorizontalScrollEvent; + static Action _htmlHorizontalScrollAction = ( + browserHandle, + scrollData + ) => + { + HtmlHorizontalScrollEvent?.Invoke( + browserHandle, + new HtmlScrollData + { + ScrollMax = scrollData["scroll_max"].AsUInt32(), + ScrollCurrent = scrollData["scroll_current"].AsUInt32(), + PageScale = scrollData["page_scale"].AsSingle(), + Visible = scrollData["visible"].AsBool(), + PageSize = scrollData["page_size"].AsUInt32(), + } + ); + }; + public static event HtmlHorizontalScrollEventHandler HtmlHorizontalScroll + { + add + { + if (HtmlHorizontalScrollEvent == null) + { + GetInstance() + .Connect( + Signals.HtmlHorizontalScroll, + Callable.From(_htmlHorizontalScrollAction) + ); + } + HtmlHorizontalScrollEvent += value; + } + remove + { + HtmlHorizontalScrollEvent -= value; + if (HtmlHorizontalScrollEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlHorizontalScroll, + Callable.From(_htmlHorizontalScrollAction) + ); + } + } + } + + public delegate void HtmlJsAlertEventHandler(uint browserHandle, string message); + private static event HtmlJsAlertEventHandler HtmlJsAlertEvent; + static Action _htmlJsAlertAction = (browserHandle, message) => + { + HtmlJsAlertEvent?.Invoke(browserHandle, message); + }; + public static event HtmlJsAlertEventHandler HtmlJsAlert + { + add + { + if (HtmlJsAlertEvent == null) + { + GetInstance().Connect(Signals.HtmlJsAlert, Callable.From(_htmlJsAlertAction)); + } + HtmlJsAlertEvent += value; + } + remove + { + HtmlJsAlertEvent -= value; + if (HtmlJsAlertEvent == null) + { + GetInstance().Disconnect(Signals.HtmlJsAlert, Callable.From(_htmlJsAlertAction)); + } + } + } + + public delegate void HtmlJsConfirmEventHandler(uint browserHandle, string message); + private static event HtmlJsConfirmEventHandler HtmlJsConfirmEvent; + static Action _htmlJsConfirmAction = (browserHandle, message) => + { + HtmlJsConfirmEvent?.Invoke(browserHandle, message); + }; + public static event HtmlJsConfirmEventHandler HtmlJsConfirm + { + add + { + if (HtmlJsConfirmEvent == null) + { + GetInstance().Connect(Signals.HtmlJsConfirm, Callable.From(_htmlJsConfirmAction)); + } + HtmlJsConfirmEvent += value; + } + remove + { + HtmlJsConfirmEvent -= value; + if (HtmlJsConfirmEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlJsConfirm, Callable.From(_htmlJsConfirmAction)); + } + } + } + + public delegate void HtmlLinkAtPositionEventHandler(uint browserHandle, HtmlLinkData linkData); + private static event HtmlLinkAtPositionEventHandler HtmlLinkAtPositionEvent; + static Action _htmlLinkAtPositionAction = ( + browserHandle, + linkData + ) => + { + HtmlLinkAtPositionEvent?.Invoke( + browserHandle, + new HtmlLinkData + { + X = linkData["x"].AsUInt32(), + Y = linkData["y"].AsUInt32(), + Url = new Uri(linkData["url"].AsString()), + Input = linkData["input"].AsBool(), + LiveLink = linkData["live_link"].AsBool(), + } + ); + }; + public static event HtmlLinkAtPositionEventHandler HtmlLinkAtPosition + { + add + { + if (HtmlLinkAtPositionEvent == null) + { + GetInstance() + .Connect(Signals.HtmlLinkAtPosition, Callable.From(_htmlLinkAtPositionAction)); + } + HtmlLinkAtPositionEvent += value; + } + remove + { + HtmlLinkAtPositionEvent -= value; + if (HtmlLinkAtPositionEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlLinkAtPosition, + Callable.From(_htmlLinkAtPositionAction) + ); + } + } + } + + public delegate void HtmlNeedsPaintEventHandler(uint browserHandle, HtmlPageData pageData); + private static event HtmlNeedsPaintEventHandler HtmlNeedsPaintEvent; + static Action _htmlNeedsPaintAction = ( + browserHandle, + pageData + ) => + { + HtmlNeedsPaintEvent?.Invoke( + browserHandle, + new HtmlPageData + { + Bgra = pageData["bgra"].AsString(), + Wide = pageData["wide"].AsUInt32(), + Tall = pageData["tall"].AsUInt32(), + UpdateX = pageData["update_x"].AsUInt32(), + UpdateY = pageData["update_y"].AsUInt32(), + UpdateWide = pageData["update_wide"].AsUInt32(), + UpdateTall = pageData["update_tall"].AsUInt32(), + ScrollX = pageData["scroll_x"].AsUInt32(), + ScrollY = pageData["scroll_y"].AsUInt32(), + PageScale = pageData["page_scale"].AsSingle(), + PageSerial = pageData["page_serial"].AsUInt32(), + } + ); + }; + public static event HtmlNeedsPaintEventHandler HtmlNeedsPaint + { + add + { + if (HtmlNeedsPaintEvent == null) + { + GetInstance().Connect(Signals.HtmlNeedsPaint, Callable.From(_htmlNeedsPaintAction)); + } + HtmlNeedsPaintEvent += value; + } + remove + { + HtmlNeedsPaintEvent -= value; + if (HtmlNeedsPaintEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlNeedsPaint, Callable.From(_htmlNeedsPaintAction)); + } + } + } + + public delegate void HtmlNewWindowEventHandler(uint browserHandle, HtmlWindowData windowData); + private static event HtmlNewWindowEventHandler HtmlNewWindowEvent; + static Action _htmlNewWindowAction = ( + browserHandle, + windowData + ) => + { + HtmlNewWindowEvent?.Invoke( + browserHandle, + new HtmlWindowData + { + Url = new Uri(windowData["url"].AsString()), + X = windowData["x"].AsUInt32(), + Y = windowData["y"].AsUInt32(), + Wide = windowData["wide"].AsUInt32(), + Tall = windowData["tall"].AsUInt32(), + NewHandle = windowData["new_handle"].AsUInt32(), + } + ); + }; + public static event HtmlNewWindowEventHandler HtmlNewWindow + { + add + { + if (HtmlNewWindowEvent == null) + { + GetInstance().Connect(Signals.HtmlNewWindow, Callable.From(_htmlNewWindowAction)); + } + HtmlNewWindowEvent += value; + } + remove + { + HtmlNewWindowEvent -= value; + if (HtmlNewWindowEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlNewWindow, Callable.From(_htmlNewWindowAction)); + } + } + } + + public delegate void HtmlOpenLinkInNewTabEventHandler(uint browserHandle, string url); + private static event HtmlOpenLinkInNewTabEventHandler HtmlOpenLinkInNewTabEvent; + static Action _htmlOpenLinkInNewTabAction = (browserHandle, url) => + { + HtmlOpenLinkInNewTabEvent?.Invoke(browserHandle, url); + }; + public static event HtmlOpenLinkInNewTabEventHandler HtmlOpenLinkInNewTab + { + add + { + if (HtmlOpenLinkInNewTabEvent == null) + { + GetInstance() + .Connect( + Signals.HtmlOpenLinkInNewTab, + Callable.From(_htmlOpenLinkInNewTabAction) + ); + } + HtmlOpenLinkInNewTabEvent += value; + } + remove + { + HtmlOpenLinkInNewTabEvent -= value; + if (HtmlOpenLinkInNewTabEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlOpenLinkInNewTab, + Callable.From(_htmlOpenLinkInNewTabAction) + ); + } + } + } + + public delegate void HtmlSearchResultsEventHandler( + uint browserHandle, + uint results, + uint currentMatch + ); + private static event HtmlSearchResultsEventHandler HtmlSearchResultsEvent; + static Action _htmlSearchResultsAction = ( + browserHandle, + results, + currentMatch + ) => + { + HtmlSearchResultsEvent?.Invoke(browserHandle, results, currentMatch); + }; + public static event HtmlSearchResultsEventHandler HtmlSearchResults + { + add + { + if (HtmlSearchResultsEvent == null) + { + GetInstance() + .Connect(Signals.HtmlSearchResults, Callable.From(_htmlSearchResultsAction)); + } + HtmlSearchResultsEvent += value; + } + remove + { + HtmlSearchResultsEvent -= value; + if (HtmlSearchResultsEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlSearchResults, Callable.From(_htmlSearchResultsAction)); + } + } + } + + public delegate void HtmlSetCursorEventHandler(uint browserHandle, HtmlMouseCursor mouseCursor); + private static event HtmlSetCursorEventHandler HtmlSetCursorEvent; + static Action _htmlSetCursorAction = (browserHandle, mouseCursor) => + { + HtmlSetCursorEvent?.Invoke(browserHandle, (HtmlMouseCursor)mouseCursor); + }; + public static event HtmlSetCursorEventHandler HtmlSetCursor + { + add + { + if (HtmlSetCursorEvent == null) + { + GetInstance().Connect(Signals.HtmlSetCursor, Callable.From(_htmlSetCursorAction)); + } + HtmlSetCursorEvent += value; + } + remove + { + HtmlSetCursorEvent -= value; + if (HtmlSetCursorEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlSetCursor, Callable.From(_htmlSetCursorAction)); + } + } + } + + public delegate void HtmlShowTooltipEventHandler(uint browserHandle, string message); + private static event HtmlShowTooltipEventHandler HtmlShowTooltipEvent; + static Action _htmlShowTooltipAction = (browserHandle, message) => + { + HtmlShowTooltipEvent?.Invoke(browserHandle, message); + }; + public static event HtmlShowTooltipEventHandler HtmlShowTooltip + { + add + { + if (HtmlShowTooltipEvent == null) + { + GetInstance() + .Connect(Signals.HtmlShowTooltip, Callable.From(_htmlShowTooltipAction)); + } + HtmlShowTooltipEvent += value; + } + remove + { + HtmlShowTooltipEvent -= value; + if (HtmlShowTooltipEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlShowTooltip, Callable.From(_htmlShowTooltipAction)); + } + } + } + + public delegate void HtmlStartRequestEventHandler( + uint browserHandle, + string url, + string target, + string postData, + bool redirect + ); + private static event HtmlStartRequestEventHandler HtmlStartRequestEvent; + static Action _htmlStartRequestAction = ( + browserHandle, + url, + target, + postData, + redirect + ) => + { + HtmlStartRequestEvent?.Invoke(browserHandle, url, target, postData, redirect); + }; + public static event HtmlStartRequestEventHandler HtmlStartRequest + { + add + { + if (HtmlStartRequestEvent == null) + { + GetInstance() + .Connect(Signals.HtmlStartRequest, Callable.From(_htmlStartRequestAction)); + } + HtmlStartRequestEvent += value; + } + remove + { + HtmlStartRequestEvent -= value; + if (HtmlStartRequestEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlStartRequest, Callable.From(_htmlStartRequestAction)); + } + } + } + + public delegate void HtmlStatusTextEventHandler(uint browserHandle, string message); + private static event HtmlStatusTextEventHandler HtmlStatusTextEvent; + static Action _htmlStatusTextAction = (browserHandle, message) => + { + HtmlStatusTextEvent?.Invoke(browserHandle, message); + }; + public static event HtmlStatusTextEventHandler HtmlStatusText + { + add + { + if (HtmlStatusTextEvent == null) + { + GetInstance().Connect(Signals.HtmlStatusText, Callable.From(_htmlStatusTextAction)); + } + HtmlStatusTextEvent += value; + } + remove + { + HtmlStatusTextEvent -= value; + if (HtmlStatusTextEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlStatusText, Callable.From(_htmlStatusTextAction)); + } + } + } + + public delegate void HtmlUpdateTooltipEventHandler(uint browserHandle, string message); + private static event HtmlUpdateTooltipEventHandler HtmlUpdateTooltipEvent; + static Action _htmlUpdateTooltipAction = (browserHandle, message) => + { + HtmlUpdateTooltipEvent?.Invoke(browserHandle, message); + }; + public static event HtmlUpdateTooltipEventHandler HtmlUpdateTooltip + { + add + { + if (HtmlUpdateTooltipEvent == null) + { + GetInstance() + .Connect(Signals.HtmlUpdateTooltip, Callable.From(_htmlUpdateTooltipAction)); + } + HtmlUpdateTooltipEvent += value; + } + remove + { + HtmlUpdateTooltipEvent -= value; + if (HtmlUpdateTooltipEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlUpdateTooltip, Callable.From(_htmlUpdateTooltipAction)); + } + } + } + + public delegate void HtmlUrlChangedEventHandler(uint browserHandle, HtmlUrlData urlData); + private static event HtmlUrlChangedEventHandler HtmlUrlChangedEvent; + static Action _htmlUrlChangedAction = ( + browserHandle, + urlData + ) => + { + HtmlUrlChangedEvent?.Invoke( + browserHandle, + new HtmlUrlData + { + Url = new Uri(urlData["url"].AsString()), + PostData = urlData["post_data"].AsString(), + Redirect = urlData["redirect"].AsBool(), + Title = urlData["title"].AsString(), + NewNavigation = urlData["new_navigation"].AsBool(), + } + ); + }; + public static event HtmlUrlChangedEventHandler HtmlUrlChanged + { + add + { + if (HtmlUrlChangedEvent == null) + { + GetInstance().Connect(Signals.HtmlUrlChanged, Callable.From(_htmlUrlChangedAction)); + } + HtmlUrlChangedEvent += value; + } + remove + { + HtmlUrlChangedEvent -= value; + if (HtmlUrlChangedEvent == null) + { + GetInstance() + .Disconnect(Signals.HtmlUrlChanged, Callable.From(_htmlUrlChangedAction)); + } + } + } + + public delegate void HtmlVerticalScrollEventHandler( + uint browserHandle, + HtmlScrollData scrollData + ); + private static event HtmlVerticalScrollEventHandler HtmlVerticalScrollEvent; + static Action _htmlVerticalScrollAction = ( + browserHandle, + scrollData + ) => + { + HtmlVerticalScrollEvent?.Invoke( + browserHandle, + new HtmlScrollData + { + ScrollMax = scrollData["scroll_max"].AsUInt32(), + ScrollCurrent = scrollData["scroll_current"].AsUInt32(), + PageScale = scrollData["page_scale"].AsSingle(), + Visible = scrollData["visible"].AsBool(), + PageSize = scrollData["page_size"].AsUInt32(), + } + ); + }; + public static event HtmlVerticalScrollEventHandler HtmlVerticalScroll + { + add + { + if (HtmlVerticalScrollEvent == null) + { + GetInstance() + .Connect(Signals.HtmlVerticalScroll, Callable.From(_htmlVerticalScrollAction)); + } + HtmlVerticalScrollEvent += value; + } + remove + { + HtmlVerticalScrollEvent -= value; + if (HtmlVerticalScrollEvent == null) + { + GetInstance() + .Disconnect( + Signals.HtmlVerticalScroll, + Callable.From(_htmlVerticalScrollAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.HTMLSurface.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.Signals.cs.uid new file mode 100644 index 00000000..b679dcde --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.Signals.cs.uid @@ -0,0 +1 @@ +uid://cbi5wjopd18ea diff --git a/addons/godotsteam_csharpbindings/Steam.HTMLSurface.cs b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.cs new file mode 100644 index 00000000..1ebe1ab4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.cs @@ -0,0 +1,187 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static void AddHeader(string key, string value, uint thisHandle = 0) + { + GetInstance().Call(Methods.AddHeader, key, value, thisHandle); + } + + public static void AllowStartRequest(bool allowed, uint thisHandle = 0) + { + GetInstance().Call(Methods.AllowStartRequest, allowed, thisHandle); + } + + public static void CopyToClipboard(uint thisHandle = 0) + { + GetInstance().Call(Methods.CopyToClipboard, thisHandle); + } + + public static void CreateBrowser(string userAgent = "", string userCss = "") + { + GetInstance().Call(Methods.CreateBrowser, userAgent, userCss); + } + + public static void ExecuteJavascript(string script, uint thisHandle = 0) + { + GetInstance().Call(Methods.ExecuteJavascript, script, thisHandle); + } + + public static void Find(string search, bool currentlyInFind, bool reverse, uint thisHandle = 0) + { + GetInstance().Call(Methods.Find, search, currentlyInFind, reverse, thisHandle); + } + + public static void GetLinkAtPosition(int x, int y, uint thisHandle = 0) + { + GetInstance().Call(Methods.GetLinkAtPosition, x, y, thisHandle); + } + + public static void GoBack(uint thisHandle = 0) + { + GetInstance().Call(Methods.GoBack, thisHandle); + } + + public static void GoForward(uint thisHandle = 0) + { + GetInstance().Call(Methods.GoForward, thisHandle); + } + + public static void HtmlInit() + { + GetInstance().Call(Methods.HtmlInit); + } + + public static void JsDialogResponse(bool result, uint thisHandle = 0) + { + GetInstance().Call(Methods.JsDialogResponse, result, thisHandle); + } + + public static void KeyChar(uint unicodeChar, HtmlKeyModifiers keyModifiers, uint thisHandle = 0) + { + GetInstance().Call(Methods.KeyChar, unicodeChar, (int)keyModifiers, thisHandle); + } + + public static void KeyDown( + uint nativeKeyCode, + HtmlKeyModifiers keyModifiers, + uint thisHandle = 0 + ) + { + GetInstance().Call(Methods.KeyDown, nativeKeyCode, (int)keyModifiers, thisHandle); + } + + public static void KeyUp(uint nativeKeyCode, HtmlKeyModifiers keyModifiers, uint thisHandle = 0) + { + GetInstance().Call(Methods.KeyUp, nativeKeyCode, (int)keyModifiers, thisHandle); + } + + public static void LoadURL(string url, string postData, uint thisHandle = 0) + { + GetInstance().Call(Methods.LoadURL, url, postData, thisHandle); + } + + public static void MouseDoubleClick(HtmlMouseButton mouseButton, uint thisHandle = 0) + { + GetInstance().Call(Methods.MouseDoubleClick, (int)mouseButton, thisHandle); + } + + public static void MouseDown(HtmlMouseButton mouseButton, uint thisHandle = 0) + { + GetInstance().Call(Methods.MouseDown, (int)mouseButton, thisHandle); + } + + public static void MouseMove(int x, int y, uint thisHandle = 0) + { + GetInstance().Call(Methods.MouseMove, x, y, thisHandle); + } + + public static void MouseUp(HtmlMouseButton mouseButton, uint thisHandle = 0) + { + GetInstance().Call(Methods.MouseUp, (int)mouseButton, thisHandle); + } + + public static void MouseWheel(int delta, uint thisHandle = 0) + { + GetInstance().Call(Methods.MouseWheel, delta, thisHandle); + } + + public static void PasteFromClipboard(uint thisHandle = 0) + { + GetInstance().Call(Methods.PasteFromClipboard, thisHandle); + } + + public static void Reload(uint thisHandle = 0) + { + GetInstance().Call(Methods.Reload, thisHandle); + } + + public static void RemoveBrowser(uint thisHandle = 0) + { + GetInstance().Call(Methods.RemoveBrowser, thisHandle); + } + + public static void SetBackgroundMode(bool backgroundMode, uint thisHandle = 0) + { + GetInstance().Call(Methods.SetBackgroundMode, backgroundMode, thisHandle); + } + + public static void SetCookie( + string hostname, + string key, + string value, + string path, + uint expires, + bool secure, + bool httpOnly + ) + { + GetInstance() + .Call(Methods.SetCookie, hostname, key, value, path, expires, secure, httpOnly); + } + + public static void SetHorizontalScroll(uint absolutePixelScroll, uint thisHandle = 0) + { + GetInstance().Call(Methods.SetHorizontalScroll, absolutePixelScroll, thisHandle); + } + + public static void SetKeyFocus(bool hasKeyFocus, uint thisHandle = 0) + { + GetInstance().Call(Methods.SetKeyFocus, hasKeyFocus, thisHandle); + } + + public static void SetPageScaleFactor(float zoom, int pointX, int pointY, uint thisHandle = 0) + { + GetInstance().Call(Methods.SetPageScaleFactor, zoom, pointX, pointY, thisHandle); + } + + public static void SetSize(uint width, uint height, uint thisHandle = 0) + { + GetInstance().Call(Methods.SetSize, width, height, thisHandle); + } + + public static void SetVerticalScroll(uint absolutePixelScroll, uint thisHandle = 0) + { + GetInstance().Call(Methods.SetVerticalScroll, absolutePixelScroll, thisHandle); + } + + public static bool HtmlShutdown() + { + return GetInstance().Call(Methods.HtmlShutdown).AsBool(); + } + + public static void StopFind(uint thisHandle = 0) + { + GetInstance().Call(Methods.StopFind, thisHandle); + } + + public static void StopLoad(uint thisHandle = 0) + { + GetInstance().Call(Methods.StopLoad, thisHandle); + } + + public static void ViewSource(uint thisHandle = 0) + { + GetInstance().Call(Methods.ViewSource, thisHandle); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.HTMLSurface.cs.uid b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.cs.uid new file mode 100644 index 00000000..cb4a435a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTMLSurface.cs.uid @@ -0,0 +1 @@ +uid://3nir88lvbc4c diff --git a/addons/godotsteam_csharpbindings/Steam.HTTP.Signals.cs b/addons/godotsteam_csharpbindings/Steam.HTTP.Signals.cs new file mode 100644 index 00000000..1665db4a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTTP.Signals.cs @@ -0,0 +1,140 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void HttpRequestCompletedEventHandler( + long cookieHandle, + long contextValue, + bool requestSuccess, + long statusCode, + long bodySize + ); + private static event HttpRequestCompletedEventHandler HttpRequestCompletedEvent; + static Action _httpRequestCompletedAction = ( + cookieHandle, + contextValue, + requestSuccess, + statusCode, + bodySize + ) => + { + HttpRequestCompletedEvent?.Invoke( + cookieHandle, + contextValue, + requestSuccess, + statusCode, + bodySize + ); + }; + public static event HttpRequestCompletedEventHandler HttpRequestCompleted + { + add + { + if (HttpRequestCompletedEvent == null) + { + GetInstance() + .Connect( + Signals.HttpRequestCompleted, + Callable.From(_httpRequestCompletedAction) + ); + } + HttpRequestCompletedEvent += value; + } + remove + { + HttpRequestCompletedEvent -= value; + if (HttpRequestCompletedEvent == null) + { + GetInstance() + .Disconnect( + Signals.HttpRequestCompleted, + Callable.From(_httpRequestCompletedAction) + ); + } + } + } + + public delegate void HttpRequestDataReceivedEventHandler( + long cookieHandle, + long contextValue, + long offset, + long bytesReceived + ); + private static event HttpRequestDataReceivedEventHandler HttpRequestDataReceivedEvent; + static Action _httpRequestDataReceivedAction = ( + cookieHandle, + contextValue, + offset, + bytesReceived + ) => + { + HttpRequestDataReceivedEvent?.Invoke(cookieHandle, contextValue, offset, bytesReceived); + }; + public static event HttpRequestDataReceivedEventHandler HttpRequestDataReceived + { + add + { + if (HttpRequestDataReceivedEvent == null) + { + GetInstance() + .Connect( + Signals.HttpRequestDataReceived, + Callable.From(_httpRequestDataReceivedAction) + ); + } + HttpRequestDataReceivedEvent += value; + } + remove + { + HttpRequestDataReceivedEvent -= value; + if (HttpRequestDataReceivedEvent == null) + { + GetInstance() + .Disconnect( + Signals.HttpRequestDataReceived, + Callable.From(_httpRequestDataReceivedAction) + ); + } + } + } + + public delegate void HttpRequestHeadersReceivedEventHandler( + long cookieHandle, + long contextValue + ); + private static event HttpRequestHeadersReceivedEventHandler HttpRequestHeadersReceivedEvent; + static Action _httpRequestHeadersReceivedAction = (cookieHandle, contextValue) => + { + HttpRequestHeadersReceivedEvent?.Invoke(cookieHandle, contextValue); + }; + public static event HttpRequestHeadersReceivedEventHandler HttpRequestHeadersReceived + { + add + { + if (HttpRequestHeadersReceivedEvent == null) + { + GetInstance() + .Connect( + Signals.HttpRequestHeadersReceived, + Callable.From(_httpRequestHeadersReceivedAction) + ); + } + HttpRequestHeadersReceivedEvent += value; + } + remove + { + HttpRequestHeadersReceivedEvent -= value; + if (HttpRequestHeadersReceivedEvent == null) + { + GetInstance() + .Disconnect( + Signals.HttpRequestHeadersReceived, + Callable.From(_httpRequestHeadersReceivedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.HTTP.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.HTTP.Signals.cs.uid new file mode 100644 index 00000000..3857b1bf --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTTP.Signals.cs.uid @@ -0,0 +1 @@ +uid://dp6y0hvvt3qg diff --git a/addons/godotsteam_csharpbindings/Steam.HTTP.cs b/addons/godotsteam_csharpbindings/Steam.HTTP.cs new file mode 100644 index 00000000..036a690a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTTP.cs @@ -0,0 +1,246 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static uint CreateCookieContainer(bool allowResponseToModify) + { + return GetInstance().Call(Methods.CreateCookieContainer, allowResponseToModify).AsUInt32(); + } + + public static uint CreateHTTPRequest(HttpMethod requestMethod, string absoluteUrl) + { + return GetInstance() + .Call(Methods.CreateHTTPRequest, (long)requestMethod, absoluteUrl) + .AsUInt32(); + } + + public static bool DeferHTTPRequest(long requestHandle) + { + return GetInstance().Call(Methods.DeferHTTPRequest, requestHandle).AsBool(); + } + + public static float GetHTTPDownloadProgressPct(long requestHandle) + { + return GetInstance().Call(Methods.GetHTTPDownloadProgressPct, requestHandle).AsSingle(); + } + + public static bool GetHTTPRequestWasTimedOut(long requestHandle) + { + return GetInstance().Call(Methods.GetHTTPRequestWasTimedOut, requestHandle).AsBool(); + } + + public static byte[] GetHTTPResponseBodyData(uint requestHandle, long bufferSize) + { + return GetInstance() + .Call(Methods.GetHTTPResponseBodyData, requestHandle, bufferSize) + .AsByteArray(); + } + + public static uint GetHTTPResponseBodySize(long requestHandle) + { + return GetInstance().Call(Methods.GetHTTPResponseBodySize, requestHandle).AsUInt32(); + } + + public static uint GetHTTPResponseHeaderSize(uint requestHandle, string headerName) + { + return GetInstance() + .Call(Methods.GetHTTPResponseHeaderSize, requestHandle, headerName) + .AsUInt32(); + } + + public static byte GetHTTPResponseHeaderValue( + uint requestHandle, + string headerName, + long bufferSize + ) + { + return GetInstance() + .Call(Methods.GetHTTPResponseHeaderValue, requestHandle, headerName, bufferSize) + .AsByte(); + } + + public static byte GetHTTPStreamingResponseBodyData( + uint requestHandle, + uint offset, + long bufferSize + ) + { + return GetInstance() + .Call(Methods.GetHTTPStreamingResponseBodyData, requestHandle, offset, bufferSize) + .AsByte(); + } + + public static bool PrioritizeHTTPRequest(long requestHandle) + { + return GetInstance().Call(Methods.PrioritizeHTTPRequest, requestHandle).AsBool(); + } + + public static bool ReleaseCookieContainer(long cookieHandle) + { + return GetInstance().Call(Methods.ReleaseCookieContainer, cookieHandle).AsBool(); + } + + public static bool ReleaseHTTPRequest(long requestHandle) + { + return GetInstance().Call(Methods.ReleaseHTTPRequest, requestHandle).AsBool(); + } + + public static bool SendHTTPRequest(long requestHandle) + { + return GetInstance().Call(Methods.SendHTTPRequest, requestHandle).AsBool(); + } + + public static bool SendHTTPRequestAndStreamResponse(long requestHandle) + { + return GetInstance().Call(Methods.SendHTTPRequestAndStreamResponse, requestHandle).AsBool(); + } + + public static bool SetHTTPCookie(uint cookieHandle, string host, string url, string cookie) + { + return GetInstance().Call(Methods.SetHTTPCookie, cookieHandle, host, url, cookie).AsBool(); + } + + public static bool SetHTTPRequestAbsoluteTimeoutMS(uint requestHandle, long milliseconds) + { + return GetInstance() + .Call(Methods.SetHTTPRequestAbsoluteTimeoutMS, requestHandle, milliseconds) + .AsBool(); + } + + public static bool SetHTTPRequestContextValue(uint requestHandle, long contextValue) + { + return GetInstance() + .Call(Methods.SetHTTPRequestContextValue, requestHandle, contextValue) + .AsBool(); + } + + public static bool SetHTTPRequestCookieContainer(uint requestHandle, long cookieHandle) + { + return GetInstance() + .Call(Methods.SetHTTPRequestCookieContainer, requestHandle, cookieHandle) + .AsBool(); + } + + public static bool SetHTTPRequestGetOrPostParameter( + uint requestHandle, + string name, + string value + ) + { + return GetInstance() + .Call(Methods.SetHTTPRequestGetOrPostParameter, requestHandle, name, value) + .AsBool(); + } + + public static bool SetHTTPRequestHeaderValue( + uint requestHandle, + string headerName, + string headerValue + ) + { + return GetInstance() + .Call(Methods.SetHTTPRequestHeaderValue, requestHandle, headerName, headerValue) + .AsBool(); + } + + public static bool SetHTTPRequestNetworkActivityTimeout(uint requestHandle, long timeoutSeconds) + { + return GetInstance() + .Call(Methods.SetHTTPRequestNetworkActivityTimeout, requestHandle, timeoutSeconds) + .AsBool(); + } + + public static byte SetHTTPRequestRawPostBody( + uint requestHandle, + string contentType, + long bodyLength + ) + { + return GetInstance() + .Call(Methods.SetHTTPRequestRawPostBody, requestHandle, contentType, bodyLength) + .AsByte(); + } + + public static bool SetHTTPRequestRequiresVerifiedCertificate( + uint requestHandle, + bool requireVerifiedCertificate + ) + { + return GetInstance() + .Call( + Methods.SetHTTPRequestRequiresVerifiedCertificate, + requestHandle, + requireVerifiedCertificate + ) + .AsBool(); + } + + public static bool SetHTTPRequestUserAgentInfo(uint requestHandle, string userAgentInfo) + { + return GetInstance() + .Call(Methods.SetHTTPRequestUserAgentInfo, requestHandle, userAgentInfo) + .AsBool(); + } + + public enum HttpMethod : long + { + Invalid = 0, + Get = 1, + Head = 2, + Post = 3, + Put = 4, + Delete = 5, + Options = 6, + Patch = 7, + } + + public enum HttpStatusCode : long + { + Invalid = 0, + Code100Continue = 100, + Code101SwitchingProtocols = 101, + Code200Ok = 200, + Code201Created = 201, + Code202Accepted = 202, + Code203NonAuthoritative = 203, + Code204NoContent = 204, + Code205ResetContent = 205, + Code206PartialContent = 206, + Code300MultipleChoices = 300, + Code301MovedPermanently = 301, + Code302Found = 302, + Code303SeeOther = 303, + Code304NotModified = 304, + Code305UseProxy = 305, + Code307TemporaryRedirect = 307, + Code308PermanentRedirect = 308, + Code400BadRequest = 400, + Code401Unauthorized = 401, + Code402PaymentRequired = 402, + Code403Forbidden = 403, + Code404NotFound = 404, + Code405MethodNotAllowed = 405, + Code406NotAcceptable = 406, + Code407ProxyAuthRequired = 407, + Code408RequestTimeout = 408, + Code409Conflict = 409, + Code410Gone = 410, + Code411LengthRequired = 411, + Code412PreconditionFailed = 412, + Code413RequestEntityTooLarge = 413, + Code414RequestUriTooLong = 414, + Code415UnsupportedMediaType = 415, + Code416RequestedRangeNotSatisfiable = 416, + Code417ExpectationFailed = 417, + Code4XxUnknown = 418, + Code429TooManyRequests = 429, + Code444ConnectionClosed = 444, + Code500InternalServerError = 500, + Code501NotImplemented = 501, + Code502BadGateway = 502, + Code503ServiceUnavailable = 503, + Code504GatewayTimeout = 504, + Code505HttpVersionNotSupported = 505, + Code5XxUnknown = 599, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.HTTP.cs.uid b/addons/godotsteam_csharpbindings/Steam.HTTP.cs.uid new file mode 100644 index 00000000..6ee8e2fe --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.HTTP.cs.uid @@ -0,0 +1 @@ +uid://7cur6lchwvky diff --git a/addons/godotsteam_csharpbindings/Steam.Input.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Input.Signals.cs new file mode 100644 index 00000000..cf3db128 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Input.Signals.cs @@ -0,0 +1,195 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + private static event Action InputActionEventDelegate; + static Action _inputActionAction = () => + { + InputActionEventDelegate?.Invoke(); + }; + public static event Action InputActionEvent + { + add + { + if (InputActionEventDelegate == null) + { + GetInstance().Connect(Signals.InputActionEvent, Callable.From(_inputActionAction)); + } + InputActionEventDelegate += value; + } + remove + { + InputActionEventDelegate -= value; + if (InputActionEventDelegate == null) + { + GetInstance() + .Disconnect(Signals.InputActionEvent, Callable.From(_inputActionAction)); + } + } + } + + public delegate void InputDeviceConnectedEventHandler(long inputHandle); + private static event InputDeviceConnectedEventHandler InputDeviceConnectedEvent; + static Action _inputDeviceConnectedAction = (inputHandle) => + { + InputDeviceConnectedEvent?.Invoke(inputHandle); + }; + public static event InputDeviceConnectedEventHandler InputDeviceConnected + { + add + { + if (InputDeviceConnectedEvent == null) + { + GetInstance() + .Connect( + Signals.InputDeviceConnected, + Callable.From(_inputDeviceConnectedAction) + ); + } + InputDeviceConnectedEvent += value; + } + remove + { + InputDeviceConnectedEvent -= value; + if (InputDeviceConnectedEvent == null) + { + GetInstance() + .Disconnect( + Signals.InputDeviceConnected, + Callable.From(_inputDeviceConnectedAction) + ); + } + } + } + + public delegate void InputDeviceDisconnectedEventHandler(long inputHandle); + private static event InputDeviceDisconnectedEventHandler InputDeviceDisconnectedEvent; + static Action _inputDeviceDisconnectedAction = (inputHandle) => + { + InputDeviceDisconnectedEvent?.Invoke(inputHandle); + }; + public static event InputDeviceDisconnectedEventHandler InputDeviceDisconnected + { + add + { + if (InputDeviceDisconnectedEvent == null) + { + GetInstance() + .Connect( + Signals.InputDeviceDisconnected, + Callable.From(_inputDeviceDisconnectedAction) + ); + } + InputDeviceDisconnectedEvent += value; + } + remove + { + InputDeviceDisconnectedEvent -= value; + if (InputDeviceDisconnectedEvent == null) + { + GetInstance() + .Disconnect( + Signals.InputDeviceDisconnected, + Callable.From(_inputDeviceDisconnectedAction) + ); + } + } + } + + public delegate void InputConfigurationLoadedEventHandler( + uint appId, + long deviceHandle, + Godot.Collections.Dictionary configData + ); + private static event InputConfigurationLoadedEventHandler InputConfigurationLoadedEvent; + static Action _inputConfigurationLoadedAction = ( + appId, + deviceHandle, + configData + ) => + { + InputConfigurationLoadedEvent?.Invoke(appId, deviceHandle, configData); + }; + public static event InputConfigurationLoadedEventHandler InputConfigurationLoaded + { + add + { + if (InputConfigurationLoadedEvent == null) + { + GetInstance() + .Connect( + Signals.InputConfigurationLoaded, + Callable.From(_inputConfigurationLoadedAction) + ); + } + InputConfigurationLoadedEvent += value; + } + remove + { + InputConfigurationLoadedEvent -= value; + if (InputConfigurationLoadedEvent == null) + { + GetInstance() + .Disconnect( + Signals.InputConfigurationLoaded, + Callable.From(_inputConfigurationLoadedAction) + ); + } + } + } + + public delegate void InputGamepadSlotChangeEventHandler( + uint appId, + long deviceHandle, + long deviceType, + long oldGamepadSlot, + long newGamepadSlot + ); + private static event InputGamepadSlotChangeEventHandler InputGamepadSlotChangeEvent; + static Action _inputGamepadSlotChangeAction = ( + appId, + deviceHandle, + deviceType, + oldGamepadSlot, + newGamepadSlot + ) => + { + InputGamepadSlotChangeEvent?.Invoke( + appId, + deviceHandle, + deviceType, + oldGamepadSlot, + newGamepadSlot + ); + }; + public static event InputGamepadSlotChangeEventHandler InputGamepadSlotChange + { + add + { + if (InputGamepadSlotChangeEvent == null) + { + GetInstance() + .Connect( + Signals.InputGamepadSlotChange, + Callable.From(_inputGamepadSlotChangeAction) + ); + } + InputGamepadSlotChangeEvent += value; + } + remove + { + InputGamepadSlotChangeEvent -= value; + if (InputGamepadSlotChangeEvent == null) + { + GetInstance() + .Disconnect( + Signals.InputGamepadSlotChange, + Callable.From(_inputGamepadSlotChangeAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Input.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Input.Signals.cs.uid new file mode 100644 index 00000000..e2e99443 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Input.Signals.cs.uid @@ -0,0 +1 @@ +uid://dxpge2ru7ddhv diff --git a/addons/godotsteam_csharpbindings/Steam.Input.cs b/addons/godotsteam_csharpbindings/Steam.Input.cs new file mode 100644 index 00000000..85d6daa4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Input.cs @@ -0,0 +1,846 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static void ActivateActionSet(ulong inputHandle, long actionSetHandle) + { + GetInstance().Call(Methods.ActivateActionSet, inputHandle, actionSetHandle); + } + + public static void ActivateActionSetLayer(ulong inputHandle, long actionSetLayerHandle) + { + GetInstance().Call(Methods.ActivateActionSetLayer, inputHandle, actionSetLayerHandle); + } + + public static void DeactivateActionSetLayer(ulong inputHandle, long actionSetHandle) + { + GetInstance().Call(Methods.DeactivateActionSetLayer, inputHandle, actionSetHandle); + } + + public static void DeactivateAllActionSetLayers(long inputHandle) + { + GetInstance().Call(Methods.DeactivateAllActionSetLayers, inputHandle); + } + + public static ulong GetActionSetHandle(string actionSetName) + { + return GetInstance().Call(Methods.GetActionSetHandle, actionSetName).AsUInt64(); + } + + public static InputActionOrigin GetActionOriginFromXboxOrigin(ulong inputHandle, long origin) + { + return (InputActionOrigin) + GetInstance() + .Call(Methods.GetActionOriginFromXboxOrigin, inputHandle, origin) + .AsInt64(); + } + + public static Godot.Collections.Array GetActiveActionSetLayers(long inputHandle) + { + return GetInstance().Call(Methods.GetActiveActionSetLayers, inputHandle).AsGodotArray(); + } + + public static Godot.Collections.Dictionary GetAnalogActionData( + ulong inputHandle, + long analogActionHandle + ) + { + return GetInstance() + .Call(Methods.GetAnalogActionData, inputHandle, analogActionHandle) + .AsGodotDictionary(); + } + + public static ulong GetAnalogActionHandle(string actionName) + { + return GetInstance().Call(Methods.GetAnalogActionHandle, actionName).AsUInt16(); + } + + public static Godot.Collections.Array GetAnalogActionOrigins( + ulong inputHandle, + ulong actionSetHandle, + long analogActionHandle + ) + { + return GetInstance() + .Call(Methods.GetAnalogActionOrigins, inputHandle, actionSetHandle, analogActionHandle) + .AsGodotArray(); + } + + public static Godot.Collections.Array GetConnectedControllers() + { + return GetInstance().Call(Methods.GetConnectedControllers).AsGodotArray(); + } + + public static ulong GetControllerForGamepadIndex(long index) + { + return GetInstance().Call(Methods.GetControllerForGamepadIndex, index).AsUInt16(); + } + + public static ulong GetCurrentActionSet(long inputHandle) + { + return GetInstance().Call(Methods.GetCurrentActionSet, inputHandle).AsUInt16(); + } + + public static Godot.Collections.Array GetDeviceBindingRevision(long inputHandle) + { + return GetInstance().Call(Methods.GetDeviceBindingRevision, inputHandle).AsGodotArray(); + } + + public static Godot.Collections.Dictionary GetDigitalActionData( + ulong inputHandle, + long digitalActionHandle + ) + { + return GetInstance() + .Call(Methods.GetDigitalActionData, inputHandle, digitalActionHandle) + .AsGodotDictionary(); + } + + public static ulong GetDigitalActionHandle(string actionName) + { + return GetInstance().Call(Methods.GetDigitalActionHandle, actionName).AsUInt64(); + } + + public static Godot.Collections.Array GetDigitalActionOrigins( + ulong inputHandle, + ulong actionSetHandle, + long digitalActionHandle + ) + { + return GetInstance() + .Call( + Methods.GetDigitalActionOrigins, + inputHandle, + actionSetHandle, + digitalActionHandle + ) + .AsGodotArray(); + } + + public static int GetGamepadIndexForController(long inputHandle) + { + return GetInstance().Call(Methods.GetGamepadIndexForController, inputHandle).AsInt32(); + } + + public static string GetGlyphForActionOrigin(InputActionOrigin origin) + { + return GetInstance().Call(Methods.GetGlyphForActionOrigin, (long)origin).AsString(); + } + + public static string GetInputTypeForHandle(long inputHandle) + { + return GetInstance().Call(Methods.GetInputTypeForHandle, inputHandle).AsString(); + } + + public static Godot.Collections.Dictionary GetMotionData(long inputHandle) + { + return GetInstance().Call(Methods.GetMotionData, inputHandle).AsGodotDictionary(); + } + + public static int GetRemotePlaySessionID(long inputHandle) + { + return GetInstance().Call(Methods.GetRemotePlaySessionID, inputHandle).AsInt32(); + } + + public static string GetStringForActionOrigin(InputActionOrigin origin) + { + return GetInstance().Call(Methods.GetStringForActionOrigin, (long)origin).AsString(); + } + + public static bool InputInit(bool explicitlyCallRunframe = false) + { + return GetInstance().Call(Methods.InputInit, explicitlyCallRunframe).AsBool(); + } + + public static bool InputShutdown() + { + return GetInstance().Call(Methods.InputShutdown).AsBool(); + } + + public static void RunFrame(bool reservedValue = true) + { + GetInstance().Call(Methods.RunFrame, reservedValue); + } + + public static void SetLEDColor( + ulong inputHandle, + int colorR, + int colorG, + int colorB, + long flags + ) + { + GetInstance().Call(Methods.SetLEDColor, inputHandle, colorR, colorG, colorB, flags); + } + + public static bool ShowBindingPanel(long inputHandle) + { + return GetInstance().Call(Methods.ShowBindingPanel, inputHandle).AsBool(); + } + + public static void StopAnalogActionMomentum(ulong inputHandle, long action) + { + GetInstance().Call(Methods.StopAnalogActionMomentum, inputHandle, action); + } + + public static int TranslateActionOrigin( + InputType destinationInput, + InputActionOrigin sourceOrigin + ) + { + return GetInstance() + .Call(Methods.TranslateActionOrigin, (long)destinationInput, (long)sourceOrigin) + .AsInt32(); + } + + public static void TriggerHapticPulse(ulong inputHandle, int targetPad, long duration) + { + GetInstance().Call(Methods.TriggerHapticPulse, inputHandle, targetPad, duration); + } + + public static void TriggerRepeatedHapticPulse( + ulong inputHandle, + int targetPad, + int duration, + int offset, + int repeat, + long flags + ) + { + GetInstance() + .Call( + Methods.TriggerRepeatedHapticPulse, + inputHandle, + targetPad, + duration, + offset, + repeat, + flags + ); + } + + public static void TriggerVibration(ulong inputHandle, int leftSpeed, long rightSpeed) + { + GetInstance().Call(Methods.TriggerVibration, inputHandle, leftSpeed, rightSpeed); + } + + public static bool SetInputActionManifestFilePath(string manifestPath) + { + return GetInstance().Call(Methods.SetInputActionManifestFilePath, manifestPath).AsBool(); + } + + public static void SetDualSenseTriggerEffect( + ulong inputHandle, + int parameters, + int triggerMask, + ScePadTriggerEffectMode effectMode, + int position, + int amplitude, + long frequency + ) + { + GetInstance() + .Call( + Methods.SetDualSenseTriggerEffect, + inputHandle, + parameters, + triggerMask, + (long)effectMode, + position, + amplitude, + frequency + ); + } + + public static bool WaitForData(bool waitForever, long timeout) + { + return GetInstance().Call(Methods.WaitForData, waitForever, timeout).AsBool(); + } + + public static bool NewDataAvailable() + { + return GetInstance().Call(Methods.NewDataAvailable).AsBool(); + } + + public static void EnableDeviceCallbacks() + { + GetInstance().Call(Methods.EnableDeviceCallbacks); + } + + public static string GetGlyphPNGForActionOrigin( + InputActionOrigin origin, + InputGlyphSize size, + long flags + ) + { + return GetInstance() + .Call(Methods.GetGlyphPNGForActionOrigin, (long)origin, (long)size, flags) + .AsString(); + } + + public static string GetGlyphSVGForActionOrigin(InputActionOrigin origin, long flags) + { + return GetInstance() + .Call(Methods.GetGlyphSVGForActionOrigin, (long)origin, flags) + .AsString(); + } + + public static void TriggerVibrationExtended( + ulong inputHandle, + int leftSpeed, + int rightSpeed, + int leftTriggerSpeed, + long rightTriggerSpeed + ) + { + GetInstance() + .Call( + Methods.TriggerVibrationExtended, + inputHandle, + leftSpeed, + rightSpeed, + leftTriggerSpeed, + rightTriggerSpeed + ); + } + + public static void TriggerSimpleHapticEvent( + ulong inputHandle, + int hapticLocation, + int intensity, + string gainDb, + int otherIntensity, + string otherGainDb + ) + { + GetInstance() + .Call( + Methods.TriggerSimpleHapticEvent, + inputHandle, + hapticLocation, + intensity, + gainDb, + otherIntensity, + otherGainDb + ); + } + + public static string GetStringForXboxOrigin(long origin) + { + return GetInstance().Call(Methods.GetStringForXboxOrigin, origin).AsString(); + } + + public static string GetGlyphForXboxOrigin(long origin) + { + return GetInstance().Call(Methods.GetGlyphForXboxOrigin, origin).AsString(); + } + + public static long GetSessionInputConfigurationSettings() + { + return GetInstance().Call(Methods.GetSessionInputConfigurationSettings).AsInt64(); + } + + public static string GetStringForDigitalActionName(long actionHandle) + { + return GetInstance().Call(Methods.GetStringForDigitalActionName, actionHandle).AsString(); + } + + public static string GetStringForAnalogActionName(long actionHandle) + { + return GetInstance().Call(Methods.GetStringForAnalogActionName, actionHandle).AsString(); + } + + public enum InputActionEventType : long + { + DigitalAction = 0, + AnalogAction = 1, + } + + public enum InputActionOrigin : long + { + None = 0, + SteamcontrollerA = 1, + SteamcontrollerB = 2, + SteamcontrollerX = 3, + SteamcontrollerY = 4, + SteamcontrollerLeftbumper = 5, + SteamcontrollerRightbumper = 6, + SteamcontrollerLeftgrip = 7, + SteamcontrollerRightgrip = 8, + SteamcontrollerStart = 9, + SteamcontrollerBack = 10, + SteamcontrollerLeftpadTouch = 11, + SteamcontrollerLeftpadSwipe = 12, + SteamcontrollerLeftpadClick = 13, + SteamcontrollerLeftpadDpadnorth = 14, + SteamcontrollerLeftpadDpadsouth = 15, + SteamcontrollerLeftpadDpadwest = 16, + SteamcontrollerLeftpadDpadeast = 17, + SteamcontrollerRightpadTouch = 18, + SteamcontrollerRightpadSwipe = 19, + SteamcontrollerRightpadClick = 20, + SteamcontrollerRightpadDpadnorth = 21, + SteamcontrollerRightpadDpadsouth = 22, + SteamcontrollerRightpadDpadwest = 23, + SteamcontrollerRightpadDpadeast = 24, + SteamcontrollerLefttriggerPull = 25, + SteamcontrollerLefttriggerClick = 26, + SteamcontrollerRighttriggerPull = 27, + SteamcontrollerRighttriggerClick = 28, + SteamcontrollerLeftstickMove = 29, + SteamcontrollerLeftstickClick = 30, + SteamcontrollerLeftstickDpadnorth = 31, + SteamcontrollerLeftstickDpadsouth = 32, + SteamcontrollerLeftstickDpadwest = 33, + SteamcontrollerLeftstickDpadeast = 34, + SteamcontrollerGyroMove = 35, + SteamcontrollerGyroPitch = 36, + SteamcontrollerGyroYaw = 37, + SteamcontrollerGyroRoll = 38, + SteamcontrollerReserved0 = 39, + SteamcontrollerReserved1 = 40, + SteamcontrollerReserved2 = 41, + SteamcontrollerReserved3 = 42, + SteamcontrollerReserved4 = 43, + SteamcontrollerReserved5 = 44, + SteamcontrollerReserved6 = 45, + SteamcontrollerReserved7 = 46, + SteamcontrollerReserved8 = 47, + SteamcontrollerReserved9 = 48, + SteamcontrollerReserved10 = 49, + Ps4X = 50, + Ps4Circle = 51, + Ps4Triangle = 52, + Ps4Square = 53, + Ps4Leftbumper = 54, + Ps4Rightbumper = 55, + Ps4Options = 56, + Ps4Share = 57, + Ps4LeftpadTouch = 58, + Ps4LeftpadSwipe = 59, + Ps4LeftpadClick = 60, + Ps4LeftpadDpadnorth = 61, + Ps4LeftpadDpadsouth = 62, + Ps4LeftpadDpadwest = 63, + Ps4LeftpadDpadeast = 64, + Ps4RightpadTouch = 65, + Ps4RightpadSwipe = 66, + Ps4RightpadClick = 67, + Ps4RightpadDpadnorth = 68, + Ps4RightpadDpadsouth = 69, + Ps4RightpadDpadwest = 70, + Ps4RightpadDpadeast = 71, + Ps4CenterpadTouch = 72, + Ps4CenterpadSwipe = 73, + Ps4CenterpadClick = 74, + Ps4CenterpadDpadnorth = 75, + Ps4CenterpadDpadsouth = 76, + Ps4CenterpadDpadwest = 77, + Ps4CenterpadDpadeast = 78, + Ps4LefttriggerPull = 79, + Ps4LefttriggerClick = 80, + Ps4RighttriggerPull = 81, + Ps4RighttriggerClick = 82, + Ps4LeftstickMove = 83, + Ps4LeftstickClick = 84, + Ps4LeftstickDpadnorth = 85, + Ps4LeftstickDpadsouth = 86, + Ps4LeftstickDpadwest = 87, + Ps4LeftstickDpadeast = 88, + Ps4RightstickMove = 89, + Ps4RightstickClick = 90, + Ps4RightstickDpadnorth = 91, + Ps4RightstickDpadsouth = 92, + Ps4RightstickDpadwest = 93, + Ps4RightstickDpadeast = 94, + Ps4DpadNorth = 95, + Ps4DpadSouth = 96, + Ps4DpadWest = 97, + Ps4DpadEast = 98, + Ps4GyroMove = 99, + Ps4GyroPitch = 100, + Ps4GyroYaw = 101, + Ps4GyroRoll = 102, + Ps4DpadMove = 103, + Ps4Reserved1 = 104, + Ps4Reserved2 = 105, + Ps4Reserved3 = 106, + Ps4Reserved4 = 107, + Ps4Reserved5 = 108, + Ps4Reserved6 = 109, + Ps4Reserved7 = 110, + Ps4Reserved8 = 111, + Ps4Reserved9 = 112, + Ps4Reserved10 = 113, + XboxoneA = 114, + XboxoneB = 115, + XboxoneX = 116, + XboxoneY = 117, + XboxoneLeftbumper = 118, + XboxoneRightbumper = 119, + XboxoneMenu = 120, + XboxoneView = 121, + XboxoneLefttriggerPull = 122, + XboxoneLefttriggerClick = 123, + XboxoneRighttriggerPull = 124, + XboxoneRighttriggerClick = 125, + XboxoneLeftstickMove = 126, + XboxoneLeftstickClick = 127, + XboxoneLeftstickDpadnorth = 128, + XboxoneLeftstickDpadsouth = 129, + XboxoneLeftstickDpadwest = 130, + XboxoneLeftstickDpadeast = 131, + XboxoneRightstickMove = 132, + XboxoneRightstickClick = 133, + XboxoneRightstickDpadnorth = 134, + XboxoneRightstickDpadsouth = 135, + XboxoneRightstickDpadwest = 136, + XboxoneRightstickDpadeast = 137, + XboxoneDpadNorth = 138, + XboxoneDpadSouth = 139, + XboxoneDpadWest = 140, + XboxoneDpadEast = 141, + XboxoneDpadMove = 142, + XboxoneLeftgripLower = 143, + XboxoneLeftgripUpper = 144, + XboxoneRightgripLower = 145, + XboxoneRightgripUpper = 146, + XboxoneShare = 147, + XboxoneReserved6 = 148, + XboxoneReserved7 = 149, + XboxoneReserved8 = 150, + XboxoneReserved9 = 151, + XboxoneReserved10 = 152, + Xbox360A = 153, + Xbox360B = 154, + Xbox360X = 155, + Xbox360Y = 156, + Xbox360Leftbumper = 157, + Xbox360Rightbumper = 158, + Xbox360Start = 159, + Xbox360Back = 160, + Xbox360LefttriggerPull = 161, + Xbox360LefttriggerClick = 162, + Xbox360RighttriggerPull = 163, + Xbox360RighttriggerClick = 164, + Xbox360LeftstickMove = 165, + Xbox360LeftstickClick = 166, + Xbox360LeftstickDpadnorth = 167, + Xbox360LeftstickDpadsouth = 168, + Xbox360LeftstickDpadwest = 169, + Xbox360LeftstickDpadeast = 170, + Xbox360RightstickMove = 171, + Xbox360RightstickClick = 172, + Xbox360RightstickDpadnorth = 173, + Xbox360RightstickDpadsouth = 174, + Xbox360RightstickDpadwest = 175, + Xbox360RightstickDpadeast = 176, + Xbox360DpadNorth = 177, + Xbox360DpadSouth = 178, + Xbox360DpadWest = 179, + Xbox360DpadEast = 180, + Xbox360DpadMove = 181, + Xbox360Reserved1 = 182, + Xbox360Reserved2 = 183, + Xbox360Reserved3 = 184, + Xbox360Reserved4 = 185, + Xbox360Reserved5 = 186, + Xbox360Reserved6 = 187, + Xbox360Reserved7 = 188, + Xbox360Reserved8 = 189, + Xbox360Reserved9 = 190, + Xbox360Reserved10 = 191, + SwitchA = 192, + SwitchB = 193, + SwitchX = 194, + SwitchY = 195, + SwitchLeftbumper = 196, + SwitchRightbumper = 197, + SwitchPlus = 198, + SwitchMinus = 199, + SwitchCapture = 200, + SwitchLefttriggerPull = 201, + SwitchLefttriggerClick = 202, + SwitchRighttriggerPull = 203, + SwitchRighttriggerClick = 204, + SwitchLeftstickMove = 205, + SwitchLeftstickClick = 206, + SwitchLeftstickDpadnorth = 207, + SwitchLeftstickDpadsouth = 208, + SwitchLeftstickDpadwest = 209, + SwitchLeftstickDpadeast = 210, + SwitchRightstickMove = 211, + SwitchRightstickClick = 212, + SwitchRightstickDpadnorth = 213, + SwitchRightstickDpadsouth = 214, + SwitchRightstickDpadwest = 215, + SwitchRightstickDpadeast = 216, + SwitchDpadNorth = 217, + SwitchDpadSouth = 218, + SwitchDpadWest = 219, + SwitchDpadEast = 220, + SwitchProgyroMove = 221, + SwitchProgyroPitch = 222, + SwitchProgyroYaw = 223, + SwitchProgyroRoll = 224, + SwitchDpadMove = 225, + SwitchReserved1 = 226, + SwitchReserved2 = 227, + SwitchReserved3 = 228, + SwitchReserved4 = 229, + SwitchReserved5 = 230, + SwitchReserved6 = 231, + SwitchReserved7 = 232, + SwitchReserved8 = 233, + SwitchReserved9 = 234, + SwitchReserved10 = 235, + SwitchRightgyroMove = 236, + SwitchRightgyroPitch = 237, + SwitchRightgyroYaw = 238, + SwitchRightgyroRoll = 239, + SwitchLeftgyroMove = 240, + SwitchLeftgyroPitch = 241, + SwitchLeftgyroYaw = 242, + SwitchLeftgyroRoll = 243, + SwitchLeftgripLower = 244, + SwitchLeftgripUpper = 245, + SwitchRightgripLower = 246, + SwitchRightgripUpper = 247, + SwitchJoyconButtonN = 248, + SwitchJoyconButtonE = 249, + SwitchJoyconButtonS = 250, + SwitchJoyconButtonW = 251, + SwitchReserved15 = 252, + SwitchReserved16 = 253, + SwitchReserved17 = 254, + SwitchReserved18 = 255, + SwitchReserved19 = 256, + SwitchReserved20 = 257, + Ps5X = 258, + Ps5Circle = 259, + Ps5Triangle = 260, + Ps5Square = 261, + Ps5Leftbumper = 262, + Ps5Rightbumper = 263, + Ps5Option = 264, + Ps5Create = 265, + Ps5Mute = 266, + Ps5LeftpadTouch = 267, + Ps5LeftpadSwipe = 268, + Ps5LeftpadClick = 269, + Ps5LeftpadDpadnorth = 270, + Ps5LeftpadDpadsouth = 271, + Ps5LeftpadDpadwest = 272, + Ps5LeftpadDpadeast = 273, + Ps5RightpadTouch = 274, + Ps5RightpadSwipe = 275, + Ps5RightpadClick = 276, + Ps5RightpadDpadnorth = 277, + Ps5RightpadDpadsouth = 278, + Ps5RightpadDpadwest = 279, + Ps5RightpadDpadeast = 280, + Ps5CenterpadTouch = 281, + Ps5CenterpadSwipe = 282, + Ps5CenterpadClick = 283, + Ps5CenterpadDpadnorth = 284, + Ps5CenterpadDpadsouth = 285, + Ps5CenterpadDpadwest = 286, + Ps5CenterpadDpadeast = 287, + Ps5LefttriggerPull = 288, + Ps5LefttriggerClick = 289, + Ps5RighttriggerPull = 290, + Ps5RighttriggerClick = 291, + Ps5LeftstickMove = 292, + Ps5LeftstickClick = 293, + Ps5LeftstickDpadnorth = 294, + Ps5LeftstickDpadsouth = 295, + Ps5LeftstickDpadwest = 296, + Ps5LeftstickDpadeast = 297, + Ps5RightstickMove = 298, + Ps5RightstickClick = 299, + Ps5RightstickDpadnorth = 300, + Ps5RightstickDpadsouth = 301, + Ps5RightstickDpadwest = 302, + Ps5RightstickDpadeast = 303, + Ps5DpadNorth = 304, + Ps5DpadSouth = 305, + Ps5DpadWest = 306, + Ps5DpadEast = 307, + Ps5GyroMove = 308, + Ps5GyroPitch = 309, + Ps5GyroYaw = 310, + Ps5GyroRoll = 311, + Ps5DpadMove = 312, + Ps5Leftgrip = 313, + Ps5Rightgrip = 314, + Ps5Leftfn = 315, + Ps5Rightfn = 316, + Ps5Reserved5 = 317, + Ps5Reserved6 = 318, + Ps5Reserved7 = 319, + Ps5Reserved8 = 320, + Ps5Reserved9 = 321, + Ps5Reserved10 = 322, + Ps5Reserved11 = 323, + Ps5Reserved12 = 324, + Ps5Reserved13 = 325, + Ps5Reserved14 = 326, + Ps5Reserved15 = 327, + Ps5Reserved16 = 328, + Ps5Reserved17 = 329, + Ps5Reserved18 = 330, + Ps5Reserved19 = 331, + Ps5Reserved20 = 332, + SteamdeckA = 333, + SteamdeckB = 334, + SteamdeckX = 335, + SteamdeckY = 336, + SteamdeckL1 = 337, + SteamdeckR1 = 338, + SteamdeckMenu = 339, + SteamdeckView = 340, + SteamdeckLeftpadTouch = 341, + SteamdeckLeftpadSwipe = 342, + SteamdeckLeftpadClick = 343, + SteamdeckLeftpadDpadnorth = 344, + SteamdeckLeftpadDpadsouth = 345, + SteamdeckLeftpadDpadwest = 346, + SteamdeckLeftpadDpadeast = 347, + SteamdeckRightpadTouch = 348, + SteamdeckRightpadSwipe = 349, + SteamdeckRightpadClick = 350, + SteamdeckRightpadDpadnorth = 351, + SteamdeckRightpadDpadsouth = 352, + SteamdeckRightpadDpadwest = 353, + SteamdeckRightpadDpadeast = 354, + SteamdeckL2Softpull = 355, + SteamdeckL2 = 356, + SteamdeckR2Softpull = 357, + SteamdeckR2 = 358, + SteamdeckLeftstickMove = 359, + SteamdeckL3 = 360, + SteamdeckLeftstickDpadnorth = 361, + SteamdeckLeftstickDpadsouth = 362, + SteamdeckLeftstickDpadwest = 363, + SteamdeckLeftstickDpadeast = 364, + SteamdeckLeftstickTouch = 365, + SteamdeckRightstickMove = 366, + SteamdeckR3 = 367, + SteamdeckRightstickDpadnorth = 368, + SteamdeckRightstickDpadsouth = 369, + SteamdeckRightstickDpadwest = 370, + SteamdeckRightstickDpadeast = 371, + SteamdeckRightstickTouch = 372, + SteamdeckL4 = 373, + SteamdeckR4 = 374, + SteamdeckL5 = 375, + SteamdeckR5 = 376, + SteamdeckDpadMove = 377, + SteamdeckDpadNorth = 378, + SteamdeckDpadSouth = 379, + SteamdeckDpadWest = 380, + SteamdeckDpadEast = 381, + SteamdeckGyroMove = 382, + SteamdeckGyroPitch = 383, + SteamdeckGyroYaw = 384, + SteamdeckGyroRoll = 385, + SteamdeckReserved1 = 386, + SteamdeckReserved2 = 387, + SteamdeckReserved3 = 388, + SteamdeckReserved4 = 389, + SteamdeckReserved5 = 390, + SteamdeckReserved6 = 391, + SteamdeckReserved7 = 392, + SteamdeckReserved8 = 393, + SteamdeckReserved9 = 394, + SteamdeckReserved10 = 395, + SteamdeckReserved11 = 396, + SteamdeckReserved12 = 397, + SteamdeckReserved13 = 398, + SteamdeckReserved14 = 399, + SteamdeckReserved15 = 400, + SteamdeckReserved16 = 401, + SteamdeckReserved17 = 402, + SteamdeckReserved18 = 403, + SteamdeckReserved19 = 404, + SteamdeckReserved20 = 405, + Count = 406, + MaximumPossibleValue = 32767, + } + + [System.Flags] + public enum InputConfigurationEnableType : long + { + None = 0, + Playstation = 1, + Xbox = 2, + Generic = 4, + Switch = 8, + } + + public enum InputGlyphSize : long + { + Small = 0, + Medium = 1, + Large = 2, + Count = 3, + } + + [System.Flags] + public enum InputGlyphStyle : long + { + Knockout = 0, + Light = 1, + Dark = 2, + NeutralColorAbxy = 16, + SolidAbxy = 32, + } + + public enum InputLedFlag : long + { + SetColor = 0, + RestoreUserDefault = 1, + } + + public enum InputSourceMode : long + { + None = 0, + Dpad = 1, + Buttons = 2, + FourButtons = 3, + AbsoluteMouse = 4, + RelativeMouse = 5, + JoystickMove = 6, + JoystickMouse = 7, + JoystickCamera = 8, + ScrollWheel = 9, + Trigger = 10, + TouchMenu = 11, + MouseJoystick = 12, + MouseRegion = 13, + RadialMenu = 14, + SingleButton = 15, + Switch = 16, + } + + public enum InputType : long + { + Unknown = 0, + SteamController = 1, + Xbox360Controller = 2, + XboxoneController = 3, + GenericXinput = 4, + Ps4Controller = 5, + AppleMfiController = 6, + AndroidController = 7, + SwitchJoyconPair = 8, + SwitchJoyconSingle = 9, + SwitchProController = 10, + MobileTouch = 11, + Ps3Controller = 12, + Ps5Controller = 13, + SteamDeckController = 14, + Count = 15, + MaximumPossibleValue = 255, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Input.cs.uid b/addons/godotsteam_csharpbindings/Steam.Input.cs.uid new file mode 100644 index 00000000..59735a6b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Input.cs.uid @@ -0,0 +1 @@ +uid://cdp7kht5j4b6g diff --git a/addons/godotsteam_csharpbindings/Steam.Inventory.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Inventory.Signals.cs new file mode 100644 index 00000000..006a7f1e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Inventory.Signals.cs @@ -0,0 +1,227 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void InventoryDefinitionUpdateEventHandler(Godot.Collections.Array definitions); + private static event InventoryDefinitionUpdateEventHandler InventoryDefinitionUpdateEvent; + static Action _inventoryDefinitionUpdateAction = (definitions) => + { + InventoryDefinitionUpdateEvent?.Invoke(definitions); + }; + public static event InventoryDefinitionUpdateEventHandler InventoryDefinitionUpdate + { + add + { + if (InventoryDefinitionUpdateEvent == null) + { + GetInstance() + .Connect( + Signals.InventoryDefinitionUpdate, + Callable.From(_inventoryDefinitionUpdateAction) + ); + } + InventoryDefinitionUpdateEvent += value; + } + remove + { + InventoryDefinitionUpdateEvent -= value; + if (InventoryDefinitionUpdateEvent == null) + { + GetInstance() + .Disconnect( + Signals.InventoryDefinitionUpdate, + Callable.From(_inventoryDefinitionUpdateAction) + ); + } + } + } + + public delegate void InventoryEligiblePromoItemEventHandler( + long result, + bool cached, + Godot.Collections.Array definitions + ); + private static event InventoryEligiblePromoItemEventHandler InventoryEligiblePromoItemEvent; + static Action _inventoryEligiblePromoItemAction = ( + result, + cached, + definitions + ) => + { + InventoryEligiblePromoItemEvent?.Invoke(result, cached, definitions); + }; + public static event InventoryEligiblePromoItemEventHandler InventoryEligiblePromoItem + { + add + { + if (InventoryEligiblePromoItemEvent == null) + { + GetInstance() + .Connect( + Signals.InventoryEligiblePromoItem, + Callable.From(_inventoryEligiblePromoItemAction) + ); + } + InventoryEligiblePromoItemEvent += value; + } + remove + { + InventoryEligiblePromoItemEvent -= value; + if (InventoryEligiblePromoItemEvent == null) + { + GetInstance() + .Disconnect( + Signals.InventoryEligiblePromoItem, + Callable.From(_inventoryEligiblePromoItemAction) + ); + } + } + } + + public delegate void InventoryFullUpdateEventHandler(long inventoryHandle); + private static event InventoryFullUpdateEventHandler InventoryFullUpdateEvent; + static Action _inventoryFullUpdateAction = (inventoryHandle) => + { + InventoryFullUpdateEvent?.Invoke(inventoryHandle); + }; + public static event InventoryFullUpdateEventHandler InventoryFullUpdate + { + add + { + if (InventoryFullUpdateEvent == null) + { + GetInstance() + .Connect( + Signals.InventoryFullUpdate, + Callable.From(_inventoryFullUpdateAction) + ); + } + InventoryFullUpdateEvent += value; + } + remove + { + InventoryFullUpdateEvent -= value; + if (InventoryFullUpdateEvent == null) + { + GetInstance() + .Disconnect( + Signals.InventoryFullUpdate, + Callable.From(_inventoryFullUpdateAction) + ); + } + } + } + + public delegate void InventoryResultReadyEventHandler(long result, long inventoryHandle); + private static event InventoryResultReadyEventHandler InventoryResultReadyEvent; + static Action _inventoryResultReadyAction = (result, inventoryHandle) => + { + InventoryResultReadyEvent?.Invoke(result, inventoryHandle); + }; + public static event InventoryResultReadyEventHandler InventoryResultReady + { + add + { + if (InventoryResultReadyEvent == null) + { + GetInstance() + .Connect( + Signals.InventoryResultReady, + Callable.From(_inventoryResultReadyAction) + ); + } + InventoryResultReadyEvent += value; + } + remove + { + InventoryResultReadyEvent -= value; + if (InventoryResultReadyEvent == null) + { + GetInstance() + .Disconnect( + Signals.InventoryResultReady, + Callable.From(_inventoryResultReadyAction) + ); + } + } + } + + public delegate void InventoryStartPurchaseResultEventHandler( + string result, + long orderId, + long transactionId + ); + private static event InventoryStartPurchaseResultEventHandler InventoryStartPurchaseResultEvent; + static Action _inventoryStartPurchaseResultAction = ( + result, + orderId, + transactionId + ) => + { + InventoryStartPurchaseResultEvent?.Invoke(result, orderId, transactionId); + }; + public static event InventoryStartPurchaseResultEventHandler InventoryStartPurchaseResult + { + add + { + if (InventoryStartPurchaseResultEvent == null) + { + GetInstance() + .Connect( + Signals.InventoryStartPurchaseResult, + Callable.From(_inventoryStartPurchaseResultAction) + ); + } + InventoryStartPurchaseResultEvent += value; + } + remove + { + InventoryStartPurchaseResultEvent -= value; + if (InventoryStartPurchaseResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.InventoryStartPurchaseResult, + Callable.From(_inventoryStartPurchaseResultAction) + ); + } + } + } + + public delegate void InventoryRequestPricesResultEventHandler(long result, string currency); + private static event InventoryRequestPricesResultEventHandler InventoryRequestPricesResultEvent; + static Action _inventoryRequestPricesResultAction = (result, currency) => + { + InventoryRequestPricesResultEvent?.Invoke(result, currency); + }; + public static event InventoryRequestPricesResultEventHandler InventoryRequestPricesResult + { + add + { + if (InventoryRequestPricesResultEvent == null) + { + GetInstance() + .Connect( + Signals.InventoryRequestPricesResult, + Callable.From(_inventoryRequestPricesResultAction) + ); + } + InventoryRequestPricesResultEvent += value; + } + remove + { + InventoryRequestPricesResultEvent -= value; + if (InventoryRequestPricesResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.InventoryRequestPricesResult, + Callable.From(_inventoryRequestPricesResultAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Inventory.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Inventory.Signals.cs.uid new file mode 100644 index 00000000..4cc9497a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Inventory.Signals.cs.uid @@ -0,0 +1 @@ +uid://cost68vwxtyxm diff --git a/addons/godotsteam_csharpbindings/Steam.Inventory.cs b/addons/godotsteam_csharpbindings/Steam.Inventory.cs new file mode 100644 index 00000000..df9ae1b0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Inventory.cs @@ -0,0 +1,231 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static int AddPromoItem(long item) + { + return GetInstance().Call(Methods.AddPromoItem, item).AsInt32(); + } + + public static int AddPromoItems(long[] items) + { + return GetInstance().Call(Methods.AddPromoItems, items).AsInt32(); + } + + public static bool CheckResultSteamID(ulong steamIdExpected, long thisInventoryHandle = 0) + { + return GetInstance() + .Call(Methods.CheckResultSteamID, steamIdExpected, thisInventoryHandle) + .AsBool(); + } + + public static int ConsumeItem(ulong itemConsume, long quantity) + { + return GetInstance().Call(Methods.ConsumeItem, itemConsume, quantity).AsInt32(); + } + + public static int DeserializeResult(byte[] buffer) + { + return GetInstance().Call(Methods.DeserializeResult, buffer).AsInt32(); + } + + public static void DestroyResult(long thisInventoryHandle = 0) + { + GetInstance().Call(Methods.DestroyResult, thisInventoryHandle); + } + + public static int ExchangeItems( + long[] outputItems, + uint outputQuantity, + ulong inputItems, + long inputQuantity + ) + { + return GetInstance() + .Call(Methods.ExchangeItems, outputItems, outputQuantity, inputItems, inputQuantity) + .AsInt32(); + } + + public static int GenerateItems(long[] items, long quantity) + { + return GetInstance().Call(Methods.GenerateItems, items, quantity).AsInt32(); + } + + public static long GetAllItems() + { + return GetInstance().Call(Methods.GetAllItems).AsInt64(); + } + + public static string GetItemDefinitionProperty(uint definition, string name) + { + return GetInstance().Call(Methods.GetItemDefinitionProperty, definition, name).AsString(); + } + + public static int GetItemsByID(ulong idArray, long count) + { + return GetInstance().Call(Methods.GetItemsByID, idArray, count).AsInt32(); + } + + public static ulong GetItemPrice(long definition) + { + return GetInstance().Call(Methods.GetItemPrice, definition).AsUInt64(); + } + + public static Godot.Collections.Array GetItemsWithPrices(long length) + { + return GetInstance().Call(Methods.GetItemsWithPrices, length).AsGodotArray(); + } + + public static long GetNumItemsWithPrices() + { + return GetInstance().Call(Methods.GetNumItemsWithPrices).AsInt64(); + } + + public static string GetResultItemProperty( + uint index, + string name, + long thisInventoryHandle = 0 + ) + { + return GetInstance() + .Call(Methods.GetResultItemProperty, index, name, thisInventoryHandle) + .AsString(); + } + + public static Godot.Collections.Array GetResultItems(long thisInventoryHandle = 0) + { + return GetInstance().Call(Methods.GetResultItems, thisInventoryHandle).AsGodotArray(); + } + + public static string GetResultStatus(long thisInventoryHandle = 0) + { + return GetInstance().Call(Methods.GetResultStatus, thisInventoryHandle).AsString(); + } + + public static uint GetResultTimestamp(long thisInventoryHandle = 0) + { + return GetInstance().Call(Methods.GetResultTimestamp, thisInventoryHandle).AsUInt32(); + } + + public static long GrantPromoItems() + { + return GetInstance().Call(Methods.GrantPromoItems).AsInt64(); + } + + public static bool LoadItemDefinitions() + { + return GetInstance().Call(Methods.LoadItemDefinitions).AsBool(); + } + + public static void RequestEligiblePromoItemDefinitionsIDs(ulong steamId) + { + GetInstance().Call(Methods.RequestEligiblePromoItemDefinitionsIDs, steamId); + } + + public static void RequestPrices() + { + GetInstance().Call(Methods.RequestPrices); + } + + public static string SerializeResult(long thisInventoryHandle = 0) + { + return GetInstance().Call(Methods.SerializeResult, thisInventoryHandle).AsString(); + } + + public static void StartPurchase(long[] items, long quantity) + { + GetInstance().Call(Methods.StartPurchase, items, quantity); + } + + public static int TransferItemQuantity( + ulong itemId, + uint quantity, + ulong itemDestination, + bool split + ) + { + return GetInstance() + .Call(Methods.TransferItemQuantity, itemId, quantity, itemDestination, split) + .AsInt32(); + } + + public static int TriggerItemDrop(long definition) + { + return GetInstance().Call(Methods.TriggerItemDrop, definition).AsInt32(); + } + + public static void StartUpdateProperties() + { + GetInstance().Call(Methods.StartUpdateProperties); + } + + public static int SubmitUpdateProperties(long thisInventoryUpdateHandle = 0) + { + return GetInstance() + .Call(Methods.SubmitUpdateProperties, thisInventoryUpdateHandle) + .AsInt32(); + } + + public static bool RemoveProperty(ulong itemId, string name, long thisInventoryUpdateHandle = 0) + { + return GetInstance() + .Call(Methods.RemoveProperty, itemId, name, thisInventoryUpdateHandle) + .AsBool(); + } + + public static bool SetPropertyString( + ulong itemId, + string name, + string value, + long thisInventoryUpdateHandle = 0 + ) + { + return GetInstance() + .Call(Methods.SetPropertyString, itemId, name, value, thisInventoryUpdateHandle) + .AsBool(); + } + + public static bool SetPropertyBool( + ulong itemId, + string name, + bool value, + long thisInventoryUpdateHandle = 0 + ) + { + return GetInstance() + .Call(Methods.SetPropertyBool, itemId, name, value, thisInventoryUpdateHandle) + .AsBool(); + } + + public static bool SetPropertyInt( + ulong itemId, + string name, + ulong value, + long thisInventoryUpdateHandle = 0 + ) + { + return GetInstance() + .Call(Methods.SetPropertyInt, itemId, name, value, thisInventoryUpdateHandle) + .AsBool(); + } + + public static bool SetPropertyFloat( + ulong itemId, + string name, + float value, + long thisInventoryUpdateHandle = 0 + ) + { + return GetInstance() + .Call(Methods.SetPropertyFloat, itemId, name, value, thisInventoryUpdateHandle) + .AsBool(); + } + + [System.Flags] + public enum ItemFlags : long + { + NoTrade = 1, + Removed = 256, + Consumed = 512, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Inventory.cs.uid b/addons/godotsteam_csharpbindings/Steam.Inventory.cs.uid new file mode 100644 index 00000000..a9579ac9 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Inventory.cs.uid @@ -0,0 +1 @@ +uid://cdpl682enwg7m diff --git a/addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs new file mode 100644 index 00000000..5d960b73 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs @@ -0,0 +1,360 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void FavoritesListAccountsUpdatedEventHandler(long result); + private static event FavoritesListAccountsUpdatedEventHandler FavoritesListAccountsUpdatedEvent; + static Action _favoritesListAccountsUpdatedAction = (result) => + { + FavoritesListAccountsUpdatedEvent?.Invoke(result); + }; + public static event FavoritesListAccountsUpdatedEventHandler FavoritesListAccountsUpdated + { + add + { + if (FavoritesListAccountsUpdatedEvent == null) + { + GetInstance() + .Connect( + Signals.FavoritesListAccountsUpdated, + Callable.From(_favoritesListAccountsUpdatedAction) + ); + } + FavoritesListAccountsUpdatedEvent += value; + } + remove + { + FavoritesListAccountsUpdatedEvent -= value; + if (FavoritesListAccountsUpdatedEvent == null) + { + GetInstance() + .Disconnect( + Signals.FavoritesListAccountsUpdated, + Callable.From(_favoritesListAccountsUpdatedAction) + ); + } + } + } + + public delegate void FavoritesListChangedEventHandler(Godot.Collections.Dictionary favorite); + private static event FavoritesListChangedEventHandler FavoritesListChangedEvent; + static Action _favoritesListChangedAction = (favorite) => + { + FavoritesListChangedEvent?.Invoke(favorite); + }; + public static event FavoritesListChangedEventHandler FavoritesListChanged + { + add + { + if (FavoritesListChangedEvent == null) + { + GetInstance() + .Connect( + Signals.FavoritesListChanged, + Callable.From(_favoritesListChangedAction) + ); + } + FavoritesListChangedEvent += value; + } + remove + { + FavoritesListChangedEvent -= value; + if (FavoritesListChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.FavoritesListChanged, + Callable.From(_favoritesListChangedAction) + ); + } + } + } + + public delegate void LobbyMessageEventHandler( + ulong lobbyId, + long user, + string message, + long chatType + ); + private static event LobbyMessageEventHandler LobbyMessageEvent; + static Action _lobbyMessageAction = ( + lobbyId, + user, + message, + chatType + ) => + { + LobbyMessageEvent?.Invoke(lobbyId, user, message, chatType); + }; + public static event LobbyMessageEventHandler LobbyMessage + { + add + { + if (LobbyMessageEvent == null) + { + GetInstance().Connect(Signals.LobbyMessage, Callable.From(_lobbyMessageAction)); + } + LobbyMessageEvent += value; + } + remove + { + LobbyMessageEvent -= value; + if (LobbyMessageEvent == null) + { + GetInstance().Disconnect(Signals.LobbyMessage, Callable.From(_lobbyMessageAction)); + } + } + } + + public delegate void LobbyChatUpdateEventHandler( + ulong lobbyId, + long changedId, + long makingChangeId, + long chatState + ); + private static event LobbyChatUpdateEventHandler LobbyChatUpdateEvent; + static Action _lobbyChatUpdateAction = ( + lobbyId, + changedId, + makingChangeId, + chatState + ) => + { + LobbyChatUpdateEvent?.Invoke(lobbyId, changedId, makingChangeId, chatState); + }; + public static event LobbyChatUpdateEventHandler LobbyChatUpdate + { + add + { + if (LobbyChatUpdateEvent == null) + { + GetInstance() + .Connect(Signals.LobbyChatUpdate, Callable.From(_lobbyChatUpdateAction)); + } + LobbyChatUpdateEvent += value; + } + remove + { + LobbyChatUpdateEvent -= value; + if (LobbyChatUpdateEvent == null) + { + GetInstance() + .Disconnect(Signals.LobbyChatUpdate, Callable.From(_lobbyChatUpdateAction)); + } + } + } + + public delegate void LobbyCreatedEventHandler(long connect, ulong lobbyId); + private static event LobbyCreatedEventHandler LobbyCreatedEvent; + static Action _lobbyCreatedAction = (connect, lobbyId) => + { + LobbyCreatedEvent?.Invoke(connect, lobbyId); + }; + public static event LobbyCreatedEventHandler LobbyCreated + { + add + { + if (LobbyCreatedEvent == null) + { + GetInstance().Connect(Signals.LobbyCreated, Callable.From(_lobbyCreatedAction)); + } + LobbyCreatedEvent += value; + } + remove + { + LobbyCreatedEvent -= value; + if (LobbyCreatedEvent == null) + { + GetInstance().Disconnect(Signals.LobbyCreated, Callable.From(_lobbyCreatedAction)); + } + } + } + + public delegate void LobbyDataUpdateEventHandler(uint success, ulong lobbyID, ulong memberID); + public static event LobbyDataUpdateEventHandler LobbyDataUpdateEvent; + static Action _lobbyDataUpdateAction = (success, lobbyID, memberID) => + { + LobbyDataUpdateEvent?.Invoke(success, lobbyID, memberID); + }; + public static event LobbyDataUpdateEventHandler LobbyDataUpdate + { + add + { + if (LobbyDataUpdateEvent == null) + { + GetInstance() + .Connect(Signals.LobbyDataUpdate, Callable.From(_lobbyDataUpdateAction)); + } + LobbyDataUpdateEvent += value; + } + remove + { + LobbyDataUpdateEvent -= value; + if (LobbyDataUpdateEvent == null) + { + GetInstance() + .Disconnect(Signals.LobbyDataUpdate, Callable.From(_lobbyDataUpdateAction)); + } + } + } + + public delegate void LobbyJoinedEventHandler( + ulong lobby, + long permissions, + bool locked, + long response + ); + private static event LobbyJoinedEventHandler LobbyJoinedEvent; + static Action _lobbyJoinedAction = ( + lobby, + permissions, + locked, + response + ) => + { + LobbyJoinedEvent?.Invoke(lobby, permissions, locked, response); + }; + public static event LobbyJoinedEventHandler LobbyJoined + { + add + { + if (LobbyJoinedEvent == null) + { + GetInstance().Connect(Signals.LobbyJoined, Callable.From(_lobbyJoinedAction)); + } + LobbyJoinedEvent += value; + } + remove + { + LobbyJoinedEvent -= value; + if (LobbyJoinedEvent == null) + { + GetInstance().Disconnect(Signals.LobbyJoined, Callable.From(_lobbyJoinedAction)); + } + } + } + + public delegate void LobbyGameCreatedEventHandler( + ulong lobbyId, + ulong serverId, + string serverIP, + ushort port + ); + private static event LobbyGameCreatedEventHandler LobbyGameCreatedEvent; + static Action _lobbyGameCreatedAction = ( + lobbyId, + serverId, + serverIP, + port + ) => + { + LobbyGameCreatedEvent?.Invoke(lobbyId, serverId, serverIP, port); + }; + public static event LobbyGameCreatedEventHandler LobbyGameCreated + { + add + { + if (LobbyGameCreatedEvent == null) + { + GetInstance() + .Connect(Signals.LobbyGameCreated, Callable.From(_lobbyGameCreatedAction)); + } + LobbyGameCreatedEvent += value; + } + remove + { + LobbyGameCreatedEvent -= value; + if (LobbyGameCreatedEvent == null) + { + GetInstance() + .Disconnect(Signals.LobbyGameCreated, Callable.From(_lobbyGameCreatedAction)); + } + } + } + + public delegate void LobbyInviteEventHandler(ulong inviter, ulong lobby, ulong game); + private static event LobbyInviteEventHandler LobbyInviteEvent; + static Action _lobbyInviteAction = (inviter, lobby, game) => + { + LobbyInviteEvent?.Invoke(inviter, lobby, game); + }; + public static event LobbyInviteEventHandler LobbyInvite + { + add + { + if (LobbyInviteEvent == null) + { + GetInstance().Connect(Signals.LobbyInvite, Callable.From(_lobbyInviteAction)); + } + LobbyInviteEvent += value; + } + remove + { + LobbyInviteEvent -= value; + if (LobbyInviteEvent == null) + { + GetInstance().Disconnect(Signals.LobbyInvite, Callable.From(_lobbyInviteAction)); + } + } + } + + public delegate void LobbyMatchListEventHandler(Godot.Collections.Array lobbies); + private static event LobbyMatchListEventHandler LobbyMatchListEvent; + static Action _lobbyMatchListAction = (lobbies) => + { + LobbyMatchListEvent?.Invoke(lobbies); + }; + public static event LobbyMatchListEventHandler LobbyMatchList + { + add + { + if (LobbyMatchListEvent == null) + { + GetInstance().Connect(Signals.LobbyMatchList, Callable.From(_lobbyMatchListAction)); + } + LobbyMatchListEvent += value; + } + remove + { + LobbyMatchListEvent -= value; + if (LobbyMatchListEvent == null) + { + GetInstance() + .Disconnect(Signals.LobbyMatchList, Callable.From(_lobbyMatchListAction)); + } + } + } + + public delegate void LobbyKickedEventHandler( + ulong lobbyId, + ulong adminId, + byte dueToDisconnect + ); + private static event LobbyKickedEventHandler LobbyKickedEvent; + static Action _lobbyKickedAction = (lobbyId, adminId, dueToDisconnect) => + { + LobbyKickedEvent?.Invoke(lobbyId, adminId, dueToDisconnect); + }; + public static event LobbyKickedEventHandler LobbyKicked + { + add + { + if (LobbyKickedEvent == null) + { + GetInstance().Connect(Signals.LobbyKicked, Callable.From(_lobbyKickedAction)); + } + LobbyKickedEvent += value; + } + remove + { + LobbyKickedEvent -= value; + if (LobbyKickedEvent == null) + { + GetInstance().Disconnect(Signals.LobbyKicked, Callable.From(_lobbyKickedAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs.uid new file mode 100644 index 00000000..ef142fed --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs.uid @@ -0,0 +1 @@ +uid://6usy88k3yn23 diff --git a/addons/godotsteam_csharpbindings/Steam.Matchmaking.cs b/addons/godotsteam_csharpbindings/Steam.Matchmaking.cs new file mode 100644 index 00000000..8ad49845 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Matchmaking.cs @@ -0,0 +1,240 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static Godot.Collections.Array GetFavoriteGames() + { + return GetInstance().Call(Methods.GetFavoriteGames).AsGodotArray(); + } + + public static int AddFavoriteGame(uint iP, int port, int queryPort, uint flags, long lastPlayed) + { + return GetInstance() + .Call(Methods.AddFavoriteGame, iP, port, queryPort, flags, lastPlayed) + .AsInt32(); + } + + public static bool RemoveFavoriteGame(uint appId, uint iP, int port, int queryPort, long flags) + { + return GetInstance() + .Call(Methods.RemoveFavoriteGame, appId, iP, port, queryPort, flags) + .AsBool(); + } + + public static void RequestLobbyList() + { + GetInstance().Call(Methods.RequestLobbyList); + } + + public static void AddRequestLobbyListStringFilter( + string keyToMatch, + string valueToMatch, + LobbyComparison comparisonType + ) + { + GetInstance() + .Call( + Methods.AddRequestLobbyListStringFilter, + keyToMatch, + valueToMatch, + (long)comparisonType + ); + } + + public static void AddRequestLobbyListNumericalFilter( + string keyToMatch, + int valueToMatch, + LobbyComparison comparisonType + ) + { + GetInstance() + .Call( + Methods.AddRequestLobbyListNumericalFilter, + keyToMatch, + valueToMatch, + (long)comparisonType + ); + } + + public static void AddRequestLobbyListNearValueFilter(string keyToMatch, long valueToBeCloseTo) + { + GetInstance() + .Call(Methods.AddRequestLobbyListNearValueFilter, keyToMatch, valueToBeCloseTo); + } + + public static void AddRequestLobbyListFilterSlotsAvailable(long slotsAvailable) + { + GetInstance().Call(Methods.AddRequestLobbyListFilterSlotsAvailable, slotsAvailable); + } + + public static void AddRequestLobbyListDistanceFilter(LobbyDistanceFilter distanceFilter) + { + GetInstance().Call(Methods.AddRequestLobbyListDistanceFilter, (long)distanceFilter); + } + + public static void AddRequestLobbyListResultCountFilter(long maxResults) + { + GetInstance().Call(Methods.AddRequestLobbyListResultCountFilter, maxResults); + } + + public static void CreateLobby(LobbyType lobbyType, long maxMembers = 2) + { + GetInstance().Call(Methods.CreateLobby, (long)lobbyType, maxMembers); + } + + public static void JoinLobby(ulong steamLobbyId) + { + GetInstance().Call(Methods.JoinLobby, steamLobbyId); + } + + public static void LeaveLobby(ulong steamLobbyId) + { + GetInstance().Call(Methods.LeaveLobby, steamLobbyId); + } + + public static bool InviteUserToLobby(ulong steamLobbyId, ulong steamIdInvitee) + { + return GetInstance().Call(Methods.InviteUserToLobby, steamLobbyId, steamIdInvitee).AsBool(); + } + + public static int GetNumLobbyMembers(ulong steamLobbyId) + { + return GetInstance().Call(Methods.GetNumLobbyMembers, steamLobbyId).AsInt32(); + } + + public static ulong GetLobbyMemberByIndex(ulong steamLobbyId, long member) + { + return GetInstance().Call(Methods.GetLobbyMemberByIndex, steamLobbyId, member).AsUInt64(); + } + + public static string GetLobbyData(ulong steamLobbyId, string key) + { + return GetInstance().Call(Methods.GetLobbyData, steamLobbyId, key).AsString(); + } + + public static bool SetLobbyData(ulong steamLobbyId, string key, string value) + { + return GetInstance().Call(Methods.SetLobbyData, steamLobbyId, key, value).AsBool(); + } + + public static Godot.Collections.Dictionary GetAllLobbyData(ulong steamLobbyId) + { + return GetInstance().Call(Methods.GetAllLobbyData, steamLobbyId).AsGodotDictionary(); + } + + public static bool DeleteLobbyData(ulong steamLobbyId, string key) + { + return GetInstance().Call(Methods.DeleteLobbyData, steamLobbyId, key).AsBool(); + } + + public static string GetLobbyMemberData(ulong steamLobbyId, ulong steamIdUser, string key) + { + return GetInstance() + .Call(Methods.GetLobbyMemberData, steamLobbyId, steamIdUser, key) + .AsString(); + } + + public static void SetLobbyMemberData(ulong steamLobbyId, string key, string value) + { + GetInstance().Call(Methods.SetLobbyMemberData, steamLobbyId, key, value); + } + + public static bool SendLobbyChatMsg(ulong steamLobbyId, string messageBody) + { + return GetInstance().Call(Methods.SendLobbyChatMsg, steamLobbyId, messageBody).AsBool(); + } + + public static bool RequestLobbyData(ulong steamLobbyId) + { + return GetInstance().Call(Methods.RequestLobbyData, steamLobbyId).AsBool(); + } + + public static void SetLobbyGameServer( + ulong steamLobbyId, + string serverIP, + int serverPort, + ulong steamIdGameServer + ) + { + GetInstance() + .Call( + Methods.SetLobbyGameServer, + steamLobbyId, + serverIP, + serverPort, + steamIdGameServer + ); + } + + public static Godot.Collections.Dictionary GetLobbyGameServer(ulong steamLobbyId) + { + return GetInstance().Call(Methods.GetLobbyGameServer, steamLobbyId).AsGodotDictionary(); + } + + public static bool SetLobbyMemberLimit(ulong steamLobbyId, long maxMembers) + { + return GetInstance().Call(Methods.SetLobbyMemberLimit, steamLobbyId, maxMembers).AsBool(); + } + + public static int GetLobbyMemberLimit(ulong steamLobbyId) + { + return GetInstance().Call(Methods.GetLobbyMemberLimit, steamLobbyId).AsInt32(); + } + + public static bool SetLobbyType(ulong steamLobbyId, LobbyType lobbyType) + { + return GetInstance().Call(Methods.SetLobbyType, steamLobbyId, (long)lobbyType).AsBool(); + } + + public static bool SetLobbyJoinable(ulong steamLobbyId, bool joinable) + { + return GetInstance().Call(Methods.SetLobbyJoinable, steamLobbyId, joinable).AsBool(); + } + + public static ulong GetLobbyOwner(ulong steamLobbyId) + { + return GetInstance().Call(Methods.GetLobbyOwner, steamLobbyId).AsUInt64(); + } + + public static bool SetLobbyOwner(ulong steamLobbyId, ulong steamIdNewOwner) + { + return GetInstance().Call(Methods.SetLobbyOwner, steamLobbyId, steamIdNewOwner).AsBool(); + } + + [System.Flags] + public enum ChatMemberStateChange : long + { + Entered = 1, + Left = 2, + Disconnected = 4, + Kicked = 8, + Banned = 16, + } + + public enum LobbyComparison : long + { + LobbyComparisonEqualToOrLessThan = -2, + LobbyComparisonLessThan = -1, + LobbyComparisonEqual = 0, + LobbyComparisonGreaterThan = 1, + LobbyComparisonEqualToGreaterThan = 2, + LobbyComparisonNotEqual = 3, + } + + public enum LobbyDistanceFilter : long + { + Close = 0, + Default = 1, + Far = 2, + Worldwide = 3, + } + + public enum LobbyType : long + { + Private = 0, + FriendsOnly = 1, + Public = 2, + Invisible = 3, + PrivateUnique = 4, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Matchmaking.cs.uid b/addons/godotsteam_csharpbindings/Steam.Matchmaking.cs.uid new file mode 100644 index 00000000..3180d99c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Matchmaking.cs.uid @@ -0,0 +1 @@ +uid://nyyih81w26he diff --git a/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.Signals.cs b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.Signals.cs new file mode 100644 index 00000000..35776ad1 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.Signals.cs @@ -0,0 +1,67 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public static event Action ServerRespondedEvent; + static Action _serverRespondedAction = () => + { + ServerRespondedEvent?.Invoke(); + }; + public static event Action ServerResponded + { + add + { + if (ServerRespondedEvent == null) + { + GetInstance() + .Connect(Signals.ServerResponded, Callable.From(_serverRespondedAction)); + } + ServerRespondedEvent += value; + } + remove + { + ServerRespondedEvent -= value; + if (ServerRespondedEvent == null) + { + GetInstance() + .Disconnect(Signals.ServerResponded, Callable.From(_serverRespondedAction)); + } + } + } + + public static event Action ServerFailedToRespondEvent; + static Action _serverFailedToRespondAction = () => + { + ServerFailedToRespondEvent?.Invoke(); + }; + public static event Action ServerFailedToRespond + { + add + { + if (ServerFailedToRespondEvent == null) + { + GetInstance() + .Connect( + Signals.ServerFailedToRespond, + Callable.From(_serverFailedToRespondAction) + ); + } + ServerFailedToRespondEvent += value; + } + remove + { + ServerFailedToRespondEvent -= value; + if (ServerFailedToRespondEvent == null) + { + GetInstance() + .Disconnect( + Signals.ServerFailedToRespond, + Callable.From(_serverFailedToRespondAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.Signals.cs.uid new file mode 100644 index 00000000..c06ab0dc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.Signals.cs.uid @@ -0,0 +1 @@ +uid://bpbnpgg6iriyb diff --git a/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.cs b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.cs new file mode 100644 index 00000000..1669862e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.cs @@ -0,0 +1,98 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static void CancelQuery(long serverListRequest) + { + GetInstance().Call(Methods.CancelQuery, serverListRequest); + } + + public static void CancelServerQuery(long serverQuery) + { + GetInstance().Call(Methods.CancelServerQuery, serverQuery); + } + + public static int GetServerCount(long serverListRequest) + { + return GetInstance().Call(Methods.GetServerCount, serverListRequest).AsInt32(); + } + + public static Godot.Collections.Dictionary GetServerDetails(int server, long serverListRequest) + { + return GetInstance() + .Call(Methods.GetServerDetails, server, serverListRequest) + .AsGodotDictionary(); + } + + public static bool IsRefreshing(long serverListRequest) + { + return GetInstance().Call(Methods.IsRefreshing, serverListRequest).AsBool(); + } + + public static int PingServer(string iP, long port) + { + return GetInstance().Call(Methods.PingServer, iP, port).AsInt32(); + } + + public static int PlayerDetails(string iP, long port) + { + return GetInstance().Call(Methods.PlayerDetails, iP, port).AsInt32(); + } + + public static void RefreshQuery(long serverListRequest) + { + GetInstance().Call(Methods.RefreshQuery, serverListRequest); + } + + public static void RefreshServer(int server, long serverListRequest) + { + GetInstance().Call(Methods.RefreshServer, server, serverListRequest); + } + + public static void ReleaseRequest(long serverListRequest) + { + GetInstance().Call(Methods.ReleaseRequest, serverListRequest); + } + + public static ulong RequestFavoritesServerList(uint appId, Godot.Collections.Array filters) + { + return GetInstance().Call(Methods.RequestFavoritesServerList, appId, filters).AsUInt64(); + } + + public static ulong RequestFriendsServerList(uint appId, Godot.Collections.Array filters) + { + return GetInstance().Call(Methods.RequestFriendsServerList, appId, filters).AsUInt64(); + } + + public static ulong RequestHistoryServerList(uint appId, Godot.Collections.Array filters) + { + return GetInstance().Call(Methods.RequestHistoryServerList, appId, filters).AsUInt64(); + } + + public static ulong RequestInternetServerList(uint appId, Godot.Collections.Array filters) + { + return GetInstance().Call(Methods.RequestInternetServerList, appId, filters).AsUInt64(); + } + + public static ulong RequestLANServerList(uint appId) + { + return GetInstance().Call(Methods.RequestLANServerList, appId).AsUInt64(); + } + + public static ulong RequestSpectatorServerList(uint appId, Godot.Collections.Array filters) + { + return GetInstance().Call(Methods.RequestSpectatorServerList, appId, filters).AsUInt64(); + } + + public static int ServerRules(string iP, long port) + { + return GetInstance().Call(Methods.ServerRules, iP, port).AsInt32(); + } + + public enum MatchMakingServerResponse : long + { + ServerResponded = 0, + ServerFailedToRespond = 1, + NoServersListedOnMasterServer = 2, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.cs.uid b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.cs.uid new file mode 100644 index 00000000..3227b6d3 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MatchmakingServers.cs.uid @@ -0,0 +1 @@ +uid://bdhnj5vbbpct8 diff --git a/addons/godotsteam_csharpbindings/Steam.Music.cs b/addons/godotsteam_csharpbindings/Steam.Music.cs new file mode 100644 index 00000000..36c38dbb --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Music.cs @@ -0,0 +1,57 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool MusicIsEnabled() + { + return GetInstance().Call(Methods.MusicIsEnabled).AsBool(); + } + + public static bool MusicIsPlaying() + { + return GetInstance().Call(Methods.MusicIsPlaying).AsBool(); + } + + public static AudioPlaybackStatus GetPlaybackStatus() + { + return (AudioPlaybackStatus)GetInstance().Call(Methods.GetPlaybackStatus).AsInt64(); + } + + public static double MusicGetVolume() + { + return GetInstance().Call(Methods.MusicGetVolume).AsDouble(); + } + + public static void MusicPause() + { + GetInstance().Call(Methods.MusicPause); + } + + public static void MusicPlay() + { + GetInstance().Call(Methods.MusicPlay); + } + + public static void MusicPlayNext() + { + GetInstance().Call(Methods.MusicPlayNext); + } + + public static void MusicPlayPrev() + { + GetInstance().Call(Methods.MusicPlayPrev); + } + + public static void MusicSetVolume(double volume) + { + GetInstance().Call(Methods.MusicSetVolume, volume); + } + + public enum AudioPlaybackStatus : long + { + Undefined = 0, + Playing = 1, + Paused = 2, + Idle = 3, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Music.cs.uid b/addons/godotsteam_csharpbindings/Steam.Music.cs.uid new file mode 100644 index 00000000..71536686 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Music.cs.uid @@ -0,0 +1 @@ +uid://7gsit5fbnxt5 diff --git a/addons/godotsteam_csharpbindings/Steam.MusicRemote.Signals.cs b/addons/godotsteam_csharpbindings/Steam.MusicRemote.Signals.cs new file mode 100644 index 00000000..18fd08bb --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MusicRemote.Signals.cs @@ -0,0 +1,475 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public static event Action MusicPlayerRemoteToFrontEvent; + static Action _musicPlayerRemoteToFrontAction = () => + { + MusicPlayerRemoteToFrontEvent?.Invoke(); + }; + public static event Action MusicPlayerRemoteToFront + { + add + { + if (MusicPlayerRemoteToFrontEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerRemoteToFront, + Callable.From(_musicPlayerRemoteToFrontAction) + ); + } + MusicPlayerRemoteToFrontEvent += value; + } + remove + { + MusicPlayerRemoteToFrontEvent -= value; + if (MusicPlayerRemoteToFrontEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerRemoteToFront, + Callable.From(_musicPlayerRemoteToFrontAction) + ); + } + } + } + + public static event Action MusicPlayerRemoteWillActivateEvent; + static Action _musicPlayerRemoteWillActivateAction = () => + { + MusicPlayerRemoteWillActivateEvent?.Invoke(); + }; + public static event Action MusicPlayerRemoteWillActivate + { + add + { + if (MusicPlayerRemoteWillActivateEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerRemoteWillActivate, + Callable.From(_musicPlayerRemoteWillActivateAction) + ); + } + MusicPlayerRemoteWillActivateEvent += value; + } + remove + { + MusicPlayerRemoteWillActivateEvent -= value; + if (MusicPlayerRemoteWillActivateEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerRemoteWillActivate, + Callable.From(_musicPlayerRemoteWillActivateAction) + ); + } + } + } + + public static event Action MusicPlayerRemoteWillDeactivateEvent; + static Action _musicPlayerRemoteWillDeactivateAction = () => + { + MusicPlayerRemoteWillDeactivateEvent?.Invoke(); + }; + public static event Action MusicPlayerRemoteWillDeactivate + { + add + { + if (MusicPlayerRemoteWillDeactivateEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerRemoteWillDeactivate, + Callable.From(_musicPlayerRemoteWillDeactivateAction) + ); + } + MusicPlayerRemoteWillDeactivateEvent += value; + } + remove + { + MusicPlayerRemoteWillDeactivateEvent -= value; + if (MusicPlayerRemoteWillDeactivateEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerRemoteWillDeactivate, + Callable.From(_musicPlayerRemoteWillDeactivateAction) + ); + } + } + } + + public delegate void MusicPlayerSelectsPlaylistEntryEventHandler(long entry); + private static event MusicPlayerSelectsPlaylistEntryEventHandler MusicPlayerSelectsPlaylistEntryEvent; + static Action _musicPlayerSelectsPlaylistEntryAction = (entry) => + { + MusicPlayerSelectsPlaylistEntryEvent?.Invoke(entry); + }; + public static event MusicPlayerSelectsPlaylistEntryEventHandler MusicPlayerSelectsPlaylistEntry + { + add + { + if (MusicPlayerSelectsPlaylistEntryEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerSelectsPlaylistEntry, + Callable.From(_musicPlayerSelectsPlaylistEntryAction) + ); + } + MusicPlayerSelectsPlaylistEntryEvent += value; + } + remove + { + MusicPlayerSelectsPlaylistEntryEvent -= value; + if (MusicPlayerSelectsPlaylistEntryEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerSelectsPlaylistEntry, + Callable.From(_musicPlayerSelectsPlaylistEntryAction) + ); + } + } + } + + public delegate void MusicPlayerSelectsQueueEntryEventHandler(long entry); + private static event MusicPlayerSelectsQueueEntryEventHandler MusicPlayerSelectsQueueEntryEvent; + static Action _musicPlayerSelectsQueueEntryAction = (entry) => + { + MusicPlayerSelectsQueueEntryEvent?.Invoke(entry); + }; + public static event MusicPlayerSelectsQueueEntryEventHandler MusicPlayerSelectsQueueEntry + { + add + { + if (MusicPlayerSelectsQueueEntryEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerSelectsQueueEntry, + Callable.From(_musicPlayerSelectsQueueEntryAction) + ); + } + MusicPlayerSelectsQueueEntryEvent += value; + } + remove + { + MusicPlayerSelectsQueueEntryEvent -= value; + if (MusicPlayerSelectsQueueEntryEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerSelectsQueueEntry, + Callable.From(_musicPlayerSelectsQueueEntryAction) + ); + } + } + } + + public delegate void MusicPlayerWantsLoopedEventHandler(bool looped); + private static event MusicPlayerWantsLoopedEventHandler MusicPlayerWantsLoopedEvent; + static Action _musicPlayerWantsLoopedAction = (looped) => + { + MusicPlayerWantsLoopedEvent?.Invoke(looped); + }; + public static event MusicPlayerWantsLoopedEventHandler MusicPlayerWantsLooped + { + add + { + if (MusicPlayerWantsLoopedEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsLooped, + Callable.From(_musicPlayerWantsLoopedAction) + ); + } + MusicPlayerWantsLoopedEvent += value; + } + remove + { + MusicPlayerWantsLoopedEvent -= value; + if (MusicPlayerWantsLoopedEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsLooped, + Callable.From(_musicPlayerWantsLoopedAction) + ); + } + } + } + + public static event Action MusicPlayerWantsPauseEvent; + static Action _musicPlayerWantsPauseAction = () => + { + MusicPlayerWantsPauseEvent?.Invoke(); + }; + public static event Action MusicPlayerWantsPause + { + add + { + if (MusicPlayerWantsPauseEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsPause, + Callable.From(_musicPlayerWantsPauseAction) + ); + } + MusicPlayerWantsPauseEvent += value; + } + remove + { + MusicPlayerWantsPauseEvent -= value; + if (MusicPlayerWantsPauseEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsPause, + Callable.From(_musicPlayerWantsPauseAction) + ); + } + } + } + + public delegate void MusicPlayerWantsPlayingRepeatStatusEventHandler(long status); + private static event MusicPlayerWantsPlayingRepeatStatusEventHandler MusicPlayerWantsPlayingRepeatStatusEvent; + static Action _musicPlayerWantsPlayingRepeatStatusAction = (status) => + { + MusicPlayerWantsPlayingRepeatStatusEvent?.Invoke(status); + }; + public static event MusicPlayerWantsPlayingRepeatStatusEventHandler MusicPlayerWantsPlayingRepeatStatus + { + add + { + if (MusicPlayerWantsPlayingRepeatStatusEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsPlayingRepeatStatus, + Callable.From(_musicPlayerWantsPlayingRepeatStatusAction) + ); + } + MusicPlayerWantsPlayingRepeatStatusEvent += value; + } + remove + { + MusicPlayerWantsPlayingRepeatStatusEvent -= value; + if (MusicPlayerWantsPlayingRepeatStatusEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsPlayingRepeatStatus, + Callable.From(_musicPlayerWantsPlayingRepeatStatusAction) + ); + } + } + } + + public static event Action MusicPlayerWantsPlayNextEvent; + static Action _musicPlayerWantsPlayNextAction = () => + { + MusicPlayerWantsPlayNextEvent?.Invoke(); + }; + public static event Action MusicPlayerWantsPlayNext + { + add + { + if (MusicPlayerWantsPlayNextEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsPlayNext, + Callable.From(_musicPlayerWantsPlayNextAction) + ); + } + MusicPlayerWantsPlayNextEvent += value; + } + remove + { + MusicPlayerWantsPlayNextEvent -= value; + if (MusicPlayerWantsPlayNextEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsPlayNext, + Callable.From(_musicPlayerWantsPlayNextAction) + ); + } + } + } + + public static event Action MusicPlayerWantsPlayPreviousEvent; + static Action _musicPlayerWantsPlayPreviousAction = () => + { + MusicPlayerWantsPlayPreviousEvent?.Invoke(); + }; + public static event Action MusicPlayerWantsPlayPrevious + { + add + { + if (MusicPlayerWantsPlayPreviousEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsPlayPrevious, + Callable.From(_musicPlayerWantsPlayPreviousAction) + ); + } + MusicPlayerWantsPlayPreviousEvent += value; + } + remove + { + MusicPlayerWantsPlayPreviousEvent -= value; + if (MusicPlayerWantsPlayPreviousEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsPlayPrevious, + Callable.From(_musicPlayerWantsPlayPreviousAction) + ); + } + } + } + + public static event Action MusicPlayerWantsPlayEvent; + static Action _musicPlayerWantsPlayAction = () => + { + MusicPlayerWantsPlayEvent?.Invoke(); + }; + public static event Action MusicPlayerWantsPlay + { + add + { + if (MusicPlayerWantsPlayEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsPlay, + Callable.From(_musicPlayerWantsPlayAction) + ); + } + MusicPlayerWantsPlayEvent += value; + } + remove + { + MusicPlayerWantsPlayEvent -= value; + if (MusicPlayerWantsPlayEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsPlay, + Callable.From(_musicPlayerWantsPlayAction) + ); + } + } + } + + public delegate void MusicPlayerWantsShuffledEventHandler(bool shuffled); + private static event MusicPlayerWantsShuffledEventHandler MusicPlayerWantsShuffledEvent; + static Action _musicPlayerWantsShuffledAction = (shuffled) => + { + MusicPlayerWantsShuffledEvent?.Invoke(shuffled); + }; + public static event MusicPlayerWantsShuffledEventHandler MusicPlayerWantsShuffled + { + add + { + if (MusicPlayerWantsShuffledEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsShuffled, + Callable.From(_musicPlayerWantsShuffledAction) + ); + } + MusicPlayerWantsShuffledEvent += value; + } + remove + { + MusicPlayerWantsShuffledEvent -= value; + if (MusicPlayerWantsShuffledEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsShuffled, + Callable.From(_musicPlayerWantsShuffledAction) + ); + } + } + } + + public delegate void MusicPlayerWantsVolumeEventHandler(double volume); + private static event MusicPlayerWantsVolumeEventHandler MusicPlayerWantsVolumeEvent; + static Action _musicPlayerWantsVolumeAction = (volume) => + { + MusicPlayerWantsVolumeEvent?.Invoke(volume); + }; + public static event MusicPlayerWantsVolumeEventHandler MusicPlayerWantsVolume + { + add + { + if (MusicPlayerWantsVolumeEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWantsVolume, + Callable.From(_musicPlayerWantsVolumeAction) + ); + } + MusicPlayerWantsVolumeEvent += value; + } + remove + { + MusicPlayerWantsVolumeEvent -= value; + if (MusicPlayerWantsVolumeEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWantsVolume, + Callable.From(_musicPlayerWantsVolumeAction) + ); + } + } + } + + public static event Action MusicPlayerWillQuitEvent; + static Action _musicPlayerWillQuitAction = () => + { + MusicPlayerWillQuitEvent?.Invoke(); + }; + public static event Action MusicPlayerWillQuit + { + add + { + if (MusicPlayerWillQuitEvent == null) + { + GetInstance() + .Connect( + Signals.MusicPlayerWillQuit, + Callable.From(_musicPlayerWillQuitAction) + ); + } + MusicPlayerWillQuitEvent += value; + } + remove + { + MusicPlayerWillQuitEvent -= value; + if (MusicPlayerWillQuitEvent == null) + { + GetInstance() + .Disconnect( + Signals.MusicPlayerWillQuit, + Callable.From(_musicPlayerWillQuitAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.MusicRemote.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.MusicRemote.Signals.cs.uid new file mode 100644 index 00000000..71d5ac7b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MusicRemote.Signals.cs.uid @@ -0,0 +1 @@ +uid://c52be5fc77rje diff --git a/addons/godotsteam_csharpbindings/Steam.MusicRemote.cs b/addons/godotsteam_csharpbindings/Steam.MusicRemote.cs new file mode 100644 index 00000000..6ca1bd84 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MusicRemote.cs @@ -0,0 +1,164 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool ActivationSuccess(bool activate) + { + return GetInstance().Call(Methods.ActivationSuccess, activate).AsBool(); + } + + public static bool IsCurrentMusicRemote() + { + return GetInstance().Call(Methods.IsCurrentMusicRemote).AsBool(); + } + + public static bool CurrentEntryDidChange() + { + return GetInstance().Call(Methods.CurrentEntryDidChange).AsBool(); + } + + public static bool CurrentEntryIsAvailable(bool available) + { + return GetInstance().Call(Methods.CurrentEntryIsAvailable, available).AsBool(); + } + + public static bool CurrentEntryWillChange() + { + return GetInstance().Call(Methods.CurrentEntryWillChange).AsBool(); + } + + public static bool DeregisterSteamMusicRemote() + { + return GetInstance().Call(Methods.DeregisterSteamMusicRemote).AsBool(); + } + + public static bool EnableLooped(bool loop) + { + return GetInstance().Call(Methods.EnableLooped, loop).AsBool(); + } + + public static bool EnablePlaylists(bool playlists) + { + return GetInstance().Call(Methods.EnablePlaylists, playlists).AsBool(); + } + + public static bool EnablePlayNext(bool next) + { + return GetInstance().Call(Methods.EnablePlayNext, next).AsBool(); + } + + public static bool EnablePlayPrevious(bool previous) + { + return GetInstance().Call(Methods.EnablePlayPrevious, previous).AsBool(); + } + + public static bool EnableQueue(bool queue) + { + return GetInstance().Call(Methods.EnableQueue, queue).AsBool(); + } + + public static bool EnableShuffled(bool shuffle) + { + return GetInstance().Call(Methods.EnableShuffled, shuffle).AsBool(); + } + + public static bool PlaylistDidChange() + { + return GetInstance().Call(Methods.PlaylistDidChange).AsBool(); + } + + public static bool PlaylistWillChange() + { + return GetInstance().Call(Methods.PlaylistWillChange).AsBool(); + } + + public static bool QueueDidChange() + { + return GetInstance().Call(Methods.QueueDidChange).AsBool(); + } + + public static bool QueueWillChange() + { + return GetInstance().Call(Methods.QueueWillChange).AsBool(); + } + + public static bool RegisterSteamMusicRemote(string name) + { + return GetInstance().Call(Methods.RegisterSteamMusicRemote, name).AsBool(); + } + + public static bool ResetPlaylistEntries() + { + return GetInstance().Call(Methods.ResetPlaylistEntries).AsBool(); + } + + public static bool ResetQueueEntries() + { + return GetInstance().Call(Methods.ResetQueueEntries).AsBool(); + } + + public static bool SetCurrentPlaylistEntry(long id) + { + return GetInstance().Call(Methods.SetCurrentPlaylistEntry, id).AsBool(); + } + + public static bool SetCurrentQueueEntry(long id) + { + return GetInstance().Call(Methods.SetCurrentQueueEntry, id).AsBool(); + } + + public static bool SetDisplayName(string name) + { + return GetInstance().Call(Methods.SetDisplayName, name).AsBool(); + } + + public static bool SetPlaylistEntry(int id, int position, string entryText) + { + return GetInstance().Call(Methods.SetPlaylistEntry, id, position, entryText).AsBool(); + } + + public static bool SetPNGIcon64X64(byte[] icon) + { + return GetInstance().Call(Methods.SetPNGIcon64X64, icon).AsBool(); + } + + public static bool SetQueueEntry(int id, int position, string entryText) + { + return GetInstance().Call(Methods.SetQueueEntry, id, position, entryText).AsBool(); + } + + public static bool UpdateCurrentEntryCoverArt(byte[] art) + { + return GetInstance().Call(Methods.UpdateCurrentEntryCoverArt, art).AsBool(); + } + + public static bool UpdateCurrentEntryElapsedSeconds(long seconds) + { + return GetInstance().Call(Methods.UpdateCurrentEntryElapsedSeconds, seconds).AsBool(); + } + + public static bool UpdateCurrentEntryText(string text) + { + return GetInstance().Call(Methods.UpdateCurrentEntryText, text).AsBool(); + } + + public static bool UpdateLooped(bool looped) + { + return GetInstance().Call(Methods.UpdateLooped, looped).AsBool(); + } + + public static bool UpdatePlaybackStatus(AudioPlaybackStatus status) + { + return GetInstance().Call(Methods.UpdatePlaybackStatus, (long)status).AsBool(); + } + + public static bool UpdateShuffled(bool shuffle) + { + return GetInstance().Call(Methods.UpdateShuffled, shuffle).AsBool(); + } + + public static bool UpdateVolume(double volume) + { + return GetInstance().Call(Methods.UpdateVolume, volume).AsBool(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.MusicRemote.cs.uid b/addons/godotsteam_csharpbindings/Steam.MusicRemote.cs.uid new file mode 100644 index 00000000..978c55d0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.MusicRemote.cs.uid @@ -0,0 +1 @@ +uid://bm5bvq8mdvp6s diff --git a/addons/godotsteam_csharpbindings/Steam.Networking.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Networking.Signals.cs new file mode 100644 index 00000000..8ade7708 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Networking.Signals.cs @@ -0,0 +1,71 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void P2PSessionRequestEventHandler(ulong steamIdRemote); + private static event P2PSessionRequestEventHandler P2PSessionRequestEvent; + static Action _p2pSessionRequestAction = (steamIdRemote) => + { + P2PSessionRequestEvent?.Invoke(steamIdRemote); + }; + public static event P2PSessionRequestEventHandler P2PSessionRequest + { + add + { + if (P2PSessionRequestEvent == null) + { + GetInstance() + .Connect(Signals.P2PSessionRequest, Callable.From(_p2pSessionRequestAction)); + } + P2PSessionRequestEvent += value; + } + remove + { + P2PSessionRequestEvent -= value; + if (P2PSessionRequestEvent == null) + { + GetInstance() + .Disconnect(Signals.P2PSessionRequest, Callable.From(_p2pSessionRequestAction)); + } + } + } + + public delegate void P2PSessionConnectFailEventHandler(ulong steamIdRemote, long sessionError); + private static event P2PSessionConnectFailEventHandler P2PSessionConnectFailEvent; + static Action _p2pSessionConnectFailAction = (steamIdRemote, sessionError) => + { + P2PSessionConnectFailEvent?.Invoke(steamIdRemote, sessionError); + }; + public static event P2PSessionConnectFailEventHandler P2PSessionConnectFail + { + add + { + if (P2PSessionConnectFailEvent == null) + { + GetInstance() + .Connect( + Signals.P2PSessionConnectFail, + Callable.From(_p2pSessionConnectFailAction) + ); + } + + P2PSessionConnectFailEvent += value; + } + remove + { + P2PSessionConnectFailEvent -= value; + + if (P2PSessionConnectFailEvent == null) + { + GetInstance() + .Disconnect( + Signals.P2PSessionConnectFail, + Callable.From(_p2pSessionConnectFailAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Networking.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Networking.Signals.cs.uid new file mode 100644 index 00000000..29fe5698 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Networking.Signals.cs.uid @@ -0,0 +1 @@ +uid://cejt4l4r6ovwe diff --git a/addons/godotsteam_csharpbindings/Steam.Networking.cs b/addons/godotsteam_csharpbindings/Steam.Networking.cs new file mode 100644 index 00000000..e80c5ae1 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Networking.cs @@ -0,0 +1,91 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool AcceptP2PSessionWithUser(ulong steamIdRemote) + { + return GetInstance().Call(Methods.AcceptP2PSessionWithUser, steamIdRemote).AsBool(); + } + + public static bool AllowP2PPacketRelay(bool allow) + { + return GetInstance().Call(Methods.AllowP2PPacketRelay, allow).AsBool(); + } + + public static bool CloseP2PChannelWithUser(ulong steamIdRemote, long channel) + { + return GetInstance().Call(Methods.CloseP2PChannelWithUser, steamIdRemote, channel).AsBool(); + } + + public static bool CloseP2PSessionWithUser(ulong steamIdRemote) + { + return GetInstance().Call(Methods.CloseP2PSessionWithUser, steamIdRemote).AsBool(); + } + + public static Godot.Collections.Dictionary GetP2PSessionState(ulong steamIdRemote) + { + return GetInstance().Call(Methods.GetP2PSessionState, steamIdRemote).AsGodotDictionary(); + } + + public static uint GetAvailableP2PPacketSize(long channel = 0) + { + return GetInstance().Call(Methods.GetAvailableP2PPacketSize, channel).AsUInt32(); + } + + public static Godot.Collections.Dictionary ReadP2PPacket(uint packet, long channel = 0) + { + return GetInstance().Call(Methods.ReadP2PPacket, packet, channel).AsGodotDictionary(); + } + + public static bool SendP2PPacket( + ulong steamIdRemote, + byte[] data, + P2PSend sendType, + long channel = 0 + ) + { + return GetInstance() + .Call(Methods.SendP2PPacket, steamIdRemote, data, (long)sendType, channel) + .AsBool(); + } + + public enum P2PSend : long + { + Unreliable = 0, + UnreliableNoDelay = 1, + Reliable = 2, + ReliableWithBuffering = 3, + } + + public enum P2PSessionError : long + { + None = 0, + NotRunningApp = 1, + NoRightsToApp = 2, + DestinationNotLoggedOn = 3, + Timeout = 4, + Max = 5, + } + + public enum SocketConnectionType : long + { + NotConnected = 0, + Udp = 1, + UdpRelay = 2, + } + + public enum SocketState : long + { + Invalid = 0, + Connected = 1, + Initiated = 10, + LocalCandidateFound = 11, + ReceivedRemoteCandidates = 12, + ChallengeHandshake = 15, + Disconnecting = 21, + LocalDisconnect = 22, + TimeoutDuringConnect = 23, + RemoteEndDisconnected = 24, + Broken = 25, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Networking.cs.uid b/addons/godotsteam_csharpbindings/Steam.Networking.cs.uid new file mode 100644 index 00000000..c8d8d9a0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Networking.cs.uid @@ -0,0 +1 @@ +uid://bax0l1e44v8nc diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.Signals.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.Signals.cs new file mode 100644 index 00000000..45b6cc20 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.Signals.cs @@ -0,0 +1,77 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void NetworkMessagesSessionRequestEventHandler(ulong remoteSteamId); + private static event NetworkMessagesSessionRequestEventHandler NetworkMessagesSessionRequestEvent; + static Action _networkMessagesSessionRequestAction = (remoteSteamId) => + { + NetworkMessagesSessionRequestEvent?.Invoke(remoteSteamId); + }; + public static event NetworkMessagesSessionRequestEventHandler NetworkMessagesSessionRequest + { + add + { + if (NetworkMessagesSessionRequestEvent == null) + { + GetInstance() + .Connect( + Signals.NetworkMessagesSessionRequest, + Callable.From(_networkMessagesSessionRequestAction) + ); + } + + NetworkMessagesSessionRequestEvent += value; + } + remove + { + NetworkMessagesSessionRequestEvent -= value; + + if (NetworkMessagesSessionRequestEvent == null) + { + GetInstance() + .Disconnect( + Signals.NetworkMessagesSessionRequest, + Callable.From(_networkMessagesSessionRequestAction) + ); + } + } + } + + public delegate void NetworkMessagesSessionFailedEventHandler(long reason); + private static event NetworkMessagesSessionFailedEventHandler NetworkMessagesSessionFailedEvent; + static Action _networkMessagesSessionFailedAction = (reason) => + { + NetworkMessagesSessionFailedEvent?.Invoke(reason); + }; + public static event NetworkMessagesSessionFailedEventHandler NetworkMessagesSessionFailed + { + add + { + if (NetworkMessagesSessionFailedEvent == null) + { + GetInstance() + .Connect( + Signals.NetworkMessagesSessionFailed, + Callable.From(_networkMessagesSessionFailedAction) + ); + } + NetworkMessagesSessionFailedEvent += value; + } + remove + { + NetworkMessagesSessionFailedEvent -= value; + if (NetworkMessagesSessionFailedEvent == null) + { + GetInstance() + .Disconnect( + Signals.NetworkMessagesSessionFailed, + Callable.From(_networkMessagesSessionFailedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.Signals.cs.uid new file mode 100644 index 00000000..dab77d05 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.Signals.cs.uid @@ -0,0 +1 @@ +uid://mgfn4h0cag30 diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.cs new file mode 100644 index 00000000..0bbb30d0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.cs @@ -0,0 +1,44 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool AcceptSessionWithUser(ulong remoteSteamId) + { + return GetInstance().Call(Methods.AcceptSessionWithUser, remoteSteamId).AsBool(); + } + + public static bool CloseChannelWithUser(ulong remoteSteamId, long channel) + { + return GetInstance().Call(Methods.CloseChannelWithUser, remoteSteamId, channel).AsBool(); + } + + public static bool CloseSessionWithUser(ulong remoteSteamId) + { + return GetInstance().Call(Methods.CloseSessionWithUser, remoteSteamId).AsBool(); + } + + public static Godot.Collections.Dictionary GetSessionConnectionInfo( + ulong remoteSteamId, + bool getConnection, + bool getStatus + ) + { + return GetInstance() + .Call(Methods.GetSessionConnectionInfo, remoteSteamId, getConnection, getStatus) + .AsGodotDictionary(); + } + + public static Godot.Collections.Array ReceiveMessagesOnChannel(int channel, long maxMessages) + { + return GetInstance() + .Call(Methods.ReceiveMessagesOnChannel, channel, maxMessages) + .AsGodotArray(); + } + + public static int SendMessageToUser(ulong remoteSteamId, byte[] data, int flags, long channel) + { + return GetInstance() + .Call(Methods.SendMessageToUser, remoteSteamId, data, flags, channel) + .AsInt32(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.cs.uid new file mode 100644 index 00000000..5ce98eb8 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingMessages.cs.uid @@ -0,0 +1 @@ +uid://cnj17tpleg05p diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.Signals.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.Signals.cs new file mode 100644 index 00000000..0634b338 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.Signals.cs @@ -0,0 +1,125 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void NetworkConnectionStatusChangedEventHandler( + long connectHandle, + Godot.Collections.Dictionary connection, + long oldState + ); + private static event NetworkConnectionStatusChangedEventHandler NetworkConnectionStatusChangedEvent; + static Action _networkConnectionStatusChangedAction = + (connectHandle, connection, oldState) => + { + NetworkConnectionStatusChangedEvent?.Invoke(connectHandle, connection, oldState); + }; + public static event NetworkConnectionStatusChangedEventHandler NetworkConnectionStatusChanged + { + add + { + if (NetworkConnectionStatusChangedEvent == null) + { + GetInstance() + .Connect( + Signals.NetworkConnectionStatusChanged, + Callable.From(_networkConnectionStatusChangedAction) + ); + } + + NetworkConnectionStatusChangedEvent += value; + } + remove + { + NetworkConnectionStatusChangedEvent -= value; + + if (NetworkConnectionStatusChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.NetworkConnectionStatusChanged, + Callable.From(_networkConnectionStatusChangedAction) + ); + } + } + } + + public delegate void NetworkAuthenticationStatusEventHandler( + long available, + string debugMessage + ); + private static event NetworkAuthenticationStatusEventHandler NetworkAuthenticationStatusEvent; + static Action _networkAuthenticationStatusAction = (available, debugMessage) => + { + NetworkAuthenticationStatusEvent?.Invoke(available, debugMessage); + }; + public static event NetworkAuthenticationStatusEventHandler NetworkAuthenticationStatus + { + add + { + if (NetworkAuthenticationStatusEvent == null) + { + GetInstance() + .Connect( + Signals.NetworkAuthenticationStatus, + Callable.From(_networkAuthenticationStatusAction) + ); + } + + NetworkAuthenticationStatusEvent += value; + } + remove + { + NetworkAuthenticationStatusEvent -= value; + + if (NetworkAuthenticationStatusEvent == null) + { + GetInstance() + .Disconnect( + Signals.NetworkAuthenticationStatus, + Callable.From(_networkAuthenticationStatusAction) + ); + } + } + } + + public delegate void FakeIPResultEventHandler( + long result, + string identity, + string fakeIP, + Godot.Collections.Array portList + ); + private static event FakeIPResultEventHandler FakeIPResultEvent; + static Action _fakeIPResultAction = ( + result, + identity, + fakeIP, + portList + ) => + { + FakeIPResultEvent?.Invoke(result, identity, fakeIP, portList); + }; + public static event FakeIPResultEventHandler FakeIPResult + { + add + { + if (FakeIPResultEvent == null) + { + GetInstance().Connect(Signals.FakeIPResult, Callable.From(_fakeIPResultAction)); + } + + FakeIPResultEvent += value; + } + remove + { + FakeIPResultEvent -= value; + + if (FakeIPResultEvent == null) + { + GetInstance().Disconnect(Signals.FakeIPResult, Callable.From(_fakeIPResultAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.Signals.cs.uid new file mode 100644 index 00000000..27f545fc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.Signals.cs.uid @@ -0,0 +1 @@ +uid://dt42f0ldop5ns diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.cs new file mode 100644 index 00000000..587c74cc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.cs @@ -0,0 +1,436 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static int AcceptConnection(long connection) + { + return GetInstance().Call(Methods.AcceptConnection, connection).AsInt32(); + } + + public static bool BeginAsyncRequestFakeIP(long numPorts) + { + return GetInstance().Call(Methods.BeginAsyncRequestFakeIP, numPorts).AsBool(); + } + + public static bool CloseConnection(uint peer, int reason, string debugMessage, bool linger) + { + return GetInstance() + .Call(Methods.CloseConnection, peer, reason, debugMessage, linger) + .AsBool(); + } + + public static bool CloseListenSocket(long socket) + { + return GetInstance().Call(Methods.CloseListenSocket, socket).AsBool(); + } + + public static int ConfigureConnectionLanes( + uint connection, + int lanes, + Godot.Collections.Array priorities, + Godot.Collections.Array weights + ) + { + return GetInstance() + .Call(Methods.ConfigureConnectionLanes, connection, lanes, priorities, weights) + .AsInt32(); + } + + public static uint ConnectP2P( + string identityReference, + int virtualPort, + Godot.Collections.Array options + ) + { + return GetInstance() + .Call(Methods.ConnectP2P, identityReference, virtualPort, options) + .AsUInt32(); + } + + public static uint ConnectByIPAddress(string iPAddressWithPort, Godot.Collections.Array options) + { + return GetInstance() + .Call(Methods.ConnectByIPAddress, iPAddressWithPort, options) + .AsUInt32(); + } + + public static uint ConnectToHostedDedicatedServer( + string identityReference, + int virtualPort, + Godot.Collections.Array options + ) + { + return GetInstance() + .Call(Methods.ConnectToHostedDedicatedServer, identityReference, virtualPort, options) + .AsUInt32(); + } + + public static void CreateFakeUDPPort(long fakeServerPort) + { + GetInstance().Call(Methods.CreateFakeUDPPort, fakeServerPort); + } + + public static uint CreateHostedDedicatedServerListenSocket( + int virtualPort, + Godot.Collections.Array options + ) + { + return GetInstance() + .Call(Methods.CreateHostedDedicatedServerListenSocket, virtualPort, options) + .AsUInt32(); + } + + public static uint CreateListenSocketIP(string iPReference, Godot.Collections.Array options) + { + return GetInstance().Call(Methods.CreateListenSocketIP, iPReference, options).AsUInt32(); + } + + public static uint CreateListenSocketP2P(int virtualPort, Godot.Collections.Array options) + { + return GetInstance().Call(Methods.CreateListenSocketP2P, virtualPort, options).AsUInt32(); + } + + public static uint CreateListenSocketP2PFakeIP(int fakePort, Godot.Collections.Array options) + { + return GetInstance() + .Call(Methods.CreateListenSocketP2PFakeIP, fakePort, options) + .AsUInt32(); + } + + public static long CreatePollGroup() + { + return GetInstance().Call(Methods.CreatePollGroup).AsInt64(); + } + + public static Godot.Collections.Dictionary CreateSocketPair( + bool loopback, + string identityReference1, + string identityReference2 + ) + { + return GetInstance() + .Call(Methods.CreateSocketPair, loopback, identityReference1, identityReference2) + .AsGodotDictionary(); + } + + public static bool DestroyPollGroup(long pollGroup) + { + return GetInstance().Call(Methods.DestroyPollGroup, pollGroup).AsBool(); + } + + public static int FlushMessagesOnConnection(long connectionHandle) + { + return GetInstance().Call(Methods.FlushMessagesOnConnection, connectionHandle).AsInt32(); + } + + public static NetworkingAvailability GetAuthenticationStatus() + { + return (NetworkingAvailability) + GetInstance().Call(Methods.GetAuthenticationStatus).AsInt64(); + } + + public static Godot.Collections.Dictionary GetCertificateRequest() + { + return GetInstance().Call(Methods.GetCertificateRequest).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetConnectionInfo(long connectionHandle) + { + return GetInstance().Call(Methods.GetConnectionInfo, connectionHandle).AsGodotDictionary(); + } + + public static string GetConnectionName(long peer) + { + return GetInstance().Call(Methods.GetConnectionName, peer).AsString(); + } + + public static Godot.Collections.Dictionary GetConnectionRealTimeStatus( + uint connectionHandle, + int lanes, + bool getStatus = true + ) + { + return GetInstance() + .Call(Methods.GetConnectionRealTimeStatus, connectionHandle, lanes, getStatus) + .AsGodotDictionary(); + } + + public static ulong GetConnectionUserData(long peer) + { + return GetInstance().Call(Methods.GetConnectionUserData, peer).AsUInt64(); + } + + public static Godot.Collections.Dictionary GetDetailedConnectionStatus(long connectionHandle) + { + return GetInstance() + .Call(Methods.GetDetailedConnectionStatus, connectionHandle) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetFakeIP(long firstPort = 0) + { + return GetInstance().Call(Methods.GetFakeIP, firstPort).AsGodotDictionary(); + } + + public static long GetHostedDedicatedServerPOPId() + { + return GetInstance().Call(Methods.GetHostedDedicatedServerPOPId).AsInt64(); + } + + public static long GetHostedDedicatedServerPort() + { + return GetInstance().Call(Methods.GetHostedDedicatedServerPort).AsInt64(); + } + + public static string GetListenSocketAddress(uint socket, bool withPort = true) + { + return GetInstance().Call(Methods.GetListenSocketAddress, socket, withPort).AsString(); + } + + public static string GetIdentity() + { + return GetInstance().Call(Methods.GetIdentity).AsString(); + } + + public static Godot.Collections.Dictionary GetRemoteFakeIPForConnection(long connection) + { + return GetInstance() + .Call(Methods.GetRemoteFakeIPForConnection, connection) + .AsGodotDictionary(); + } + + public static NetworkingAvailability InitAuthentication() + { + return (NetworkingAvailability)GetInstance().Call(Methods.InitAuthentication).AsInt64(); + } + + public static Godot.Collections.Array ReceiveMessagesOnConnection( + uint connection, + long maxMessages + ) + { + return GetInstance() + .Call(Methods.ReceiveMessagesOnConnection, connection, maxMessages) + .AsGodotArray(); + } + + public static Godot.Collections.Array ReceiveMessagesOnPollGroup( + uint pollGroup, + long maxMessages + ) + { + return GetInstance() + .Call(Methods.ReceiveMessagesOnPollGroup, pollGroup, maxMessages) + .AsGodotArray(); + } + + public static void ResetIdentity(string thisIdentity) + { + GetInstance().Call(Methods.ResetIdentity, thisIdentity); + } + + public static void RunNetworkingCallbacks() + { + GetInstance().Call(Methods.RunNetworkingCallbacks); + } + + public static void SendMessages(int messages, byte[] data, uint connectionHandle, long flags) + { + GetInstance().Call(Methods.SendMessages, messages, data, connectionHandle, flags); + } + + public static Godot.Collections.Dictionary SendMessageToConnection( + uint connectionHandle, + byte[] data, + long flags + ) + { + return GetInstance() + .Call(Methods.SendMessageToConnection, connectionHandle, data, flags) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary SetCertificate(byte[] certificate) + { + return GetInstance().Call(Methods.SetCertificate, certificate).AsGodotDictionary(); + } + + public static bool SetConnectionPollGroup(uint connectionHandle, long pollGroup) + { + return GetInstance() + .Call(Methods.SetConnectionPollGroup, connectionHandle, pollGroup) + .AsBool(); + } + + public static void SetConnectionName(uint peer, string name) + { + GetInstance().Call(Methods.SetConnectionName, peer, name); + } + + public enum NetworkingConfigValue : long + { + Invalid = 0, + FakePacketLossSend = 2, + FakePacketLossRecv = 3, + FakePacketLagSend = 4, + FakePacketLagRecv = 5, + FakePacketReorderSend = 6, + FakePacketReorderRecv = 7, + FakePacketReorderTime = 8, + FakePacketDupSend = 26, + FakePacketDupRevc = 27, + FakePacketDupTimeMax = 28, + PacketTraceMaxBytes = 41, + FakeRateLimitSendRate = 42, + FakeRateLimitSendBurst = 43, + FakeRateLimitRecvRate = 44, + FakeRateLimitRecvBurst = 45, + ConnectionUserData = 40, + TimeoutInitial = 24, + TimeoutConnected = 25, + SendBufferSize = 9, + RecvBufferSize = 47, + RecvBufferMessages = 48, + RecvMaxMessageSize = 49, + RecvMaxSegmentsPerPacket = 50, + SendRateMin = 10, + SendRateMax = 11, + NagleTime = 12, + IPAllowWithoutAuth = 23, + MtuPacketSize = 32, + MtuDataSize = 33, + Unencrypted = 34, + SymmetricConnect = 37, + LocalVirtualPort = 38, + DualWifiEnable = 39, + EnableDiagnosticsUi = 46, + SdrClientConsecPingTimeoutFailInitial = 19, + SdrClientConsecPingTimeoutFail = 20, + SdrClientMinPingsBeforePingAccurate = 21, + SdrClientSingleSocket = 22, + SdrClientForceRelayCluster = 29, + SdrClientDebugTicketAddress = 30, + SdrClientForceProxyAddr = 31, + SdrClientFakeClusterPing = 36, + LogLevelAckRtt = 13, + LogLevelPacketDecode = 14, + LogLevelMessage = 15, + LogLevelPacketGaps = 16, + LogLevelP2PRendezvous = 17, + LogLevelSrdRelayPings = 18, + CallbackConnectionStatusChanged = 201, + CallbackAuthStatusChanged = 202, + CallbackRelayNetworkStatusChanged = 203, + CallbackMessageSessionRequest = 204, + CallbackMessagesSessionFailed = 205, + CallbackCreateConnectionSignaling = 206, + CallbackFakeIPResult = 207, + P2PStunServerList = 103, + P2PTransportIceEnable = 104, + P2PTransportIcePenalty = 105, + P2PTransportSdrPenalty = 106, + P2PTurnServerList = 107, + P2PTurnUserList = 108, + P2PTurnPassList = 109, + P2PTransportIceImplementation = 110, + ValueForce32Bit = 2147483647, + } + + public enum NetworkingConnectionEnd : long + { + Invalid = 0, + AppMin = 1000, + AppGeneric = 1000, + AppMax = 1999, + AppExceptionMin = 2000, + AppExceptionGeneric = 2000, + AppExceptionMax = 2999, + LocalMin = 3000, + LocalOfflineMode = 3001, + LocalManyRelayConnectivity = 3002, + LocalHostedServerPrimaryRelay = 3003, + LocalNetworkConfig = 3004, + LocalRights = 3005, + NoPublicAddress = 3006, + LocalMax = 3999, + RemoveMin = 4000, + RemoteTimeout = 4001, + RemoteBadCrypt = 4002, + RemoteBadCert = 4003, + BadProtocolVersion = 4006, + RemoteP2PIceNoPublicAddresses = 4007, + RemoteMax = 4999, + MiscMin = 5000, + MiscGeneric = 5001, + MiscInternalError = 5002, + MiscTimeout = 5003, + MiscSteamConnectivity = 5005, + MiscNoRelaySessionsToClient = 5006, + MiscP2PRendezvous = 5008, + MiscP2PNatFirewall = 5009, + MiscPeerSentNoConnection = 5010, + MiscMax = 5999, + Force32Bit = 2147483647, + } + + public enum NetworkingConnectionState : long + { + None = 0, + Connecting = 1, + FindingRoute = 2, + Connected = 3, + ClosedByPeer = 4, + ProblemDetectedLocally = 5, + FinWait = -1, + Linger = -2, + Dead = -3, + Force32Bit = 2147483647, + } + + public enum NetworkingFakeIPType : long + { + Invalid = 0, + NotFake = 1, + GlobalIpv4 = 2, + LocalIpv4 = 3, + Force32Bit = 2147483647, + } + + public enum NetworkingGetConfigValueResult : long + { + BadValue = -1, + BadScopeObj = -2, + BufferTooSmall = -3, + Ok = 1, + OkInherited = 2, + Force32Bit = 2147483647, + } + + public enum NetworkingIdentityType : long + { + Invalid = 0, + Steamid = 16, + IPAddress = 1, + GenericString = 2, + GenericBytes = 3, + UnknownType = 4, + XboxPairwise = 17, + SonyPsn = 18, + GoogleStadia = 19, + Force32Bit = 2147483647, + } + + public enum NetworkingSocketsDebugOutputType : long + { + None = 0, + Bug = 1, + Error = 2, + Important = 3, + Warning = 4, + Msg = 5, + Verbose = 6, + Debug = 7, + Everything = 8, + Force32Bit = 2147483647, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.cs.uid new file mode 100644 index 00000000..72c0ba72 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingSockets.cs.uid @@ -0,0 +1 @@ +uid://bq4r0eftdkv0a diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingTypes.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingTypes.cs new file mode 100644 index 00000000..4760f827 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingTypes.cs @@ -0,0 +1,188 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool AddIdentity(string referenceName) + { + return GetInstance().Call(Methods.AddIdentity, referenceName).AsBool(); + } + + public static bool AddIPAddress(string referenceName) + { + return GetInstance().Call(Methods.AddIPAddress, referenceName).AsBool(); + } + + public static void ClearIdentity(string referenceName) + { + GetInstance().Call(Methods.ClearIdentity, referenceName); + } + + public static void ClearIPAddress(string referenceName) + { + GetInstance().Call(Methods.ClearIPAddress, referenceName); + } + + public static byte GetGenericBytes(string referenceName) + { + return GetInstance().Call(Methods.GetGenericBytes, referenceName).AsByte(); + } + + public static string GetGenericString(string referenceName) + { + return GetInstance().Call(Methods.GetGenericString, referenceName).AsString(); + } + + public static Godot.Collections.Array GetIdentities() + { + return GetInstance().Call(Methods.GetIdentities).AsGodotArray(); + } + + public static uint GetIdentityIPAddr(string referenceName) + { + return GetInstance().Call(Methods.GetIdentityIPAddr, referenceName).AsUInt32(); + } + + public static uint GetIdentitySteamID(string referenceName) + { + return GetInstance().Call(Methods.GetIdentitySteamID, referenceName).AsUInt32(); + } + + public static ulong GetIdentitySteamID64(string referenceName) + { + return GetInstance().Call(Methods.GetIdentitySteamID64, referenceName).AsUInt64(); + } + + public static Godot.Collections.Array GetIPAddresses() + { + return GetInstance().Call(Methods.GetIPAddresses).AsGodotArray(); + } + + public static uint GetIPv4(string referenceName) + { + return GetInstance().Call(Methods.GetIPv4, referenceName).AsUInt32(); + } + + public static ulong GetPSNID(string referenceName) + { + return GetInstance().Call(Methods.GetPSNID, referenceName).AsUInt64(); + } + + public static ulong GetStadiaID(string referenceName) + { + return GetInstance().Call(Methods.GetStadiaID, referenceName).AsUInt64(); + } + + public static string GetXboxPairwiseID(string referenceName) + { + return GetInstance().Call(Methods.GetXboxPairwiseID, referenceName).AsString(); + } + + public static bool IsAddressLocalHost(string referenceName) + { + return GetInstance().Call(Methods.IsAddressLocalHost, referenceName).AsBool(); + } + + public static bool IsIdentityInvalid(string referenceName) + { + return GetInstance().Call(Methods.IsIdentityInvalid, referenceName).AsBool(); + } + + public static bool IsIdentityLocalHost(string referenceName) + { + return GetInstance().Call(Methods.IsIdentityLocalHost, referenceName).AsBool(); + } + + public static bool IsIPv4(string referenceName) + { + return GetInstance().Call(Methods.IsIPv4, referenceName).AsBool(); + } + + public static bool IsIPv6AllZeros(string referenceName) + { + return GetInstance().Call(Methods.IsIPv6AllZeros, referenceName).AsBool(); + } + + public static bool ParseIdentityString(string referenceName, string stringToParse) + { + return GetInstance() + .Call(Methods.ParseIdentityString, referenceName, stringToParse) + .AsBool(); + } + + public static bool ParseIPAddressString(string referenceName, string stringToParse) + { + return GetInstance() + .Call(Methods.ParseIPAddressString, referenceName, stringToParse) + .AsBool(); + } + + public static bool SetGenericBytes(string referenceName, long data) + { + return GetInstance().Call(Methods.SetGenericBytes, referenceName, data).AsBool(); + } + + public static bool SetGenericString(string referenceName, string thisString) + { + return GetInstance().Call(Methods.SetGenericString, referenceName, thisString).AsBool(); + } + + public static bool SetIdentityIPAddr(string referenceName, string iPAddressName) + { + return GetInstance().Call(Methods.SetIdentityIPAddr, referenceName, iPAddressName).AsBool(); + } + + public static void SetIdentityLocalHost(string referenceName) + { + GetInstance().Call(Methods.SetIdentityLocalHost, referenceName); + } + + public static void SetIdentitySteamID(string referenceName, ulong steamId) + { + GetInstance().Call(Methods.SetIdentitySteamID, referenceName, steamId); + } + + public static void SetIdentitySteamID64(string referenceName, ulong steamId) + { + GetInstance().Call(Methods.SetIdentitySteamID64, referenceName, steamId); + } + + public static void SetIPv4(string referenceName, uint iP, long port) + { + GetInstance().Call(Methods.SetIPv4, referenceName, iP, port); + } + + public static void SetIPv6(string referenceName, int ipv6, long port) + { + GetInstance().Call(Methods.SetIPv6, referenceName, ipv6, port); + } + + public static void SetIPv6LocalHost(string referenceName, long port = 0) + { + GetInstance().Call(Methods.SetIPv6LocalHost, referenceName, port); + } + + public static void SetPSNID(string referenceName, long psnId) + { + GetInstance().Call(Methods.SetPSNID, referenceName, psnId); + } + + public static void SetStadiaID(string referenceName, long stadiaId) + { + GetInstance().Call(Methods.SetStadiaID, referenceName, stadiaId); + } + + public static bool SetXboxPairwiseID(string referenceName, string xboxId) + { + return GetInstance().Call(Methods.SetXboxPairwiseID, referenceName, xboxId).AsBool(); + } + + public static string ToIdentityString(string referenceName) + { + return GetInstance().Call(Methods.ToIdentityString, referenceName).AsString(); + } + + public static string ToIPAddressString(string referenceName, bool withPort) + { + return GetInstance().Call(Methods.ToIPAddressString, referenceName, withPort).AsString(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingTypes.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingTypes.cs.uid new file mode 100644 index 00000000..5c18e6fd --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingTypes.cs.uid @@ -0,0 +1 @@ +uid://50uq51ln4jmh diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.Signals.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.Signals.cs new file mode 100644 index 00000000..17a26151 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.Signals.cs @@ -0,0 +1,58 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void RelayNetworkStatusEventHandler( + long available, + long pingMeasurement, + long availableConfig, + long availableRelay, + string debugMessage + ); + private static event RelayNetworkStatusEventHandler RelayNetworkStatusEvent; + static Action _relayNetworkStatusAction = ( + available, + pingMeasurement, + availableConfig, + availableRelay, + debugMessage + ) => + { + RelayNetworkStatusEvent?.Invoke( + available, + pingMeasurement, + availableConfig, + availableRelay, + debugMessage + ); + }; + public static event RelayNetworkStatusEventHandler RelayNetworkStatus + { + add + { + if (RelayNetworkStatusEvent == null) + { + GetInstance() + .Connect(Signals.RelayNetworkStatus, Callable.From(_relayNetworkStatusAction)); + } + + RelayNetworkStatusEvent += value; + } + remove + { + RelayNetworkStatusEvent -= value; + + if (RelayNetworkStatusEvent == null) + { + GetInstance() + .Disconnect( + Signals.RelayNetworkStatus, + Callable.From(_relayNetworkStatusAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.Signals.cs.uid new file mode 100644 index 00000000..19f0a585 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.Signals.cs.uid @@ -0,0 +1 @@ +uid://b3bca6mtbsmrq diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.cs b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.cs new file mode 100644 index 00000000..ab12b209 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.cs @@ -0,0 +1,170 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool CheckPingDataUpToDate(double maxAgeInSeconds) + { + return GetInstance().Call(Methods.CheckPingDataUpToDate, maxAgeInSeconds).AsBool(); + } + + public static string ConvertPingLocationToString(byte[] location) + { + return GetInstance().Call(Methods.ConvertPingLocationToString, location).AsString(); + } + + public static int EstimatePingTimeBetweenTwoLocations(byte[] location1, byte[] location2) + { + return GetInstance() + .Call(Methods.EstimatePingTimeBetweenTwoLocations, location1, location2) + .AsInt32(); + } + + public static int EstimatePingTimeFromLocalHost(byte[] location) + { + return GetInstance().Call(Methods.EstimatePingTimeFromLocalHost, location).AsInt32(); + } + + public static Godot.Collections.Dictionary GetConfigValue( + NetworkingConfigValue configValue, + NetworkingConfigScope scopeType, + long connectionHandle + ) + { + return GetInstance() + .Call(Methods.GetConfigValue, (long)configValue, (long)scopeType, connectionHandle) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetConfigValueInfo(NetworkingConfigValue configValue) + { + return GetInstance() + .Call(Methods.GetConfigValueInfo, (long)configValue) + .AsGodotDictionary(); + } + + public static int GetDirectPingToPOP(long popId) + { + return GetInstance().Call(Methods.GetDirectPingToPOP, popId).AsInt32(); + } + + public static Godot.Collections.Dictionary GetLocalPingLocation() + { + return GetInstance().Call(Methods.GetLocalPingLocation).AsGodotDictionary(); + } + + public static long GetLocalTimestamp() + { + return GetInstance().Call(Methods.GetLocalTimestamp).AsInt64(); + } + + public static Godot.Collections.Dictionary GetPingToDataCenter(long popId) + { + return GetInstance().Call(Methods.GetPingToDataCenter, popId).AsGodotDictionary(); + } + + public static long GetPOPCount() + { + return GetInstance().Call(Methods.GetPOPCount).AsInt64(); + } + + public static Godot.Collections.Array GetPOPList() + { + return GetInstance().Call(Methods.GetPOPList).AsGodotArray(); + } + + public static NetworkingAvailability GetRelayNetworkStatus() + { + return (NetworkingAvailability)GetInstance().Call(Methods.GetRelayNetworkStatus).AsInt64(); + } + + public static void InitRelayNetworkAccess() + { + GetInstance().Call(Methods.InitRelayNetworkAccess); + } + + public static Godot.Collections.Dictionary ParsePingLocationString(string @string) + { + return GetInstance().Call(Methods.ParsePingLocationString, @string).AsGodotDictionary(); + } + + public static bool SetConnectionConfigValueFloat( + uint connection, + NetworkingConfigValue config, + double value + ) + { + return GetInstance() + .Call(Methods.SetConnectionConfigValueFloat, connection, (long)config, value) + .AsBool(); + } + + public static bool SetConnectionConfigValueInt32( + uint connection, + NetworkingConfigValue config, + long value + ) + { + return GetInstance() + .Call(Methods.SetConnectionConfigValueInt32, connection, (long)config, value) + .AsBool(); + } + + public static bool SetConnectionConfigValueString( + uint connection, + NetworkingConfigValue config, + string value + ) + { + return GetInstance() + .Call(Methods.SetConnectionConfigValueString, connection, (long)config, value) + .AsBool(); + } + + public static bool SetGlobalConfigValueFloat(NetworkingConfigValue config, double value) + { + return GetInstance().Call(Methods.SetGlobalConfigValueFloat, (long)config, value).AsBool(); + } + + public static bool SetGlobalConfigValueInt32(NetworkingConfigValue config, long value) + { + return GetInstance().Call(Methods.SetGlobalConfigValueInt32, (long)config, value).AsBool(); + } + + public static bool SetGlobalConfigValueString(NetworkingConfigValue config, string value) + { + return GetInstance().Call(Methods.SetGlobalConfigValueString, (long)config, value).AsBool(); + } + + public enum NetworkingAvailability : long + { + CannotTry = -102, + Failed = -101, + Previously = -100, + Retrying = -10, + NeverTried = 1, + Waiting = 2, + Attempting = 3, + Current = 100, + Unknown = 0, + Force32Bit = 2147483647, + } + + public enum NetworkingConfigDataType : long + { + NetworkingConfigTypeInt32 = 1, + NetworkingConfigTypeInt64 = 2, + NetworkingConfigTypeFloat = 3, + EtworkingConfigTypeString = 4, + NetworkingConfigTypeFunctionPtr = 5, + NetworkingConfigTypeForce32Bit = 2147483647, + } + + public enum NetworkingConfigScope : long + { + Global = 1, + SocketsInterface = 2, + ListenSocket = 3, + Connection = 4, + Force32Bit = 2147483647, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.cs.uid b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.cs.uid new file mode 100644 index 00000000..23762ba7 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.NetworkingUtils.cs.uid @@ -0,0 +1 @@ +uid://braojp6a3dvb5 diff --git a/addons/godotsteam_csharpbindings/Steam.ParentalSettings.Signals.cs b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.Signals.cs new file mode 100644 index 00000000..38814803 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.Signals.cs @@ -0,0 +1,42 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + private static event Action ParentalSettingChangedEvent; + static Action _parentalSettingChangedAction = () => + { + ParentalSettingChangedEvent?.Invoke(); + }; + public static event Action ParentalSettingChanged + { + add + { + if (ParentalSettingChangedEvent == null) + { + GetInstance() + .Connect( + Signals.ParentalSettingChanged, + Callable.From(_parentalSettingChangedAction) + ); + } + + ParentalSettingChangedEvent += value; + } + remove + { + ParentalSettingChangedEvent -= value; + + if (ParentalSettingChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.ParentalSettingChanged, + Callable.From(_parentalSettingChangedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.ParentalSettings.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.Signals.cs.uid new file mode 100644 index 00000000..f0f188db --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.Signals.cs.uid @@ -0,0 +1 @@ +uid://6ne3oi3ox0uo diff --git a/addons/godotsteam_csharpbindings/Steam.ParentalSettings.cs b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.cs new file mode 100644 index 00000000..4afd89a2 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.cs @@ -0,0 +1,54 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool IsParentalLockEnabled() + { + return GetInstance().Call(Methods.IsParentalLockEnabled).AsBool(); + } + + public static bool IsParentalLockLocked() + { + return GetInstance().Call(Methods.IsParentalLockLocked).AsBool(); + } + + public static bool IsAppBlocked(uint appId) + { + return GetInstance().Call(Methods.IsAppBlocked, appId).AsBool(); + } + + public static bool IsAppInBlockList(uint appId) + { + return GetInstance().Call(Methods.IsAppInBlockList, appId).AsBool(); + } + + public static bool IsFeatureBlocked(ParentalFeature feature) + { + return GetInstance().Call(Methods.IsFeatureBlocked, (long)feature).AsBool(); + } + + public static bool IsFeatureInBlockList(ParentalFeature feature) + { + return GetInstance().Call(Methods.IsFeatureInBlockList, (long)feature).AsBool(); + } + + public enum ParentalFeature : long + { + Invalid = 0, + Store = 1, + Community = 2, + Profile = 3, + Friends = 4, + News = 5, + Trading = 6, + Settings = 7, + Console = 8, + Browser = 9, + ParentalSetup = 10, + Library = 11, + Test = 12, + SiteLicense = 13, + KioskMode = 14, + Max = 15, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.ParentalSettings.cs.uid b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.cs.uid new file mode 100644 index 00000000..a8aa9e47 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.ParentalSettings.cs.uid @@ -0,0 +1 @@ +uid://dyarbc7utwpom diff --git a/addons/godotsteam_csharpbindings/Steam.Parties.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Parties.Signals.cs new file mode 100644 index 00000000..0203b117 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Parties.Signals.cs @@ -0,0 +1,220 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void JoinPartySignalEventHandler( + long result, + long beaconId, + ulong steamId, + string connectString + ); + private static event JoinPartySignalEventHandler JoinPartySignalEvent; + static Action _joinPartySignalAction = ( + result, + beaconId, + steamId, + connectString + ) => + { + JoinPartySignalEvent?.Invoke(result, beaconId, steamId, connectString); + }; + public static event JoinPartySignalEventHandler JoinPartySignal + { + add + { + if (JoinPartySignalEvent == null) + { + GetInstance() + .Connect(Signals.JoinPartySignal, Callable.From(_joinPartySignalAction)); + } + + JoinPartySignalEvent += value; + } + remove + { + JoinPartySignalEvent -= value; + + if (JoinPartySignalEvent == null) + { + GetInstance() + .Disconnect(Signals.JoinPartySignal, Callable.From(_joinPartySignalAction)); + } + } + } + + public delegate void CreateBeaconSignalEventHandler(long result, long beaconId); + private static event CreateBeaconSignalEventHandler CreateBeaconSignalEvent; + static Action _createBeaconSignalAction = (result, beaconId) => + { + CreateBeaconSignalEvent?.Invoke(result, beaconId); + }; + public static event CreateBeaconSignalEventHandler CreateBeaconSignal + { + add + { + if (CreateBeaconSignalEvent == null) + { + GetInstance() + .Connect(Signals.CreateBeaconSignal, Callable.From(_createBeaconSignalAction)); + } + + CreateBeaconSignalEvent += value; + } + remove + { + CreateBeaconSignalEvent -= value; + + if (CreateBeaconSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.CreateBeaconSignal, + Callable.From(_createBeaconSignalAction) + ); + } + } + } + + public delegate void ReservationNotificationEventHandler(long beaconId, ulong steamId); + private static event ReservationNotificationEventHandler ReservationNotificationEvent; + static Action _reservationNotificationAction = (beaconId, steamId) => + { + ReservationNotificationEvent?.Invoke(beaconId, steamId); + }; + public static event ReservationNotificationEventHandler ReservationNotification + { + add + { + if (ReservationNotificationEvent == null) + { + GetInstance() + .Connect( + Signals.ReservationNotification, + Callable.From(_reservationNotificationAction) + ); + } + + ReservationNotificationEvent += value; + } + remove + { + ReservationNotificationEvent -= value; + + if (ReservationNotificationEvent == null) + { + GetInstance() + .Disconnect( + Signals.ReservationNotification, + Callable.From(_reservationNotificationAction) + ); + } + } + } + + public delegate void ChangeNumOpenSlotsSignalEventHandler(long result); + private static event ChangeNumOpenSlotsSignalEventHandler ChangeNumOpenSlotsSignalEvent; + static Action _changeNumOpenSlotsSignalAction = (result) => + { + ChangeNumOpenSlotsSignalEvent?.Invoke(result); + }; + public static event ChangeNumOpenSlotsSignalEventHandler ChangeNumOpenSlotsSignal + { + add + { + if (ChangeNumOpenSlotsSignalEvent == null) + { + GetInstance() + .Connect( + Signals.ChangeNumOpenSlotsSignal, + Callable.From(_changeNumOpenSlotsSignalAction) + ); + } + + ChangeNumOpenSlotsSignalEvent += value; + } + remove + { + ChangeNumOpenSlotsSignalEvent -= value; + + if (ChangeNumOpenSlotsSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.ChangeNumOpenSlotsSignal, + Callable.From(_changeNumOpenSlotsSignalAction) + ); + } + } + } + + private static event Action AvailableBeaconLocationsUpdatedEvent; + static Action _availableBeaconLocationsUpdatedAction = () => + { + AvailableBeaconLocationsUpdatedEvent?.Invoke(); + }; + public static event Action AvailableBeaconLocationsUpdated + { + add + { + if (AvailableBeaconLocationsUpdatedEvent == null) + { + GetInstance() + .Connect( + Signals.AvailableBeaconLocationsUpdated, + Callable.From(_availableBeaconLocationsUpdatedAction) + ); + } + AvailableBeaconLocationsUpdatedEvent += value; + } + remove + { + AvailableBeaconLocationsUpdatedEvent -= value; + if (AvailableBeaconLocationsUpdatedEvent == null) + { + GetInstance() + .Disconnect( + Signals.AvailableBeaconLocationsUpdated, + Callable.From(_availableBeaconLocationsUpdatedAction) + ); + } + } + } + + private static event Action ActiveBeaconsUpdatedEvent; + static Action _activeBeaconsUpdatedAction = () => + { + ActiveBeaconsUpdatedEvent?.Invoke(); + }; + public static event Action ActiveBeaconsUpdated + { + add + { + if (ActiveBeaconsUpdatedEvent == null) + { + GetInstance() + .Connect( + Signals.ActiveBeaconsUpdated, + Callable.From(_activeBeaconsUpdatedAction) + ); + } + + ActiveBeaconsUpdatedEvent += value; + } + remove + { + ActiveBeaconsUpdatedEvent -= value; + + if (ActiveBeaconsUpdatedEvent == null) + { + GetInstance() + .Disconnect( + Signals.ActiveBeaconsUpdated, + Callable.From(_activeBeaconsUpdatedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Parties.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Parties.Signals.cs.uid new file mode 100644 index 00000000..d5d8a7e0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Parties.Signals.cs.uid @@ -0,0 +1 @@ +uid://xqj1h63jtbny diff --git a/addons/godotsteam_csharpbindings/Steam.Parties.cs b/addons/godotsteam_csharpbindings/Steam.Parties.cs new file mode 100644 index 00000000..27a54406 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Parties.cs @@ -0,0 +1,95 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static void CancelReservation(ulong beaconId, ulong steamId) + { + GetInstance().Call(Methods.CancelReservation, beaconId, steamId); + } + + public static void ChangeNumOpenSlots(ulong beaconId, long openSlots) + { + GetInstance().Call(Methods.ChangeNumOpenSlots, beaconId, openSlots); + } + + public static void CreateBeacon( + uint openSlots, + ulong locationId, + PartyBeaconLocationType type, + string connectString, + string beaconMetadata + ) + { + GetInstance() + .Call( + Methods.CreateBeacon, + openSlots, + locationId, + (long)type, + connectString, + beaconMetadata + ); + } + + public static bool DestroyBeacon(long beaconId) + { + return GetInstance().Call(Methods.DestroyBeacon, beaconId).AsBool(); + } + + public static Godot.Collections.Array GetAvailableBeaconLocations(long max) + { + return GetInstance().Call(Methods.GetAvailableBeaconLocations, max).AsGodotArray(); + } + + public static ulong GetBeaconByIndex(long index) + { + return GetInstance().Call(Methods.GetBeaconByIndex, index).AsUInt64(); + } + + public static Godot.Collections.Dictionary GetBeaconDetails(long beaconId) + { + return GetInstance().Call(Methods.GetBeaconDetails, beaconId).AsGodotDictionary(); + } + + public static string GetBeaconLocationData( + ulong locationId, + PartyBeaconLocationType locationType, + PartyBeaconLocationData locationData + ) + { + return GetInstance() + .Call(Methods.GetBeaconLocationData, locationId, (long)locationType, (long)locationData) + .AsString(); + } + + public static long GetNumActiveBeacons() + { + return GetInstance().Call(Methods.GetNumActiveBeacons).AsInt64(); + } + + public static void JoinParty(long beaconId) + { + GetInstance().Call(Methods.JoinParty, beaconId); + } + + public static void OnReservationCompleted(ulong beaconId, ulong steamId) + { + GetInstance().Call(Methods.OnReservationCompleted, beaconId, steamId); + } + + public enum PartyBeaconLocationData : long + { + Data = 0, + DataName = 1, + DataUrlSmall = 2, + DataUrlMedium = 3, + DataUrlLarge = 4, + } + + public enum PartyBeaconLocationType : long + { + LocationtypeInvalid = 0, + LocationtypeChatGroup = 1, + LocationTypeMax = 2, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Parties.cs.uid b/addons/godotsteam_csharpbindings/Steam.Parties.cs.uid new file mode 100644 index 00000000..f40255ae --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Parties.cs.uid @@ -0,0 +1 @@ +uid://bgmbcdrfe2wwg diff --git a/addons/godotsteam_csharpbindings/Steam.RemotePlay.Signals.cs b/addons/godotsteam_csharpbindings/Steam.RemotePlay.Signals.cs new file mode 100644 index 00000000..2e6d9b0a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemotePlay.Signals.cs @@ -0,0 +1,75 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void RemotePlaySessionConnectedEventHandler(long sessionId); + private static event RemotePlaySessionConnectedEventHandler RemotePlaySessionConnectedEvent; + static Action _remotePlaySessionConnectedAction = (sessionId) => + { + RemotePlaySessionConnectedEvent?.Invoke(sessionId); + }; + public static event RemotePlaySessionConnectedEventHandler RemotePlaySessionConnected + { + add + { + if (RemotePlaySessionConnectedEvent == null) + { + GetInstance() + .Connect( + Signals.RemotePlaySessionConnected, + Callable.From(_remotePlaySessionConnectedAction) + ); + } + RemotePlaySessionConnectedEvent += value; + } + remove + { + RemotePlaySessionConnectedEvent -= value; + if (RemotePlaySessionConnectedEvent == null) + { + GetInstance() + .Disconnect( + Signals.RemotePlaySessionConnected, + Callable.From(_remotePlaySessionConnectedAction) + ); + } + } + } + + public delegate void RemotePlaySessionDisconnectedEventHandler(long sessionId); + private static event RemotePlaySessionDisconnectedEventHandler RemotePlaySessionDisconnectedEvent; + static Action _remotePlaySessionDisconnectedAction = (sessionId) => + { + RemotePlaySessionDisconnectedEvent?.Invoke(sessionId); + }; + public static event RemotePlaySessionDisconnectedEventHandler RemotePlaySessionDisconnected + { + add + { + if (RemotePlaySessionDisconnectedEvent == null) + { + GetInstance() + .Connect( + Signals.RemotePlaySessionDisconnected, + Callable.From(_remotePlaySessionDisconnectedAction) + ); + } + RemotePlaySessionDisconnectedEvent += value; + } + remove + { + RemotePlaySessionDisconnectedEvent -= value; + if (RemotePlaySessionDisconnectedEvent == null) + { + GetInstance() + .Disconnect( + Signals.RemotePlaySessionDisconnected, + Callable.From(_remotePlaySessionDisconnectedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.RemotePlay.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.RemotePlay.Signals.cs.uid new file mode 100644 index 00000000..c8fab373 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemotePlay.Signals.cs.uid @@ -0,0 +1 @@ +uid://du8cue6fgrtgs diff --git a/addons/godotsteam_csharpbindings/Steam.RemotePlay.cs b/addons/godotsteam_csharpbindings/Steam.RemotePlay.cs new file mode 100644 index 00000000..af80aaac --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemotePlay.cs @@ -0,0 +1,46 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static long GetSessionCount() + { + return GetInstance().Call(Methods.GetSessionCount).AsInt64(); + } + + public static uint GetSessionID(long index) + { + return GetInstance().Call(Methods.GetSessionID, index).AsUInt32(); + } + + public static ulong GetSessionSteamID(long sessionId) + { + return GetInstance().Call(Methods.GetSessionSteamID, sessionId).AsUInt64(); + } + + public static string GetSessionClientName(long sessionId) + { + return GetInstance().Call(Methods.GetSessionClientName, sessionId).AsString(); + } + + public static int GetSessionClientFormFactor(long sessionId) + { + return GetInstance().Call(Methods.GetSessionClientFormFactor, sessionId).AsInt32(); + } + + public static Godot.Collections.Dictionary GetSessionClientResolution(long sessionId) + { + return GetInstance() + .Call(Methods.GetSessionClientResolution, sessionId) + .AsGodotDictionary(); + } + + public static bool SendRemotePlayTogetherInvite(ulong friendId) + { + return GetInstance().Call(Methods.SendRemotePlayTogetherInvite, friendId).AsBool(); + } + + public static bool StartRemotePlayTogether(bool showOverlay = true) + { + return GetInstance().Call(Methods.StartRemotePlayTogether, showOverlay).AsBool(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.RemotePlay.cs.uid b/addons/godotsteam_csharpbindings/Steam.RemotePlay.cs.uid new file mode 100644 index 00000000..46516a96 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemotePlay.cs.uid @@ -0,0 +1 @@ +uid://ct722oe7hsrh8 diff --git a/addons/godotsteam_csharpbindings/Steam.RemoteStorage.Signals.cs b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.Signals.cs new file mode 100644 index 00000000..5c554808 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.Signals.cs @@ -0,0 +1,232 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void FileReadAsyncCompleteEventHandler(Godot.Collections.Dictionary fileRead); + private static event FileReadAsyncCompleteEventHandler FileReadAsyncCompleteEvent; + static Action _fileReadAsyncCompleteAction = (fileRead) => + { + FileReadAsyncCompleteEvent?.Invoke(fileRead); + }; + public static event FileReadAsyncCompleteEventHandler FileReadAsyncComplete + { + add + { + if (FileReadAsyncCompleteEvent == null) + { + GetInstance() + .Connect( + Signals.FileReadAsyncComplete, + Callable.From(_fileReadAsyncCompleteAction) + ); + } + FileReadAsyncCompleteEvent += value; + } + remove + { + FileReadAsyncCompleteEvent -= value; + if (FileReadAsyncCompleteEvent == null) + { + GetInstance() + .Disconnect( + Signals.FileReadAsyncComplete, + Callable.From(_fileReadAsyncCompleteAction) + ); + } + } + } + + public delegate void FileShareResultEventHandler(long result, long handle, string name); + private static event FileShareResultEventHandler FileShareResultEvent; + static Action _fileShareResultAction = (result, handle, name) => + { + FileShareResultEvent?.Invoke(result, handle, name); + }; + public static event FileShareResultEventHandler FileShareResult + { + add + { + if (FileShareResultEvent == null) + { + GetInstance() + .Connect(Signals.FileShareResult, Callable.From(_fileShareResultAction)); + } + FileShareResultEvent += value; + } + remove + { + FileShareResultEvent -= value; + if (FileShareResultEvent == null) + { + GetInstance() + .Disconnect(Signals.FileShareResult, Callable.From(_fileShareResultAction)); + } + } + } + + public delegate void FileWriteAsyncCompleteEventHandler(long result); + private static event FileWriteAsyncCompleteEventHandler FileWriteAsyncCompleteEvent; + static Action _fileWriteAsyncCompleteAction = (result) => + { + FileWriteAsyncCompleteEvent?.Invoke(result); + }; + public static event FileWriteAsyncCompleteEventHandler FileWriteAsyncComplete + { + add + { + if (FileWriteAsyncCompleteEvent == null) + { + GetInstance() + .Connect( + Signals.FileWriteAsyncComplete, + Callable.From(_fileWriteAsyncCompleteAction) + ); + } + FileWriteAsyncCompleteEvent += value; + } + remove + { + FileWriteAsyncCompleteEvent -= value; + if (FileWriteAsyncCompleteEvent == null) + { + GetInstance() + .Disconnect( + Signals.FileWriteAsyncComplete, + Callable.From(_fileWriteAsyncCompleteAction) + ); + } + } + } + + public delegate void DownloadUgcResultEventHandler( + long result, + Godot.Collections.Dictionary downloadData + ); + private static event DownloadUgcResultEventHandler DownloadUgcResultEvent; + static Action _downloadUgcResultAction = ( + result, + downloadData + ) => + { + DownloadUgcResultEvent?.Invoke(result, downloadData); + }; + public static event DownloadUgcResultEventHandler DownloadUgcResult + { + add + { + if (DownloadUgcResultEvent == null) + { + GetInstance() + .Connect(Signals.DownloadUgcResult, Callable.From(_downloadUgcResultAction)); + } + DownloadUgcResultEvent += value; + } + remove + { + DownloadUgcResultEvent -= value; + if (DownloadUgcResultEvent == null) + { + GetInstance() + .Disconnect(Signals.DownloadUgcResult, Callable.From(_downloadUgcResultAction)); + } + } + } + + public delegate void UnsubscribeItemSignalEventHandler(long result, long fileId); + private static event UnsubscribeItemSignalEventHandler UnsubscribeItemSignalEvent; + static Action _unsubscribeItemSignalAction = (result, fileId) => + { + UnsubscribeItemSignalEvent?.Invoke(result, fileId); + }; + public static event UnsubscribeItemSignalEventHandler UnsubscribeItemSignal + { + add + { + if (UnsubscribeItemSignalEvent == null) + { + GetInstance() + .Connect( + Signals.UnsubscribeItemSignal, + Callable.From(_unsubscribeItemSignalAction) + ); + } + UnsubscribeItemSignalEvent += value; + } + remove + { + UnsubscribeItemSignalEvent -= value; + if (UnsubscribeItemSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.UnsubscribeItemSignal, + Callable.From(_unsubscribeItemSignalAction) + ); + } + } + } + + public delegate void SubscribeItemSignalEventHandler(long result, long fileId); + private static event SubscribeItemSignalEventHandler SubscribeItemSignalEvent; + static Action _subscribeItemSignalAction = (result, fileId) => + { + SubscribeItemSignalEvent?.Invoke(result, fileId); + }; + public static event SubscribeItemSignalEventHandler SubscribeItemSignal + { + add + { + if (SubscribeItemSignalEvent == null) + { + GetInstance() + .Connect( + Signals.SubscribeItemSignal, + Callable.From(_subscribeItemSignalAction) + ); + } + SubscribeItemSignalEvent += value; + } + remove + { + SubscribeItemSignalEvent -= value; + if (SubscribeItemSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.SubscribeItemSignal, + Callable.From(_subscribeItemSignalAction) + ); + } + } + } + + private static event Action LocalFileChangedEvent; + static Action _localFileChangedAction = () => + { + LocalFileChangedEvent?.Invoke(); + }; + public static event Action LocalFileChanged + { + add + { + if (LocalFileChangedEvent == null) + { + GetInstance() + .Connect(Signals.LocalFileChanged, Callable.From(_localFileChangedAction)); + } + LocalFileChangedEvent += value; + } + remove + { + LocalFileChangedEvent -= value; + if (LocalFileChangedEvent == null) + { + GetInstance() + .Disconnect(Signals.LocalFileChanged, Callable.From(_localFileChangedAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.RemoteStorage.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.Signals.cs.uid new file mode 100644 index 00000000..b805f7cf --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.Signals.cs.uid @@ -0,0 +1 @@ +uid://d2gw838h5g0fk diff --git a/addons/godotsteam_csharpbindings/Steam.RemoteStorage.cs b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.cs new file mode 100644 index 00000000..0eed4121 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.cs @@ -0,0 +1,272 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static bool BeginFileWriteBatch() + { + return GetInstance().Call(Methods.BeginFileWriteBatch).AsBool(); + } + + public static bool EndFileWriteBatch() + { + return GetInstance().Call(Methods.EndFileWriteBatch).AsBool(); + } + + public static bool FileDelete(string file) + { + return GetInstance().Call(Methods.FileDelete, file).AsBool(); + } + + public static bool FileExists(string file) + { + return GetInstance().Call(Methods.FileExists, file).AsBool(); + } + + public static bool FileForget(string file) + { + return GetInstance().Call(Methods.FileForget, file).AsBool(); + } + + public static bool FilePersisted(string file) + { + return GetInstance().Call(Methods.FilePersisted, file).AsBool(); + } + + public static Godot.Collections.Dictionary FileRead(string file, long dataToRead) + { + return GetInstance().Call(Methods.FileRead, file, dataToRead).AsGodotDictionary(); + } + + public static void FileReadAsync(string file, uint offset, long dataToRead) + { + GetInstance().Call(Methods.FileReadAsync, file, offset, dataToRead); + } + + public static void FileShare(string file) + { + GetInstance().Call(Methods.FileShare, file); + } + + public static bool FileWrite(string file, byte[] data, long size = 0) + { + return GetInstance().Call(Methods.FileWrite, file, data, size).AsBool(); + } + + public static void FileWriteAsync(string file, byte[] data, long size = 0) + { + GetInstance().Call(Methods.FileWriteAsync, file, data, size); + } + + public static bool FileWriteStreamCancel(long writeHandle) + { + return GetInstance().Call(Methods.FileWriteStreamCancel, writeHandle).AsBool(); + } + + public static bool FileWriteStreamClose(long writeHandle) + { + return GetInstance().Call(Methods.FileWriteStreamClose, writeHandle).AsBool(); + } + + public static ulong FileWriteStreamOpen(string file) + { + return GetInstance().Call(Methods.FileWriteStreamOpen, file).AsUInt64(); + } + + public static bool FileWriteStreamWriteChunk(ulong writeHandle, byte[] data) + { + return GetInstance().Call(Methods.FileWriteStreamWriteChunk, writeHandle, data).AsBool(); + } + + public static long GetCachedUGCCount() + { + return GetInstance().Call(Methods.GetCachedUGCCount).AsInt64(); + } + + public static ulong GetCachedUGCHandle(long content) + { + return GetInstance().Call(Methods.GetCachedUGCHandle, content).AsUInt64(); + } + + public static long GetFileCount() + { + return GetInstance().Call(Methods.GetFileCount).AsInt64(); + } + + public static Godot.Collections.Dictionary GetFileNameAndSize(long file) + { + return GetInstance().Call(Methods.GetFileNameAndSize, file).AsGodotDictionary(); + } + + public static int GetFileSize(string file) + { + return GetInstance().Call(Methods.GetFileSize, file).AsInt32(); + } + + public static long GetFileTimestamp(string file) + { + return GetInstance().Call(Methods.GetFileTimestamp, file).AsInt64(); + } + + public static Godot.Collections.Dictionary GetLocalFileChange(long file) + { + return GetInstance().Call(Methods.GetLocalFileChange, file).AsGodotDictionary(); + } + + public static long GetLocalFileChangeCount() + { + return GetInstance().Call(Methods.GetLocalFileChangeCount).AsInt64(); + } + + public static Godot.Collections.Dictionary GetQuota() + { + return GetInstance().Call(Methods.GetQuota).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetSyncPlatforms(string file) + { + return GetInstance().Call(Methods.GetSyncPlatforms, file).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetUGCDetails(long content) + { + return GetInstance().Call(Methods.GetUGCDetails, content).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetUGCDownloadProgress(long content) + { + return GetInstance().Call(Methods.GetUGCDownloadProgress, content).AsGodotDictionary(); + } + + public static bool IsCloudEnabledForAccount() + { + return GetInstance().Call(Methods.IsCloudEnabledForAccount).AsBool(); + } + + public static bool IsCloudEnabledForApp() + { + return GetInstance().Call(Methods.IsCloudEnabledForApp).AsBool(); + } + + public static void SetCloudEnabledForApp(bool enabled) + { + GetInstance().Call(Methods.SetCloudEnabledForApp, enabled); + } + + public static bool SetSyncPlatforms(string file, long platform) + { + return GetInstance().Call(Methods.SetSyncPlatforms, file, platform).AsBool(); + } + + public static void UgcDownload(ulong content, long priority) + { + GetInstance().Call(Methods.UgcDownload, content, priority); + } + + public static void UgcDownloadToLocation(ulong content, string location, long priority) + { + GetInstance().Call(Methods.UgcDownloadToLocation, content, location, priority); + } + + public static byte[] UgcRead(ulong content, int dataSize, uint offset, UgcReadAction action) + { + return GetInstance() + .Call(Methods.UgcRead, content, dataSize, offset, (long)action) + .AsByteArray(); + } + + [System.Flags] + public enum RemoteStoragePlatform : long + { + None = 0, + Windows = 1, + Osx = 2, + Ps3 = 4, + Linux = 8, + Switch = 16, + Android = 32, + Ios = 64, + All = 4294967295, + } + + public enum RemoteStoragePublishedFileVisibility : long + { + Public = 0, + FriendsOnly = 1, + Private = 2, + Unlisted = 3, + } + + public enum UgcReadAction : long + { + ContinueReadingUntilFinished = 0, + ContinueReading = 1, + Close = 2, + } + + public enum WorkshopEnumerationType : long + { + RankedByVote = 0, + Recent = 1, + Trending = 2, + FavoritesOfFriends = 3, + VotedByFriends = 4, + ContentByFriends = 5, + RecentFromFollowedUsers = 6, + } + + public enum WorkshopFileAction : long + { + Played = 0, + Completed = 1, + } + + public enum WorkshopFileType : long + { + WorkshopFileTypeFirst = 0, + WorkshopFileTypeCommunity = 0, + WorkshopFileTypeMicrotransaction = 1, + WorkshopFileTypeCollection = 2, + WorkshopFileTypeArt = 3, + WorkshopFileTypeVideo = 4, + WorkshopFileTypeScreenshot = 5, + WorkshopFileTypeGame = 6, + WorkshopFileTypeSoftware = 7, + WorkshopFileTypeConcept = 8, + WorkshopFileTypeWebGuide = 9, + WorkshopFileTypeIntegratedGuide = 10, + WorkshopFileTypeMerch = 11, + WorkshopFileTypeControllerBinding = 12, + WorkshopFileTypeSteamworksAccessInvite = 13, + WorkshopFileTypeSteamVideo = 14, + WorkshopFileTypeGameManagedItem = 15, + WorkshopFileTypeMax = 16, + } + + public enum WorkshopVideoProvider : long + { + None = 0, + Youtube = 1, + } + + public enum WorkshopVote : long + { + Unvoted = 0, + For = 1, + Against = 2, + Later = 3, + } + + public enum LocalFileChange : long + { + Invalid = 0, + FileUpdated = 1, + FileDeleted = 2, + } + + public enum FilePathType : long + { + Invalid = 0, + Absolute = 1, + ApiFileName = 2, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.RemoteStorage.cs.uid b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.cs.uid new file mode 100644 index 00000000..624d1da0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.RemoteStorage.cs.uid @@ -0,0 +1 @@ +uid://djeeotxol2suo diff --git a/addons/godotsteam_csharpbindings/Steam.Screenshots.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Screenshots.Signals.cs new file mode 100644 index 00000000..176c4ccb --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Screenshots.Signals.cs @@ -0,0 +1,68 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void ScreenshotReadyEventHandler(uint handle, ErrorResult result); + private static event ScreenshotReadyEventHandler ScreenshotReadyEvent; + static Action _screenshotReadyAction = (handle, result) => + { + ScreenshotReadyEvent?.Invoke(handle, (ErrorResult)result); + }; + public static event ScreenshotReadyEventHandler ScreenshotReady + { + add + { + if (ScreenshotReadyEvent == null) + { + GetInstance() + .Connect(Signals.ScreenshotReady, Callable.From(_screenshotReadyAction)); + } + ScreenshotReadyEvent += value; + } + remove + { + ScreenshotReadyEvent -= value; + if (ScreenshotReadyEvent == null) + { + GetInstance() + .Disconnect(Signals.ScreenshotReady, Callable.From(_screenshotReadyAction)); + } + } + } + + private static event Action ScreenshotRequestedEvent; + static Action _screenshotRequestedAction = () => + { + ScreenshotRequestedEvent?.Invoke(); + }; + public static event Action ScreenshotRequested + { + add + { + if (ScreenshotRequestedEvent == null) + { + GetInstance() + .Connect( + Signals.ScreenshotRequested, + Callable.From(_screenshotRequestedAction) + ); + } + ScreenshotRequestedEvent += value; + } + remove + { + ScreenshotRequestedEvent -= value; + if (ScreenshotRequestedEvent == null) + { + GetInstance() + .Disconnect( + Signals.ScreenshotRequested, + Callable.From(_screenshotRequestedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Screenshots.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Screenshots.Signals.cs.uid new file mode 100644 index 00000000..e23d7fec --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Screenshots.Signals.cs.uid @@ -0,0 +1 @@ +uid://i72xtnpthx2v diff --git a/addons/godotsteam_csharpbindings/Steam.Screenshots.cs b/addons/godotsteam_csharpbindings/Steam.Screenshots.cs new file mode 100644 index 00000000..dd8bb48c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Screenshots.cs @@ -0,0 +1,62 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static uint AddScreenshotToLibrary( + string fileName, + string thumbnailFileName, + int width, + int height + ) + { + return GetInstance() + .Call(Methods.AddScreenshotToLibrary, fileName, thumbnailFileName, width, height) + .AsUInt32(); + } + + public static uint AddVRScreenshotToLibrary( + VRScreenshotType type, + string fileName, + string vrFileName + ) + { + return GetInstance() + .Call(Methods.AddVRScreenshotToLibrary, (int)type, fileName, vrFileName) + .AsUInt32(); + } + + public static void HookScreenshots(bool hook) + { + GetInstance().Call(Methods.HookScreenshots, hook); + } + + public static bool IsScreenshotsHooked() + { + return GetInstance().Call(Methods.IsScreenshotsHooked).AsBool(); + } + + public static bool SetLocation(uint screenshot, string location) + { + return GetInstance().Call(Methods.SetLocation, screenshot, location).AsBool(); + } + + public static bool TagPublishedFile(uint screenshot, ulong fileId) + { + return GetInstance().Call(Methods.TagPublishedFile, screenshot, fileId).AsBool(); + } + + public static bool TagUser(uint screenshot, ulong steamId) + { + return GetInstance().Call(Methods.TagUser, screenshot, steamId).AsBool(); + } + + public static void TriggerScreenshot() + { + GetInstance().Call(Methods.TriggerScreenshot); + } + + public static uint WriteScreenshot(byte[] rgb, int width, int height) + { + return GetInstance().Call(Methods.WriteScreenshot, rgb, width, height).AsUInt32(); + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Screenshots.cs.uid b/addons/godotsteam_csharpbindings/Steam.Screenshots.cs.uid new file mode 100644 index 00000000..39188d5e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Screenshots.cs.uid @@ -0,0 +1 @@ +uid://buas4arvbau2m diff --git a/addons/godotsteam_csharpbindings/Steam.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Signals.cs new file mode 100644 index 00000000..cc9cd422 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Signals.cs @@ -0,0 +1,35 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void SteamworksErrorEventHandler(string failedSignal, string iOFailure); + private static event SteamworksErrorEventHandler SteamworksErrorEvent; + static Action _steamworksErrorAction = (failedSignal, iOFailure) => + { + SteamworksErrorEvent?.Invoke(failedSignal, iOFailure); + }; + public static event SteamworksErrorEventHandler SteamworksError + { + add + { + if (SteamworksErrorEvent == null) + { + GetInstance() + .Connect(Signals.SteamworksError, Callable.From(_steamworksErrorAction)); + } + SteamworksErrorEvent += value; + } + remove + { + SteamworksErrorEvent -= value; + if (SteamworksErrorEvent == null) + { + GetInstance() + .Disconnect(Signals.SteamworksError, Callable.From(_steamworksErrorAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Signals.cs.uid new file mode 100644 index 00000000..0f31baad --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Signals.cs.uid @@ -0,0 +1 @@ +uid://b8risj0vfs2x3 diff --git a/addons/godotsteam_csharpbindings/Steam.UGC.Signals.cs b/addons/godotsteam_csharpbindings/Steam.UGC.Signals.cs new file mode 100644 index 00000000..a7260b3b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UGC.Signals.cs @@ -0,0 +1,629 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void AddAppDependencyResultEventHandler(long result, long fileId, uint appId); + private static event AddAppDependencyResultEventHandler AddAppDependencyResultEvent; + static Action _addAppDependencyResultAction = (result, fileId, appId) => + { + AddAppDependencyResultEvent?.Invoke(result, fileId, appId); + }; + public static event AddAppDependencyResultEventHandler AddAppDependencyResult + { + add + { + if (AddAppDependencyResultEvent == null) + { + GetInstance() + .Connect( + Signals.AddAppDependencyResult, + Callable.From(_addAppDependencyResultAction) + ); + } + AddAppDependencyResultEvent += value; + } + remove + { + AddAppDependencyResultEvent -= value; + if (AddAppDependencyResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.AddAppDependencyResult, + Callable.From(_addAppDependencyResultAction) + ); + } + } + } + + public delegate void AddUgcDependencyResultEventHandler(long result, long fileId, long childId); + private static event AddUgcDependencyResultEventHandler AddUgcDependencyResultEvent; + static Action _addUgcDependencyResultAction = (result, fileId, childId) => + { + AddUgcDependencyResultEvent?.Invoke(result, fileId, childId); + }; + public static event AddUgcDependencyResultEventHandler AddUgcDependencyResult + { + add + { + if (AddUgcDependencyResultEvent == null) + { + GetInstance() + .Connect( + Signals.AddUgcDependencyResult, + Callable.From(_addUgcDependencyResultAction) + ); + } + AddUgcDependencyResultEvent += value; + } + remove + { + AddUgcDependencyResultEvent -= value; + if (AddUgcDependencyResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.AddUgcDependencyResult, + Callable.From(_addUgcDependencyResultAction) + ); + } + } + } + + public delegate void ItemCreatedEventHandler(long result, long fileId, bool acceptTos); + private static event ItemCreatedEventHandler ItemCreatedEvent; + static Action _itemCreatedAction = (result, fileId, acceptTos) => + { + ItemCreatedEvent?.Invoke(result, fileId, acceptTos); + }; + public static event ItemCreatedEventHandler ItemCreated + { + add + { + if (ItemCreatedEvent == null) + { + GetInstance().Connect(Signals.ItemCreated, Callable.From(_itemCreatedAction)); + } + ItemCreatedEvent += value; + } + remove + { + ItemCreatedEvent -= value; + if (ItemCreatedEvent == null) + { + GetInstance().Disconnect(Signals.ItemCreated, Callable.From(_itemCreatedAction)); + } + } + } + + public delegate void ItemDownloadedEventHandler(long result, long fileId, uint appId); + private static event ItemDownloadedEventHandler ItemDownloadedEvent; + static Action _itemDownloadedAction = (result, fileId, appId) => + { + ItemDownloadedEvent?.Invoke(result, fileId, appId); + }; + public static event ItemDownloadedEventHandler ItemDownloaded + { + add + { + if (ItemDownloadedEvent == null) + { + GetInstance().Connect(Signals.ItemDownloaded, Callable.From(_itemDownloadedAction)); + } + ItemDownloadedEvent += value; + } + remove + { + ItemDownloadedEvent -= value; + if (ItemDownloadedEvent == null) + { + GetInstance() + .Disconnect(Signals.ItemDownloaded, Callable.From(_itemDownloadedAction)); + } + } + } + + public delegate void GetAppDependenciesResultEventHandler( + long result, + long fileId, + long appDependencies, + long totalAppDependencies + ); + private static event GetAppDependenciesResultEventHandler GetAppDependenciesResultEvent; + static Action _getAppDependenciesResultAction = ( + result, + fileId, + appDependencies, + totalAppDependencies + ) => + { + GetAppDependenciesResultEvent?.Invoke( + result, + fileId, + appDependencies, + totalAppDependencies + ); + }; + public static event GetAppDependenciesResultEventHandler GetAppDependenciesResult + { + add + { + if (GetAppDependenciesResultEvent == null) + { + GetInstance() + .Connect( + Signals.GetAppDependenciesResult, + Callable.From(_getAppDependenciesResultAction) + ); + } + GetAppDependenciesResultEvent += value; + } + remove + { + GetAppDependenciesResultEvent -= value; + if (GetAppDependenciesResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.GetAppDependenciesResult, + Callable.From(_getAppDependenciesResultAction) + ); + } + } + } + + public delegate void ItemDeletedEventHandler(long result, long fileId); + private static event ItemDeletedEventHandler ItemDeletedEvent; + static Action _itemDeletedAction = (result, fileId) => + { + ItemDeletedEvent?.Invoke(result, fileId); + }; + public static event ItemDeletedEventHandler ItemDeleted + { + add + { + if (ItemDeletedEvent == null) + { + GetInstance().Connect(Signals.ItemDeleted, Callable.From(_itemDeletedAction)); + } + ItemDeletedEvent += value; + } + remove + { + ItemDeletedEvent -= value; + if (ItemDeletedEvent == null) + { + GetInstance().Disconnect(Signals.ItemDeleted, Callable.From(_itemDeletedAction)); + } + } + } + + public delegate void GetItemVoteResultEventHandler( + long result, + long fileId, + bool voteUp, + bool voteDown, + bool voteSkipped + ); + private static event GetItemVoteResultEventHandler GetItemVoteResultEvent; + static Action _getItemVoteResultAction = ( + result, + fileId, + voteUp, + voteDown, + voteSkipped + ) => + { + GetItemVoteResultEvent?.Invoke(result, fileId, voteUp, voteDown, voteSkipped); + }; + public static event GetItemVoteResultEventHandler GetItemVoteResult + { + add + { + if (GetItemVoteResultEvent == null) + { + GetInstance() + .Connect(Signals.GetItemVoteResult, Callable.From(_getItemVoteResultAction)); + } + GetItemVoteResultEvent += value; + } + remove + { + GetItemVoteResultEvent -= value; + if (GetItemVoteResultEvent == null) + { + GetInstance() + .Disconnect(Signals.GetItemVoteResult, Callable.From(_getItemVoteResultAction)); + } + } + } + + public delegate void ItemInstalledEventHandler(uint appId, long fileId); + private static event ItemInstalledEventHandler ItemInstalledEvent; + static Action _itemInstalledAction = (appId, fileId) => + { + ItemInstalledEvent?.Invoke(appId, fileId); + }; + public static event ItemInstalledEventHandler ItemInstalled + { + add + { + if (ItemInstalledEvent == null) + { + GetInstance().Connect(Signals.ItemInstalled, Callable.From(_itemInstalledAction)); + } + ItemInstalledEvent += value; + } + remove + { + ItemInstalledEvent -= value; + if (ItemInstalledEvent == null) + { + GetInstance() + .Disconnect(Signals.ItemInstalled, Callable.From(_itemInstalledAction)); + } + } + } + + public delegate void RemoveAppDependencyResultEventHandler( + long result, + long fileId, + uint appId + ); + private static event RemoveAppDependencyResultEventHandler RemoveAppDependencyResultEvent; + static Action _removeAppDependencyResultAction = (result, fileId, appId) => + { + RemoveAppDependencyResultEvent?.Invoke(result, fileId, appId); + }; + public static event RemoveAppDependencyResultEventHandler RemoveAppDependencyResult + { + add + { + if (RemoveAppDependencyResultEvent == null) + { + GetInstance() + .Connect( + Signals.RemoveAppDependencyResult, + Callable.From(_removeAppDependencyResultAction) + ); + } + RemoveAppDependencyResultEvent += value; + } + remove + { + RemoveAppDependencyResultEvent -= value; + if (RemoveAppDependencyResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.RemoveAppDependencyResult, + Callable.From(_removeAppDependencyResultAction) + ); + } + } + } + + public delegate void RemoveUgcDependencyResultEventHandler( + long result, + long fileId, + long childId + ); + private static event RemoveUgcDependencyResultEventHandler RemoveUgcDependencyResultEvent; + static Action _removeUgcDependencyResultAction = (result, fileId, childId) => + { + RemoveUgcDependencyResultEvent?.Invoke(result, fileId, childId); + }; + public static event RemoveUgcDependencyResultEventHandler RemoveUgcDependencyResult + { + add + { + if (RemoveUgcDependencyResultEvent == null) + { + GetInstance() + .Connect( + Signals.RemoveUgcDependencyResult, + Callable.From(_removeUgcDependencyResultAction) + ); + } + RemoveUgcDependencyResultEvent += value; + } + remove + { + RemoveUgcDependencyResultEvent -= value; + if (RemoveUgcDependencyResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.RemoveUgcDependencyResult, + Callable.From(_removeUgcDependencyResultAction) + ); + } + } + } + + public delegate void SetUserItemVoteSignalEventHandler(long result, long fileId, bool voteUp); + private static event SetUserItemVoteSignalEventHandler SetUserItemVoteSignalEvent; + static Action _setUserItemVoteSignalAction = (result, fileId, voteUp) => + { + SetUserItemVoteSignalEvent?.Invoke(result, fileId, voteUp); + }; + public static event SetUserItemVoteSignalEventHandler SetUserItemVoteSignal + { + add + { + if (SetUserItemVoteSignalEvent == null) + { + GetInstance() + .Connect( + Signals.SetUserItemVoteSignal, + Callable.From(_setUserItemVoteSignalAction) + ); + } + SetUserItemVoteSignalEvent += value; + } + remove + { + SetUserItemVoteSignalEvent -= value; + if (SetUserItemVoteSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.SetUserItemVoteSignal, + Callable.From(_setUserItemVoteSignalAction) + ); + } + } + } + + public delegate void StartPlaytimeTrackingSignalEventHandler(long result); + private static event StartPlaytimeTrackingSignalEventHandler StartPlaytimeTrackingSignalEvent; + static Action _startPlaytimeTrackingSignalAction = (result) => + { + StartPlaytimeTrackingSignalEvent?.Invoke(result); + }; + public static event StartPlaytimeTrackingSignalEventHandler StartPlaytimeTrackingSignal + { + add + { + if (StartPlaytimeTrackingSignalEvent == null) + { + GetInstance() + .Connect( + Signals.StartPlaytimeTrackingSignal, + Callable.From(_startPlaytimeTrackingSignalAction) + ); + } + StartPlaytimeTrackingSignalEvent += value; + } + remove + { + StartPlaytimeTrackingSignalEvent -= value; + if (StartPlaytimeTrackingSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.StartPlaytimeTrackingSignal, + Callable.From(_startPlaytimeTrackingSignalAction) + ); + } + } + } + + public delegate void UgcQueryCompletedEventHandler( + long handle, + long result, + long resultsReturned, + long totalMatching, + bool cached + ); + private static event UgcQueryCompletedEventHandler UgcQueryCompletedEvent; + static Action _ugcQueryCompletedAction = ( + handle, + result, + resultsReturned, + totalMatching, + cached + ) => + { + UgcQueryCompletedEvent?.Invoke(handle, result, resultsReturned, totalMatching, cached); + }; + public static event UgcQueryCompletedEventHandler UgcQueryCompleted + { + add + { + if (UgcQueryCompletedEvent == null) + { + GetInstance() + .Connect(Signals.UgcQueryCompleted, Callable.From(_ugcQueryCompletedAction)); + } + UgcQueryCompletedEvent += value; + } + remove + { + UgcQueryCompletedEvent -= value; + if (UgcQueryCompletedEvent == null) + { + GetInstance() + .Disconnect(Signals.UgcQueryCompleted, Callable.From(_ugcQueryCompletedAction)); + } + } + } + + public delegate void StopPlaytimeTrackingSignalEventHandler(long result); + private static event StopPlaytimeTrackingSignalEventHandler StopPlaytimeTrackingSignalEvent; + static Action _stopPlaytimeTrackingSignalAction = (result) => + { + StopPlaytimeTrackingSignalEvent?.Invoke(result); + }; + public static event StopPlaytimeTrackingSignalEventHandler StopPlaytimeTrackingSignal + { + add + { + if (StopPlaytimeTrackingSignalEvent == null) + { + GetInstance() + .Connect( + Signals.StopPlaytimeTrackingSignal, + Callable.From(_stopPlaytimeTrackingSignalAction) + ); + } + StopPlaytimeTrackingSignalEvent += value; + } + remove + { + StopPlaytimeTrackingSignalEvent -= value; + if (StopPlaytimeTrackingSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.StopPlaytimeTrackingSignal, + Callable.From(_stopPlaytimeTrackingSignalAction) + ); + } + } + } + + public delegate void ItemUpdatedEventHandler(long result, bool acceptTos); + private static event ItemUpdatedEventHandler ItemUpdatedEvent; + static Action _itemUpdatedAction = (result, acceptTos) => + { + ItemUpdatedEvent?.Invoke(result, acceptTos); + }; + public static event ItemUpdatedEventHandler ItemUpdated + { + add + { + if (ItemUpdatedEvent == null) + { + GetInstance().Connect(Signals.ItemUpdated, Callable.From(_itemUpdatedAction)); + } + ItemUpdatedEvent += value; + } + remove + { + ItemUpdatedEvent -= value; + if (ItemUpdatedEvent == null) + { + GetInstance().Disconnect(Signals.ItemUpdated, Callable.From(_itemUpdatedAction)); + } + } + } + + public delegate void UserFavoriteItemsListChangedEventHandler( + long result, + long fileId, + bool wasAddRequest + ); + private static event UserFavoriteItemsListChangedEventHandler UserFavoriteItemsListChangedEvent; + static Action _userFavoriteItemsListChangedAction = ( + result, + fileId, + wasAddRequest + ) => + { + UserFavoriteItemsListChangedEvent?.Invoke(result, fileId, wasAddRequest); + }; + public static event UserFavoriteItemsListChangedEventHandler UserFavoriteItemsListChanged + { + add + { + if (UserFavoriteItemsListChangedEvent == null) + { + GetInstance() + .Connect( + Signals.UserFavoriteItemsListChanged, + Callable.From(_userFavoriteItemsListChangedAction) + ); + } + UserFavoriteItemsListChangedEvent += value; + } + remove + { + UserFavoriteItemsListChangedEvent -= value; + if (UserFavoriteItemsListChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.UserFavoriteItemsListChanged, + Callable.From(_userFavoriteItemsListChangedAction) + ); + } + } + } + + public delegate void WorkshopEulaStatusEventHandler( + long result, + uint appId, + Godot.Collections.Dictionary eulaData + ); + private static event WorkshopEulaStatusEventHandler WorkshopEulaStatusEvent; + static Action _workshopEulaStatusAction = ( + result, + appId, + eulaData + ) => + { + WorkshopEulaStatusEvent?.Invoke(result, appId, eulaData); + }; + public static event WorkshopEulaStatusEventHandler WorkshopEulaStatus + { + add + { + if (WorkshopEulaStatusEvent == null) + { + GetInstance() + .Connect(Signals.WorkshopEulaStatus, Callable.From(_workshopEulaStatusAction)); + } + WorkshopEulaStatusEvent += value; + } + remove + { + WorkshopEulaStatusEvent -= value; + if (WorkshopEulaStatusEvent == null) + { + GetInstance() + .Disconnect( + Signals.WorkshopEulaStatus, + Callable.From(_workshopEulaStatusAction) + ); + } + } + } + + public delegate void UserSubscribedItemsListChangedEventHandler(uint appId); + private static event UserSubscribedItemsListChangedEventHandler UserSubscribedItemsListChangedEvent; + static Action _userSubscribedItemsListChangedAction = (appId) => + { + UserSubscribedItemsListChangedEvent?.Invoke(appId); + }; + public static event UserSubscribedItemsListChangedEventHandler UserSubscribedItemsListChanged + { + add + { + if (UserSubscribedItemsListChangedEvent == null) + { + GetInstance() + .Connect( + Signals.UserSubscribedItemsListChanged, + Callable.From(_userSubscribedItemsListChangedAction) + ); + } + UserSubscribedItemsListChangedEvent += value; + } + remove + { + UserSubscribedItemsListChangedEvent -= value; + if (UserSubscribedItemsListChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.UserSubscribedItemsListChanged, + Callable.From(_userSubscribedItemsListChangedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.UGC.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.UGC.Signals.cs.uid new file mode 100644 index 00000000..65214452 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UGC.Signals.cs.uid @@ -0,0 +1 @@ +uid://syr4ofgum21r diff --git a/addons/godotsteam_csharpbindings/Steam.UGC.cs b/addons/godotsteam_csharpbindings/Steam.UGC.cs new file mode 100644 index 00000000..3b46480c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UGC.cs @@ -0,0 +1,668 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static void AddAppDependency(ulong publishedFileId, uint appId) + { + GetInstance().Call(Methods.AddAppDependency, publishedFileId, appId); + } + + public static bool AddContentDescriptor(ulong updateHandle, long descriptorId) + { + return GetInstance() + .Call(Methods.AddContentDescriptor, updateHandle, descriptorId) + .AsBool(); + } + + public static void AddDependency(ulong publishedFileId, long childPublishedFileId) + { + GetInstance().Call(Methods.AddDependency, publishedFileId, childPublishedFileId); + } + + public static bool AddExcludedTag(ulong queryHandle, string tagName) + { + return GetInstance().Call(Methods.AddExcludedTag, queryHandle, tagName).AsBool(); + } + + public static bool AddItemKeyValueTag(ulong queryHandle, string key, string value) + { + return GetInstance().Call(Methods.AddItemKeyValueTag, queryHandle, key, value).AsBool(); + } + + public static bool AddItemPreviewFile( + ulong queryHandle, + string previewFile, + ItemPreviewType type + ) + { + return GetInstance() + .Call(Methods.AddItemPreviewFile, queryHandle, previewFile, (long)type) + .AsBool(); + } + + public static bool AddItemPreviewVideo(ulong queryHandle, string videoId) + { + return GetInstance().Call(Methods.AddItemPreviewVideo, queryHandle, videoId).AsBool(); + } + + public static void AddItemToFavorites(uint appId, long publishedFileId) + { + GetInstance().Call(Methods.AddItemToFavorites, appId, publishedFileId); + } + + public static bool AddRequiredKeyValueTag(ulong queryHandle, string key, string value) + { + return GetInstance().Call(Methods.AddRequiredKeyValueTag, queryHandle, key, value).AsBool(); + } + + public static bool AddRequiredTag(ulong queryHandle, string tagName) + { + return GetInstance().Call(Methods.AddRequiredTag, queryHandle, tagName).AsBool(); + } + + public static bool AddRequiredTagGroup(ulong queryHandle, Godot.Collections.Array tagArray) + { + return GetInstance().Call(Methods.AddRequiredTagGroup, queryHandle, tagArray).AsBool(); + } + + public static bool InitWorkshopForGameServer(long workshopDepotId) + { + return GetInstance().Call(Methods.InitWorkshopForGameServer, workshopDepotId).AsBool(); + } + + public static void CreateItem(uint appId, WorkshopFileType fileType) + { + GetInstance().Call(Methods.CreateItem, appId, (long)fileType); + } + + public static ulong CreateQueryAllUGCRequest( + UgcQuery queryType, + UgcMatchingUgcType matchingType, + uint creatorId, + uint consumerId, + long page + ) + { + return GetInstance() + .Call( + Methods.CreateQueryAllUGCRequest, + (long)queryType, + (long)matchingType, + creatorId, + consumerId, + page + ) + .AsUInt64(); + } + + public static ulong CreateQueryUGCDetailsRequest(Godot.Collections.Array publishedFileId) + { + return GetInstance().Call(Methods.CreateQueryUGCDetailsRequest, publishedFileId).AsUInt64(); + } + + public static ulong CreateQueryUserUGCRequest( + ulong accountId, + UserUgcList listType, + UgcMatchingUgcType matchingUgcType, + UserUgcListSortOrder sortOrder, + uint creatorId, + uint consumerId, + long page + ) + { + return GetInstance() + .Call( + Methods.CreateQueryUserUGCRequest, + accountId, + (long)listType, + (long)matchingUgcType, + (long)sortOrder, + creatorId, + consumerId, + page + ) + .AsUInt64(); + } + + public static void DeleteItem(long publishedFileId) + { + GetInstance().Call(Methods.DeleteItem, publishedFileId); + } + + public static bool DownloadItem(ulong publishedFileId, bool highPriority) + { + return GetInstance().Call(Methods.DownloadItem, publishedFileId, highPriority).AsBool(); + } + + public static Godot.Collections.Dictionary GetItemDownloadInfo(long publishedFileId) + { + return GetInstance().Call(Methods.GetItemDownloadInfo, publishedFileId).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetItemInstallInfo(long publishedFileId) + { + return GetInstance().Call(Methods.GetItemInstallInfo, publishedFileId).AsGodotDictionary(); + } + + public static uint GetItemState(long publishedFileId) + { + return GetInstance().Call(Methods.GetItemState, publishedFileId).AsUInt32(); + } + + public static Godot.Collections.Dictionary GetItemUpdateProgress(long updateHandle) + { + return GetInstance().Call(Methods.GetItemUpdateProgress, updateHandle).AsGodotDictionary(); + } + + public static long GetNumSubscribedItems() + { + return GetInstance().Call(Methods.GetNumSubscribedItems).AsInt64(); + } + + public static Godot.Collections.Dictionary GetQueryUGCAdditionalPreview( + ulong queryHandle, + uint index, + long previewIndex + ) + { + return GetInstance() + .Call(Methods.GetQueryUGCAdditionalPreview, queryHandle, index, previewIndex) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetQueryUGCChildren( + ulong queryHandle, + uint index, + long childCount + ) + { + return GetInstance() + .Call(Methods.GetQueryUGCChildren, queryHandle, index, childCount) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetQueryUGCContentDescriptors( + ulong queryHandle, + uint index, + long maxEntries + ) + { + return GetInstance() + .Call(Methods.GetQueryUGCContentDescriptors, queryHandle, index, maxEntries) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetQueryUGCKeyValueTag( + ulong queryHandle, + uint index, + long keyValueTagIndex + ) + { + return GetInstance() + .Call(Methods.GetQueryUGCKeyValueTag, queryHandle, index, keyValueTagIndex) + .AsGodotDictionary(); + } + + public static string GetQueryUGCMetadata(ulong queryHandle, long index) + { + return GetInstance().Call(Methods.GetQueryUGCMetadata, queryHandle, index).AsString(); + } + + public static uint GetQueryUGCNumAdditionalPreviews(ulong queryHandle, long index) + { + return GetInstance() + .Call(Methods.GetQueryUGCNumAdditionalPreviews, queryHandle, index) + .AsUInt32(); + } + + public static uint GetQueryUGCNumKeyValueTags(ulong queryHandle, long index) + { + return GetInstance() + .Call(Methods.GetQueryUGCNumKeyValueTags, queryHandle, index) + .AsUInt32(); + } + + public static uint GetQueryUGCNumTags(ulong queryHandle, long index) + { + return GetInstance().Call(Methods.GetQueryUGCNumTags, queryHandle, index).AsUInt32(); + } + + public static string GetQueryUGCPreviewURL(ulong queryHandle, long index) + { + return GetInstance().Call(Methods.GetQueryUGCPreviewURL, queryHandle, index).AsString(); + } + + public static Godot.Collections.Dictionary GetQueryUGCResult(ulong queryHandle, long index) + { + return GetInstance() + .Call(Methods.GetQueryUGCResult, queryHandle, index) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetQueryUGCStatistic( + ulong queryHandle, + uint index, + ItemStatistic statType + ) + { + return GetInstance() + .Call(Methods.GetQueryUGCStatistic, queryHandle, index, (long)statType) + .AsGodotDictionary(); + } + + public static string GetQueryUGCTag(ulong queryHandle, uint index, long tagIndex) + { + return GetInstance().Call(Methods.GetQueryUGCTag, queryHandle, index, tagIndex).AsString(); + } + + public static string GetQueryUGCTagDisplayName(ulong queryHandle, uint index, long tagIndex) + { + return GetInstance() + .Call(Methods.GetQueryUGCTagDisplayName, queryHandle, index, tagIndex) + .AsString(); + } + + public static Godot.Collections.Array GetSubscribedItems() + { + return GetInstance().Call(Methods.GetSubscribedItems).AsGodotArray(); + } + + public static Godot.Collections.Array GetUserContentDescriptorPreferences(long maxEntries) + { + return GetInstance() + .Call(Methods.GetUserContentDescriptorPreferences, maxEntries) + .AsGodotArray(); + } + + public static void GetUserItemVote(long publishedFileId) + { + GetInstance().Call(Methods.GetUserItemVote, publishedFileId); + } + + public static bool ReleaseQueryUGCRequest(long queryHandle) + { + return GetInstance().Call(Methods.ReleaseQueryUGCRequest, queryHandle).AsBool(); + } + + public static void RemoveAppDependency(ulong publishedFileId, uint appId) + { + GetInstance().Call(Methods.RemoveAppDependency, publishedFileId, appId); + } + + public static bool RemoveContentDescriptor(ulong updateHandle, long descriptorId) + { + return GetInstance() + .Call(Methods.RemoveContentDescriptor, updateHandle, descriptorId) + .AsBool(); + } + + public static void RemoveDependency(ulong publishedFileId, long childPublishedFileId) + { + GetInstance().Call(Methods.RemoveDependency, publishedFileId, childPublishedFileId); + } + + public static void RemoveItemFromFavorites(uint appId, long publishedFileId) + { + GetInstance().Call(Methods.RemoveItemFromFavorites, appId, publishedFileId); + } + + public static bool RemoveItemKeyValueTags(ulong updateHandle, string key) + { + return GetInstance().Call(Methods.RemoveItemKeyValueTags, updateHandle, key).AsBool(); + } + + public static bool RemoveItemPreview(ulong updateHandle, long index) + { + return GetInstance().Call(Methods.RemoveItemPreview, updateHandle, index).AsBool(); + } + + public static void SendQueryUGCRequest(long updateHandle) + { + GetInstance().Call(Methods.SendQueryUGCRequest, updateHandle); + } + + public static bool SetAllowCachedResponse(ulong updateHandle, long maxAgeSeconds) + { + return GetInstance() + .Call(Methods.SetAllowCachedResponse, updateHandle, maxAgeSeconds) + .AsBool(); + } + + public static bool SetCloudFileNameFilter(ulong updateHandle, string matchCloudFileName) + { + return GetInstance() + .Call(Methods.SetCloudFileNameFilter, updateHandle, matchCloudFileName) + .AsBool(); + } + + public static bool SetItemContent(ulong updateHandle, string contentFolder) + { + return GetInstance().Call(Methods.SetItemContent, updateHandle, contentFolder).AsBool(); + } + + public static bool SetItemDescription(ulong updateHandle, string description) + { + return GetInstance().Call(Methods.SetItemDescription, updateHandle, description).AsBool(); + } + + public static bool SetItemMetadata(ulong updateHandle, string ugcMetadata) + { + return GetInstance().Call(Methods.SetItemMetadata, updateHandle, ugcMetadata).AsBool(); + } + + public static bool SetItemPreview(ulong updateHandle, string previewFile) + { + return GetInstance().Call(Methods.SetItemPreview, updateHandle, previewFile).AsBool(); + } + + public static bool SetItemTags( + ulong updateHandle, + Godot.Collections.Array tagArray, + bool allowAdminTags = false + ) + { + return GetInstance() + .Call(Methods.SetItemTags, updateHandle, tagArray, allowAdminTags) + .AsBool(); + } + + public static bool SetItemTitle(ulong updateHandle, string title) + { + return GetInstance().Call(Methods.SetItemTitle, updateHandle, title).AsBool(); + } + + public static bool SetItemUpdateLanguage(ulong updateHandle, string language) + { + return GetInstance().Call(Methods.SetItemUpdateLanguage, updateHandle, language).AsBool(); + } + + public static bool SetItemVisibility( + ulong updateHandle, + RemoteStoragePublishedFileVisibility visibility + ) + { + return GetInstance() + .Call(Methods.SetItemVisibility, updateHandle, (long)visibility) + .AsBool(); + } + + public static bool SetLanguage(ulong queryHandle, string language) + { + return GetInstance().Call(Methods.SetLanguage, queryHandle, language).AsBool(); + } + + public static bool SetMatchAnyTag(ulong queryHandle, bool matchAnyTag) + { + return GetInstance().Call(Methods.SetMatchAnyTag, queryHandle, matchAnyTag).AsBool(); + } + + public static bool SetRankedByTrendDays(ulong queryHandle, long days) + { + return GetInstance().Call(Methods.SetRankedByTrendDays, queryHandle, days).AsBool(); + } + + public static bool SetReturnAdditionalPreviews(ulong queryHandle, bool returnAdditionalPreviews) + { + return GetInstance() + .Call(Methods.SetReturnAdditionalPreviews, queryHandle, returnAdditionalPreviews) + .AsBool(); + } + + public static bool SetReturnChildren(ulong queryHandle, bool returnChildren) + { + return GetInstance().Call(Methods.SetReturnChildren, queryHandle, returnChildren).AsBool(); + } + + public static bool SetReturnKeyValueTags(ulong queryHandle, bool returnKeyValueTags) + { + return GetInstance() + .Call(Methods.SetReturnKeyValueTags, queryHandle, returnKeyValueTags) + .AsBool(); + } + + public static bool SetReturnLongDescription(ulong queryHandle, bool returnLongDescription) + { + return GetInstance() + .Call(Methods.SetReturnLongDescription, queryHandle, returnLongDescription) + .AsBool(); + } + + public static bool SetReturnMetadata(ulong queryHandle, bool returnMetadata) + { + return GetInstance().Call(Methods.SetReturnMetadata, queryHandle, returnMetadata).AsBool(); + } + + public static bool SetReturnOnlyIDs(ulong queryHandle, bool returnOnlyIds) + { + return GetInstance().Call(Methods.SetReturnOnlyIDs, queryHandle, returnOnlyIds).AsBool(); + } + + public static bool SetReturnPlaytimeStats(ulong queryHandle, long days) + { + return GetInstance().Call(Methods.SetReturnPlaytimeStats, queryHandle, days).AsBool(); + } + + public static bool SetReturnTotalOnly(ulong queryHandle, bool returnTotalOnly) + { + return GetInstance() + .Call(Methods.SetReturnTotalOnly, queryHandle, returnTotalOnly) + .AsBool(); + } + + public static bool SetSearchText(ulong queryHandle, string searchText) + { + return GetInstance().Call(Methods.SetSearchText, queryHandle, searchText).AsBool(); + } + + public static void SetUserItemVote(ulong publishedFileId, bool voteUp) + { + GetInstance().Call(Methods.SetUserItemVote, publishedFileId, voteUp); + } + + public static ulong StartItemUpdate(uint appId, long fileId) + { + return GetInstance().Call(Methods.StartItemUpdate, appId, fileId).AsUInt64(); + } + + public static void StartPlaytimeTracking(Godot.Collections.Array publishedFileIds) + { + GetInstance().Call(Methods.StartPlaytimeTracking, publishedFileIds); + } + + public static void StopPlaytimeTracking(Godot.Collections.Array publishedFileIds) + { + GetInstance().Call(Methods.StopPlaytimeTracking, publishedFileIds); + } + + public static void StopPlaytimeTrackingForAllItems() + { + GetInstance().Call(Methods.StopPlaytimeTrackingForAllItems); + } + + public static void GetAppDependencies(long publishedFileId) + { + GetInstance().Call(Methods.GetAppDependencies, publishedFileId); + } + + public static void SubmitItemUpdate(ulong updateHandle, string changeNote) + { + GetInstance().Call(Methods.SubmitItemUpdate, updateHandle, changeNote); + } + + public static void SubscribeItem(long publishedFileId) + { + GetInstance().Call(Methods.SubscribeItem, publishedFileId); + } + + public static void SuspendDownloads(bool suspend) + { + GetInstance().Call(Methods.SuspendDownloads, suspend); + } + + public static void UnsubscribeItem(long publishedFileId) + { + GetInstance().Call(Methods.UnsubscribeItem, publishedFileId); + } + + public static bool UpdateItemPreviewFile(ulong updateHandle, uint index, string previewFile) + { + return GetInstance() + .Call(Methods.UpdateItemPreviewFile, updateHandle, index, previewFile) + .AsBool(); + } + + public static bool UpdateItemPreviewVideo(ulong updateHandle, uint index, string videoId) + { + return GetInstance() + .Call(Methods.UpdateItemPreviewVideo, updateHandle, index, videoId) + .AsBool(); + } + + public static bool ShowWorkshopEULA() + { + return GetInstance().Call(Methods.ShowWorkshopEULA).AsBool(); + } + + public static void GetWorkshopEULAStatus() + { + GetInstance().Call(Methods.GetWorkshopEULAStatus); + } + + public static bool SetTimeCreatedDateRange(ulong updateHandle, uint start, long end) + { + return GetInstance() + .Call(Methods.SetTimeCreatedDateRange, updateHandle, start, end) + .AsBool(); + } + + public static bool SetTimeUpdatedDateRange(ulong updateHandle, uint start, long end) + { + return GetInstance() + .Call(Methods.SetTimeUpdatedDateRange, updateHandle, start, end) + .AsBool(); + } + + public enum ItemPreviewType : long + { + Image = 0, + YoutubeVideo = 1, + Sketchfab = 2, + EnvironmentmapHorizontalCross = 3, + EnvironmentmapLatLong = 4, + ReservedMax = 255, + } + + [System.Flags] + public enum ItemState : long + { + None = 0, + Subscribed = 1, + LegacyItem = 2, + Installed = 4, + NeedsUpdate = 8, + Downloading = 16, + DownloadPending = 32, + } + + public enum ItemStatistic : long + { + NumSubscriptions = 0, + NumFavorites = 1, + NumFollowers = 2, + NumUniqueSubscriptions = 3, + NumUniqueFavorites = 4, + NumUniqueFollowers = 5, + NumUniqueWebsiteViews = 6, + ReportScore = 7, + NumSecondsPlayed = 8, + NumPlaytimeSessions = 9, + NumComments = 10, + NumSecondsPlayedDuringTimePeriod = 11, + NumPlaytimeSessionsDuringTimePeriod = 12, + } + + public enum ItemUpdateStatus : long + { + Invalid = 0, + PreparingConfig = 1, + PreparingContent = 2, + UploadingContent = 3, + UploadingPreviewFile = 4, + CommittingChanges = 5, + } + + public enum UserUgcList : long + { + Published = 0, + VotedOn = 1, + VotedUp = 2, + VotedDown = 3, + WillVoteLater = 4, + Favorited = 5, + Subscribed = 6, + UsedOrPlayed = 7, + Followed = 8, + } + + public enum UserUgcListSortOrder : long + { + UserugclistsortorderCreationorderdesc = 0, + UserugclistsortorderCreationorderasc = 1, + UserugclistsortorderTitleasc = 2, + UserugclistsortorderLastupdateddesc = 3, + UserugclistsortorderSubscriptiondatedesc = 4, + UserugclistsortorderVotescoredesc = 5, + SerugclistsortorderFormoderation = 6, + } + + public enum UgcQuery : long + { + RankedByVote = 0, + RankedByPublicationDate = 1, + AcceptedForGameRankedByAcceptanceDate = 2, + RankedByTrend = 3, + FavoritedByFriendsRankedByPublicationDate = 4, + CreatedByFriendsRankedByPublicationDate = 5, + RankedByNumTimesReported = 6, + CreatedByFollowedUsersRankedByPublicationDate = 7, + NotYetRated = 8, + RankedByTotalVotesAsc = 9, + RankedByVotesUp = 10, + RankedByTextSearch = 11, + RankedByTotalUniqueSubscriptions = 12, + RankedByPlaytimeTrend = 13, + RankedByTotalPlaytime = 14, + RankedByAveragePlaytimeTrend = 15, + RankedByLifetimeAveragePlaytime = 16, + RankedByPlaytimeSessionsTrend = 17, + RankedByLifetimePlaytimeSessions = 18, + RankedByLastUpdatedDate = 19, + } + + public enum UgcContentDescriptorId : long + { + NudityOrSexualContent = 1, + FrequentViolenceOrGore = 2, + AdultOnlySexualContent = 3, + GratuitousSexualContent = 4, + AnyMatureContent = 5, + } + + public enum UgcMatchingUgcType : long + { + MatchingugctypeItems = 0, + MatchingUgcTypeItemsMtx = 1, + MatchingUgcTypeItemsReadyToUse = 2, + MatchingUgcTypeCollections = 3, + MatchingUgcTypeArtwork = 4, + MatchingUgcTypeVideos = 5, + MatchingUgcTypeScreenshots = 6, + MatchingUgcTypeAllGuides = 7, + MatchingUgcTypeWebGuides = 8, + MatchingUgcTypeIntegratedGuides = 9, + MatchingUgcTypeUsableInGame = 10, + MatchingUgcTypeControllerBindings = 11, + MatchingUgcTypeGameManagedItems = 12, + MatchingUgcTypeAll = -1, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.UGC.cs.uid b/addons/godotsteam_csharpbindings/Steam.UGC.cs.uid new file mode 100644 index 00000000..48248ebe --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UGC.cs.uid @@ -0,0 +1 @@ +uid://bf0suxxpxh6yw diff --git a/addons/godotsteam_csharpbindings/Steam.User.Signals.cs b/addons/godotsteam_csharpbindings/Steam.User.Signals.cs new file mode 100644 index 00000000..14570189 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.User.Signals.cs @@ -0,0 +1,492 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void DurationControlEventHandler( + long result, + Godot.Collections.Dictionary duration + ); + private static event DurationControlEventHandler DurationControlEvent; + static Action _durationControlAction = (result, duration) => + { + DurationControlEvent?.Invoke(result, duration); + }; + public static event DurationControlEventHandler DurationControl + { + add + { + if (DurationControlEvent == null) + { + GetInstance() + .Connect(Signals.DurationControl, Callable.From(_durationControlAction)); + } + DurationControlEvent += value; + } + remove + { + DurationControlEvent -= value; + if (DurationControlEvent == null) + { + GetInstance() + .Disconnect(Signals.DurationControl, Callable.From(_durationControlAction)); + } + } + } + + public delegate void ClientGameServerDenyEventHandler( + uint appId, + string iP, + long serverPort, + long secure, + long reason + ); + private static event ClientGameServerDenyEventHandler ClientGameServerDenyEvent; + static Action _clientGameServerDenyAction = ( + appId, + iP, + serverPort, + secure, + reason + ) => + { + ClientGameServerDenyEvent?.Invoke(appId, iP, serverPort, secure, reason); + }; + public static event ClientGameServerDenyEventHandler ClientGameServerDeny + { + add + { + if (ClientGameServerDenyEvent == null) + { + GetInstance() + .Connect( + Signals.ClientGameServerDeny, + Callable.From(_clientGameServerDenyAction) + ); + } + ClientGameServerDenyEvent += value; + } + remove + { + ClientGameServerDenyEvent -= value; + if (ClientGameServerDenyEvent == null) + { + GetInstance() + .Disconnect( + Signals.ClientGameServerDeny, + Callable.From(_clientGameServerDenyAction) + ); + } + } + } + + public delegate void EncryptedAppTicketResponseEventHandler(string result); + private static event EncryptedAppTicketResponseEventHandler EncryptedAppTicketResponseEvent; + static Action _encryptedAppTicketResponseAction = (result) => + { + EncryptedAppTicketResponseEvent?.Invoke(result); + }; + public static event EncryptedAppTicketResponseEventHandler EncryptedAppTicketResponse + { + add + { + if (EncryptedAppTicketResponseEvent == null) + { + GetInstance() + .Connect( + Signals.EncryptedAppTicketResponse, + Callable.From(_encryptedAppTicketResponseAction) + ); + } + EncryptedAppTicketResponseEvent += value; + } + remove + { + EncryptedAppTicketResponseEvent -= value; + if (EncryptedAppTicketResponseEvent == null) + { + GetInstance() + .Disconnect( + Signals.EncryptedAppTicketResponse, + Callable.From(_encryptedAppTicketResponseAction) + ); + } + } + } + + public delegate void GameWebCallbackEventHandler(string url); + private static event GameWebCallbackEventHandler GameWebCallbackEvent; + static Action _gameWebCallbackAction = (url) => + { + GameWebCallbackEvent?.Invoke(url); + }; + public static event GameWebCallbackEventHandler GameWebCallback + { + add + { + if (GameWebCallbackEvent == null) + { + GetInstance() + .Connect(Signals.GameWebCallback, Callable.From(_gameWebCallbackAction)); + } + GameWebCallbackEvent += value; + } + remove + { + GameWebCallbackEvent -= value; + if (GameWebCallbackEvent == null) + { + GetInstance() + .Disconnect(Signals.GameWebCallback, Callable.From(_gameWebCallbackAction)); + } + } + } + + public delegate void GetAuthSessionTicketResponseEventHandler(long authTicket, long result); + private static event GetAuthSessionTicketResponseEventHandler GetAuthSessionTicketResponseEvent; + static Action _getAuthSessionTicketResponseAction = (authTicket, result) => + { + GetAuthSessionTicketResponseEvent?.Invoke(authTicket, result); + }; + public static event GetAuthSessionTicketResponseEventHandler GetAuthSessionTicketResponse + { + add + { + if (GetAuthSessionTicketResponseEvent == null) + { + GetInstance() + .Connect( + Signals.GetAuthSessionTicketResponse, + Callable.From(_getAuthSessionTicketResponseAction) + ); + } + GetAuthSessionTicketResponseEvent += value; + } + remove + { + GetAuthSessionTicketResponseEvent -= value; + if (GetAuthSessionTicketResponseEvent == null) + { + GetInstance() + .Disconnect( + Signals.GetAuthSessionTicketResponse, + Callable.From(_getAuthSessionTicketResponseAction) + ); + } + } + } + + public delegate void GetTicketForWebApiEventHandler( + long authTicket, + long result, + long ticketSize, + Godot.Collections.Array ticketBuffer + ); + private static event GetTicketForWebApiEventHandler GetTicketForWebApiEvent; + static Action _getTicketForWebApiAction = ( + authTicket, + result, + ticketSize, + ticketBuffer + ) => + { + GetTicketForWebApiEvent?.Invoke(authTicket, result, ticketSize, ticketBuffer); + }; + public static event GetTicketForWebApiEventHandler GetTicketForWebApi + { + add + { + if (GetTicketForWebApiEvent == null) + { + GetInstance() + .Connect(Signals.GetTicketForWebApi, Callable.From(_getTicketForWebApiAction)); + } + GetTicketForWebApiEvent += value; + } + remove + { + GetTicketForWebApiEvent -= value; + if (GetTicketForWebApiEvent == null) + { + GetInstance() + .Disconnect( + Signals.GetTicketForWebApi, + Callable.From(_getTicketForWebApiAction) + ); + } + } + } + + public delegate void IpcFailureEventHandler(long type); + private static event IpcFailureEventHandler IpcFailureEvent; + static Action _ipcFailureAction = (type) => + { + IpcFailureEvent?.Invoke(type); + }; + public static event IpcFailureEventHandler IpcFailure + { + add + { + if (IpcFailureEvent == null) + { + GetInstance().Connect(Signals.IpcFailure, Callable.From(_ipcFailureAction)); + } + IpcFailureEvent += value; + } + remove + { + IpcFailureEvent -= value; + if (IpcFailureEvent == null) + { + GetInstance().Disconnect(Signals.IpcFailure, Callable.From(_ipcFailureAction)); + } + } + } + + private static event Action LicensesUpdatedEvent; + static Action _licensesUpdatedAction = () => + { + LicensesUpdatedEvent?.Invoke(); + }; + public static event Action LicensesUpdated + { + add + { + if (LicensesUpdatedEvent == null) + { + GetInstance() + .Connect(Signals.LicensesUpdated, Callable.From(_licensesUpdatedAction)); + } + LicensesUpdatedEvent += value; + } + remove + { + LicensesUpdatedEvent -= value; + if (LicensesUpdatedEvent == null) + { + GetInstance() + .Disconnect(Signals.LicensesUpdated, Callable.From(_licensesUpdatedAction)); + } + } + } + + public delegate void MicrotransactionAuthResponseEventHandler( + uint appId, + long orderId, + bool authorized + ); + private static event MicrotransactionAuthResponseEventHandler MicrotransactionAuthResponseEvent; + static Action _microtransactionAuthResponseAction = ( + appId, + orderId, + authorized + ) => + { + MicrotransactionAuthResponseEvent?.Invoke(appId, orderId, authorized); + }; + public static event MicrotransactionAuthResponseEventHandler MicrotransactionAuthResponse + { + add + { + if (MicrotransactionAuthResponseEvent == null) + { + GetInstance() + .Connect( + Signals.MicrotransactionAuthResponse, + Callable.From(_microtransactionAuthResponseAction) + ); + } + MicrotransactionAuthResponseEvent += value; + } + remove + { + MicrotransactionAuthResponseEvent -= value; + if (MicrotransactionAuthResponseEvent == null) + { + GetInstance() + .Disconnect( + Signals.MicrotransactionAuthResponse, + Callable.From(_microtransactionAuthResponseAction) + ); + } + } + } + + public delegate void SteamServerConnectFailedEventHandler(long result, bool retrying); + private static event SteamServerConnectFailedEventHandler SteamServerConnectFailedEvent; + static Action _steamServerConnectFailedAction = (result, retrying) => + { + SteamServerConnectFailedEvent?.Invoke(result, retrying); + }; + public static event SteamServerConnectFailedEventHandler SteamServerConnectFailed + { + add + { + if (SteamServerConnectFailedEvent == null) + { + GetInstance() + .Connect( + Signals.SteamServerConnectFailed, + Callable.From(_steamServerConnectFailedAction) + ); + } + SteamServerConnectFailedEvent += value; + } + remove + { + SteamServerConnectFailedEvent -= value; + if (SteamServerConnectFailedEvent == null) + { + GetInstance() + .Disconnect( + Signals.SteamServerConnectFailed, + Callable.From(_steamServerConnectFailedAction) + ); + } + } + } + + private static event Action SteamServerConnectedEvent; + static Action _steamServerConnectedAction = () => + { + SteamServerConnectedEvent?.Invoke(); + }; + public static event Action SteamServerConnected + { + add + { + if (SteamServerConnectedEvent == null) + { + GetInstance() + .Connect( + Signals.SteamServerConnected, + Callable.From(_steamServerConnectedAction) + ); + } + SteamServerConnectedEvent += value; + } + remove + { + SteamServerConnectedEvent -= value; + if (SteamServerConnectedEvent == null) + { + GetInstance() + .Disconnect( + Signals.SteamServerConnected, + Callable.From(_steamServerConnectedAction) + ); + } + } + } + + private static event Action SteamServerDisconnectedEvent; + static Action _steamServerDisconnectedAction = () => + { + SteamServerDisconnectedEvent?.Invoke(); + }; + public static event Action SteamServerDisconnected + { + add + { + if (SteamServerDisconnectedEvent == null) + { + GetInstance() + .Connect( + Signals.SteamServerDisconnected, + Callable.From(_steamServerDisconnectedAction) + ); + } + SteamServerDisconnectedEvent += value; + } + remove + { + SteamServerDisconnectedEvent -= value; + if (SteamServerDisconnectedEvent == null) + { + GetInstance() + .Disconnect( + Signals.SteamServerDisconnected, + Callable.From(_steamServerDisconnectedAction) + ); + } + } + } + + public delegate void StoreAuthUrlResponseEventHandler(string url); + private static event StoreAuthUrlResponseEventHandler StoreAuthUrlResponseEvent; + static Action _storeAuthUrlResponseAction = (url) => + { + StoreAuthUrlResponseEvent?.Invoke(url); + }; + public static event StoreAuthUrlResponseEventHandler StoreAuthUrlResponse + { + add + { + if (StoreAuthUrlResponseEvent == null) + { + GetInstance() + .Connect( + Signals.StoreAuthUrlResponse, + Callable.From(_storeAuthUrlResponseAction) + ); + } + StoreAuthUrlResponseEvent += value; + } + remove + { + StoreAuthUrlResponseEvent -= value; + if (StoreAuthUrlResponseEvent == null) + { + GetInstance() + .Disconnect( + Signals.StoreAuthUrlResponse, + Callable.From(_storeAuthUrlResponseAction) + ); + } + } + } + + public delegate void ValidateAuthTicketResponseEventHandler( + long authId, + long response, + long ownerId + ); + private static event ValidateAuthTicketResponseEventHandler ValidateAuthTicketResponseEvent; + static Action _validateAuthTicketResponseAction = ( + authId, + response, + ownerId + ) => + { + ValidateAuthTicketResponseEvent?.Invoke(authId, response, ownerId); + }; + public static event ValidateAuthTicketResponseEventHandler ValidateAuthTicketResponse + { + add + { + if (ValidateAuthTicketResponseEvent == null) + { + GetInstance() + .Connect( + Signals.ValidateAuthTicketResponse, + Callable.From(_validateAuthTicketResponseAction) + ); + } + ValidateAuthTicketResponseEvent += value; + } + remove + { + ValidateAuthTicketResponseEvent -= value; + if (ValidateAuthTicketResponseEvent == null) + { + GetInstance() + .Disconnect( + Signals.ValidateAuthTicketResponse, + Callable.From(_validateAuthTicketResponseAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.User.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.User.Signals.cs.uid new file mode 100644 index 00000000..5bef8f8d --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.User.Signals.cs.uid @@ -0,0 +1 @@ +uid://bxyhx18lnjd12 diff --git a/addons/godotsteam_csharpbindings/Steam.User.cs b/addons/godotsteam_csharpbindings/Steam.User.cs new file mode 100644 index 00000000..87c35540 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.User.cs @@ -0,0 +1,191 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static void AdvertiseGame(string serverIP, long port) + { + GetInstance().Call(Methods.AdvertiseGame, serverIP, port); + } + + public static BeginAuthSessionResult BeginAuthSession( + byte[] ticket, + int ticketSize, + ulong steamId + ) + { + return (BeginAuthSessionResult) + GetInstance().Call(Methods.BeginAuthSession, ticket, ticketSize, steamId).AsInt64(); + } + + public static void CancelAuthTicket(long authTicket) + { + GetInstance().Call(Methods.CancelAuthTicket, authTicket); + } + + public static Godot.Collections.Dictionary DecompressVoice( + byte[] voice, + uint voiceSize, + long sampleRate + ) + { + return GetInstance() + .Call(Methods.DecompressVoice, voice, voiceSize, sampleRate) + .AsGodotDictionary(); + } + + public static void EndAuthSession(ulong steamId) + { + GetInstance().Call(Methods.EndAuthSession, steamId); + } + + public static Godot.Collections.Dictionary GetAuthSessionTicket(string identityReference = "") + { + return GetInstance() + .Call(Methods.GetAuthSessionTicket, identityReference) + .AsGodotDictionary(); + } + + public static uint GetAuthTicketForWebApi(string identityReference = "") + { + return GetInstance().Call(Methods.GetAuthTicketForWebApi, identityReference).AsUInt32(); + } + + public static Godot.Collections.Dictionary GetAvailableVoice() + { + return GetInstance().Call(Methods.GetAvailableVoice).AsGodotDictionary(); + } + + public static void GetDurationControl() + { + GetInstance().Call(Methods.GetDurationControl); + } + + public static Godot.Collections.Dictionary GetEncryptedAppTicket() + { + return GetInstance().Call(Methods.GetEncryptedAppTicket).AsGodotDictionary(); + } + + public static int GetGameBadgeLevel(int series, bool foil) + { + return GetInstance().Call(Methods.GetGameBadgeLevel, series, foil).AsInt32(); + } + + public static Godot.Collections.Dictionary GetVoice() + { + return GetInstance().Call(Methods.GetVoice).AsGodotDictionary(); + } + + public static long GetVoiceOptimalSampleRate() + { + return GetInstance().Call(Methods.GetVoiceOptimalSampleRate).AsInt64(); + } + + public static Godot.Collections.Dictionary InitiateGameConnection( + ulong serverId, + uint serverIP, + int serverPort, + bool secure + ) + { + return GetInstance() + .Call(Methods.InitiateGameConnection, serverId, serverIP, serverPort, secure) + .AsGodotDictionary(); + } + + public static bool IsBehindNAT() + { + return GetInstance().Call(Methods.IsBehindNAT).AsBool(); + } + + public static bool IsPhoneIdentifying() + { + return GetInstance().Call(Methods.IsPhoneIdentifying).AsBool(); + } + + public static bool IsPhoneRequiringVerification() + { + return GetInstance().Call(Methods.IsPhoneRequiringVerification).AsBool(); + } + + public static bool IsPhoneVerified() + { + return GetInstance().Call(Methods.IsPhoneVerified).AsBool(); + } + + public static bool IsTwoFactorEnabled() + { + return GetInstance().Call(Methods.IsTwoFactorEnabled).AsBool(); + } + + public static bool LoggedOn() + { + return GetInstance().Call(Methods.LoggedOn).AsBool(); + } + + public static void RequestEncryptedAppTicket(string secret) + { + GetInstance().Call(Methods.RequestEncryptedAppTicket, secret); + } + + public static void RequestStoreAuthURL(string redirect) + { + GetInstance().Call(Methods.RequestStoreAuthURL, redirect); + } + + public static void StartVoiceRecording() + { + GetInstance().Call(Methods.StartVoiceRecording); + } + + public static bool SetDurationControlOnlineState(long newState) + { + return GetInstance().Call(Methods.SetDurationControlOnlineState, newState).AsBool(); + } + + public static void StopVoiceRecording() + { + GetInstance().Call(Methods.StopVoiceRecording); + } + + public static void TerminateGameConnection(uint serverIP, long serverPort) + { + GetInstance().Call(Methods.TerminateGameConnection, serverIP, serverPort); + } + + public static int UserHasLicenseForApp(ulong steamId, uint appId) + { + return GetInstance().Call(Methods.UserHasLicenseForApp, steamId, appId).AsInt32(); + } + + public static ulong GetSteamID() + { + return GetInstance().Call(Methods.GetSteamID).AsUInt64(); + } + + public static int GetPlayerSteamLevel() + { + return GetInstance().Call(Methods.GetPlayerSteamLevel).AsInt32(); + } + + public enum DurationControlProgress : long + { + ProgressFull = 0, + ProgressHalf = 1, + ProgressNone = 2, + ExitSoon3H = 3, + ExitSoon5H = 4, + ExitSoonNight = 5, + } + + public enum DurationControlNotification : long + { + None = 0, + Notification1Hour = 1, + Notification3Hours = 2, + HalfProgress = 3, + NoProgress = 4, + ExitSoon3H = 5, + ExitSoon5H = 6, + ExitSoonNight = 7, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.User.cs.uid b/addons/godotsteam_csharpbindings/Steam.User.cs.uid new file mode 100644 index 00000000..331fd94a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.User.cs.uid @@ -0,0 +1 @@ +uid://caend1w4huijt diff --git a/addons/godotsteam_csharpbindings/Steam.UserStats.Signals.cs b/addons/godotsteam_csharpbindings/Steam.UserStats.Signals.cs new file mode 100644 index 00000000..04261368 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UserStats.Signals.cs @@ -0,0 +1,423 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void GlobalAchievementPercentagesReadyEventHandler(long gameId, long result); + private static event GlobalAchievementPercentagesReadyEventHandler GlobalAchievementPercentagesReadyEvent; + static Action _globalAchievementPercentagesReadyAction = (gameId, result) => + { + GlobalAchievementPercentagesReadyEvent?.Invoke(gameId, result); + }; + public static event GlobalAchievementPercentagesReadyEventHandler GlobalAchievementPercentagesReady + { + add + { + if (GlobalAchievementPercentagesReadyEvent == null) + { + GetInstance() + .Connect( + Signals.GlobalAchievementPercentagesReady, + Callable.From(_globalAchievementPercentagesReadyAction) + ); + } + GlobalAchievementPercentagesReadyEvent += value; + } + remove + { + GlobalAchievementPercentagesReadyEvent -= value; + if (GlobalAchievementPercentagesReadyEvent == null) + { + GetInstance() + .Disconnect( + Signals.GlobalAchievementPercentagesReady, + Callable.From(_globalAchievementPercentagesReadyAction) + ); + } + } + } + + public delegate void GlobalStatsReceivedEventHandler(long gameId, string result); + private static event GlobalStatsReceivedEventHandler GlobalStatsReceivedEvent; + static Action _globalStatsReceivedAction = (gameId, result) => + { + GlobalStatsReceivedEvent?.Invoke(gameId, result); + }; + public static event GlobalStatsReceivedEventHandler GlobalStatsReceived + { + add + { + if (GlobalStatsReceivedEvent == null) + { + GetInstance() + .Connect( + Signals.GlobalStatsReceived, + Callable.From(_globalStatsReceivedAction) + ); + } + GlobalStatsReceivedEvent += value; + } + remove + { + GlobalStatsReceivedEvent -= value; + if (GlobalStatsReceivedEvent == null) + { + GetInstance() + .Disconnect( + Signals.GlobalStatsReceived, + Callable.From(_globalStatsReceivedAction) + ); + } + } + } + + public delegate void LeaderboardFindResultEventHandler(long leaderboardHandle, long found); + private static event LeaderboardFindResultEventHandler LeaderboardFindResultEvent; + static Action _leaderboardFindResultAction = (leaderboardHandle, found) => + { + LeaderboardFindResultEvent?.Invoke(leaderboardHandle, found); + }; + public static event LeaderboardFindResultEventHandler LeaderboardFindResult + { + add + { + if (LeaderboardFindResultEvent == null) + { + GetInstance() + .Connect( + Signals.LeaderboardFindResult, + Callable.From(_leaderboardFindResultAction) + ); + } + LeaderboardFindResultEvent += value; + } + remove + { + LeaderboardFindResultEvent -= value; + if (LeaderboardFindResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.LeaderboardFindResult, + Callable.From(_leaderboardFindResultAction) + ); + } + } + } + + public delegate void LeaderboardScoresDownloadedEventHandler( + string message, + Godot.Collections.Array leaderboardEntries + ); + private static event LeaderboardScoresDownloadedEventHandler LeaderboardScoresDownloadedEvent; + static Action _leaderboardScoresDownloadedAction = ( + message, + leaderboardEntries + ) => + { + LeaderboardScoresDownloadedEvent?.Invoke(message, leaderboardEntries); + }; + public static event LeaderboardScoresDownloadedEventHandler LeaderboardScoresDownloaded + { + add + { + if (LeaderboardScoresDownloadedEvent == null) + { + GetInstance() + .Connect( + Signals.LeaderboardScoresDownloaded, + Callable.From(_leaderboardScoresDownloadedAction) + ); + } + LeaderboardScoresDownloadedEvent += value; + } + remove + { + LeaderboardScoresDownloadedEvent -= value; + if (LeaderboardScoresDownloadedEvent == null) + { + GetInstance() + .Disconnect( + Signals.LeaderboardScoresDownloaded, + Callable.From(_leaderboardScoresDownloadedAction) + ); + } + } + } + + public delegate void LeaderboardScoreUploadedEventHandler( + bool success, + long thisHandle, + Godot.Collections.Dictionary thisScore + ); + private static event LeaderboardScoreUploadedEventHandler LeaderboardScoreUploadedEvent; + static Action _leaderboardScoreUploadedAction = ( + success, + thisHandle, + thisScore + ) => + { + LeaderboardScoreUploadedEvent?.Invoke(success, thisHandle, thisScore); + }; + public static event LeaderboardScoreUploadedEventHandler LeaderboardScoreUploaded + { + add + { + if (LeaderboardScoreUploadedEvent == null) + { + GetInstance() + .Connect( + Signals.LeaderboardScoreUploaded, + Callable.From(_leaderboardScoreUploadedAction) + ); + } + LeaderboardScoreUploadedEvent += value; + } + remove + { + LeaderboardScoreUploadedEvent -= value; + if (LeaderboardScoreUploadedEvent == null) + { + GetInstance() + .Disconnect( + Signals.LeaderboardScoreUploaded, + Callable.From(_leaderboardScoreUploadedAction) + ); + } + } + } + + public delegate void LeaderboardUgcSetEventHandler(long leaderboardHandle, string result); + private static event LeaderboardUgcSetEventHandler LeaderboardUgcSetEvent; + static Action _leaderboardUgcSetAction = (leaderboardHandle, result) => + { + LeaderboardUgcSetEvent?.Invoke(leaderboardHandle, result); + }; + public static event LeaderboardUgcSetEventHandler LeaderboardUgcSet + { + add + { + if (LeaderboardUgcSetEvent == null) + { + GetInstance() + .Connect(Signals.LeaderboardUgcSet, Callable.From(_leaderboardUgcSetAction)); + } + LeaderboardUgcSetEvent += value; + } + remove + { + LeaderboardUgcSetEvent -= value; + if (LeaderboardUgcSetEvent == null) + { + GetInstance() + .Disconnect(Signals.LeaderboardUgcSet, Callable.From(_leaderboardUgcSetAction)); + } + } + } + + public delegate void NumberOfCurrentPlayersEventHandler(long success, long players); + private static event NumberOfCurrentPlayersEventHandler NumberOfCurrentPlayersEvent; + static Action _numberOfCurrentPlayersAction = (success, players) => + { + NumberOfCurrentPlayersEvent?.Invoke(success, players); + }; + public static event NumberOfCurrentPlayersEventHandler NumberOfCurrentPlayers + { + add + { + if (NumberOfCurrentPlayersEvent == null) + { + GetInstance() + .Connect( + Signals.NumberOfCurrentPlayers, + Callable.From(_numberOfCurrentPlayersAction) + ); + } + NumberOfCurrentPlayersEvent += value; + } + remove + { + NumberOfCurrentPlayersEvent -= value; + if (NumberOfCurrentPlayersEvent == null) + { + GetInstance() + .Disconnect( + Signals.NumberOfCurrentPlayers, + Callable.From(_numberOfCurrentPlayersAction) + ); + } + } + } + + public delegate void UserAchievementStoredEventHandler( + long gameId, + bool groupAchieve, + string achievementName, + long currentProgress, + long maxProgress + ); + private static event UserAchievementStoredEventHandler UserAchievementStoredEvent; + static Action _userAchievementStoredAction = ( + gameId, + groupAchieve, + achievementName, + currentProgress, + maxProgress + ) => + { + UserAchievementStoredEvent?.Invoke( + gameId, + groupAchieve, + achievementName, + currentProgress, + maxProgress + ); + }; + public static event UserAchievementStoredEventHandler UserAchievementStored + { + add + { + if (UserAchievementStoredEvent == null) + { + GetInstance() + .Connect( + Signals.UserAchievementStored, + Callable.From(_userAchievementStoredAction) + ); + } + UserAchievementStoredEvent += value; + } + remove + { + UserAchievementStoredEvent -= value; + if (UserAchievementStoredEvent == null) + { + GetInstance() + .Disconnect( + Signals.UserAchievementStored, + Callable.From(_userAchievementStoredAction) + ); + } + } + } + + public delegate void CurrentStatsReceivedEventHandler(long gameId, long result, long userId); + private static event CurrentStatsReceivedEventHandler CurrentStatsReceivedEvent; + static Action _currentStatsReceivedAction = (gameId, result, userId) => + { + CurrentStatsReceivedEvent?.Invoke(gameId, result, userId); + }; + public static event CurrentStatsReceivedEventHandler CurrentStatsReceived + { + add + { + if (CurrentStatsReceivedEvent == null) + { + GetInstance() + .Connect( + Signals.CurrentStatsReceived, + Callable.From(_currentStatsReceivedAction) + ); + } + CurrentStatsReceivedEvent += value; + } + remove + { + CurrentStatsReceivedEvent -= value; + if (CurrentStatsReceivedEvent == null) + { + GetInstance() + .Disconnect( + Signals.CurrentStatsReceived, + Callable.From(_currentStatsReceivedAction) + ); + } + } + } + + public delegate void UserStatsReceivedEventHandler(long gameId, long result, long userId); + private static event UserStatsReceivedEventHandler UserStatsReceivedEvent; + static Action _userStatsReceivedAction = (gameId, result, userId) => + { + UserStatsReceivedEvent?.Invoke(gameId, result, userId); + }; + public static event UserStatsReceivedEventHandler UserStatsReceived + { + add + { + if (UserStatsReceivedEvent == null) + { + GetInstance() + .Connect(Signals.UserStatsReceived, Callable.From(_userStatsReceivedAction)); + } + UserStatsReceivedEvent += value; + } + remove + { + UserStatsReceivedEvent -= value; + if (UserStatsReceivedEvent == null) + { + GetInstance() + .Disconnect(Signals.UserStatsReceived, Callable.From(_userStatsReceivedAction)); + } + } + } + + public delegate void UserStatsStoredEventHandler(long gameId, long result); + private static event UserStatsStoredEventHandler UserStatsStoredEvent; + static Action _userStatsStoredAction = (gameId, result) => + { + UserStatsStoredEvent?.Invoke(gameId, result); + }; + public static event UserStatsStoredEventHandler UserStatsStored + { + add + { + if (UserStatsStoredEvent == null) + { + GetInstance() + .Connect(Signals.UserStatsStored, Callable.From(_userStatsStoredAction)); + } + UserStatsStoredEvent += value; + } + remove + { + UserStatsStoredEvent -= value; + if (UserStatsStoredEvent == null) + { + GetInstance() + .Disconnect(Signals.UserStatsStored, Callable.From(_userStatsStoredAction)); + } + } + } + + public delegate void UserStatsUnloadedEventHandler(long userId); + private static event UserStatsUnloadedEventHandler UserStatsUnloadedEvent; + static Action _userStatsUnloadedAction = (userId) => + { + UserStatsUnloadedEvent?.Invoke(userId); + }; + public static event UserStatsUnloadedEventHandler UserStatsUnloaded + { + add + { + if (UserStatsUnloadedEvent == null) + { + GetInstance() + .Connect(Signals.UserStatsUnloaded, Callable.From(_userStatsUnloadedAction)); + } + UserStatsUnloadedEvent += value; + } + remove + { + UserStatsUnloadedEvent -= value; + if (UserStatsUnloadedEvent == null) + { + GetInstance() + .Disconnect(Signals.UserStatsUnloaded, Callable.From(_userStatsUnloadedAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.UserStats.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.UserStats.Signals.cs.uid new file mode 100644 index 00000000..9b45e07b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UserStats.Signals.cs.uid @@ -0,0 +1 @@ +uid://w4o7jlpei2u2 diff --git a/addons/godotsteam_csharpbindings/Steam.UserStats.cs b/addons/godotsteam_csharpbindings/Steam.UserStats.cs new file mode 100644 index 00000000..d0dfc0a7 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UserStats.cs @@ -0,0 +1,332 @@ +using System; + +namespace GodotSteam; + +public static partial class Steam +{ + public static void AttachLeaderboardUGC(ulong ugcHandle, long thisLeaderboard = 0) + { + GetInstance().Call(Methods.AttachLeaderboardUGC, ugcHandle, thisLeaderboard); + } + + public static bool ClearAchievement(string achievementName) + { + return GetInstance().Call(Methods.ClearAchievement, achievementName).AsBool(); + } + + public static void DownloadLeaderboardEntries( + int start, + int end, + LeaderboardDataRequest type = 0, + long thisLeaderboard = 0 + ) + { + GetInstance() + .Call(Methods.DownloadLeaderboardEntries, start, end, (long)type, thisLeaderboard); + } + + public static void DownloadLeaderboardEntriesForUsers( + Godot.Collections.Array usersId, + long thisLeaderboard = 0 + ) + { + GetInstance().Call(Methods.DownloadLeaderboardEntriesForUsers, usersId, thisLeaderboard); + } + + public static void FindLeaderboard(string leaderboardName) + { + GetInstance().Call(Methods.FindLeaderboard, leaderboardName); + } + + public static void FindOrCreateLeaderboard( + string leaderboardName, + LeaderboardSortMethod sortMethod, + LeaderboardDisplayType displayType + ) + { + GetInstance() + .Call( + Methods.FindOrCreateLeaderboard, + leaderboardName, + (long)sortMethod, + (long)displayType + ); + } + + public static Godot.Collections.Dictionary GetAchievement(string achievementName) + { + return GetInstance().Call(Methods.GetAchievement, achievementName).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetAchievementAchievedPercent(string achievementName) + { + return GetInstance() + .Call(Methods.GetAchievementAchievedPercent, achievementName) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetAchievementAndUnlockTime(string achievementName) + { + return GetInstance() + .Call(Methods.GetAchievementAndUnlockTime, achievementName) + .AsGodotDictionary(); + } + + public static string GetAchievementDisplayAttribute(string achievementName, string key) + { + return GetInstance() + .Call(Methods.GetAchievementDisplayAttribute, achievementName, key) + .AsString(); + } + + public static int GetAchievementIcon(string achievementName) + { + return GetInstance().Call(Methods.GetAchievementIcon, achievementName).AsInt32(); + } + + public static string GetAchievementName(long achievement) + { + return GetInstance().Call(Methods.GetAchievementName, achievement).AsString(); + } + + public static Godot.Collections.Dictionary GetAchievementProgressLimitsInt( + string achievementName + ) + { + return GetInstance() + .Call(Methods.GetAchievementProgressLimitsInt, achievementName) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetAchievementProgressLimitsFloat( + string achievementName + ) + { + return GetInstance() + .Call(Methods.GetAchievementProgressLimitsFloat, achievementName) + .AsGodotDictionary(); + } + + public static ulong GetGlobalStatInt(string statName) + { + return GetInstance().Call(Methods.GetGlobalStatInt, statName).AsUInt64(); + } + + public static double GetGlobalStatFloat(string statName) + { + return GetInstance().Call(Methods.GetGlobalStatFloat, statName).AsDouble(); + } + + public static ulong GetGlobalStatIntHistory(string statName) + { + return GetInstance().Call(Methods.GetGlobalStatIntHistory, statName).AsUInt64(); + } + + public static double GetGlobalStatFloatHistory(string statName) + { + return GetInstance().Call(Methods.GetGlobalStatFloatHistory, statName).AsDouble(); + } + + public static Godot.Collections.Dictionary GetLeaderboardDisplayType(long thisLeaderboard = 0) + { + return GetInstance() + .Call(Methods.GetLeaderboardDisplayType, thisLeaderboard) + .AsGodotDictionary(); + } + + public static int GetLeaderboardEntryCount(long thisLeaderboard = 0) + { + return GetInstance().Call(Methods.GetLeaderboardEntryCount, thisLeaderboard).AsInt32(); + } + + public static string GetLeaderboardName(long thisLeaderboard = 0) + { + return GetInstance().Call(Methods.GetLeaderboardName, thisLeaderboard).AsString(); + } + + public static Godot.Collections.Dictionary GetLeaderboardSortMethod(long thisLeaderboard = 0) + { + return GetInstance() + .Call(Methods.GetLeaderboardSortMethod, thisLeaderboard) + .AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetMostAchievedAchievementInfo() + { + return GetInstance().Call(Methods.GetMostAchievedAchievementInfo).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetNextMostAchievedAchievementInfo(long iterator) + { + return GetInstance() + .Call(Methods.GetNextMostAchievedAchievementInfo, iterator) + .AsGodotDictionary(); + } + + public static long GetNumAchievements() + { + return GetInstance().Call(Methods.GetNumAchievements).AsInt64(); + } + + public static void GetNumberOfCurrentPlayers() + { + GetInstance().Call(Methods.GetNumberOfCurrentPlayers); + } + + public static float GetStatFloat(string statName) + { + return GetInstance().Call(Methods.GetStatFloat, statName).AsSingle(); + } + + public static int GetStatInt(string statName) + { + return GetInstance().Call(Methods.GetStatInt, statName).AsInt32(); + } + + public static Godot.Collections.Dictionary GetUserAchievement(ulong steamId, string name) + { + return GetInstance().Call(Methods.GetUserAchievement, steamId, name).AsGodotDictionary(); + } + + public static Godot.Collections.Dictionary GetUserAchievementAndUnlockTime( + ulong steamId, + string name + ) + { + return GetInstance() + .Call(Methods.GetUserAchievementAndUnlockTime, steamId, name) + .AsGodotDictionary(); + } + + public static float GetUserStatFloat(ulong steamId, string name) + { + return GetInstance().Call(Methods.GetUserStatFloat, steamId, name).AsSingle(); + } + + public static int GetUserStatInt(ulong steamId, string name) + { + return GetInstance().Call(Methods.GetUserStatInt, steamId, name).AsInt32(); + } + + public static bool IndicateAchievementProgress( + string name, + int currentProgress, + long maxProgress + ) + { + return GetInstance() + .Call(Methods.IndicateAchievementProgress, name, currentProgress, maxProgress) + .AsBool(); + } + + public static bool RequestCurrentStats() + { + return GetInstance().Call(Methods.RequestCurrentStats).AsBool(); + } + + public static void RequestGlobalAchievementPercentages() + { + GetInstance().Call(Methods.RequestGlobalAchievementPercentages); + } + + public static void RequestGlobalStats(long historyDays) + { + GetInstance().Call(Methods.RequestGlobalStats, historyDays); + } + + public static void RequestUserStats(ulong steamId) + { + GetInstance().Call(Methods.RequestUserStats, steamId); + } + + public static bool ResetAllStats(bool achievementsToo) + { + return GetInstance().Call(Methods.ResetAllStats, achievementsToo).AsBool(); + } + + public static bool SetAchievement(string name) + { + return GetInstance().Call(Methods.SetAchievement, name).AsBool(); + } + + public static int SetLeaderboardDetailsMax(long max) + { + return GetInstance().Call(Methods.SetLeaderboardDetailsMax, max).AsInt32(); + } + + public static bool SetStatFloat(string name, double value) + { + return GetInstance().Call(Methods.SetStatFloat, name, value).AsBool(); + } + + public static bool SetStatInt(string name, long value) + { + return GetInstance().Call(Methods.SetStatInt, name, value).AsBool(); + } + + public static bool StoreStats() + { + return GetInstance().Call(Methods.StoreStats).AsBool(); + } + + public static bool UpdateAvgRateStat(string name, float thisSession, double sessionLength) + { + return GetInstance() + .Call(Methods.UpdateAvgRateStat, name, thisSession, sessionLength) + .AsBool(); + } + + /// If the parameter is null, then the default value is Array.Empty<int>(). + public static void UploadLeaderboardScore( + int score, + bool keepBest = true, + int[] details = null, + long thisLeaderboard = 0 + ) + { + var detailsOrDefVal = details ?? Array.Empty(); + GetInstance() + .Call( + Methods.UploadLeaderboardScore, + score, + keepBest, + detailsOrDefVal, + thisLeaderboard + ); + } + + public static Godot.Collections.Array GetLeaderboardEntries() + { + return GetInstance().Call(Methods.GetLeaderboardEntries).AsGodotArray(); + } + + public enum LeaderboardDataRequest : long + { + Global = 0, + GlobalAroundUser = 1, + Friends = 2, + Users = 3, + } + + public enum LeaderboardDisplayType : long + { + None = 0, + Numeric = 1, + TimeSeconds = 2, + TimeMilliseconds = 3, + } + + public enum LeaderboardSortMethod : long + { + None = 0, + Ascending = 1, + Descending = 2, + } + + public enum LeaderboardUploadScoreMethod : long + { + None = 0, + KeepBest = 1, + ForceUpdate = 2, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.UserStats.cs.uid b/addons/godotsteam_csharpbindings/Steam.UserStats.cs.uid new file mode 100644 index 00000000..c33122d0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.UserStats.cs.uid @@ -0,0 +1 @@ +uid://by56va5e6wrw3 diff --git a/addons/godotsteam_csharpbindings/Steam.Utils.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Utils.Signals.cs new file mode 100644 index 00000000..65049d55 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Utils.Signals.cs @@ -0,0 +1,306 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void CheckFileSignatureEventHandler(string signature); + private static event CheckFileSignatureEventHandler CheckFileSignatureEvent; + static Action _checkFileSignatureAction = (signature) => + { + CheckFileSignatureEvent?.Invoke(signature); + }; + public static event CheckFileSignatureEventHandler CheckFileSignature + { + add + { + if (CheckFileSignatureEvent == null) + { + GetInstance() + .Connect(Signals.CheckFileSignature, Callable.From(_checkFileSignatureAction)); + } + CheckFileSignatureEvent += value; + } + remove + { + CheckFileSignatureEvent -= value; + if (CheckFileSignatureEvent == null) + { + GetInstance() + .Disconnect( + Signals.CheckFileSignature, + Callable.From(_checkFileSignatureAction) + ); + } + } + } + + public delegate void GamepadTextInputDismissedEventHandler( + bool submitted, + string enteredText, + uint appId + ); + private static event GamepadTextInputDismissedEventHandler GamepadTextInputDismissedEvent; + static Action _gamepadTextInputDismissedAction = ( + submitted, + enteredText, + appId + ) => + { + GamepadTextInputDismissedEvent?.Invoke(submitted, enteredText, appId); + }; + public static event GamepadTextInputDismissedEventHandler GamepadTextInputDismissed + { + add + { + if (GamepadTextInputDismissedEvent == null) + { + GetInstance() + .Connect( + Signals.GamepadTextInputDismissed, + Callable.From(_gamepadTextInputDismissedAction) + ); + } + GamepadTextInputDismissedEvent += value; + } + remove + { + GamepadTextInputDismissedEvent -= value; + if (GamepadTextInputDismissedEvent == null) + { + GetInstance() + .Disconnect( + Signals.GamepadTextInputDismissed, + Callable.From(_gamepadTextInputDismissedAction) + ); + } + } + } + + private static event Action IPCountryEvent; + static Action _iPCountryAction = () => + { + IPCountryEvent?.Invoke(); + }; + public static event Action IPCountry + { + add + { + if (IPCountryEvent == null) + { + GetInstance().Connect(Signals.IPCountry, Callable.From(_iPCountryAction)); + } + IPCountryEvent += value; + } + remove + { + IPCountryEvent -= value; + if (IPCountryEvent == null) + { + GetInstance().Disconnect(Signals.IPCountry, Callable.From(_iPCountryAction)); + } + } + } + + public delegate void LowPowerEventHandler(byte power); + private static event LowPowerEventHandler LowPowerEvent; + static Action _lowPowerAction = (power) => + { + LowPowerEvent?.Invoke(power); + }; + public static event LowPowerEventHandler LowPower + { + add + { + if (LowPowerEvent == null) + { + GetInstance().Connect(Signals.LowPower, Callable.From(_lowPowerAction)); + } + LowPowerEvent += value; + } + remove + { + LowPowerEvent -= value; + if (LowPowerEvent == null) + { + GetInstance().Disconnect(Signals.LowPower, Callable.From(_lowPowerAction)); + } + } + } + + public delegate void SteamApiCallCompletedEventHandler( + ulong asyncCall, + int callback, + uint parameter + ); + private static event SteamApiCallCompletedEventHandler SteamApiCallCompletedEvent; + static Action _steamApiCallCompletedAction = ( + asyncCall, + callback, + parameter + ) => + { + SteamApiCallCompletedEvent?.Invoke(asyncCall, callback, parameter); + }; + public static event SteamApiCallCompletedEventHandler SteamApiCallCompleted + { + add + { + if (SteamApiCallCompletedEvent == null) + { + GetInstance() + .Connect( + Signals.SteamApiCallCompleted, + Callable.From(_steamApiCallCompletedAction) + ); + } + SteamApiCallCompletedEvent += value; + } + remove + { + SteamApiCallCompletedEvent -= value; + if (SteamApiCallCompletedEvent == null) + { + GetInstance() + .Disconnect( + Signals.SteamApiCallCompleted, + Callable.From(_steamApiCallCompletedAction) + ); + } + } + } + + private static event Action SteamShutdownSignalEvent; + static Action _steamShutdownSignalAction = () => + { + SteamShutdownSignalEvent?.Invoke(); + }; + public static event Action SteamShutdownSignal + { + add + { + if (SteamShutdownSignalEvent == null) + { + GetInstance() + .Connect( + Signals.SteamShutdownSignal, + Callable.From(_steamShutdownSignalAction) + ); + } + SteamShutdownSignalEvent += value; + } + remove + { + SteamShutdownSignalEvent -= value; + if (SteamShutdownSignalEvent == null) + { + GetInstance() + .Disconnect( + Signals.SteamShutdownSignal, + Callable.From(_steamShutdownSignalAction) + ); + } + } + } + + private static event Action AppResumingFromSuspendEvent; + static Action _appResumingFromSuspendAction = () => + { + AppResumingFromSuspendEvent?.Invoke(); + }; + public static event Action AppResumingFromSuspend + { + add + { + if (AppResumingFromSuspendEvent == null) + { + GetInstance() + .Connect( + Signals.AppResumingFromSuspend, + Callable.From(_appResumingFromSuspendAction) + ); + } + AppResumingFromSuspendEvent += value; + } + remove + { + AppResumingFromSuspendEvent -= value; + if (AppResumingFromSuspendEvent == null) + { + GetInstance() + .Disconnect( + Signals.AppResumingFromSuspend, + Callable.From(_appResumingFromSuspendAction) + ); + } + } + } + + private static event Action FloatingGamepadTextInputDismissedEvent; + static Action _floatingGamepadTextInputDismissedAction = () => + { + FloatingGamepadTextInputDismissedEvent?.Invoke(); + }; + public static event Action FloatingGamepadTextInputDismissed + { + add + { + if (FloatingGamepadTextInputDismissedEvent == null) + { + GetInstance() + .Connect( + Signals.FloatingGamepadTextInputDismissed, + Callable.From(_floatingGamepadTextInputDismissedAction) + ); + } + FloatingGamepadTextInputDismissedEvent += value; + } + remove + { + FloatingGamepadTextInputDismissedEvent -= value; + if (FloatingGamepadTextInputDismissedEvent == null) + { + GetInstance() + .Disconnect( + Signals.FloatingGamepadTextInputDismissed, + Callable.From(_floatingGamepadTextInputDismissedAction) + ); + } + } + } + + public delegate void FilterTextDictionaryChangedEventHandler(long language); + private static event FilterTextDictionaryChangedEventHandler FilterTextDictionaryChangedEvent; + static Action _filterTextDictionaryChangedAction = (language) => + { + FilterTextDictionaryChangedEvent?.Invoke(language); + }; + public static event FilterTextDictionaryChangedEventHandler FilterTextDictionaryChanged + { + add + { + if (FilterTextDictionaryChangedEvent == null) + { + GetInstance() + .Connect( + Signals.FilterTextDictionaryChanged, + Callable.From(_filterTextDictionaryChangedAction) + ); + } + FilterTextDictionaryChangedEvent += value; + } + remove + { + FilterTextDictionaryChangedEvent -= value; + if (FilterTextDictionaryChangedEvent == null) + { + GetInstance() + .Disconnect( + Signals.FilterTextDictionaryChanged, + Callable.From(_filterTextDictionaryChangedAction) + ); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Utils.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Utils.Signals.cs.uid new file mode 100644 index 00000000..dcbd6ccc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Utils.Signals.cs.uid @@ -0,0 +1 @@ +uid://wdspj6lqxg4q diff --git a/addons/godotsteam_csharpbindings/Steam.Utils.cs b/addons/godotsteam_csharpbindings/Steam.Utils.cs new file mode 100644 index 00000000..b28a53ae --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Utils.cs @@ -0,0 +1,226 @@ +namespace GodotSteam; + +public static partial class Steam +{ + public static string FilterText(TextFilteringContext context, ulong steamId, string message) + { + return GetInstance().Call(Methods.FilterText, (int)context, steamId, message).AsString(); + } + + public static string GetAPICallFailureReason() + { + return GetInstance().Call(Methods.GetAPICallFailureReason).AsString(); + } + + public static uint GetAppID() + { + return GetInstance().Call(Methods.GetAppID).AsUInt32(); + } + + public static int GetCurrentBatteryPower() + { + return GetInstance().Call(Methods.GetCurrentBatteryPower).AsInt32(); + } + + public static ImageRGBA GetImageRGBA(int image) + { + var raw = GetInstance().Call(Methods.GetImageRGBA, image).AsGodotDictionary(); + + if (!raw.ContainsKey("buffer") || !raw.ContainsKey("success")) + { + return null; + } + + return new ImageRGBA + { + Buffer = raw["buffer"].AsByteArray(), + Success = raw["success"].AsBool(), + }; + } + + public static ImageSize GetImageSize(int image) + { + var raw = GetInstance().Call(Methods.GetImageSize, image).AsGodotDictionary(); + + if (!raw.ContainsKey("width") || !raw.ContainsKey("height")) + { + return null; + } + + return new ImageSize { Width = raw["width"].AsUInt32(), Height = raw["height"].AsUInt32() }; + } + + public static uint GetIPCCallCount() + { + return GetInstance().Call(Methods.GetIPCCallCount).AsUInt32(); + } + + public static string GetIPCountry() + { + return GetInstance().Call(Methods.GetIPCountry).AsString(); + } + + public static int GetSecondsSinceAppActive() + { + return GetInstance().Call(Methods.GetSecondsSinceAppActive).AsInt32(); + } + + public static int GetSecondsSinceComputerActive() + { + return GetInstance().Call(Methods.GetSecondsSinceComputerActive).AsInt32(); + } + + public static int GetServerRealTime() + { + return GetInstance().Call(Methods.GetServerRealTime).AsInt32(); + } + + public static string GetSteamUILanguage() + { + return GetInstance().Call(Methods.GetSteamUILanguage).AsString(); + } + + public static bool InitFilterText() + { + return GetInstance().Call(Methods.InitFilterText).AsBool(); + } + + public static ApiCallResult IsAPICallCompleted() + { + var raw = GetInstance().Call(Methods.IsAPICallCompleted).AsGodotDictionary(); + + if (!raw.ContainsKey("completed") || !raw.ContainsKey("failed")) + { + return null; + } + + return new ApiCallResult + { + Completed = raw["completed"].AsBool(), + Failed = raw["failed"].AsBool(), + }; + } + + public static bool IsOverlayEnabled() + { + return GetInstance().Call(Methods.IsOverlayEnabled).AsBool(); + } + + public static bool IsSteamChinaLauncher() + { + return GetInstance().Call(Methods.IsSteamChinaLauncher).AsBool(); + } + + public static bool IsSteamInBigPictureMode() + { + return GetInstance().Call(Methods.IsSteamInBigPictureMode).AsBool(); + } + + public static bool IsSteamRunningInVR() + { + return GetInstance().Call(Methods.IsSteamRunningInVR).AsBool(); + } + + public static bool IsVRHeadsetStreamingEnabled() + { + return GetInstance().Call(Methods.IsVRHeadsetStreamingEnabled).AsBool(); + } + + public static bool OverlayNeedsPresent() + { + return GetInstance().Call(Methods.OverlayNeedsPresent).AsBool(); + } + + public static void SetOverlayNotificationInset(int horizontal, int vertical) + { + GetInstance().Call(Methods.SetOverlayNotificationInset, horizontal, vertical); + } + + public static void SetOverlayNotificationPosition(OverlayNotificationPosition pos) + { + GetInstance().Call(Methods.SetOverlayNotificationPosition, (int)pos); + } + + public static void SetVRHeadsetStreamingEnabled(bool enabled) + { + GetInstance().Call(Methods.SetVRHeadsetStreamingEnabled, enabled); + } + + public static bool ShowGamepadTextInput( + GamepadTextInputMode inputMode, + GamepadTextInputLineMode lineInputMode, + string description, + uint maxText, + string presetText + ) + { + return GetInstance() + .Call( + Methods.ShowGamepadTextInput, + (int)inputMode, + (int)lineInputMode, + description, + maxText, + presetText + ) + .AsBool(); + } + + public static bool ShowFloatingGamepadTextInput( + FloatingGamepadTextInputMode inputMode, + int textFieldXPosition, + int textFieldYPosition, + int textFieldWidth, + int textFieldHeight + ) + { + return GetInstance() + .Call( + Methods.ShowFloatingGamepadTextInput, + (long)inputMode, + textFieldXPosition, + textFieldYPosition, + textFieldWidth, + textFieldHeight + ) + .AsBool(); + } + + public static void SetGameLauncherMode(bool mode) + { + GetInstance().Call(Methods.SetGameLauncherMode, mode); + } + + public static void StartVRDashboard() + { + GetInstance().Call(Methods.StartVRDashboard); + } + + public static bool IsSteamRunningOnSteamDeck() + { + return GetInstance().Call(Methods.IsSteamRunningOnSteamDeck).AsBool(); + } + + public static bool DismissFloatingGamepadTextInput() + { + return GetInstance().Call(Methods.DismissFloatingGamepadTextInput).AsBool(); + } + + public enum ApiCallFailure : long + { + None = -1, + SteamGone = 0, + NetworkFailure = 1, + InvalidHandle = 2, + MismatchedCallback = 3, + } + + public enum CheckFileSignatureEnum : long + { + InvalidSignature = 0, + ValidSignature = 1, + FileNotFound = 2, + NoSignaturesFoundForThisApp = 3, + NoSignaturesFoundForThisFile = 4, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Utils.cs.uid b/addons/godotsteam_csharpbindings/Steam.Utils.cs.uid new file mode 100644 index 00000000..38492b04 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Utils.cs.uid @@ -0,0 +1 @@ +uid://bp5kbs6xenskj diff --git a/addons/godotsteam_csharpbindings/Steam.Video.Signals.cs b/addons/godotsteam_csharpbindings/Steam.Video.Signals.cs new file mode 100644 index 00000000..0cc7ae99 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Video.Signals.cs @@ -0,0 +1,68 @@ +using System; +using Godot; + +namespace GodotSteam; + +public static partial class Steam +{ + public delegate void GetOpfSettingsResultEventHandler(ErrorResult result, uint appId); + private static event GetOpfSettingsResultEventHandler GetOpfSettingsResultEvent; + static Action _getOpfSettingsResultAction = (result, appId) => + { + GetOpfSettingsResultEvent?.Invoke((ErrorResult)result, appId); + }; + public static event GetOpfSettingsResultEventHandler GetOpfSettingsResult + { + add + { + if (GetOpfSettingsResultEvent == null) + { + GetInstance() + .Connect( + Signals.GetOpfSettingsResult, + Callable.From(_getOpfSettingsResultAction) + ); + } + GetOpfSettingsResultEvent += value; + } + remove + { + GetOpfSettingsResultEvent -= value; + if (GetOpfSettingsResultEvent == null) + { + GetInstance() + .Disconnect( + Signals.GetOpfSettingsResult, + Callable.From(_getOpfSettingsResultAction) + ); + } + } + } + + public delegate void GetVideoResultEventHandler(ErrorResult result, uint appId, string url); + private static event GetVideoResultEventHandler GetVideoResultEvent; + static Action _getVideoResultAction = (result, appId, url) => + { + GetVideoResultEvent?.Invoke((ErrorResult)result, appId, url); + }; + public static event GetVideoResultEventHandler GetVideoResult + { + add + { + if (GetVideoResultEvent == null) + { + GetInstance().Connect(Signals.GetVideoResult, Callable.From(_getVideoResultAction)); + } + GetVideoResultEvent += value; + } + remove + { + GetVideoResultEvent -= value; + if (GetVideoResultEvent == null) + { + GetInstance() + .Disconnect(Signals.GetVideoResult, Callable.From(_getVideoResultAction)); + } + } + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Video.Signals.cs.uid b/addons/godotsteam_csharpbindings/Steam.Video.Signals.cs.uid new file mode 100644 index 00000000..5f292b8f --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Video.Signals.cs.uid @@ -0,0 +1 @@ +uid://bunrk4xhrup74 diff --git a/addons/godotsteam_csharpbindings/Steam.Video.cs b/addons/godotsteam_csharpbindings/Steam.Video.cs new file mode 100644 index 00000000..d1a7b127 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Video.cs @@ -0,0 +1,32 @@ +using System.Linq; + +namespace GodotSteam; + +public static partial class Steam +{ + public static void GetOPFSettings(uint appId) + { + GetInstance().Call(Methods.GetOPFSettings, appId); + } + + public static string GetOPFStringForApp(uint appId) + { + return GetInstance().Call(Methods.GetOPFStringForApp, appId).AsString(); + } + + public static void GetVideoURL(uint appId) + { + GetInstance().Call(Methods.GetVideoURL, appId); + } + + public static BroadcastStatus IsBroadcasting() + { + var raw = GetInstance().Call(Methods.IsBroadcasting).AsGodotDictionary(); + + return new BroadcastStatus + { + Broadcasting = raw["broadcasting"].AsBool(), + Viewers = raw["viewers"].AsInt32(), + }; + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.Video.cs.uid b/addons/godotsteam_csharpbindings/Steam.Video.cs.uid new file mode 100644 index 00000000..9c787b3e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.Video.cs.uid @@ -0,0 +1 @@ +uid://c36x1284sd8vn diff --git a/addons/godotsteam_csharpbindings/Steam.cs b/addons/godotsteam_csharpbindings/Steam.cs new file mode 100644 index 00000000..6af1b041 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.cs @@ -0,0 +1,231 @@ +using System; +using Godot; +using Godot.Collections; + +namespace GodotSteam; + +public static partial class Steam +{ + public static GodotObject Instance; + + public static GodotObject GetInstance() + { + if (Instance != null) + return Instance; + + if (!ClassDB.ClassExists("Steam")) + { + throw new Exception("GodotSteam is not installed."); + } + + if (!ClassDB.CanInstantiate("Steam")) + { + throw new Exception("GodotSteam cannot be instantiated."); + } + + Instance = ClassDB.Instantiate("Steam").AsGodotObject(); + return Instance; + } + + public static bool IsSteamRunning() + { + return GetInstance().Call(Methods.IsSteamRunning).AsBool(); + } + + public static void RunCallbacks() + { + GetInstance().Call(Methods.RunCallbacks); + } + + public static bool RestartAppIfNecessary(uint appId) + { + return GetInstance().Call(Methods.RestartAppIfNecessary, appId).AsBool(); + } + + public static bool SteamInit(uint appId, bool embedCallbacks) + { + return GetInstance().Call(Methods.SteamInit, appId, embedCallbacks).AsBool(); + } + + public static SteamInitResult SteamInit(bool retrieveStats = true) + { + var raw = GetInstance().Call(Methods.SteamInit, retrieveStats).AsGodotDictionary(); + + return new SteamInitResult + { + Status = (SteamInitStatus)raw["status"].AsInt32(), + Verbal = raw["verbal"].AsString(), + }; + } + + public static SteamInitExResult SteamInitEx(uint appId, bool embedCallbacks) + { + var raw = GetInstance() + .Call(Methods.SteamInitEx, appId, embedCallbacks) + .AsGodotDictionary(); + + return new SteamInitExResult + { + Status = (SteamInitExStatus)raw["status"].AsInt32(), + Verbal = raw["verbal"].AsString(), + }; + } + + public static SteamInitExResult SteamInitEx(bool retrieveStats) + { + var raw = GetInstance().Call(Methods.SteamInitEx, retrieveStats).AsGodotDictionary(); + + return new SteamInitExResult + { + Status = (SteamInitExStatus)raw["status"].AsInt32(), + Verbal = raw["verbal"].AsString(), + }; + } + + public static void SteamShutdown() + { + GetInstance().Call(Methods.SteamShutdown); + } + + public static bool IsCybercafe() + { + return GetInstance().Call(Methods.IsCybercafe).AsBool(); + } + + public enum AccountType : long + { + Invalid = 0, + Individual = 1, + Multiseat = 2, + GameServer = 3, + AnonGameServer = 4, + Pending = 5, + ContentServer = 6, + Clan = 7, + Chat = 8, + ConsoleUser = 9, + AnonUser = 10, + Max = 11, + } + + public enum AuthSessionResponse : long + { + Ok = 0, + UserNotConnectedToSteam = 1, + NoLicenseOrExpired = 2, + VacBanned = 3, + LoggedInElsewhere = 4, + VacCheckTimedOut = 5, + AuthTicketCanceled = 6, + AuthTicketInvalidAlreadyUsed = 7, + AuthTicketInvalid = 8, + PublisherIssuedBan = 9, + AuthTicketNetworkIdentityFailure = 10, + } + + public enum BeginAuthSessionResult : long + { + Ok = 0, + InvalidTicket = 1, + DuplicateRequest = 2, + InvalidVersion = 3, + GameMismatch = 4, + ExpiredTicket = 5, + } + + public enum BroadcastUploadResult : long + { + None = 0, + Ok = 1, + InitFailed = 2, + FrameFailed = 3, + TimeOut = 4, + BandwidthExceeded = 5, + LowFps = 6, + MissingKeyframes = 7, + NoConnection = 8, + RelayFailed = 9, + SettingsChanged = 10, + MissingAudio = 11, + TooFarBehind = 12, + TranscodeBehind = 13, + NotAllowedToPlay = 14, + Busy = 15, + Banned = 16, + AlreadyActive = 17, + ForcedOff = 18, + AudioBehind = 19, + Shutdown = 20, + Disconnect = 21, + VideoInitFailed = 22, + AudioInitFailed = 23, + } + + [System.Flags] + public enum ChatSteamIdInstanceFlags : long + { + AccountInstanceMask = 4095, + InstanceFlagClan = 524288, + InstanceFlagLobby = 262144, + InstanceFlagMmsLobby = 131072, + } + + public enum DenyReason : long + { + Invalid = 0, + InvalidVersion = 1, + Generic = 2, + NotLoggedOn = 3, + NoLicense = 4, + Cheater = 5, + LoggedInElsewhere = 6, + UnknownText = 7, + IncompatibleAntiCheat = 8, + MemoryCorruption = 9, + IncompatibleSoftware = 10, + SteamConnectionLost = 11, + SteamConnectionError = 12, + SteamResponseTimedOut = 13, + SteamValidationStalled = 14, + SteamOwnerLeftGuestUser = 15, + } + + public enum GameIdType : long + { + App = 0, + GameMod = 1, + Shortcut = 2, + P2P = 3, + } + + public enum Universe : long + { + Invalid = 0, + Public = 1, + Beta = 2, + Internal = 3, + Dev = 4, + Max = 5, + } + + public enum UserHasLicenseForAppResult : long + { + HasLicense = 0, + DoesNotHaveLicense = 1, + NoAuth = 2, + } + + public enum VoiceResult : long + { + Ok = 0, + NotInitialized = 1, + NotRecording = 2, + NoDate = 3, + BufferTooSmall = 4, + DataCorrupted = 5, + Restricted = 6, + UnsupportedCodec = 7, + ReceiverOutOfDate = 8, + ReceiverDidNotAnswer = 9, + } +} diff --git a/addons/godotsteam_csharpbindings/Steam.cs.uid b/addons/godotsteam_csharpbindings/Steam.cs.uid new file mode 100644 index 00000000..20f9c8fb --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam.cs.uid @@ -0,0 +1 @@ +uid://bdswxmyi27a84 diff --git a/addons/godotsteam_csharpbindings/Steam/ErrorResult.cs b/addons/godotsteam_csharpbindings/Steam/ErrorResult.cs new file mode 100644 index 00000000..c2eb61c0 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/ErrorResult.cs @@ -0,0 +1,111 @@ +namespace GodotSteam; + +public enum ErrorResult +{ + Ok = 1, + Fail = 2, + NoConnection = 3, + InvalidPassword = 5, + LoggedInElseWhere = 6, + InvalidProtocolVersion = 7, + InvalidParam = 8, + FileNotFound = 9, + Busy = 10, + InvalidState = 11, + InvalidName = 12, + InvalidEmail = 13, + DuplicateName = 14, + AccessDenied = 15, + Timeout = 16, + Banned = 17, + AccountNotFound = 18, + InvalidSteamId = 19, + ServiceUnavailable = 20, + NotLoggedOn = 21, + Pending = 22, + EncryptionFailure = 23, + InsufficientPriviledge = 24, + LimitExceeded = 25, + Revoked = 26, + Expired = 27, + AlreadyRedeemed = 28, + DuplicateRequest = 29, + AlreadyOwned = 30, + IPNotFound = 31, + PersistFailed = 32, + LockingFailed = 33, + LogonSessionReplaced = 24, + ConnectFailed = 36, + IOFailure = 37, + RemoteDisconnect = 38, + ShoppingCartNotFound = 39, + Blocked = 40, + Ignored = 41, + NoMatch = 42, + AccountDisabled = 43, + ServiceReadOnly = 44, + AccountNotFeatured = 45, + AdministratorOk = 46, + ContentVersion = 47, + TryAnotherCM = 48, + PasswordRequiredToKickSession = 49, + AlreadyLoggedInElsewhere = 50, + Suspended = 51, + Cancelled = 52, + Corruption = 53, + DiskFull = 54, + RemoteCallFailed = 55, + PasswordUnset = 56, + ExternalAccountUnlinked = 57, + PSNTicketInvalid = 58, + ExternalAccountAlreadyLinked = 59, + RemoteFileConflict = 60, + IllegalPassword = 61, + SameAsPreviousValue = 62, + AccountLogonDenied = 63, + CannotUseOldPassword = 64, + InvalidLoginAuthCode = 65, + AccountLogonDeniedNoMail = 66, + HardwareNotCapableOfIPT = 67, + IPTInitError = 68, + ParentalControlRestricted = 69, + FacebookQueryError = 70, + ExpiredLoginAuthCode = 71, + IPLoginRestrictionFailed = 72, + AccountLockedDown = 73, + AccountLogonDeniedVerifiedEmailRequired = 74, + NoMatchingURL = 75, + BadResponse = 76, + RequirePasswordReEntry = 77, + ValueOutOfRange = 78, + UnexpectedError = 79, + Disabled = 80, + InvalidCEGSubmission = 81, + RestrictedDevice = 82, + RegionLocked = 83, + RateLimitExceeded = 84, + AccountLoginDeniedNeedTwoFactor = 85, + ItemDeleted = 86, + AccountLoginDeniedThrottle = 87, + TwoFactorCodeMismatch = 88, + TwoFactorActivationCodeMismatch = 89, + AccountAssociatedToMultiplePartners = 90, + NotModified = 91, + NoMobileDevice = 92, + TimeNotSynced = 93, + SmsCodeFailed = 94, + AccountLimitExceeded = 95, + AccountActivityLimitExceeded = 96, + PhoneActivityLimitExceeded = 97, + RefundToWallet = 98, + EmailSendFailure = 99, + NotSettled = 100, + NeedCaptcha = 101, + GSLTDenied = 102, + GSOwnerDeneid = 103, + InvalidItemType = 104, + IPBanned = 105, + GSLTExpired = 106, + InsufficientFunds = 107, + TooManyPending = 108, +} diff --git a/addons/godotsteam_csharpbindings/Steam/ErrorResult.cs.uid b/addons/godotsteam_csharpbindings/Steam/ErrorResult.cs.uid new file mode 100644 index 00000000..f23a22c6 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/ErrorResult.cs.uid @@ -0,0 +1 @@ +uid://bhttarkawow4y diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitExResult.cs b/addons/godotsteam_csharpbindings/Steam/SteamInitExResult.cs new file mode 100644 index 00000000..08957d41 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitExResult.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class SteamInitExResult +{ + public SteamInitExStatus Status { get; set; } + public string Verbal { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitExResult.cs.uid b/addons/godotsteam_csharpbindings/Steam/SteamInitExResult.cs.uid new file mode 100644 index 00000000..293bc53a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitExResult.cs.uid @@ -0,0 +1 @@ +uid://dcv61tkxvfemk diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitExStatus.cs b/addons/godotsteam_csharpbindings/Steam/SteamInitExStatus.cs new file mode 100644 index 00000000..1333b7ec --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitExStatus.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public enum SteamInitExStatus +{ + SteamworksActive = 0, + Failed = 1, + CannotConnectToSteam = 2, + SteamClientOutOfDate = 3, +} diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitExStatus.cs.uid b/addons/godotsteam_csharpbindings/Steam/SteamInitExStatus.cs.uid new file mode 100644 index 00000000..47892b06 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitExStatus.cs.uid @@ -0,0 +1 @@ +uid://dwsdu2plsge5n diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitResult.cs b/addons/godotsteam_csharpbindings/Steam/SteamInitResult.cs new file mode 100644 index 00000000..b28d585c --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitResult.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class SteamInitResult +{ + public SteamInitStatus Status { get; set; } + public string Verbal { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitResult.cs.uid b/addons/godotsteam_csharpbindings/Steam/SteamInitResult.cs.uid new file mode 100644 index 00000000..28c503ab --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitResult.cs.uid @@ -0,0 +1 @@ +uid://cv136o6g3wyuo diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitStatus.cs b/addons/godotsteam_csharpbindings/Steam/SteamInitStatus.cs new file mode 100644 index 00000000..3a9fc2ca --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitStatus.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public enum SteamInitStatus +{ + SteamworksActive = 1, + SteamworksFailedToInitialize = 2, + SteamNotRunning = 20, + InvalidAppIdOrNotInstalled = 79, +} diff --git a/addons/godotsteam_csharpbindings/Steam/SteamInitStatus.cs.uid b/addons/godotsteam_csharpbindings/Steam/SteamInitStatus.cs.uid new file mode 100644 index 00000000..1616ecfa --- /dev/null +++ b/addons/godotsteam_csharpbindings/Steam/SteamInitStatus.cs.uid @@ -0,0 +1 @@ +uid://b0m5pcn8g0kuc diff --git a/addons/godotsteam_csharpbindings/Utils/ApiCallResult.cs b/addons/godotsteam_csharpbindings/Utils/ApiCallResult.cs new file mode 100644 index 00000000..ab044cc9 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/ApiCallResult.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class ApiCallResult +{ + public bool Completed { get; set; } + public bool Failed { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Utils/ApiCallResult.cs.uid b/addons/godotsteam_csharpbindings/Utils/ApiCallResult.cs.uid new file mode 100644 index 00000000..a17861dc --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/ApiCallResult.cs.uid @@ -0,0 +1 @@ +uid://c24hec06y6b75 diff --git a/addons/godotsteam_csharpbindings/Utils/FloatingGamepadTextInputMode.cs b/addons/godotsteam_csharpbindings/Utils/FloatingGamepadTextInputMode.cs new file mode 100644 index 00000000..44ba7ff3 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/FloatingGamepadTextInputMode.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public enum FloatingGamepadTextInputMode +{ + SingleLine = 0, + MultipleLines = 1, + Email = 2, + Numeric = 3, +} diff --git a/addons/godotsteam_csharpbindings/Utils/FloatingGamepadTextInputMode.cs.uid b/addons/godotsteam_csharpbindings/Utils/FloatingGamepadTextInputMode.cs.uid new file mode 100644 index 00000000..c10334ab --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/FloatingGamepadTextInputMode.cs.uid @@ -0,0 +1 @@ +uid://cvevihy5oks1h diff --git a/addons/godotsteam_csharpbindings/Utils/GamepadTextInputLineMode.cs b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputLineMode.cs new file mode 100644 index 00000000..7e9513da --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputLineMode.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public enum GamepadTextInputLineMode +{ + SingleLine = 0, + MultipleLines = 1, +} diff --git a/addons/godotsteam_csharpbindings/Utils/GamepadTextInputLineMode.cs.uid b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputLineMode.cs.uid new file mode 100644 index 00000000..c2dd70c1 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputLineMode.cs.uid @@ -0,0 +1 @@ +uid://b4kx7n58d4sim diff --git a/addons/godotsteam_csharpbindings/Utils/GamepadTextInputMode.cs b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputMode.cs new file mode 100644 index 00000000..c6166d89 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputMode.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public enum GamepadTextInputMode +{ + Normal = 0, + Password = 1, +} diff --git a/addons/godotsteam_csharpbindings/Utils/GamepadTextInputMode.cs.uid b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputMode.cs.uid new file mode 100644 index 00000000..062de96b --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/GamepadTextInputMode.cs.uid @@ -0,0 +1 @@ +uid://b5j4174kcxdji diff --git a/addons/godotsteam_csharpbindings/Utils/ImageRGBA.cs b/addons/godotsteam_csharpbindings/Utils/ImageRGBA.cs new file mode 100644 index 00000000..e1f9df8a --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/ImageRGBA.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class ImageRGBA +{ + public byte[] Buffer { get; set; } + public bool Success { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Utils/ImageRGBA.cs.uid b/addons/godotsteam_csharpbindings/Utils/ImageRGBA.cs.uid new file mode 100644 index 00000000..a24417ea --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/ImageRGBA.cs.uid @@ -0,0 +1 @@ +uid://cinq7lnqjc4rx diff --git a/addons/godotsteam_csharpbindings/Utils/ImageSize.cs b/addons/godotsteam_csharpbindings/Utils/ImageSize.cs new file mode 100644 index 00000000..40358539 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/ImageSize.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class ImageSize +{ + public uint Width { get; set; } + public uint Height { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Utils/ImageSize.cs.uid b/addons/godotsteam_csharpbindings/Utils/ImageSize.cs.uid new file mode 100644 index 00000000..54dd7ba7 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/ImageSize.cs.uid @@ -0,0 +1 @@ +uid://c8wv25jqgant5 diff --git a/addons/godotsteam_csharpbindings/Utils/OverlayNotificationPosition.cs b/addons/godotsteam_csharpbindings/Utils/OverlayNotificationPosition.cs new file mode 100644 index 00000000..92df99eb --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/OverlayNotificationPosition.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public enum OverlayNotificationPosition +{ + TopLeft = 0, + TopRight = 1, + BottomLeft = 2, + BottomRight = 3, +} diff --git a/addons/godotsteam_csharpbindings/Utils/OverlayNotificationPosition.cs.uid b/addons/godotsteam_csharpbindings/Utils/OverlayNotificationPosition.cs.uid new file mode 100644 index 00000000..5fa80558 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/OverlayNotificationPosition.cs.uid @@ -0,0 +1 @@ +uid://cwguuipsyxmxh diff --git a/addons/godotsteam_csharpbindings/Utils/TextFilteringContext.cs b/addons/godotsteam_csharpbindings/Utils/TextFilteringContext.cs new file mode 100644 index 00000000..6b6e66e4 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/TextFilteringContext.cs @@ -0,0 +1,9 @@ +namespace GodotSteam; + +public enum TextFilteringContext +{ + Unknown = 0, + GameContent = 1, + Chat = 2, + Name = 3, +} diff --git a/addons/godotsteam_csharpbindings/Utils/TextFilteringContext.cs.uid b/addons/godotsteam_csharpbindings/Utils/TextFilteringContext.cs.uid new file mode 100644 index 00000000..2ad30986 --- /dev/null +++ b/addons/godotsteam_csharpbindings/Utils/TextFilteringContext.cs.uid @@ -0,0 +1 @@ +uid://dlsqaukk7ptqt diff --git a/addons/godotsteam_csharpbindings/Video/BroadcastStatus.cs b/addons/godotsteam_csharpbindings/Video/BroadcastStatus.cs new file mode 100644 index 00000000..86ccf54f --- /dev/null +++ b/addons/godotsteam_csharpbindings/Video/BroadcastStatus.cs @@ -0,0 +1,7 @@ +namespace GodotSteam; + +public class BroadcastStatus +{ + public bool Broadcasting { get; set; } + public int Viewers { get; set; } +} diff --git a/addons/godotsteam_csharpbindings/Video/BroadcastStatus.cs.uid b/addons/godotsteam_csharpbindings/Video/BroadcastStatus.cs.uid new file mode 100644 index 00000000..04c5435e --- /dev/null +++ b/addons/godotsteam_csharpbindings/Video/BroadcastStatus.cs.uid @@ -0,0 +1 @@ +uid://dd54nostiff7k diff --git a/project.godot b/project.godot index e9d0898a..9fb978b4 100644 --- a/project.godot +++ b/project.godot @@ -26,6 +26,7 @@ StageProducer="*res://Globals/StageProducer.cs" TimeKeeper="*res://Globals/TimeKeeper.cs" Scribe="*res://Globals/Scribe.cs" BgAudioPlayer="*res://Globals/BgAudioPlayer/BGAudioPlayer.tscn" +SteamWhisperer="*res://Globals/SteamWhisperer.cs" [display]