-
Notifications
You must be signed in to change notification settings - Fork 141
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
mod settings editor #131
base: develop
Are you sure you want to change the base?
mod settings editor #131
Conversation
Executing the mod's Lua files will definitely be too expensive. Perhaps an interface similar to the server setting page will work? Just empty text inputs that encode to the mod-setting.dat format. If there's an error with the input it should be reported in the console when the server starts, right? |
Thats exactly, what i had in mind.
If a wrong value (empty, out-of-scope) is set, the value is just reseted to its default value. That behaviour, doesnt tell the user, if something and what is wrong. In the frontend, the values are changed for no reason, when you restart the server. |
# Conflicts: # src/factorio_save_test.go # ui/App/App.jsx
I implemented it mostly like the general settings page. It is possible to read and write configs and configs will be reset, when invalid. I also wrote information on top, so users do not get confused, when things are changing by themselfs. So, this feature is finished. |
The tests failed randomly, i dont find any problem at all. @mroote can you please run the tests again. |
# Conflicts: # ui/index.scss
ok, i have no idea, why this fails. Sometimes its only one, sometimes multiple ones, sometimes on linux only, sometimes on windows only... I think this is a bug in travis :( |
I'm not sure, if i should merge this. In my opinion, this is just an error with travis-ci, cause its only on windows and not reproducable. I would say, lets just merge it. |
@mroote can you please restart travis for this PR. |
ok, i have absolutly no idea, how this error happens sometimes. It makes no sense, it only happens sometimes and i cant reproduce it, on my local machines... |
# Conflicts: # .travis.yml # README.md # gopkglist # src/mods_handler.go
Here, the travis tests are successful, but the tests on my repo are failing ... https://travis-ci.com/knoxfighter/factorio-server-manager/jobs/281517922 I dont understand this at all!! |
My Thoughts to this.. Let the Game create the mod-settings file, rather than parsing the enabled mods list yourself.. At least opening an existing mod-settings file, you are pulling the current values into the GUI.. Downside would be that a new mod setting may not appear unless you start / stop the server with the new mod installed/enabled? |
# Conflicts: # src/factorio/save.go # src/factorio_save_test.go # src/go.mod # src/go.sum # src/mods_handler.go # src/routes.go # ui/App/App.jsx # ui/App/components/Sidebar.jsx # ui/index.scss
I want to add the posibility to modify the mod-settings, like requested in #121.
Currently reading and writing the mod-settings.dat is implemented.
@mroote @sean-callahan My question is: should i make only the mod-settings.dat|json modifable, or should i also parse all mods, to get the allowed values and the default values.
Reading all mods is a heavy overhead, cause i need to extract all lua-files from the mods and execute the lua-code with a lua vm/compiler.
I opened this PR to get more information and to show the status, it is not near to be finished :)