data

package
v0.0.0-...-b8173b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: GPL-2.0 Imports: 13 Imported by: 8

Documentation

Overview

Package with functions for importing/exporting data files and directories.

Index

Constants

View Source
const (
	ModuleFileExt     = ".mod"
	ModuleConfigFile  = ".module"
	ChapterConfigFile = ".chapter"
)

Variables

This section is empty.

Functions

func DirFilesNames

func DirFilesNames(path, pattern string) ([]string, error)

DirFilesNames returns names of all files matching specified file name pattern in directory with specified path.

func ExportArea

func ExportArea(path string, data res.AreaData) error

ExportArea exports area to a new file with specified path.

func ExportArmors

func ExportArmors(path string, armors ...res.ArmorData) error

ExportArmors exports armors to the data file under specified path.

func ExportCharacters

func ExportCharacters(path string, chars ...res.CharacterData) error

ExportCharacters saves characters to new file with specified path.

func ExportDialogs

func ExportDialogs(path string, dialogs ...res.DialogData) error

ExportDialogs exports dialogs to the data file under specified path.

func ExportEffects

func ExportEffects(path string, effects ...res.EffectData) error

ExportEffects exports effects to the data file under specified path.

func ExportLang

func ExportLang(path string, data ...res.TranslationData) error

ExportLang exports translation data to a new file with specified path.

func ExportLangDirs

func ExportLangDirs(path string, data ...res.TranslationBaseData) error

ExportLangDirs exports translation bases to new directories under specified path.

func ExportMiscItems

func ExportMiscItems(path string, miscs ...res.MiscItemData) error

ExportMiscItems exports misc items to the data file under specified path.

func ExportModule

func ExportModule(path string, data res.ModuleData) error

ExportModule exports module data to the single file.

func ExportModuleDir

func ExportModuleDir(path string, data res.ModuleData) error

ExportModuleDir exports module data to new a directory under specified path.

func ExportQuests

func ExportQuests(path string, quests ...res.QuestData) error

ExportQuests exports effects to the data file under specified path.

func ExportRaces

func ExportRaces(path string, races ...res.RaceData) error

ExportRaces exports races to data file under specified path.

func ExportRecipes

func ExportRecipes(path string, recipes ...res.RecipeData) error

ExportRecipes exports recipes to the data file under specified path.

func ExportSkills

func ExportSkills(path string, skills ...res.SkillData) error

ExportSkills exports skills to data file under specified path.

func ExportTrainings

func ExportTrainings(path string, trainings ...res.TrainingData) error

ExportTrainings exports trainings to the data file under specified path.

func ExportWeapons

func ExportWeapons(path string, weapons ...res.WeaponData) error

ExportWeapons exports weapons to the data file under specified path.

func ImportArea

func ImportArea(path string) (res.AreaData, error)

ImportArea imports area from area file with specified path.

func ImportAreasDir

func ImportAreasDir(path string) ([]res.AreaData, error)

ImportAreaDir imports all areas from directory with specified path.

func ImportArmors

func ImportArmors(path string) ([]res.ArmorData, error)

ImportArmors imports all XML armors from file with specified path.

func ImportArmorsDir

func ImportArmorsDir(dirPath string) ([]res.ArmorData, error)

ImportArmorsDir imports all armors data from files

func ImportChapterDir

func ImportChapterDir(path string) (data res.ChapterData, err error)

ImportChapterDir imports chapter from directory with specified path.

func ImportCharacters

func ImportCharacters(path string) ([]res.CharacterData, error)

ImportCharacters import characters data from base file with specified path.

func ImportCharactersDir

func ImportCharactersDir(path string) ([]res.CharacterData, error)

ImportCharactersDir imports all characters data from files in directory with specified path.

func ImportDialogs

func ImportDialogs(path string) ([]res.DialogData, error)

ImportDialogs imports all dialogs from data file with specified path.

func ImportDialogsDir

func ImportDialogsDir(path string) ([]res.DialogData, error)

ImportDialogsDir imports all dialogs from data files in directory with specified path.

func ImportEffects

func ImportEffects(path string) ([]res.EffectData, error)

ImportEffects imports all XML effects data from effects base with specified path.

func ImportEffectsDir

func ImportEffectsDir(dirPath string) ([]res.EffectData, error)

ImportEffectsDir imports all effects from files in specified directory.

func ImportLang

func ImportLang(path string) ([]res.TranslationData, error)

ImportLang imports all translation data from file with specified path.

func ImportLangDir

func ImportLangDir(path string) ([]res.TranslationData, error)

ImportLangDir imports all translation data from lang files in directory with specified path.

func ImportLangDirs

func ImportLangDirs(path string) ([]res.TranslationBaseData, error)

ImportLangDirs imports all translation data from child directories of the directory with a specified path.

func ImportMiscItems

func ImportMiscItems(path string) ([]res.MiscItemData, error)

ImportMiscItems imports all XML miscellaneous items from file with specified path.

func ImportMiscItemsDir

func ImportMiscItemsDir(dirPath string) ([]res.MiscItemData, error)

ImportMiscItemsDir imports all miscellaneous items from files in specified directory.

func ImportModule

func ImportModule(path string) (res.ModuleData, error)

ImportModule imports module from module file with specified path.

func ImportModuleDir

func ImportModuleDir(path string) (data res.ModuleData, err error)

ImportModuleDir imports module from directory with specified path.

func ImportQuests

func ImportQuests(path string) ([]res.QuestData, error)

ImportQuests imports all auests from base file with specified path.

func ImportQuestsDir

func ImportQuestsDir(dirPath string) ([]res.QuestData, error)

ImportQuestsDir imports all quests from base files in directory with specified path.

func ImportRaces

func ImportRaces(path string) ([]res.RaceData, error)

ImportRaces imports all reces from file with specified path.

func ImportRacesDir

func ImportRacesDir(path string) ([]res.RaceData, error)

ImportRacesDir imports all races from data files from directory with specified path.

func ImportRecipes

func ImportRecipes(path string) ([]res.RecipeData, error)

ImportRecipes imports all recipes from base file with specified path.

func ImportRecipesDir

func ImportRecipesDir(path string) ([]res.RecipeData, error)

ImportRecipesDir imports all recipes from base files in directory with specified path.

func ImportSkills

func ImportSkills(path string) ([]res.SkillData, error)

ImportSkills imports all XML skills data from skills base with specified path.

func ImportSkillsDir

func ImportSkillsDir(dirPath string) ([]res.SkillData, error)

ImportSkillsDir imports all skills from files in specified directory.

func ImportTrainings

func ImportTrainings(path string) ([]res.TrainingData, error)

ImportTrainings imports all trainings from data file with specified path.

func ImportTrainingsDir

func ImportTrainingsDir(path string) ([]res.TrainingData, error)

ImportTrainingsDir imports all trainings from data files in directory with specified path.

func ImportWeapons

func ImportWeapons(path string) ([]res.WeaponData, error)

ImportWeapons imports all XML weapons from file with specified path.

func ImportWeaponsDir

func ImportWeaponsDir(dirPath string) ([]res.WeaponData, error)

ImportWeaponsDir imports all weapons from files in specified directory.

func LoadTranslationData

func LoadTranslationData(path string) error

LoadTranslationData loads all lang files from from directory with specified path.

Types

This section is empty.

Directories

Path Synopsis
res
lang
Package for easy retrieval of translation data.
Package for easy retrieval of translation data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL