public override void OnEquip(Inventory equipper) { LaceratorSword lacerator = FindLacerator(equipper.holdableItems); if (lacerator) { lacerator.Damage.Type = DamagePacket.DamageType.STRUCTURAL; } }
protected virtual LaceratorSword FindLacerator(List <EquippedHoldableItem> items) { LaceratorSword foundWeapon = null; for (int i = 0; i < items.Count && !foundWeapon; i++) { foundWeapon = items[i].GetComponent <LaceratorSword>(); } return(foundWeapon); }