Skip to content

Commit

Permalink
Rename the Game class in snapshots_client.gs to GameInfo
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Ibáñez Sánchez <jacobibanez@jacobibanez.com>
  • Loading branch information
Iakobs committed Jan 22, 2024
1 parent 32c0df9 commit f3716c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.1
### Rename the `Game` class in `snapshots_client.gd` to `GameInfo`
The `Game` inner class in the `SnapshotsClient` autoload was renamed to `GameInfo` to avoid possible common clashes with games who might already use that name in their own namespace, as suggested by @g-libardi in [this issue](https://github.com/Iakobs/godot-play-game-services/issues/9).

## v1.2.0

### Deprecated signal
Expand Down
8 changes: 4 additions & 4 deletions plugin/export_scripts_template/autoloads/snapshots_client.gd
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class SnapshotMetadata:
var played_time: int ## The played time of this snapshot in milliseconds.
var has_change_pending: bool ## Indicates whether or not this snapshot has any changes pending that have not been uploaded to the server.
var owner: PlayersClient.Player ## The player that owns this snapshot.
var game: Game ## The game associated with this snapshot.
var game: GameInfo ## The game information associated with this snapshot.
var device_name: String ## The name of the device that wrote this snapshot, if known.
var cover_image_uri: String ## The snapshot cover image.

Expand All @@ -147,7 +147,7 @@ class SnapshotMetadata:
if dictionary.has("playedTime"): played_time = dictionary.playedTime
if dictionary.has("hasChangePending"): has_change_pending = dictionary.hasChangePending
if dictionary.has("owner"): owner = PlayersClient.Player.new(dictionary.owner)
if dictionary.has("game"): game = Game.new(dictionary.game)
if dictionary.has("game"): game = GameInfo.new(dictionary.game)
if dictionary.has("deviceName"): device_name = dictionary.deviceName
if dictionary.has("coverImageUri"): cover_image_uri = dictionary.coverImageUri

Expand All @@ -169,8 +169,8 @@ class SnapshotMetadata:

return ", ".join(result)

## Alass with information about a game.
class Game:
## A class with information about a game.
class GameInfo:
var are_snapshots_enabled: bool ## Indicates whether or not this game supports snapshots.
var achievement_total_count: int ## The number of achievements registered for this game.
var application_id: String ## The application ID for this game.
Expand Down
2 changes: 1 addition & 1 deletion plugin/export_scripts_template/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="GodotPlayGameServices"
description="A Godot 4.2 plugin for Google Play Game Services"
author="Jacob Ibáñez Sánchez"
version="1.2.0"
version="1.2.1"
script="export_plugin.gd"

0 comments on commit f3716c9

Please sign in to comment.