Skip to content

Commit b42ba80

Browse files
authored
Merge pull request #38 from TaloDev/develop
Release 0.12.0
2 parents effad38 + 9cfc5a9 commit b42ba80

33 files changed

+275
-193
lines changed

addons/talo/apis/api.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ class_name TaloAPI extends Node
33
var client: TaloClient
44

55
func _init(base_path: String):
6-
name = "Talo%s" % [base_path]
6+
name = "Talo%s" % base_path
77
client = TaloClient.new(base_path)
88
add_child(client)

addons/talo/apis/feedback_api.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ func get_categories() -> Array:
1010
_:
1111
return []
1212

13-
func send(internal_name: String, comment: String) -> void:
13+
func send(category_internal_name: String, comment: String) -> void:
1414
if Talo.identity_check() != OK:
1515
return
1616

17-
await client.make_request(HTTPClient.METHOD_POST, "/categories/%s" % internal_name, {
17+
await client.make_request(HTTPClient.METHOD_POST, "/categories/%s" % category_internal_name, {
1818
comment = comment
1919
})

addons/talo/apis/player_groups_api.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class_name PlayerGroupsAPI extends TaloAPI
22

33
func get_group(group_id: String) -> TaloPlayerGroup:
4-
var res = await client.make_request(HTTPClient.METHOD_GET, "/%s" % [group_id])
4+
var res = await client.make_request(HTTPClient.METHOD_GET, "/%s" % group_id)
55

66
match (res.status):
77
200:

addons/talo/apis/players_api.gd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ func merge(player_id1: String, player_id2: String) -> TaloPlayer:
3434
return TaloPlayer.new(res.body.player)
3535
_:
3636
return null
37+
38+
func generate_identifer() -> String:
39+
var time_hash: String = String(TimeUtils.get_current_time_msec()).sha256_text()
40+
var size = 12
41+
var split_start: int = RandomNumberGenerator.new().randi_range(0, time_hash.length() - size)
42+
return time_hash.substr(split_start, size)

addons/talo/apis/saves_api.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func update_save(save: TaloGameSave, new_name: String = "") -> TaloGameSave:
135135
if Talo.identity_check() != OK:
136136
return
137137

138-
var res = await client.make_request(HTTPClient.METHOD_PATCH, "/%s" % [save.id], {
138+
var res = await client.make_request(HTTPClient.METHOD_PATCH, "/%s" % save.id, {
139139
name=save.display_name if new_name.is_empty() else new_name,
140140
content=content
141141
})
@@ -152,7 +152,7 @@ func delete_save(save: TaloGameSave) -> void:
152152
if Talo.identity_check() != OK:
153153
return
154154

155-
var res = await client.make_request(HTTPClient.METHOD_DELETE, "/%s" % [save.id])
155+
var res = await client.make_request(HTTPClient.METHOD_DELETE, "/%s" % save.id)
156156

157157
match res.status:
158158
_:

addons/talo/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="Talo Game Services"
44
description="Talo (https://trytalo.com) is an open-source game backend with services designed to help you build games faster. You can currently:\n\n- Identify and authenticate players\n- Store persistent data across players\n- Track events (levelling up, finding loot, etc)\n- Display high scores with leaderboards\n- Store and load player saves\n- Load game config options and flags from the cloud\n- Get feedback directly from your players"
55
author="trytalo"
6-
version="0.11.0"
6+
version="0.12.0"
77
script="talo_autoload.gd"

addons/talo/samples/authentication/scripts/in_game.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func _ready() -> void:
1111
Talo.players.identified.connect(_on_player_identified)
1212

1313
func _on_player_identified(player: TaloPlayer) -> void:
14-
username.text = "What would you like to do,\n%s?" % [Talo.current_alias.identifier]
14+
username.text = "What would you like to do,\n%s?" % Talo.current_alias.identifier
1515

1616
func _on_change_password_pressed() -> void:
1717
go_to_change_password.emit()

addons/talo/samples/leaderboards/scripts/leaderboard.gd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ func _ready() -> void:
2121

2222
func _set_entry_count():
2323
if entries_container.get_child_count() == 0:
24-
info_label.text = "No entries yet!" if not _entries_error else "Failed loading leaderboard %s. Does it exist?" % [leaderboard_internal_name]
24+
info_label.text = "No entries yet!" if not _entries_error else "Failed loading leaderboard %s. Does it exist?" % leaderboard_internal_name
2525
else:
26-
info_label.text = "%s entries" % [entries_container.get_child_count()]
26+
info_label.text = "%s entries" % entries_container.get_child_count()
2727
if _filter != "All":
28-
info_label.text += " (%s team)" % [_filter]
28+
info_label.text += " (%s team)" % _filter
2929

3030
func _create_entry(entry: TaloLeaderboardEntry) -> void:
3131
var entry_instance = entry_scene.instantiate()
@@ -82,7 +82,7 @@ func _on_filter_pressed() -> void:
8282
_filter_idx += 1
8383
_filter = _get_next_filter(_filter_idx)
8484

85-
info_label.text = "Filtering on %s" % [filter_button.text.to_lower()]
86-
filter_button.text = "%s team scores" % [_get_next_filter(_filter_idx + 1)]
85+
info_label.text = "Filtering on %s" % filter_button.text.to_lower()
86+
filter_button.text = "%s team scores" % _get_next_filter(_filter_idx + 1)
8787

8888
_build_entries()

addons/talo/samples/leaderboards/scripts/leaderboard_entry.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func _set_score(score: int) -> void:
1111

1212
func _set_team(team: String) -> void:
1313
if not team.is_empty():
14-
text += " (%s team)" % [team]
14+
text += " (%s team)" % team
1515

1616
func set_data(entry: TaloLeaderboardEntry) -> void:
1717
_set_pos(entry.position)

0 commit comments

Comments
 (0)