-
-
Notifications
You must be signed in to change notification settings - Fork 1
Description
There are several types of data that are loaded into the game with classes such as CommandLoader. These classes were a simple way to set up a default state but they're not very flexible. If you wanted to customize your MUD in a persistent way (eg. removing the diagonal movement commands) you'd have to make a code change and from that point on you would always be fighting against git trying to overwrite your changes when you merge from upstream.
A better way to do this would be to make the loader classes load from a file, where the file is not managed by git.
There are currently four loader classes:
- CommandLoader
- WorldLoader
- ProfessionLoader
- SpeciesLoader
For this issue we'll ignore WorldLoader because that's covered by #406 already.
For each of the three remaining three loaders make the following changes:
- Define an appropriate file format. It should be human readable/editable. JSON might work but I don't like that it doesn't have comments. A custom format would be OK, or something like YAML or XML maybe?
- Create a default file in
src/main/resources/to load some minimal defaults from if no other source is available. - If data exists in the database already, don't load anything from files (same as current behavior).
- If a custom file exists under
./data/{filename}, load that. - If no custom file exists, load the default file from
./agonyforge-mud-demo/src/main/resources. - Add the custom files to
.gitignore.
Metadata
Metadata
Assignees
Labels
Projects
Status