private static void RetrieveStockWrappers() { ChanceFormatter = BetterUI.ProcItemsCatalog.ChanceFormatter; RangeFormatter = BetterUI.ProcItemsCatalog.RangeFormatter; HPFormatter = BetterUI.ProcItemsCatalog.HPFormatter; NoStacking = BetterUI.ProcItemsCatalog.NoStacking; LinearStacking = BetterUI.ProcItemsCatalog.LinearStacking; HyperbolicStacking = BetterUI.ProcItemsCatalog.HyperbolicStacking; ExponentialStacking = BetterUI.ProcItemsCatalog.ExponentialStacking; LinearCap = BetterUI.ProcItemsCatalog.LinearCap; }
public static void AddEffect(ItemDef itemDef, float value, float?extraStackValue = null, EffectFormatterWrapper formatter = null, StackingFormulaWrapper stackFormula = null, CapFormulaWrapper capFormula = null) { ItemCatalog.availability.CallWhenAvailable(() => { AddEffect(itemDef.itemIndex, value, extraStackValue, formatter, stackFormula, capFormula); }); }
public static void AddEffect(ItemIndex itemIndex, float value, float?extraStackValue = null, EffectFormatterWrapper formatter = null, StackingFormulaWrapper stackFormula = null, CapFormulaWrapper capFormula = null) { if (!ItemCatalog.availability.available) { TILER2Plugin._logger.LogError("Compat_BetterUI.AddEffect (itemIndex) cannot be used before ItemCatalog setup"); return; } BetterUI.ProcItemsCatalog.AddEffect(itemIndex, value, extraStackValue, formatter != null ? (BetterUI.ProcItemsCatalog.EffectFormatter)((calcValue, procCoef, luck, canCap, cap) => { return(formatter(calcValue, procCoef, luck, canCap, cap)); }) : null, stackFormula != null ? (BetterUI.ProcItemsCatalog.StackingFormula)((val, esv, stacks) => { return(stackFormula(val, esv, stacks)); }) : null, capFormula != null ? (BetterUI.ProcItemsCatalog.CapFormula)((val, esv, pCoef) => { return(capFormula(val, esv, pCoef)); }) : null); }
public static void AddEffect(ItemIndex itemIndex, float value, float?extraStackValue = null, EffectFormatterWrapper formatter = null, StackingFormulaWrapper stackFormula = null, CapFormulaWrapper capFormula = null) { BetterUI.ProcItemsCatalog.AddEffect(itemIndex, value, extraStackValue, formatter != null ? (BetterUI.ProcItemsCatalog.EffectFormatter)((calcValue, procCoef, luck, canCap, cap) => { return(formatter(calcValue, procCoef, luck, canCap, cap)); }) : null, stackFormula != null ? (BetterUI.ProcItemsCatalog.StackingFormula)((val, esv, stacks) => { return(stackFormula(val, esv, stacks)); }) : null, capFormula != null ? (BetterUI.ProcItemsCatalog.CapFormula)((val, esv, pCoef) => { return(capFormula(val, esv, pCoef)); }) : null); }