Game.Dlc.PdxSdkDlcsMapping
Assembly: Assembly-CSharp.dll
Namespace: Game.Dlc
Type: public class
Base: Colossal.PSI.PdxSdk.PdxSdkDlcMapper
Summary:
PdxSdkDlcsMapping is a small mapping helper class used to register/associate in-game DLC/content identifiers with the PDX SDK mapping system. It is decorated with [Preserve] to prevent the class (or its constructor) from being stripped by Unity's managed code stripping. In this implementation the constructor registers a set of content IDs for the legacy "CS1 Treasure Hunt" DLC (Dlc.CS1TreasureHunt) with the underlying PdxSdkDlcMapper.
Fields
private static readonly string[] kCS1TreasureHuntIds
Array of content ID strings mapped to the Dlc.CS1TreasureHunt enum value. These IDs represent specific pieces of content/assets that belong to the CS1 Treasure Hunt DLC and are passed to the PdxSdkDlcMapper.Map method in the constructor. The array contains the following entries:- "BusCO01"
- "BusCO02"
- "BusCOMirrored01"
- "BusCOMirrored02"
- "TramCarCO01"
- "TramEngineCO01"
- "AirplanePassengerCO01"
- "FountainPlaza01"
The field is static readonly because the set of IDs is constant and shared across all instances.
Properties
- This class does not declare any properties.
Constructors
public PdxSdkDlcsMapping()
The constructor calls Map(Dlc.CS1TreasureHunt, kCS1TreasureHuntIds) to register the listed content IDs with the PDX SDK mapping for the CS1 Treasure Hunt DLC. Because the class is marked with [Preserve], the constructor will be kept by Unity's code stripping even if it appears unused by static analysis.
Methods
- This class does not declare any additional methods beyond the constructor. The mapping work is done by calling the inherited Map method from PdxSdkDlcMapper inside the constructor.
Usage Example
using UnityEngine.Scripting;
using Game.Dlc;
using Colossal.PSI.PdxSdk;
[Preserve]
public class PdxSdkDlcsMapping : PdxSdkDlcMapper
{
private static readonly string[] kCS1TreasureHuntIds = new string[8]
{
"BusCO01", "BusCO02", "BusCOMirrored01", "BusCOMirrored02",
"TramCarCO01", "TramEngineCO01", "AirplanePassengerCO01", "FountainPlaza01"
};
public PdxSdkDlcsMapping()
{
// Register the list of content IDs for the CS1 Treasure Hunt DLC with the PDX SDK mapping system.
Map(Dlc.CS1TreasureHunt, kCS1TreasureHuntIds);
}
}
Notes: - Dlc.CS1TreasureHunt refers to the game's DLC enum value for the original CS1 "Treasure Hunt" content group. - PdxSdkDlcMapper.Map is provided by the Colossal.PSI.PdxSdk integration and is responsible for recording/bridging the game's DLC content identifiers into the PDX SDK system for asset management, packaging, or similar tooling.