Sheco / cdda-itembrowser

Cataclysm DDA: Item Browser
MIT License
25 stars 10 forks source link

[enhancement] Mod Support #6

Open Shadefang opened 8 years ago

Shadefang commented 8 years ago

For those of us who use mods it would be great if it were possible to enable them in the itembrowser and have the additional items and recipes included. Since there are a number of mods that ship with the game this would be useful even to those who don't run their own itembrowser. Possibly a page that lets you select which of the mods the browser has access to you want enabled?

Sheco commented 8 years ago

This might be a bit tricky, as we would need a way to upload mods.

For now, I think the best solution to achieve this is to install your own copy of the item browser, you can use Vagrant it should be quite simple and you can add any mods you want in there (remember you have to recompile the internal database when you add/remove a mod)

Shadefang commented 8 years ago

My original thought was mainly to have access to the mods that currently ship with the game through the hosted itembrowser.

You say to add the mods in then recompile the database. how would you do that without straight merging the mod files into the main data folder?

Sheco commented 8 years ago

Sorry I had forgotten to reply to your message, if you check https://github.com/Sheco/cdda-itembrowser/blob/master/src/app/models/Repositories/LocalRepository.php you can see both the modDirectory and dataPath functions do take into account modules, according to the data/mods/dev-default-mods.json file.

Although checking it, I think I implemented that incorrectly.

It's not currently including any of the default modules, is it?

Do we want to load all the modules? I can do that on the public item browsers.

Shadefang commented 8 years ago

I'll be sure to poke at it once i'm back at my desktop. On the public one I don't think it would be a good idea to load all of them, seeing as several of them remove or modify base content.