-
Notifications
You must be signed in to change notification settings - Fork 49
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
Update virtual desktop Wine plugin (use Bean) #1073
Conversation
Using ifs
Moving calls to `screenManager` Bean to separate file.
Adding the header file with calls to `screenManager` Bean.
Removing extra empty lines.
Fixed indentation.
Added missing include to fix Codacy errors and, code cleanup, and removing const
Why do I get the "not defined" codacy errors? |
Upon launching Subnautica script I get this error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the codacy errors you need to add
// eslint-disable-next-line no-unused-vars
before the functions, for an example look at https://github.com/PhoenicisOrg/scripts/blob/master/Utils/Functions/Filesystem/Files/script.js
After that change the script starts but hangs after DXVK installation and this error is in the terminal log:
|
The error seems to be unrelated to the changes in this PR. It seems like you're not using the newly created script with the new function |
Can we do this automatically? |
Should be possible with search and replace but actually I do not think that we have many scripts using this. |
We have 13 scripts in total (based on runing
|
@Zemogiter what editor are you using to work on the scripts? Are you using a "simple" editor like gedit, or are you using something more sophisticated like Atom or Visual Studio Code? I would recommend you to use something more sophisticated when working with the scripts. For example I currently use Visual Studio Code to work with the scripts. VS Code comes with a search and replace function that works on a folder hierarchy. |
Trying placing the eslint-disable line at the top to get rid of Codacy error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to block this until #1076 is merged
Added an include in order to be compatible with PhoenicisOrg#1076
Moving includes around.
Ready for review. |
Restored the definitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only place where we accessed the screen width and height from inside the scripts?
If no when do you want to change the other occurrences?
I suggest to do all related changes at once in this case. This makes it easier for us to review this and it is also makes this easier to test
@plata I think Codacy is broken... I think it should show at least two issues (for the undefined usage of |
Updated includes
I don't see anywhere else in the repo where we access screen dimensions. |
@Zemogiter I mean: when do you want to do the changes you suggested in #1073 (comment) and |
@madoar does ESLint show an issue if you run it manually? |
@madoar preferably right after this PR is merged but do I have to make a separate PR for each script? |
@plata I've tried @Zemogiter No you don't need to open a new PR for each script it is ok (and I think in this case also better) to open a single PR where you update all scripts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plata if you have no change requests I think we can merge this PR.
@ImperatorS79 you also need your approval before we can merge :) |
- adds a new script to access the "screenManager" Java Bean
Description
Part of the effort to get rid of direct java calls in JS.
Fixes PhoenicisOrg/phoenicis#2021 that affects every script that needs a virtual desktop.
I can't test until PhoenicisOrg/phoenicis#2023 and PhoenicisOrg/phoenicis#2040 are mergedI've tested it on Subnautica script and the new plugin works fine.
What works
Everything
What was not tested
Putting screen width and height inside the script that uses the virtual desktop plugin.
Test
Ready for review
json-align
andeslint
run according to the documentation.