Closed Riizade closed 5 years ago
This PR doesn't fix imports in .js
files which breaks a number of NPCs.
Lemme know what you think of this change before I spend time fixing that.
LOOL Nice
@Riizade This PR movement, which makes the server flags accessible outside of compiling range, is pretty nice! Only wondering if there wouldn't have some way to make this happen without having to resort to this many dependency files (from a bit of search it seems YamlBeans only uses one dependency... no need for you to worry on doing the transition though).
Analyzing the "flags getting moved to property files" situation, it's quite a shame though those flags still have to be declared in Java in order to be usable by the source modules. Yet overall this looks like an dependable improvement, looking forward to the script fixes!
And finally, from testing the build... Unfortunately, something seems to have went off during the flags initialization:
It's required for the flags to be initialized before a getConnection()
call. Perhaps being one of the first tasks executed when booting the server would be a good call.
The no suitable driver thing is a result of the DB_URL being an empty string (or null)
it needs to be a string of the form jdbc:mysql...
or whatever the proper format is.
The default on master
is an empty String as well, so you'd need to rebase a working instance off of this branch and then make sure you provide a DB_URL String in config.yaml
instead of ServerConstants.java
to get the DB to connect
Thank you.
Oddly enough, when the build was tested back there, tests have shown ServerConfig.HOST as an empty string and, only after the HeavenMS is now online.
message, HOST had a value set...
Ah, just noticed. You also told it as well, currently DB_URL: ""
. That's why it happened.
This replaces most constants in
ServerConstants.java
with a YAML file.Also replaces the configuration
.ini
files.This allows us to edit the config and restart the server to reload values without recompiling.
This allows for nested objects more easily, as seen in the
worlds
configs.Having done this, I'm not sure it's actually all that useful. I envision placing more server config stuff into the
worlds
config so that each world can have features enabled or disabled. This makes it a lot easier to do so.I dunno, give me some feedback and let me know what you think.
I was able to get the server up and running and poked around a bit using the client. Everything seems to work properly.