Exemple #1
0
 public static void RegisterPurchasableUpgrade <T>(UpgradeShopEntry entry) where T : LandPlotUI
 {
     PurchasableUIRegistry.RegisterPurchasable <T>((x) => new PurchaseUI.Purchasable(entry.NameKey, entry.icon, entry.mainImg, entry.DescKey, entry.cost, entry.landplotPediaId, () => {
         x.Upgrade(entry.upgrade, entry.cost);
     }, entry.isUnlocked ?? (() => true), () => !x.activator.HasUpgrade(entry.upgrade)));
 }
Exemple #2
0
 public static void RegisterPurchasableUpgrade <T>(UpgradeShopEntry entry) where T : LandPlotUI
 {
     PurchasableUIRegistry.RegisterPurchasable <T>((x) => new Purchasable(entry.NameKey, entry.icon, entry.mainImg, entry.DescKey, entry.cost, entry.landplotPediaId, () => {
         x.Upgrade(entry.upgrade, entry.cost);
     }, entry.isUnlocked != null ? (Func <bool>)(() => entry.isUnlocked(x.activator)) : (() => true), entry.isAvailable != null ? (Func <bool>)(() => entry.isAvailable(x.activator)) : (() => !x.activator.HasUpgrade(entry.upgrade)), null, entry.warning ?? null, null, null, entry.holdtopurchase));
 }