Loot Chest UPS

by ptx0

UPS friendly, Space Exploration-centric fork of LootChestPlus. Supports all loot added to entity prototype (TheDeadBurn, Alien Loot Economy, Bobenemies). Attempts to accumulate uncollected loot in a game-engine-friendly manner. Adds Multi-Surface support for SE, allowing you to make things easier or harder.

Content
1 year, 11 months ago
1.1
2.51K
Logistics

Changelog

Version: 1.1.13
Date: 2022-03-30
  Uploaded by:
    - Pi-C

  Changes:
    - Renamed command "/LC-list-loot-chests" to "/LC-list-lootchests".
    - Added new command "/LC-show-lootchest-contents". Now you can peek into chests belonging to your force even if they are far away from you, or on another surface.


  TODO:
    - Once the commands are working, we could consider to start thinking about planning to implement a GUI. Not anytime soon, though! :-D
Version: 1.1.12
Date: 2022-03-29
  Uploaded by:
    - Pi-C

  Info:
    - I've cleaned up and restructured the control scripts to make it easier to add functionality. There is a good chance that I've missed to change some function calls, so I kind of expect that things may break. If you find a bug, please don't hesitate to report it on the mod portal!

  Changes:
    - Improved filters for on_entity_died: The event will now only fire for unit/unit-spawner/turret prototypes that have loot which is not on the ignore list. This filter list will be (re-)built in on_init and on_configuration_changed, and when another mod adds items to the ignore list.
    - Added event handlers for on_pre_surface_cleared, on_pre_surface_deleted, and on_surface_renamed.
    - Added commands /LC-empty-hidden-storage, /LC-show-hidden-storage, and /LC-list-loot-chests. If you are on a surface where your force has built a loot chest, or if your force has a loot chest on the default surface (setting "Use default chest when none exists on surface" must be active for this), you can try to move items from the hidden storage list to the loot chest. (Of course, this will fail if the loot chest doesn't have enough space.)
Version: 1.1.11
Date: 2021-12-11
  Uploaded by:
    - Pi-C

  Bugfixes:
    - Another attempt at migrating loot chests to the new data structure. In 1.1.10, it could happen that loot chests were unregistered and thus wouldn't pick up loot anymore. (https://mods.factorio.com/mod/LootChestUPS/discussion/61afd47b47c5644275675ce9)
    - Fixed that loot chest recipe wouldn't be unlocked if IR2 was active.
    - Fixed that the surface table would not be removed when the last loot chest was removed from a surface.
    - Fixed logic for handling merging loot chests/hidden storage when forces were merged.

  Locale:
    - Reworked setting descriptions to explain better what is meant with "accumulated loot".

  Changes:
    - Added debugging code I use in my other mods.
Version: 1.1.10
Date: 2021-12-06
  Uploaded by:
    - Pi-C

  Bugfixes:
    - Fixed crash when trying to add 0 items to inventory. (https://mods.factorio.com/mod/LootChestUPS/discussion/61ad010bbe2f42b1f08d5628)
    - Removed forgotten remote call that was meant for local testing only.
    - Fixed migration script.

  Changes:
    - Counter for warning messages is now per force.
    - Won't keep entries for items with count==0 anymore. This should gain some time when we check for items that can be moved from hidden storage to the loot chest, and make the save file a tiny tad smaller.
Version: 1.1.9
Date: 2021-12-05
  Uploaded by:
    - Pi-C

  Bugfixes:
    - Fixed that loot items accumulated while there was no loot chest would never be moved into the loot chest when one was built.
    - Fixed that the mod actually allowed just one chest per force, while the code looked like it was supposed to allow one chest per force and surface.
    - Fixed changelog so that it can be parsed by the in-game changelog viewer.

  Changes:
    - Other mods can now blacklist their items, so that they won't be moved into loot chests.
    - Major rework of control script.
    - Localized strings for messages that are printed to players.
    - Added compatibility with "Lua API global Variable Viewer" (gvv) by x2605.

  Modding:
    - Added remote interface: You can now prevent that your loot items are automatically picked up. See control.lua for details.
Version: 1.1.8
Date: 2021.05.01
  Changes:
    - Remove unneeded debug lines
Version: 1.1.7
Date: 2021.05.01
  Bugfixes:
    - Mark PollutionSolutionsFix as incompatible because it's doing many of the same tasks
Version: 1.1.6
Date: 2020.12.26
  Bugfixes:
    - Fixed warning message being dumped to console unnecessarily
    - Fixed warning message being printed despite player disabling it
Version: 1.1.5
Date: 2020.12.26
  Changes:
    - Improved option names & descriptions
    - Ability to direct loot to a specific surface, i.e. "Nauvis Orbit"
Version: 1.1.4
Date: 2020.12.26
  Bugfixes:
    - Fix crash when loot chest is full
Version: 1.1.3
Date: 2020.12.25
  Changes:
    - Added better multi-surface support. Now, the defaults are to collect all loot in the single chest on nauvis and to hide all loot that's generated until the chest is placed.
    - An option is there to disable single chest collection. If this is disabled, then a loot chest on the surface of the killed entity will be used.
    - Another option is added to disable hiding of loot when no chest is found for insertion (or the chest is full).
    - This is useful with the multi-surface support, so that secret areas in Space Exploration don't lose their loot drops forever.
    - Recommended settings for SE are to *disable* both options, so all loot is dropped properly until a chest is placed on the same surface.
Version: 1.1.2
Date: 2020.12.15
  Changes:
    - Reworked to event-driven implementation, no more scan interval
    - Does not require research completed before it works
    - Works with all entity-prototype defined Loot
    - Accumulates non-inserted loot in a save-size friendly manner
    - Prints notices to player every 3,000 failed collections if there is no chest placed on map