go_dreamfactory/modules/questionnaire/configure.go
2023-07-20 15:42:15 +08:00

34 lines
995 B
Go

package questionnaire
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
)
const (
gameWorldTask = "game_worldtask.json"
gameWorldtaskBattle = "game_worldbattle.json"
gameWorldAll = "game_worldall.json"
gameburiedCond = "game_buriedcondi.json"
gamerdtasknpc = "game_rdtasknpc.json"
)
type configureComp struct {
modules.MCompConfigure
module *Questionnaire
}
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Questionnaire)
err = this.LoadMultiConfigure(map[string]interface{}{
gameWorldTask: cfg.NewGameWorldTask,
gameWorldtaskBattle: cfg.NewGameWorldBattle,
gameWorldAll: cfg.NewGameWorldAll,
gameburiedCond: cfg.NewGameBuriedCondi,
gamerdtasknpc: cfg.NewGameRdtaskNpc,
})
return
}