universe_mapped

package
v1.62.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: AGPL-3.0, AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

parse universe.ini

Index

Constants

View Source
const (
	FILENAME       = "universe.ini"
	KEY_BASE_TAG   = "[base]"
	KEY_TIME_TAG   = "[time]"
	KEY_SYSTEM_TAG = "[system]"
)

Variables

View Source
var (
	KEY_NICKNAME  = cfg.Key("nickname")
	KEY_STRIDNAME = cfg.Key("strid_name")
	KEY_SYSTEM    = cfg.Key("system")
	KEY_FILE      = cfg.Key("file")

	KEY_BASE_BGCS = cfg.Key("BGCS_base_run_by")

	KEY_SYSTEM_MSG_ID_PREFIX = cfg.Key("msg_id_prefix")
	KEY_SYSTEM_VISIT         = cfg.Key("visit")
	KEY_SYSTEM_IDS_INFO      = cfg.Key("ids_info")
	KEY_SYSTEM_NAVMAPSCALE   = cfg.Key("NavMapScale")
	KEY_SYSTEM_POS           = cfg.Key("pos")

	KEY_TIME_SECONDS = cfg.Key("seconds_per_day")
)
View Source
var KEY_BASE_TERRAINS = [...]string{"terrain_tiny", "terrain_sml", "terrain_mdm", "terrain_lrg", "terrain_dyna_01", "terrain_dyna_02"}

Functions

This section is empty.

Types

type Base

type Base struct {
	semantic.Model

	Nickname         *semantic.String
	System           *semantic.String
	StridName        *semantic.Int
	File             *semantic.Path
	BGCS_base_run_by *semantic.String

	ConfigBase *ConfigBase

	TraderExists bool
}

type BaseNickname

type BaseNickname string

type Config

type Config struct {
	File     *iniload.IniLoader
	Bases    []*Base
	BasesMap map[BaseNickname]*Base

	Systems   []*System
	SystemMap map[SystemNickname]*System

	TimeSeconds *semantic.Int
}

func Read

func Read(ini *iniload.IniLoader, filesystem *filefind.Filesystem) *Config

func (*Config) Write

func (frelconfig *Config) Write() *file.File

type ConfigBase

type ConfigBase struct {
	File                  *inireader.INIFile
	Rooms                 []*Room
	RoomMapByRoomNickname map[string]*Room
}

type FileRead

type FileRead struct {
	// contains filtered or unexported fields
}

type HotSpot

type HotSpot struct {
	semantic.Model
	Name       *semantic.String
	RoomSwitch *semantic.String
}

type Room

type Room struct {
	semantic.Model
	Nickname *semantic.String
	File     *semantic.Path

	RoomInfo
}

type RoomInfo

type RoomInfo struct {
	HotSpots []*HotSpot
}

type RoomInfoRead

type RoomInfoRead struct {
	Base *Base
	Room *Room
	// contains filtered or unexported fields
}

type System

type System struct {
	semantic.Model
	Nickname *semantic.String
	// Pos        *semantic.Pos
	Msg_id_prefix *semantic.String
	Visit         *semantic.Int
	StridName     *semantic.Int
	Ids_info      *semantic.Int
	File          *semantic.Path
	NavMapScale   *semantic.Float

	PosX *semantic.Float
	PosY *semantic.Float
}

type SystemNickname

type SystemNickname string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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