/* Equips an item to an actor's arms, giving it max ammo if relevant. */ public static void PrimaryEquip(string item, ref Actor actor) { Data dat = Item.GetItem(item); if (dat != null) { if (dat.itemType == Item.RANGED) { Ranged.MaxAmmo(ref dat); } actor.Equip(dat); } else { MonoBehaviour.print(item + " was null!"); } }
/* Spawns this weapon, giving it full ammo if applicable. */ private void Spawn() { Data dat = Item.GetItem(weaponName); if (dat != null) { if (dat.itemType == Item.RANGED) { Ranged.MaxAmmo(ref dat); } Item item = Item.GetItem(dat); if (item != null) { weapon = item.gameObject; weapon.transform.position = transform.position; } } }
public static void DualEquip(string item, ref Actor actor) { Data dat = Item.GetItem(item); if (dat != null) { if (dat.itemType == Item.RANGED) { Ranged.MaxAmmo(ref dat); } if (!actor.arms.DualEquipAvailable(dat)) { MonoBehaviour.print("Could not dual equip " + item); return; } actor.DualEquip(dat); } else { MonoBehaviour.print(item + " was null!"); } }