Example #1
0
    protected override void DropLoot(IInventoryHolder target, float dropModifier)
    {
        base.DropLoot(target, dropModifier);

        for (int i = 0; i < DefaultInventory.Size; i++)
        {
            ItemStack stack = DefaultInventory.ItemStacks[i];
            for (int j = 0; j < stack.Amount; j++)
            {
                PartGen.DropResource(target,
                                     transform.position, stack.ItemType);
            }
        }
    }
Example #2
0
    protected override void DropLoot(IInventoryHolder target, float dropModifier)
    {
        base.DropLoot(target, dropModifier);

        if (FirstQuestScriptedDrops.scriptedDropsActive)
        {
            List <ItemStack> stacks = FirstQuestScriptedDrops.GetScriptedDrop(target);
            if (stacks != null)
            {
                for (int i = 0; i < stacks.Count; i++)
                {
                    ItemStack stack = stacks[i];
                    for (int j = 0; j < stack.Amount; j++)
                    {
                        PartGen.DropResource(target,
                                             transform.position, stack.ItemType);
                    }
                }
                return;
            }
        }
    }