Documentation ¶
Overview ¶
Project OpenMonster Copyright (C) 2020 Kori
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/\>.
Project OpenMonster Copyright (C) 2020 Kori
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/\>.
Project OpenMonster Copyright (C) 2020 Kori
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/\>.
Index ¶
- func NewItemLoader(itemFiles map[string]io.Reader) db.ItemLoader
- func NewMoveLoader(moveFiles map[string]io.Reader) db.MoveLoader
- func NewSpeciesLoader(speciesFiles map[string]io.Reader) db.SpeciesLoader
- func NewStatusLoader(statusFiles map[string]io.Reader) db.StatusLoader
- type FailedToLoadFileError
- type HabitatLoader
- type ItemLoader
- type MoveLoader
- type SpeciesLoader
- type StatusLoader
- type TraitLoader
- type WorldLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewItemLoader ¶
func NewItemLoader(itemFiles map[string]io.Reader) db.ItemLoader
func NewMoveLoader ¶
func NewMoveLoader(moveFiles map[string]io.Reader) db.MoveLoader
func NewSpeciesLoader ¶
func NewSpeciesLoader(speciesFiles map[string]io.Reader) db.SpeciesLoader
func NewStatusLoader ¶
func NewStatusLoader(statusFiles map[string]io.Reader) db.StatusLoader
Types ¶
type FailedToLoadFileError ¶
func NewFailedToLoadFileError ¶
func NewFailedToLoadFileError() FailedToLoadFileError
func (FailedToLoadFileError) Error ¶
func (e FailedToLoadFileError) Error() string
type HabitatLoader ¶
type HabitatLoader struct {
// contains filtered or unexported fields
}
func NewHabitatLoader ¶
func NewHabitatLoader(habitatFiles map[string]io.Reader) *HabitatLoader
func (*HabitatLoader) Load ¶
func (ml *HabitatLoader) Load() (map[string][]*habitat.Entry, error)
Load loads every file in the basepath folder and tries to convert it into a monster habitat The basepath is read from the 'data.dir.monster' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every habitat, which could be parsed
func (*HabitatLoader) LoadHabitat ¶
LoadHabitat loads a monster habitat from the given file in the basepath folder. The 'filename' parameter sould be relative to the basepath. The basepath is read from the 'data.dir.monster' field in the configuration.
type ItemLoader ¶
type ItemLoader struct {
// contains filtered or unexported fields
}
func (*ItemLoader) Load ¶
func (ml *ItemLoader) Load() (map[string]*item.Base, error)
Load loads every file in the basepath folder and tries to convert it into an item The basepath is read from the 'data.dir.item' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every species, which could be parsed
type MoveLoader ¶
type MoveLoader struct {
// contains filtered or unexported fields
}
func (*MoveLoader) Load ¶
func (ml *MoveLoader) Load() (map[string]model.MoveBase, error)
Load loads every file in the basepath folder and tries to convert it into a move The basepath is read from the 'data.dir.move' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every species, which could be parsed
type SpeciesLoader ¶
type SpeciesLoader struct {
// contains filtered or unexported fields
}
func (*SpeciesLoader) Load ¶
func (ml *SpeciesLoader) Load() (map[string]*model.Species, error)
Load loads every file in the basepath folder and tries to convert it into a monster species The basepath is read from the 'data.dir.monster' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every species, which could be parsed
func (*SpeciesLoader) LoadSpecies ¶
LoadSpecies loads a monster species from the given file in the basepath folder. The 'filename' parameter sould be relative to the basepath. The basepath is read from the 'data.dir.monster' field in the configuration.
type StatusLoader ¶
type StatusLoader struct {
// contains filtered or unexported fields
}
func (*StatusLoader) Load ¶
func (ml *StatusLoader) Load() (map[string]*status.Base, error)
Load loads every file in the basepath folder and tries to convert it into an status The basepath is read from the 'data.dir.status' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every species, which could be parsed
func (*StatusLoader) LoadStatus ¶
LoadStatus loads a statusbase from the given file in the basepath folder. The 'filename' parameter sould be relative to the basepath. The basepath is read from the 'data.dir.status' field in the configuration.
type TraitLoader ¶
func NewTraitLoader ¶
func NewTraitLoader(TraitFiles map[string]io.Reader) *TraitLoader
func (*TraitLoader) Load ¶
func (ml *TraitLoader) Load() (map[string]*model.Trait, error)
Load loads every file in the basepath folder and tries to convert it into an Trait The basepath is read from the 'data.dir.Trait' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every species, which could be parsed
type WorldLoader ¶ added in v0.4.0
type WorldLoader struct {
// contains filtered or unexported fields
}
func NewWorldLoader ¶ added in v0.4.0
func NewWorldLoader(worldFiles map[string]io.Reader) *WorldLoader
func (*WorldLoader) Load ¶ added in v0.4.0
func (ml *WorldLoader) Load() (map[string]*tmx.Map, error)
Load loads every file in the basepath folder and tries to convert it into a world The basepath is read from the 'data.dir.world' field in the configuration.
Failed files will be listed in the returned error object The returned map contains every species, which could be parsed
func (*WorldLoader) LoadWorld ¶ added in v0.4.0
func (ml *WorldLoader) LoadWorld(reader io.Reader) (*tmxWorld, error)
LoadWorld loads a worldbase from the given file in the basepath folder. The 'filename' parameter sould be relative to the basepath. The basepath is read from the 'data.dir.world' field in the configuration.