Factorio-Access / FactorioAccess

An accessibility mod for the video game Factorio, making the game accessible to the blind and visually impaired.
Other
20 stars 9 forks source link

Add the elbow builder tool for belts and pipes #108

Open LevFendi opened 4 months ago

LevFendi commented 4 months ago

This tool allows building long belts and pipes more easily by specifying the start and end positions, and letting the tool do the rest. The tool builds a straight line, or two lines and a corner, like an arm and its elbow.

The tool has a menu that is activated by a keybind when you have a buildable item in hand.

Its menu has several lines for info and config and finally the build button.

Config options include the following:

  1. Choose start point
  2. Choose end point
  3. Choose start direction
  4. Clear obstacles along the path.
  5. Check if the path is clear, and if not report the first obstacle's position.
  6. Build ghosts of this elbow
  7. Build this elbow
ahicks92 commented 4 months ago

I'd really rather just have a thing where I place two pieces in the right alignment and press a key on one of them and now there is a line. The line case seems like the kind of thing that would get frequently used (it sure would by me). Perhaps the menu for the more advanced modes like elbow? Or just changing the mode and you click two endpoints after the mode is set?

I think of what I want like a "gun" that "fires" the line out the end. I'd honestly have proposed that but I couldn't come up with a good solution for range. What I do by hand is place both ends of the belt in the right direction, hit build lock, hit the cursor for like 50-100 steps, and just wait to hear the can't build sound (because you can't build transport belts of the same orientation over each other).

An advantage of being fast at lines isn't just belts, it'd also be a great way to land a thousand-track railway. Though in that case there's no good way to specify the range without teleporting, and also those can be solved with blueprints once we fix the thing where building west and north are very slow.

LevFendi commented 4 months ago

I like the gun idea. It can be a mode for this tool.

Building with a tool does not have to have a player reach limitation because we use surface.create_entity. On the other hand, I think adding a 100 tile limit would be fair because the player should not be able to build all the way into blurred territory.

We can also write checks so that if a tile has the same entity name on it, it just gets ignored instead of counting as an obstacle.

ahicks92 commented 4 months ago

O yeah no we want range limits. I should clarify that I'm thinking of the longer ranges as ghosts and KK.

I just did the blueprint version of this yesterday evening. I found that what I specifically want is pick a multiple of 10 and lay ghosts. Very effective.

we probably want this because it's simpler but I do still just want a thing that says when you're n/s/e/w of it. Could shove that on your bus if you're into buses and then you always know when the cursor is aligned with the bus for example. A "line gun" and cursor alignment tooling are two pieces that work well together.