diff --git a/infinite_storage_chest.lua b/infinite_storage_chest.lua index c0b2b27b..218b4191 100644 --- a/infinite_storage_chest.lua +++ b/infinite_storage_chest.lua @@ -68,9 +68,8 @@ local function do_item(name, count, inv, storage) end diff = math.min(prev, -diff) - - new_amount = prev - diff - inv.insert({name = name, count = diff}) + local inserted = inv.insert({name = name, count = diff}) + new_amount = prev - inserted end if new_amount == 0 then diff --git a/map_gen/presets/beach.lua b/map_gen/presets/beach.lua index 53220c08..4a3730c5 100644 --- a/map_gen/presets/beach.lua +++ b/map_gen/presets/beach.lua @@ -15,10 +15,10 @@ sand_shape = b.change_tile(sand_shape, true, 'sand-1') local value = b.manhattan_value local ores = { - {b.resource(b.full_shape, 'iron-ore', value(250, 1)), 6}, - {b.resource(b.full_shape, 'copper-ore', value(250, 1)), 4}, - {b.resource(b.full_shape, 'stone', value(250, 1)), 1}, - {b.resource(b.full_shape, 'coal', value(250, 1)), 1} + {b.resource(b.full_shape, 'iron-ore', value(125, 0.5)), 6}, + {b.resource(b.full_shape, 'copper-ore', value(125, 0.5)), 4}, + {b.resource(b.full_shape, 'stone', value(125, 0.5)), 1}, + {b.resource(b.full_shape, 'coal', value(125, 0.5)), 1} } uranium_ore = b.resource(b.full_shape, 'uranium-ore', value(50, 0.25))