narc0tiq / YARM

Yet another variant of the Resource Monitor for Factorio
https://mods.factorio.com/mod/YARM
MIT License
54 stars 42 forks source link

Disable site auto-expansion #133

Open gepandz opened 3 years ago

gepandz commented 3 years ago

Hi! Love the mod! I've been playing with the DangOREous mod and Klonan's Mining Drones mod, and I'm having some challenges with YARM's auto-expanding site creation feature.

With DangOREous, the whole planet, other than a small starting space, is covered with ore, but building anything other than a miner on the ore will cause the building to be destroyed. The ore patches, though, spread across the map -- if I hover over one of the copper bands, the in-game size estimator shows "2.1G," and it highlights basically the entire southern half of the map. Using YARM with that kind of a setup would result in truly massive sites that wouldn't be very useful from an estimating when it's time to move a miner standpoint.

With Klonan's Mining Drones mod, you have a mining building that has a square area in front of it that represents the area your mining drones will mine within. One nice feature is that the ore being mined is a property of the Mining Depot building, so if it's a mixed-ore space, it'll only mine what the depot is setup for. DangOREous + Mining Drones = happiness. 😉

Which brings me to the feature I'm asking for: Can you make the auto-expansion of a site optional, like a mod option, either on the player- or map-level? I can work with highlighting rectangular areas and doing manual site-expansion through the '+' button, so I don't think I'd need to request an additional ore-specific creation filter feature.

I think a good candidate is here in the resmon.lua script, but I'm not sure what other parts of the code might be involved in setting the site.is_site_expanding variable, or if that's the only factor involved in whether a site gets expanded to its neighboring ore spaces.

In sum, I think the auto-expansion feature is bad-ass for "normal" Factorio ore patches, and I use YARM heavily in those cases, but this is a new use-case because of modded behavior that makes auto-expansion unhelpful. If that were an option I could toggle on or off, it'd make the mod even more useful for my various use-cases. Thanks! 😃