Allow each mod to have a default version
When a visitor arrives at the site for the first time, this will ensure they have a certain set of mods on/off. Right now, that means IC2-Classic is off by default, and everything else is on.
This commit is contained in:
@@ -49,10 +49,10 @@ module.exports = class CraftingGuideRouter extends Backbone.Router
|
||||
makeResponder = (m)-> return ->
|
||||
m.activeModVersion.fetch() if m.activeModVersion?
|
||||
|
||||
for modSlug in DefaultMods
|
||||
for modSlug, modData of DefaultMods
|
||||
mod = new Mod slug:modSlug
|
||||
mod.on Event.change + ':activeModVersion', makeResponder mod
|
||||
@storage.register "mod:#{mod.slug}", mod, 'activeVersion'
|
||||
@storage.register "mod:#{mod.slug}", mod, 'activeVersion', modData.defaultVersion
|
||||
mod.fetch()
|
||||
|
||||
@modPack.addMod mod
|
||||
|
||||
Reference in New Issue
Block a user