Name: Better Storage Tanks
Description: Factorio mod that allows picking up storage tanks without dumping their contents.
License: MIT
Version: 0.3.6
Release: 2016-09-18
Tested-With-Factorio-Version: 0.14.14
Category: Item
Tags: Tanker, Liquid, Storage Tank
Download-Url: Mod portal
Source-Url: GitHub repository
Long description
Long description
Usage:
Just mine a storage tank with any liquid in it and it will magically appear in your inventory. You can then place obtained item to build a storage tank with the same liquid amount and type. It should work with any liquid-adding mods, but I haven't tested it yet. I have added a GUI button to dump contents of a storage tank, so now you don't need to shoot it to empty it :^)
Disclaimer:
Mod might do some weird stuff sometimes, be sure to save your game every now and then and please report any bugs/errors to this thread.
Usage:
Just mine a storage tank with any liquid in it and it will magically appear in your inventory. You can then place obtained item to build a storage tank with the same liquid amount and type. It should work with any liquid-adding mods, but I haven't tested it yet. I have added a GUI button to dump contents of a storage tank, so now you don't need to shoot it to empty it :^)
Disclaimer:
Mod might do some weird stuff sometimes, be sure to save your game every now and then and please report any bugs/errors to this thread.
current issues
Current issues
This section will be deleted when I consider that all's well.
Apparently, storage tanks of the same liquid MERGE into one with conbined contents. I have no idea why this happens, maybe it's the stack behaviour.
Error: if you have a full inventory and all empty slots on quickbar have filters set, the game crashes on attempt to mine a non-empty storage tank. Fixed!
Mod doesn't properly work with construction bots.When deconstructed, behaves normally. Can't be used to construct a blueprint. I don't know if this should be changed or not. When deconstructed, returns an empty tank. Disabled deconstruction for non-empty tanks. When trying to construct a storage tank - always uses and creates only empty storage tank.
Entity health is not retained through mining/placing. Entity health is properly retained.
Possible liquid duplication Fixed! (see credomane's post)
This section will be deleted when I consider that all's well.
Apparently, storage tanks of the same liquid MERGE into one with conbined contents. I have no idea why this happens, maybe it's the stack behaviour.
Mod doesn't properly work with construction bots.
Version history
Version history
- 0.1.0 (2016-09-18): Initial release. Has item generator for all liquid types, but still no icon generator and no handler for a completely full inventory. Locale: en, ru, ja
- 0.1.1 (2016-09-18): Debug flag set to false, you can set it back to true in control.lua
- 0.2.0 (2016-09-19): Rebuilt handler for Storage Tank mining, now you can't mine stuff with full inventory. Fixed a bug with "ghost item" in hand
- 0.2.1 (2016-09-19): Added icon generator. Looks meh, but whatever. Fixed another "ghost item" in hand bug
- 0.2.2 (2016-09-19): Added GUI that allows to dump contents of the storage tank
- 0.2.3 (2016-09-20): Now liquid is properly removed from the entity before it is mined. No longer duplicates liquids in the system
- 0.3.0 (2016-09-23): Rebuilt handler AGAIN. Now it's less spaghetti and more code! Removed various bugs. Construction bots finally can properly place EMPTY Storage Tanks in blueprints (they used to use crude oil tanks because alphabet and reasons). Health is properly retained through mining and placing the storage tank.
- 0.3.1 (2016-09-23): Fixed crash on attempt to mine storage tank with filtered quickbar
- 0.3.2 (2016-09-23): Removed some silly code. Bots can't mine non-empty tanks anymore.
- 0.3.3 (2016-09-23): Added new data table, it should prevent issues with multiplayer (if there was any).
- 0.3.4 (2016-09-24): Fixed an error on deconstruction "Passed index is out of range".
- 0.3.5 (2016-09-24): Fixed an error on GUI click "Attempt to index field 'opened' (a nil value)".
- 0.3.6 (2016-10-17): Replaced .has_filters() with .supports_filters() because Factorio devs like clarity.
- 0.1.0 (2016-09-18): Initial release. Has item generator for all liquid types, but still no icon generator and no handler for a completely full inventory. Locale: en, ru, ja
- 0.1.1 (2016-09-18): Debug flag set to false, you can set it back to true in control.lua
- 0.2.0 (2016-09-19): Rebuilt handler for Storage Tank mining, now you can't mine stuff with full inventory. Fixed a bug with "ghost item" in hand
- 0.2.1 (2016-09-19): Added icon generator. Looks meh, but whatever. Fixed another "ghost item" in hand bug
- 0.2.2 (2016-09-19): Added GUI that allows to dump contents of the storage tank
- 0.2.3 (2016-09-20): Now liquid is properly removed from the entity before it is mined. No longer duplicates liquids in the system
- 0.3.0 (2016-09-23): Rebuilt handler AGAIN. Now it's less spaghetti and more code! Removed various bugs. Construction bots finally can properly place EMPTY Storage Tanks in blueprints (they used to use crude oil tanks because alphabet and reasons). Health is properly retained through mining and placing the storage tank.
- 0.3.1 (2016-09-23): Fixed crash on attempt to mine storage tank with filtered quickbar
- 0.3.2 (2016-09-23): Removed some silly code. Bots can't mine non-empty tanks anymore.
- 0.3.3 (2016-09-23): Added new data table, it should prevent issues with multiplayer (if there was any).
- 0.3.4 (2016-09-24): Fixed an error on deconstruction "Passed index is out of range".
- 0.3.5 (2016-09-24): Fixed an error on GUI click "Attempt to index field 'opened' (a nil value)".
- 0.3.6 (2016-10-17): Replaced .has_filters() with .supports_filters() because Factorio devs like clarity.
ToDo
To do
Main goal is to add a handler for when a player tries to mine a storage tank whilst having a full inventory. I plan to add an error message, kinda like "Can't insert X: inventory full.", and some code to cancel the attempt to mine the storage tank. it is done! Now it returns an error message and replaces the tank.
It would be nice to add icons for every tank with liquid. Icon generator is done!
I also really want to mess around with GUI and add "Dump contents" button, because at the moment there is no proper way to remove tank contents. Simple GUI done! Now you can see contents of a storage tank and dump them if you want.
Maybe it is a good idea to add bot behaviour, so they can mine tanks and keep the liquid inside. Currenlty there is no way to affect bot inventory.
Multiplayer testing? Multiplayer fixes? Different data table?... More questionmarks?
Multiplayer testing? Multiplayer fixes? Different data table?... More questionmarks?