Esempio n. 1
0
    private static void ShowInventory(List <string> _params)
    {
        EntityPlayerLocal player    = GameManager.Instance.World.GetLocalPlayers()[0];
        Inventory         inventory = player.inventory;

        for (int k = 0; k < 9; k++)
        {
            Printer.Print("Inventory", k, inventory.GetItemInSlot(k), inventory[k]);
        }
        // CanStack/ TryStackItem / CanStackNoEmpty

        // Bag bag = player.bag;
        // ItemStack adding = new ItemStack(ItemClass.GetItem("resourceSnowBall", false), 1);
        // bag.AddItem(adding);
        for (int k = 0; k < 5; k++)
        {
            EffectsInventory.AddToBag(player, "resourceSnowBall", false, 1);
        }

        string item;

        item = "drinkJarYuccaJuice"; Printer.Print(item, EffectsBag.IsGroup(item));
        item = "drinkJarGoldenRodTea"; Printer.Print(item, EffectsBag.IsGroup(item));
        item = "foodEggBoiled"; Printer.Print(item, EffectsBag.IsGroup(item));
    }
Esempio n. 2
0
 public override void Effect1(EntityPlayer player, Emplacement place, OptionEffect opt)
 {
     // EffectsBag.AddItem(Bag bag, ItemStack stack, bool merge=true);
     // TODO randomize bool
     EffectsInventory.AddToBag(player, opt.OptionItem.item, false);
     ParticleGhosts.ManageParticle(player, biome.particleStorm);
 }