80 lines
1.9 KiB
C#
80 lines
1.9 KiB
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "NewDLCData", menuName = "EaseOut/dlcData")]
|
|
public class dlcData : ScriptableObject
|
|
{
|
|
[Header("Runtime")]
|
|
public string runtimeDlcId;
|
|
|
|
[Header("Inspector")]
|
|
public Sprite dlc_image;
|
|
|
|
[Header("Inspector")]
|
|
public int dlcID;
|
|
|
|
[Header("Inspector")]
|
|
public string dlcName;
|
|
|
|
[Header("Inspector")]
|
|
public string dlcProducer;
|
|
|
|
[Header("Inspector")]
|
|
public bool dlcIsUnlocked;
|
|
|
|
[Header("Entitlement")]
|
|
[Tooltip("When enabled, this DLC requires ownership validation before its content can be used.")]
|
|
public bool requiresOwnership;
|
|
|
|
[Tooltip("Steam DLC App ID. Keep 0 when unused.")]
|
|
public int steamAppId;
|
|
|
|
[Tooltip("Optional remote catalog/content id for future remote delivery.")]
|
|
public string remoteCatalogId;
|
|
|
|
[Tooltip("True when this DLC's content ships inside the current player build.")]
|
|
public bool builtInContent = true;
|
|
|
|
[Header("Inspector")]
|
|
[TextArea(3,10)]
|
|
public string dlcDescription;
|
|
|
|
[Header("Inspector")]
|
|
public string dlcPublishDate;
|
|
|
|
[Header("Inspector")]
|
|
public List<SongData> songList = new List<SongData>();
|
|
|
|
[Header("DLC Song Content")]
|
|
public List<SongDlcContentSO> songContentOverrides = new List<SongDlcContentSO>();
|
|
|
|
[Header("Inspector")]
|
|
[Tooltip("Documentation text normalized.")]
|
|
public AudioClip settlementMusic;
|
|
|
|
public string GetResolvedDlcKey()
|
|
{
|
|
if (!string.IsNullOrWhiteSpace(runtimeDlcId))
|
|
{
|
|
return runtimeDlcId.Trim();
|
|
}
|
|
|
|
if (dlcID > 0)
|
|
{
|
|
return dlcID.ToString();
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(dlcName))
|
|
{
|
|
return dlcName.Trim();
|
|
}
|
|
|
|
return string.IsNullOrWhiteSpace(name) ? "dlc" : name.Trim();
|
|
}
|
|
|
|
public bool ShouldEnforceEntitlement()
|
|
{
|
|
return requiresOwnership;
|
|
}
|
|
}
|