Skip to content

Commit

Permalink
Feat fix HAuth.login_anonymous_async (#37)
Browse files Browse the repository at this point in the history
* bump version to 2.1.7

* fix HAuth.login_anonymous_async
  • Loading branch information
3ddelano authored Feb 19, 2025
1 parent aec83a2 commit 74c51d5
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 50 deletions.
59 changes: 30 additions & 29 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
{
"files.exclude": {
"**/*.obj": true,
"**/*.ilk": true,
"**/*.exp": true,
"**/*.pdb": true,
"**/__pycache__": true,
"**/*.os": true,
"**/*.o": true,
},
"godot_tools.editor_path": "d:\\Projects\\Godot\\Godot_v4.exe",
"files.associations": {
"*.rmd": "markdown",
"utility": "cpp",
"sstream": "cpp",
"unordered_map": "cpp",
"algorithm": "cpp",
"chrono": "cpp",
"iterator": "cpp",
"xhash": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"string": "cpp"
},
"grammarly.selectors": [
{
"language": "cpp",
"scheme": "file"
}
]
"files.exclude": {
"**/*.obj": true,
"**/*.ilk": true,
"**/*.exp": true,
"**/*.pdb": true,
"**/__pycache__": true,
"**/*.os": true,
"**/*.o": true
},
"godot_tools.editor_path": "d:\\Projects\\Godot\\Godot_v4.exe",
"files.associations": {
"*.rmd": "markdown",
"utility": "cpp",
"sstream": "cpp",
"unordered_map": "cpp",
"algorithm": "cpp",
"chrono": "cpp",
"iterator": "cpp",
"xhash": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"string": "cpp"
},
"grammarly.selectors": [
{
"language": "cpp",
"scheme": "file"
}
],
"cmake.ignoreCMakeListsMissing": true
}
18 changes: 11 additions & 7 deletions sample/addons/epic-online-services-godot/heos/hauth.gd
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,13 @@ func delete_persistent_auth_async(refresh_token = "") -> bool:
return true


## Login to Epic Game Services without any credentials
func login_anonymous_async(user_display_name = "") -> bool:
## Login to Epic Game Services without any credentials.
## You must provide a user display name.
func login_anonymous_async(p_user_display_name: String) -> bool:
var user_display_name := p_user_display_name.strip_edges()
if not p_user_display_name:
_log.error("User display name is empty")
return false
_log.debug("Logging in anonymously...")

EOS.Connect.ConnectInterface.delete_device_id(EOS.Connect.DeleteDeviceIdOptions.new())
Expand All @@ -292,11 +297,10 @@ func login_anonymous_async(user_display_name = "") -> bool:
login_opts.credentials = EOS.Connect.Credentials.new()
login_opts.credentials.type = EOS.ExternalCredentialType.DeviceidAccessToken
login_opts.credentials.token = null
if user_display_name:
login_opts.user_login_info = EOS.Connect.UserLoginInfo.new()
login_opts.user_login_info.display_name = user_display_name
display_name = user_display_name
display_name_changed.emit()
login_opts.user_login_info = EOS.Connect.UserLoginInfo.new()
login_opts.user_login_info.display_name = user_display_name
display_name = user_display_name
display_name_changed.emit()

return await login_game_services_async(login_opts)

Expand Down
2 changes: 1 addition & 1 deletion sample/addons/epic-online-services-godot/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Epic Online Services Godot 4.3 (EOSG)"
description="Unofficial Epic Online Services for Godot 4.3 (includes demo project)"
author="3ddelano"
version="2.1.6"
version="2.1.7"
script="plugin.gd"
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ cache/0/20/0/glyphs/80/texture_idx = 0
cache/0/20/0/kerning_overrides/16/0 = Vector2(0, 0)
cache/0/20/0/kerning_overrides/20/0 = Vector2(0, 0)

[sub_resource type="Image" id="Image_f1n54"]
[sub_resource type="Image" id="Image_0ee5d"]
data = {
"data": PackedByteArray("////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////YP///2H///8A////AP///wD///8A////AP///wD///8A////AP///2D///9h////AP///wD///8A////YP///7////+/////Yf///wD///8A////AP///wD///8A////AP///2D///+/////v////2H///8A////AP///2H///+/////v////7////9h////AP///wD///8A////AP///2D///+/////v////7////9g////AP///wD///8A////Yf///7////+/////v////2H///8A////AP///2D///+/////v////7////9g////AP///wD///8A////AP///wD///9h////v////7////+/////Yf///2D///+/////v////7////9g////AP///wD///8A////AP///wD///8A////AP///2H///+/////v////7////+/////v////7////9g////AP///wD///8A////AP///wD///8A////AP///wD///8A////Yf///7////+/////v////7////9g////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///2D///+/////v////7////+/////Yf///wD///8A////AP///wD///8A////AP///wD///8A////AP///2D///+/////v////7////+/////v////7////9h////AP///wD///8A////AP///wD///8A////AP///2D///+/////v////7r///85////jv///7////+/////v////2H///8A////AP///wD///8A////AP///2D///+/////v////73///86////AP///wb///+F////v////7////+/////Yf///wD///8A////AP///2D///+/////v////77///9E////AP///wD///8A////BP///3z///+/////v////7////9h////AP///wD///9h////v////7////9O////AP///wD///8A////AP///wD///8C////cf///7////+/////YP///wD///8A////AP///2H///9a////AP///wD///8A////AP///wD///8A////AP///wH///9m////YP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA=="),
"format": "RGBA8",
Expand All @@ -1218,7 +1218,7 @@ data = {
}

[sub_resource type="ImageTexture" id="ImageTexture_3k56q"]
image = SubResource("Image_f1n54")
image = SubResource("Image_0ee5d")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ea04u"]
content_margin_left = 4.0
Expand Down Expand Up @@ -1272,7 +1272,7 @@ corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5

[sub_resource type="Image" id="Image_tumt8"]
[sub_resource type="Image" id="Image_aweow"]
data = {
"data": PackedByteArray("////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ALOzs6OysrKmuLi4Ev///wD///8A////AP///wC4uLgSsrKyprKysqb///8A////ALGxsa2ysrLZsbGxs7i4uBL///8A////ALi4uBKysrKzsrKy2bKysqz///8A////AK+vrxOysrK1srKy2bGxsbO4uLgSuLi4ErKysrOysrLZs7OztK+vrxP///8A////AP///wCvr68TsrKytbKystmxsbGzsrKys7Kystmzs7O0r6+vE////wD///8A////AP///wD///8Ar6+vE7KysrWysrLZsrKy2bOzs7Svr68T////AP///wD///8A////AP///wD///8A////AK+vrxOysrKpsrKyqK+vrxP///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A"),
"format": "RGBA8",
Expand All @@ -1282,7 +1282,7 @@ data = {
}

[sub_resource type="ImageTexture" id="ImageTexture_oehfs"]
image = SubResource("Image_tumt8")
image = SubResource("Image_aweow")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qts61"]
content_margin_left = 8.0
Expand Down
1 change: 0 additions & 1 deletion sample/scenes/LeaderboardsView/LeaderboardsView.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var selected_leaderboard = {
func _ready() -> void:
visibility_changed.connect(_on_query_leaderboard)
HAuth.logged_out.connect(_on_logged_out)
# IEOS.leaderboards_interface_query_leaderboard_ranks_callback.connect(_on_query_leaderboard_ranks_callback)
view_leaderboard_btn.pressed.connect(_on_view_leaderboard_btn_pressed)

_rebuild_ui()
Expand Down
1 change: 1 addition & 0 deletions sample/scenes/LobbiesView/CreateLobbyPopup.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[node name="CreateLobbyPopup" instance=ExtResource("1_dmoyl")]
title = "CREATE LOBBY"
size = Vector2i(356, 245)
visible = false
script = ExtResource("2_oyj73")

[node name="VB" parent="." index="1"]
Expand Down
8 changes: 0 additions & 8 deletions sample/scenes/LobbiesView/SearchLobby.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ func _on_search_lobby_btn_pressed():
var search_type = search_lobby_type.get_selected_metadata()
var search_string = search_lobby_line_edit.text.strip_edges()

var create_search_opts = EOS.Lobby.CreateLobbySearchOptions.new()
create_search_opts.max_results = 25

var lobby_search: EOSGLobbySearch = HLobbies.create_search(create_search_opts)
if not lobby_search:
print("Failed to create lobby search")
return

var lobbies = []
if search_type == SearchType.Map:
lobbies = await HLobbies.search_by_attribute_async({
Expand Down

0 comments on commit 74c51d5

Please sign in to comment.