Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trackstop and rollers overlays #884

Merged
merged 4 commits into from
Nov 7, 2023
Merged

Conversation

robob27
Copy link
Contributor

@robob27 robob27 commented Nov 6, 2023

Add overlay for changing dump direction and friction of track stops after construction. If this is accepted, I can do a follow-up to remove the old trackstop.cpp stuff.

trackstop.mp4

Some screenshots showing how it looks with various suspend manager/building plan states:

image

image

Also adds rollers overlay (same position, size, most of the same options):

rollers.mp4

The directions appear to be flipped here but I double checked them against freshly built ones. When you press the arrow up and build the result is "FromSouth" and so on.

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

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

I suggest adding a CLI so this script can be used to programmatically alter the properties of track stops, for example as part of a dwarfputing setup

Also needs docs (docs/trackstop.rst) and a changelog entry (changelog.txt)

@robob27 robob27 force-pushed the trackstop-overlay branch 3 times, most recently from 1fc3e1a to 5642081 Compare November 6, 2023 01:09
@robob27
Copy link
Contributor Author

robob27 commented Nov 6, 2023

I suggest adding a CLI so this script can be used to programmatically alter the properties of track stops, for example as part of a dwarfputing setup

Also needs docs (docs/trackstop.rst) and a changelog entry (changelog.txt)

Added docs and changelog entry! CLI would be cool. You think it would be alright if we do that in a separate PR? I won't be able to finish that up today and not sure exactly when I'll get around to it. Could be very soon... or not 😅. Also realized that trackstop.cpp dealt with rollers too, so I should probably investigate those at some point too (before removing old trackstop stuff anyways).

Edit: Adding rollers now actually. Should be very quick.

@robob27 robob27 changed the title Add trackstop overlay Add trackstop and rollers overlays Nov 6, 2023
@robob27
Copy link
Contributor Author

robob27 commented Nov 6, 2023

Updated with rollers. trackstop.cpp handled both trackstops and rollers without being named in such a way to indicate that. Should we change the name of this script to something like trackstoprollers.lua or leave as is?

@myk002
Copy link
Member

myk002 commented Nov 6, 2023

Leave it as it is, I think.

@myk002
Copy link
Member

myk002 commented Nov 6, 2023

The directions appear to be flipped here but I double checked them against freshly built ones. When you press the arrow up and build the result is "FromSouth" and so on.

Is that backwards? If the arrow is up, then you're dumping to the north, and FromSouth == "ToNorth"

@robob27
Copy link
Contributor Author

robob27 commented Nov 6, 2023

The directions appear to be flipped here but I double checked them against freshly built ones. When you press the arrow up and build the result is "FromSouth" and so on.

Is that backwards? If the arrow is up, then you're dumping to the north, and FromSouth == "ToNorth"

The direction thing I mentioned only applies to the roller direction:

rollerdirection.mp4

Dump direction for stops is handled by dump_x_shift and dump_y_shift instead of a screw pump direction.

docs/trackstop.rst Outdated Show resolved Hide resolved
docs/trackstop.rst Outdated Show resolved Hide resolved
trackstop.lua Outdated Show resolved Hide resolved
trackstop.lua Outdated Show resolved Hide resolved
trackstop.lua Outdated Show resolved Hide resolved
trackstop.lua Outdated Show resolved Hide resolved
trackstop.lua Outdated Show resolved Hide resolved
trackstop.lua Show resolved Hide resolved
trackstop.lua Show resolved Hide resolved
trackstop.lua Outdated Show resolved Hide resolved
@robob27 robob27 requested a review from myk002 November 7, 2023 02:16
@robob27
Copy link
Contributor Author

robob27 commented Nov 7, 2023

I also added ^ > < v in the directions while I was adding the colors to the other ones and I think I like it. Let me know what y'all think.

directions.mp4

@myk002
Copy link
Member

myk002 commented Nov 7, 2023

will merge once the trackstop plugin is removed (otherwise the docs will conflict)

trackstop.lua Outdated
Comment on lines 143 to 148
function TrackStopOverlay:onInput(keys)
if not self:shouldRender() then
return
end
TrackStopOverlay.super.onInput(self, keys)
end
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I forgot -- can this function be removed?

trackstop.lua Outdated
Comment on lines 123 to 125
if not self:shouldRender() then
return
end
Copy link
Member

Choose a reason for hiding this comment

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

can this be removed?

@myk002 myk002 merged commit 87e6f1a into DFHack:master Nov 7, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants