diff --git a/CHANGELOG.md b/CHANGELOG.md index b7b5a63..46c988b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/plugin/export_scripts_template/autoloads/snapshots_client.gd b/plugin/export_scripts_template/autoloads/snapshots_client.gd index 7a43ad6..6b2bf1e 100644 --- a/plugin/export_scripts_template/autoloads/snapshots_client.gd +++ b/plugin/export_scripts_template/autoloads/snapshots_client.gd @@ -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. @@ -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 @@ -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. diff --git a/plugin/export_scripts_template/plugin.cfg b/plugin/export_scripts_template/plugin.cfg index 583c8a9..5cbed31 100644 --- a/plugin/export_scripts_template/plugin.cfg +++ b/plugin/export_scripts_template/plugin.cfg @@ -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"