Iakobs / godot-play-game-services

A Godot 4.2 plugin for integration with Google Play Game Services
MIT License
82 stars 5 forks source link

Enhancement Request: Include JSON String Support in Signal Information #22

Closed nepalisameer closed 4 months ago

nepalisameer commented 4 months ago
val gameLoaded = SignalInfo("gameLoaded", Dictionary::class.java)

val conflictEmitted = SignalInfo("conflictEmitted", Dictionary::class.java)

Currently, these signal supports only Dictionary as its payload type. However, there are scenarios where it would be beneficial to support JSON strings as well. This enhancement request aims to broaden the flexibility of signal information by allowing JSON strings alongside dictionaries. It would be great to have JSON as signal parameter, especially when dealing with external systems (in my case C#).

Maybe something like this with JSON support

val gameLoadedWithJSON = SignalInfo("gameLoadedWithJson", String::class.java,)
val conflictEmittedWithJSON = SignalInfo("conflictEmittedWithJson", String::class.java)
Iakobs commented 4 months ago

Hi @nepalisameer thanks for your suggestion, you have it already done in the latest release :)

Please let me know if you need something else, in the meantime I'll be closing this issue.