From 32c35baa6b19429f4d98a6a410c6273ee301e8f8 Mon Sep 17 00:00:00 2001 From: grilledham Date: Sat, 9 Feb 2019 18:02:43 +0000 Subject: [PATCH] mark inf chests as inactive --- features/infinite_storage_chest.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/features/infinite_storage_chest.lua b/features/infinite_storage_chest.lua index 0267ed17..3a73fd07 100644 --- a/features/infinite_storage_chest.lua +++ b/features/infinite_storage_chest.lua @@ -22,7 +22,7 @@ local chest_gui_frame_name = Gui.uid_name() local chest_content_table_name = Gui.uid_name() function Module.create_chest(surface, position, storage) - local entity = surface.create_entity{name = 'infinity-chest', position = position, force = 'player'} + local entity = surface.create_entity {name = 'infinity-chest', position = position, force = 'player'} chests[entity.unit_number] = {entity = entity, storage = storage} return entity end @@ -33,6 +33,8 @@ local function built_entity(event) return end + entity.active = false + chests[entity.unit_number] = {entity = entity, storage = {}} end @@ -258,6 +260,12 @@ Gui.on_custom_close( ) local market_items = require 'resources.market_items' -table.insert(market_items, {price = 100, name = 'infinity-chest', description = 'Stores unlimited quantity of items for up to 48 different item types'}) +table.insert( + market_items, + { + price = 100, + name = 'infinity-chest', + description = 'Stores unlimited quantity of items for up to 48 different item types' + } +) return Module -