14 var curEquips = CheatSheetInterface.GetEnabledExtraAccessories(player).Take(_oldCheatSheetEquips.Length).ToArray();
17 for (
int i = 0; i < curEquips.Length; i++)
19 var oldEquip = _oldCheatSheetEquips[i];
20 var newEquip = curEquips[i];
23 if (oldEquip != null && newEquip == oldEquip)
31 if (oldEquip != null && !oldEquip.IsAir)
35 AddDetachItem(oldEquip, m);
40 if (newEquip != null && !newEquip.IsAir)
44 AddAttachItem(newEquip, m);
48 _oldCheatSheetEquips[i] = newEquip;
52 if (curEquips.Length >= _oldCheatSheetEquips.Count(x => x != null))
57 var outOfDateEquips = _oldCheatSheetEquips.Skip(curEquips.Length);
59 foreach (var item
in outOfDateEquips.Where(x => x != null && !x.IsAir))
64 AddDetachItem(item, m);
Defines a modifier, which is an unloaded GlobalItem Making it a GlobalItem gives easy access to all h...
void UpdateCheatSheetCache()
Defines an item that may be modified by modifiers from mods
static List< Modifier > GetActivePool(Item item)
Caches the item held and items equipped by players. When equips and held items change, their respective modifiers' effects are automatically called to detach and attach their delegations.