From f3716c909d83ec3be1e9f2aa81de233655c77a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20Ib=C3=A1=C3=B1ez=20S=C3=A1nchez?= Date: Mon, 22 Jan 2024 22:14:58 +0100 Subject: [PATCH] Rename the Game class in snapshots_client.gs to GameInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jacob Ibáñez Sánchez --- CHANGELOG.md | 4 ++++ .../export_scripts_template/autoloads/snapshots_client.gd | 8 ++++---- plugin/export_scripts_template/plugin.cfg | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) 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"