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

Adjust tail window size and position #408

Merged
merged 5 commits into from
Oct 26, 2024
Merged

Conversation

rraumberger
Copy link
Contributor

Hi. I noticed issue #394 and it somewhat bothered me too, so I created this small PR to make some adjustments to the default tail window size and placement.

This algorithm is not very sophisticated and can still produce overlaps in window placement, but it works good enough for me.

I also tried a different version which directly uses the window api and is slightly more dynamic and resilient, but I don't think it justifies blowing up the ram cost of the helper script to 26GB due to accessing document.

Since the result of this algorithm is a matter of personal taste, feel free to adjust the values to your liking.

image

Copy link
Owner

@alainbryden alainbryden left a comment

Choose a reason for hiding this comment

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

You're a rockstar.

We can use eval("document") to get a "free" document (I do this in casino.js and stats.js) but this is a great start.

@alainbryden alainbryden merged commit 25ffeda into alainbryden:main Oct 26, 2024
1 check passed
@alainbryden
Copy link
Owner

Made a little tweak to your logic to simply keep a running counter and "cascade" tail windows as they are opened. Uses mod like you did to wrap them after a certain number.
image

@rraumberger
Copy link
Contributor Author

You're a rockstar.

We can use eval("document") to get a "free" document (I do this in casino.js and stats.js) but this is a great start.

Ohh.. Didn't know about the eval trick. Today I learned :)

@rraumberger
Copy link
Contributor Author

Made a little tweak to your logic to simply keep a running counter and "cascade" tail windows as they are opened. Uses mod like you did to wrap them after a certain number.

That's awesome. I kinda overestimated Bitburners capabilities here and thought global shared variables wouldn't work due to being called from a different script.

@alainbryden
Copy link
Owner

It's a blessing and a curse :)

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.

2 participants