Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reflecting to have same type as in GodotSteam #31

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions addons/godotsteam_csharpbindings/Steam.Matchmaking.Signals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public static event FavoritesListChangedEventHandler FavoritesListChanged
}
}

public delegate void LobbyMessageEventHandler(long lobbyId, long user, string message, long chatType);
public delegate void LobbyMessageEventHandler(ulong lobbyId, long user, string message, long chatType);
private static event LobbyMessageEventHandler LobbyMessageEvent;
static Action<long, long, string, long> _lobbyMessageAction = (lobbyId, user, message, chatType) =>
static Action<ulong, long, string, long> _lobbyMessageAction = (lobbyId, user, message, chatType) =>
{
LobbyMessageEvent?.Invoke(lobbyId, user, message, chatType);
};
Expand All @@ -83,9 +83,9 @@ public static event LobbyMessageEventHandler LobbyMessage
}
}

public delegate void LobbyChatUpdateEventHandler(long lobbyId, long changedId, long makingChangeId, long chatState);
public delegate void LobbyChatUpdateEventHandler(ulong lobbyId, long changedId, long makingChangeId, long chatState);
private static event LobbyChatUpdateEventHandler LobbyChatUpdateEvent;
static Action<long, long, long, long> _lobbyChatUpdateAction = (lobbyId, changedId, makingChangeId, chatState) =>
static Action<ulong, long, long, long> _lobbyChatUpdateAction = (lobbyId, changedId, makingChangeId, chatState) =>
{
LobbyChatUpdateEvent?.Invoke(lobbyId, changedId, makingChangeId, chatState);
};
Expand All @@ -109,9 +109,9 @@ public static event LobbyChatUpdateEventHandler LobbyChatUpdate
}
}

public delegate void LobbyCreatedEventHandler(long connect, long lobbyId);
public delegate void LobbyCreatedEventHandler(long connect, ulong lobbyId);
private static event LobbyCreatedEventHandler LobbyCreatedEvent;
static Action<long, long> _lobbyCreatedAction = (connect, lobbyId) =>
static Action<long, ulong> _lobbyCreatedAction = (connect, lobbyId) =>
{
LobbyCreatedEvent?.Invoke(connect, lobbyId);
};
Expand Down Expand Up @@ -160,9 +160,9 @@ public static event Action LobbyDataUpdate
}
}

public delegate void LobbyJoinedEventHandler(long lobby, long permissions, bool locked, long response);
public delegate void LobbyJoinedEventHandler(ulong lobby, long permissions, bool locked, long response);
private static event LobbyJoinedEventHandler LobbyJoinedEvent;
static Action<long, long, bool, long> _lobbyJoinedAction = (lobby, permissions, locked, response) =>
static Action<ulong, long, bool, long> _lobbyJoinedAction = (lobby, permissions, locked, response) =>
{
LobbyJoinedEvent?.Invoke(lobby, permissions, locked, response);
};
Expand All @@ -186,9 +186,9 @@ public static event LobbyJoinedEventHandler LobbyJoined
}
}

public delegate void LobbyGameCreatedEventHandler(long lobbyId, long serverId, string serverIP, long port);
public delegate void LobbyGameCreatedEventHandler(ulong lobbyId, ulong serverId, string serverIP, ushort port);
private static event LobbyGameCreatedEventHandler LobbyGameCreatedEvent;
static Action<long, long, string, long> _lobbyGameCreatedAction = (lobbyId, serverId, serverIP, port) =>
static Action<ulong, ulong, string, ushort> _lobbyGameCreatedAction = (lobbyId, serverId, serverIP, port) =>
{
LobbyGameCreatedEvent?.Invoke(lobbyId, serverId, serverIP, port);
};
Expand All @@ -212,9 +212,9 @@ public static event LobbyGameCreatedEventHandler LobbyGameCreated
}
}

public delegate void LobbyInviteEventHandler(long inviter, long lobby, long game);
public delegate void LobbyInviteEventHandler(ulong inviter, ulong lobby, ulong game);
private static event LobbyInviteEventHandler LobbyInviteEvent;
static Action<long, long, long> _lobbyInviteAction = (inviter, lobby, game) =>
static Action<ulong, ulong, ulong> _lobbyInviteAction = (inviter, lobby, game) =>
{
LobbyInviteEvent?.Invoke(inviter, lobby, game);
};
Expand Down Expand Up @@ -264,9 +264,9 @@ public static event LobbyMatchListEventHandler LobbyMatchList
}
}

public delegate void LobbyKickedEventHandler(long lobbyId, long adminId, long dueToDisconnect);
public delegate void LobbyKickedEventHandler(ulong lobbyId, ulong adminId, byte dueToDisconnect);
private static event LobbyKickedEventHandler LobbyKickedEvent;
static Action<long, long, long> _lobbyKickedAction = (lobbyId, adminId, dueToDisconnect) =>
static Action<ulong, ulong, byte> _lobbyKickedAction = (lobbyId, adminId, dueToDisconnect) =>
{
LobbyKickedEvent?.Invoke(lobbyId, adminId, dueToDisconnect);
};
Expand Down
18 changes: 9 additions & 9 deletions addons/godotsteam_csharpbindings/Steam.Matchmaking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public static void CreateLobby(LobbyType lobbyType, long maxMembers = 2)
GetInstance().Call(Methods.CreateLobby, (long)lobbyType, maxMembers);
}

public static void JoinLobby(long steamLobbyId)
public static void JoinLobby(ulong steamLobbyId)
{
GetInstance().Call(Methods.JoinLobby, steamLobbyId);
}

public static void LeaveLobby(long steamLobbyId)
public static void LeaveLobby(ulong steamLobbyId)
{
GetInstance().Call(Methods.LeaveLobby, steamLobbyId);
}
Expand All @@ -72,7 +72,7 @@ public static bool InviteUserToLobby(ulong steamLobbyId, ulong steamIdInvitee)
return GetInstance().Call(Methods.InviteUserToLobby, steamLobbyId, steamIdInvitee).AsBool();
}

public static int GetNumLobbyMembers(long steamLobbyId)
public static int GetNumLobbyMembers(ulong steamLobbyId)
{
return GetInstance().Call(Methods.GetNumLobbyMembers, steamLobbyId).AsInt32();
}
Expand All @@ -92,7 +92,7 @@ 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(long steamLobbyId)
public static Godot.Collections.Dictionary GetAllLobbyData(ulong steamLobbyId)
{
return GetInstance().Call(Methods.GetAllLobbyData, steamLobbyId).AsGodotDictionary();
}
Expand All @@ -117,7 +117,7 @@ public static bool SendLobbyChatMsg(ulong steamLobbyId, string messageBody)
return GetInstance().Call(Methods.SendLobbyChatMsg, steamLobbyId, messageBody).AsBool();
}

public static bool RequestLobbyData(long steamLobbyId)
public static bool RequestLobbyData(ulong steamLobbyId)
{
return GetInstance().Call(Methods.RequestLobbyData, steamLobbyId).AsBool();
}
Expand All @@ -127,7 +127,7 @@ public static void SetLobbyGameServer(ulong steamLobbyId, string serverIP, int s
GetInstance().Call(Methods.SetLobbyGameServer, steamLobbyId, serverIP, serverPort, steamIdGameServer);
}

public static Godot.Collections.Dictionary GetLobbyGameServer(long steamLobbyId)
public static Godot.Collections.Dictionary GetLobbyGameServer(ulong steamLobbyId)
{
return GetInstance().Call(Methods.GetLobbyGameServer, steamLobbyId).AsGodotDictionary();
}
Expand All @@ -137,7 +137,7 @@ public static bool SetLobbyMemberLimit(ulong steamLobbyId, long maxMembers)
return GetInstance().Call(Methods.SetLobbyMemberLimit, steamLobbyId, maxMembers).AsBool();
}

public static int GetLobbyMemberLimit(long steamLobbyId)
public static int GetLobbyMemberLimit(ulong steamLobbyId)
{
return GetInstance().Call(Methods.GetLobbyMemberLimit, steamLobbyId).AsInt32();
}
Expand All @@ -152,7 +152,7 @@ public static bool SetLobbyJoinable(ulong steamLobbyId, bool joinable)
return GetInstance().Call(Methods.SetLobbyJoinable, steamLobbyId, joinable).AsBool();
}

public static ulong GetLobbyOwner(long steamLobbyId)
public static ulong GetLobbyOwner(ulong steamLobbyId)
{
return GetInstance().Call(Methods.GetLobbyOwner, steamLobbyId).AsUInt64();
}
Expand All @@ -178,7 +178,7 @@ public enum LobbyComparison : long
LobbyComparisonLessThan = -1,
LobbyComparisonEqual = 0,
LobbyComparisonGreaterThan = 1,
ObbyComparisonEqualToGreaterThan = 2,
LobbyComparisonEqualToGreaterThan = 2,
LobbyComparisonNotEqual = 3
}

Expand Down