Skip to content

Conversation

@martingregoire
Copy link

@martingregoire martingregoire commented Oct 3, 2024

Description

Allows to mark nodes in the visualization as "done" by double-clicking on them. A "done" node will be shown with a green background.

Double-clicking on a "done" node will reset them to their initial state.

Note: this "done" state is not persisted in LocalStorage, it is only saved in the visualization state. This means that if you e.g. reload the page, all nodes will loose their "done" state.

Demo

This is how it looks like:

sft-done-state.webm

@martingregoire
Copy link
Author

Hi @greeny, thanks a lot for your awesome Satisfactory Tools! ❤️ I've been using them all the time to plan my factories.

One thing that I'm missing is the possibility to mark parts of a factory as "done" while building it. A different tool allows this by clicking a node, so I tried to implement something similar here.

Would be nice if you could have a look and leave some feedback. 🙂

@greeny
Copy link
Owner

greeny commented Oct 3, 2024

The problem with this is that tabbing to another production line resets the "done" state (and refreshing does as well).

Refreshing would need saving the state, which is too much work, but it would be nice for the done state to persist between switching tabs at least.

Also, I'd prefer the nodes to not change color, but rather go to some "less opaque state" and keep their original color (that's how it worked before anyway).

@martingregoire
Copy link
Author

Yes I see your point, I'll try to move the "done" state further up, so it will be kept when switching production lines. 👍

Allows to mark nodes in the visualization as "done" by double-clicking
on them. A "done" node will be shown with a green background.

Double-clicking on a "done" node will reset them to their initial state.

Note: this "done" state is not persisted in LocalStorage, it is only
saved in the visualization state. This means that if you e.g. reload the
page, all nodes will loose their "done" state.
@martingregoire martingregoire force-pushed the feat/add-done-state-to-visualization branch from 9d596e1 to 2ca44f2 Compare October 3, 2024 11:58
@martingregoire
Copy link
Author

martingregoire commented Oct 3, 2024

Updated the PR (and demo video) - please check again @greeny. 🙂

The "done" state is now in the GraphNode, so it is persisted when switching between production lines.

Also the node boxes will now change their opacity when "done" (to a value of 0.2 that I found somewhere in the code), instead of changing their background color.

WDYT?

@laurensvc
Copy link

Came here to add the same feature but saw there was already a branch and pr made :)
Please review if you have the time @greeny
Also, thanks for all the work on SFT!

});

network.on('doubleClick', (event) => {
if (event.nodes?.length) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest applying an early return pattern here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants