# Upgrade Notes

## Version 2.x 2022-xx-xx
### General
* `PayoutAmount` is now used in place of `CurrencyAmount` to account for the addition of `IPayoutEntity` paying out non currency items, `PayoutAmount`'s `PayoutItemId` is now used to access the Id of the payout entity.

### Entities
* `IStandardContentSavedData.TradeInputCurrencyAmount` and `IStandardContentSavedData.TradeOutputCurrencyAmount` is now renamed to `IStandardContentSavedData.TradeInputAmount` and `IStandardContentSavedData.TradeOutputAmount` due to the introduction of `PayoutAmount`
* `ITrade.InputCurrencyAmount` and `ITrade.OutputCurrencyAmount` is now renamed to `ITrade.InputAmount` and `ITrade.OutputAmount` due to the introduction of `PayoutAmount`
* `IPayoutEntity.CalculatePayouts` now returns `PayoutAmount` instead of `CurrencyAmount`
* `ITimeSkipReward.CalculateAndCacheRewards` now returns `PayoutAmount` instead of `CurrencyAmount`
* `IPayoutEntity.CalculatePayouts` now returns `PayoutAmount[]` instead of `CurrencyAmount[]`

### Services
* `IProjectionService.GetProjectedEarnings` now returns `PayoutAmount` instead of `CurrencyAmount`
* `IProjectionCalculator.CalculateEarningsByTime` now returns `PayoutAmount` instead of `CurrencyAmount`
* `IPayoutProjection.PayoutRates` now returns `PayoutAmount[]` instead of `CurrencyAmount[]`

## Version L.0.0 to L.1.0, 2021-02-10

### General
* IdleKit's data is now handled by Beamable, a framework, which allows all the required IdleKit data to be loaded remotely at the app's startup.
* The ability to create multiple Entities from one Static Data and Entity instancing have been deprecated due to the integration of Beamable. Meaning that the need for Instance Ids or Unique Ids has been removed. IdleKit has moved to calling Ids simply as `Id` across the whole framework.
* If you need to create several Entities from the same Static Data, the new solution is to create the same amount of Entity Static Data as the required amount Entities, even if they end up being identical. This is required to maintain a 1-to-1 relationship between each Entity, the Static Data its generated from, and the Saved Data which that Static Data generates.

### Data
* `ISavedDataProvider`'s `CreateSavedData` method is now parameterless as each Saved Data now only relates to 1 specific Static Data and 1 specific Entity.
* `GetGlobalData` and `GetContentData` methods have been deprecated from the `Startup` class. This was done because with the Beamble integration Entity instancing has been deprecated, which means there is no way to create multiple Entities from the same Static Data. There is no need to make a distinction between Global and Content data, as all data is now technically Global and unique. If you need to make a distinction between 2 identical pieces of Static Data, use the Beamble tagging system.
* `IStartup` interface doesn't contain a list of Content Ids the user can load into any more. Instead the content Ids for switching between contens should be retrieved from the `IEventSettingsData`'s own `EventContentId` property, as with Beamble's integration all data are now global and have unique Ids across the project.
* `StageData` now holds a list of `goalTrackId`s instead of `GoalDataSequence`s.

### Entities
* `IsContentSpecific` property has been deprecated, as IdleKit has deprecated the ability to create multiple instances of the same Entity. Please see the `General` section for tips on how to handle creation of Entities from the same Static Data.
* `IEntity`'s `StatidDataId` and `InstanceId` were replaced with `Id`, as the ability to have multiple Entities with the same Static Data has been deprecated.
* `IEntityData`'s `CreateEntity` method is now parameterless, as multiple instances of the same Entity with different Ids have been deprecated.
* All methods related to loading multiple instances of `IEntity`s with different Ids have been deprecated. See the `General` section for tips on how to handle creation of Entities from the same Static Data.
* Removed the `ResetUser` functionality from `IKMonoInstaller`. To reset a remote user use Beamable API inside the `Beamable` class.
* `GetEventContentId` and `GetUniqueEventContentIds` methods related to retrieving unique content Ids have been removed from the `IEventService` interface, as Entity instancing by id has been deprecated. Use the Beamable tagging system to separate data into different categories, as all data is now global.

### Serializer
* `ISerializer` inteface now has an `Initialize` method, which allows it to prepare any dependencies, before deserializing data.
* The `Delete` method inside `ISerializer` now takes in the Saved Data itself, as well as its Id.
* Removed the binding process for an `ISerializer` from the `IKInstaller` as the serialization functions for Beamable data are handled in a new class: `BeamableJsonSerializer`. This new calss is bound inside the new `RemoteInstaller`.
* Removed the `GenerateContentSpecificSavedId` method from `SerializationService` as Beamable doesn't allow sharing of saved data between contents.
* `SimpleJsonSerializer`'s `Delete` method now takes in the Saved Data itself, as well as its Id.
* `SimpleSerializer`'s `Delete` method now takes in the Saved Data itself, as well as its Id.
