aebabis / factorio-state-machine

MIT License
15 stars 8 forks source link

Enhancement request: compact with medium poles #36

Open TokMor opened 2 years ago

TokMor commented 2 years ago

The debug layout is great for testing, and the compact layout is great for actually placing down a finished BP. My issue is that combinators are red/green science, but substations are RGB science and require plastic. I'm hoping to set up complex automation with the FSM prior to plastic, so it would be great if we were able to make a compact layout that used medium electric poles instead of substations. I have no idea how hard it is to make a new packing algorithm, but I'm happy to help test one. Spacing would be 6, I'm guessing startY would be -3, line 16 would just be x++, and line 17 would have X > 3 Finally 68 would be pole = bp.createEntity('medium_electric_pole', coords);

image

aebabis commented 2 years ago

This is very reasonable and shouldn't take me more than an hour to do. I'll try to have it done this week.

TokMor commented 2 years ago

Excellent, that is most appreciated!

aebabis commented 2 years ago

I've implemented the feature (https://github.com/aebabis/factorio-state-machine/commit/c763f2c757c65d5d49403900303a35e1ffdb11d0).

I tested the demo blueprints and they seem to be working, but I'll wait until you've had a chance to test it before closing the issue

TokMor commented 2 years ago

Thanks! To try this out, is there supposed to be a new value in the dropdown? image

I tried using the compact method but it appears to put substations in the BP as opposed to poles.

If I'm doing something wrong just let me know. Thanks again!

aebabis commented 2 years ago

Your browser may be caching the old HTML/CSS since I never set up cache invalidation properly. Try hard refreshing (ctrl + r). If that doesn't work. Try running in a private window or different browser. If that fixes it, we can open another issue for caching.

aebabis commented 2 years ago

Ugh, I just realized my mistake. One moment...

aebabis commented 2 years ago

I forgot that automatic deploy is disable. It's in prod now. (I checked).

TokMor commented 1 year ago

Sorry, something came up that pulled me away from this project. It almost works, except I think the spacing for small poles needs to be 5 instead of 6, and medium poles needs to be 7 instead of 8. The BPs for small and medium have a row of combinators in the middle outside of power range.