infoconf

package
v0.0.0-...-929fa59 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkipValue = "~"
)

Variables

View Source
var Defaults = map[string]interface{}{
	"DEnableInfos":         false,
	"DInfos":               []ConfiguredInfo{},
	"DEnableTickers":       false,
	"DTickers":             []ConfiguredTicker{},
	"DHideWatermarkTicker": false,
	"DEOLMessageEnabled":   false,
	"DEOLMessageJP":        "",
	"DEOLMessageEN":        "",
	"DEOLMessageURL":       "",
}

defaults

View Source
var DisplayTypes = map[string]string{
	"everyDay":     "0",
	"once":         "1",
	"fullTime":     "2",
	"onlyInfoPage": "3",
}
View Source
var InfoTypes = map[string]string{
	"text":         "0",
	"image":        "1",
	"feed":         "2",
	"roulette":     "10",
	"shop":         "11",
	"event":        "12",
	"rouletteInfo": "14",
	"quickInfo":    "15",
	"countryText":  "16",
	"countryImage": "17",
}

Functions

func Parse

func Parse(filename string) error

Types

type ConfigFile

type ConfigFile struct {
	EnableInfos         bool               `json:"enableInformation"`
	Infos               []ConfiguredInfo   `json:"infos"`
	EnableTickers       bool               `json:"enableTickers"`
	Tickers             []ConfiguredTicker `json:"tickers"`
	HideWatermarkTicker bool               `json:"hideWatermarkTicker"`
	EOLMessageEnabled   bool               `json:"eolMessageEnabled"`
	EOLMessageJP        string             `json:"eolMessageJP"`
	EOLMessageEN        string             `json:"eolMessageEN"`
	EOLMessageURL       string             `json:"eolMessageURL"`
}
var CFile ConfigFile

type ConfiguredInfo

type ConfiguredInfo struct {
	ID        int64    `json:"id"`
	Priority  int64    `json:"priority"`
	StartTime int64    `json:"startTime"`
	EndTime   int64    `json:"endTime"`
	Data      InfoData `json:"content"`
}

func (ConfiguredInfo) ConstructParam

func (c ConfiguredInfo) ConstructParam() string

func (ConfiguredInfo) HasValidDisplayType

func (c ConfiguredInfo) HasValidDisplayType() bool

func (ConfiguredInfo) HasValidInfoType

func (c ConfiguredInfo) HasValidInfoType() bool

type ConfiguredTicker

type ConfiguredTicker struct {
	Message   string `json:"message"`
	StartTime int64  `json:"startTime"`
	EndTime   int64  `json:"endTime"`
}

type InfoData

type InfoData struct {
	DisplayType string `json:"displayType,omitempty"` // if left out of param, game uses
	Message     string `json:"message,omitempty"`     // if left out of param, game uses empty string
	ImageID     string `json:"imageID,omitempty"`     // if left out of param game uses "-1". if used with text, this is the image that appears in the info list (ad_<id>_<regionCode>.jpg)
	InfoType    string `json:"infoType,omitempty"`    // if left out of param, game uses Text
	Extra       string `json:"extra,omitempty"`       // desired region code if DisplayType == countryText or countryImage; web address otherwise
}

Jump to

Keyboard shortcuts

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