private void RemoveSlots() { AddedSlots.ForEach(slot => HostUpgrade.HostShip.UpgradeBar.RemoveSlot(slot.Type, this)); ForbiddenSlots.ForEach(type => HostUpgrade.HostShip.UpgradeBar.AllowSlots(type)); foreach (var item in CostReductionByType) { HostUpgrade.HostShip.UpgradeBar.CostReduceByType(item.Key, -item.Value); } }
private void AddSlots() { AddedSlots.ForEach(slot => { slot.GrantedBy = this; HostUpgrade.HostShip.UpgradeBar.AddSlot(slot); }); ForbiddenSlots.ForEach(type => { HostUpgrade.HostShip.UpgradeBar.ForbidSlots(type); }); foreach (var item in CostReductionByType) { HostUpgrade.HostShip.UpgradeBar.CostReduceByType(item.Key, item.Value); } }