Skip to content

Game.Dlc.GdkDlcsMapping

Assembly:
Assembly-CSharp

Namespace:
Game.Dlc

Type:
class

Base:
GdkDlcMapper (from Colossal.PSI.MicrosoftGdk)

Summary:
Maps in-game DLC enum keys (Dlc) to Microsoft GDK product IDs (string) for the Microsoft/Xbox distribution. This class registers the known Skylines 2 DLC product IDs so the Microsoft GDK integration can resolve which DLC corresponds to which store/product identifier. The class is decorated with [Preserve] to avoid stripping during build/IL2CPP optimization.


Fields

  • private const string kPrePurchaseBonus = "9PM19MNT8GXH"
    Maps to the product ID used for the LandmarkBuildings (pre-purchase bonus) DLC.

  • private const string kSanFrancisco = "9NLWRT4D535J"
    Maps to the product ID used for the SanFranciscoSet DLC.

  • private const string kBridgesAndPorts = "9NFGBRJQFNB3"
    Maps to the product ID used for the BridgesAndPorts DLC.

Properties

  • (none declared in this type)

Constructors

  • public GdkDlcsMapping()
    Registers the mappings between the game's Dlc enum values and the corresponding Microsoft GDK product IDs by calling the inherited Map method:
  • Dlc.LandmarkBuildings -> "9PM19MNT8GXH"
  • Dlc.SanFranciscoSet -> "9NLWRT4D535J"
  • Dlc.BridgesAndPorts -> "9NFGBRJQFNB3"

Methods

  • (no additional methods declared; mapping happens in the constructor via the inherited Map method)

Usage Example

using Colossal.PSI.MicrosoftGdk;
using UnityEngine.Scripting;
using Game.Dlc;

[Preserve]
public class MyGdkInitializer
{
    public void Init()
    {
        // Creating an instance registers the mappings with the base GdkDlcMapper.
        var mapping = new GdkDlcsMapping();

        // After this, code that queries the GDK mapper can resolve Dlc -> product ID.
        // Example (conceptual, depends on GdkDlcMapper API):
        // string productId = mapping.GetProductId(Dlc.SanFranciscoSet);
    }
}

Notes: - The exact Map and lookup API comes from GdkDlcMapper (Colossal.PSI.MicrosoftGdk). This class only provides the concrete mappings. - The string constants are Microsoft/Xbox product identifiers for the respective DLC packages.