Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve resource, pipe and chest logic (#16)
* Added support for drills with multiple resource types When checking a drill for remaining resources, check for resources matching any of that drill's compatible types. * Remove empty fluid miners when setting changed Re-scan for depleted miners when fluid miner setting is newly enabled. Improve debug prints for resource types. * Moved max_radius calculation to init_globals * Calculate max_radius based on all prototypes in the game, rather than checking every single entity when it is built to see if it has a larger radius. * Add filter to on_deconstruction_cancelled event. * Moved max_radius calculation to init_globals * Calculate max_radius based on all prototypes in the game, rather than checking every single entity when it is built to see if it has a larger radius. * Add filter to on_deconstruction_cancelled event. * Improved pipe rotation logic Change pipe placement to utilize the direction-specific connection coordinates contained in the prototype data, rather than assuming symmetrical rotation. * Update autodeconstruct.lua * Removed unneeded validity checks for a fluidbox we know exists. * Only build pipes if this miner has more than one connection. (If a row depletes uniformly from the very end, no pipes are ever needed.) * Fixed chests being deconstructed while still in use * Fixed a logic error when checking if another miner is still using a chest. * Simplified the search code to find entities targeting the chest. * Fixed a crash if an inserter is nearby the chest but not targeting the chest. * Add deconstructing inserters feeding fuel to burner miners * For burner miners, checks for inserters targeting the miner and deconstructs them too. Note: Only case not covered is if an inserter is *taking* fuel from this miner in a daisy chain, in which case you might not want it to be deconstructed at all. * Added partial pipe construction * Added logic so that pipes are only built to connections in use. (This will fail if connected to a very rectangular entity or if there are more than one pipe connection on one side of the miner.) * Added logic to not deconstruct a burner miner that is a source for an inserter moving fuel around. * Update comment
- Loading branch information