DanielKote / Foreman2

Visual planning tool for Factorio
Other
166 stars 19 forks source link

Add a way to add (floating) notes #81

Open JeromeJ opened 9 months ago

JeromeJ commented 9 months ago

It would be nice to be able to add floating notes (that would look like nodes).

Currently, I can add a recipe or an item (source or output) but that's it.

I have an example with a use case:

image

Here, I'm trying to calculate how many jaw crushers (bottom left) and how many high-pressure furnaces (top left) I need to make a self-sustaining setup.

However, I notice some of the recipes in the chain (namely here the one to create an empty planter box) requires 0.8 iron plates. And I know, from another graph that, for each 7.5 iron plates I create, I receive about 1 stone as a byproduct.

So, to be more accurate (without having to introduce the whole iron production chain here), I calculated how many stones I would produce as a byproduct for 0.8 iron plates (which is 0.1) so I added a source of stone but I've no way to add a note to specify where this comes from.

I would be nice to be able to add a small floating note (with a free text field) where I could write some basic explanation for this. Eg. "Stone produced as a byproduct of the iron plates. 7.5 iron plates = 1 stone 0.8 iron plates = 0.1 stone" Or something along these lines.

Cheers.

EDIT: The text wouldn't have to be permanently displayed on the graph and could only show up whenever its UI is opened if that's easier to implement but it would be nice if it could be visible without having to open its UI of course.

Alternatively, this could also just be a free text field on any node itself if that's easier to implement. In this scenario, I would add the custom note on the 0.1 stone input node itself, which would work too.

mrozpara commented 9 months ago

I've got the code (almost ready) in my fork - I can prepare a package and create a pull request image

JeromeJ commented 9 months ago

@mrozpara That's nice!

Btw, the image is private so we can only view the thumbnail but it gives an idea alredy.. Which fork is it? Can the code be seen already?

mrozpara commented 9 months ago

code: https://github.com/mrozpara/Foreman2_MR I've started as fork, but later I've disconnected my version and I'm just adding 'on-fly' functions that I currently need. Right now I'm trying to add some TURD related staff (pY suite) What do you mean by "private image" ? I can see it normaly as unlogged user...

OwenHertz commented 9 months ago

I had a similar thought to this where blocks could be drawn to distinguish areas for planning (Euler Diagram). Like if I wanted to make a section of my factory process specific parts I could show it with the blocks similar to this but would be like, 'raw materials', 'intermediates', or 'fluids':

edIUykCzYmnynvtKD1F9BUTx7rgsmwRBYHaKh76zNF4 1