rise-and-swine/Assets/Scripts/Assembly-CSharp/BuildCustomizationSpecificObject.cs

45 lines
932 B
C#
Raw Permalink Normal View History

2023-02-25 23:04:03 -05:00
public class BuildCustomizationSpecificObject : WPFMonoBehaviour
{
private void Start()
{
Condition condition = this.m_condition;
if (condition != BuildCustomizationSpecificObject.Condition.IsContentLimited)
{
if (condition != BuildCustomizationSpecificObject.Condition.IsContentLimitedHasFieldOfDreams)
{
if (condition == BuildCustomizationSpecificObject.Condition.HasLeaderboards)
{
this.DestroyIf(true);
}
}
else
{
this.DestroyIf(GameProgress.GetFullVersionUnlocked() || !GameProgress.GetSandboxUnlocked("S-F"));
}
}
else
{
this.DestroyIf(GameProgress.GetFullVersionUnlocked());
}
}
private void DestroyIf(bool flag)
{
if (flag && !this.m_not)
{
UnityEngine.Object.Destroy(base.gameObject);
}
}
public Condition m_condition;
public bool m_not;
public enum Condition
{
IsContentLimited,
IsContentLimitedHasFieldOfDreams,
HasLeaderboards
}
}