require "Items/Distributions";
require "Items/ProceduralDistributions";
local magazines_items = {"Base.PanzerBook", 0.3};

local function insertItemListsInProcDistribution(location, itemDistList)
    local debugfactor = 1;
    local table = ProceduralDistributions["list"][location].items
    if (table == nil) then
        print("ERROR: ProceduralDistributions[\"list\"][\"" .. location .. "\"].items is nil")
        return
    end
    local n = #table
    for idx, itemDist in ipairs(itemDistList) do
        for i = 1, #itemDist do
            n = n + 1
            table[n] = itemDist[i]
        end
    end
end

insertItemListsInProcDistribution("CrateMagazines", {magazines_items});
insertItemListsInProcDistribution("MagazineRackMixed", {magazines_items});
insertItemListsInProcDistribution("MagazineRackMaps", {magazines_items});
insertItemListsInProcDistribution("MagazineRackNewspaper", {magazines_items});
insertItemListsInProcDistribution("CrateElectronics", {magazines_items});
insertItemListsInProcDistribution("GarageTools", {magazines_items});
insertItemListsInProcDistribution("LibraryBooks", {magazines_items});
insertItemListsInProcDistribution("LibraryCounter", {magazines_items});
insertItemListsInProcDistribution("BookstoreBooks", {magazines_items});
insertItemListsInProcDistribution("LivingRoomShelf", {magazines_items});
insertItemListsInProcDistribution("PostOfficeBooks", {magazines_items});
insertItemListsInProcDistribution("CrateBooks", {magazines_items});
insertItemListsInProcDistribution("KitchenBook", {magazines_items});
