brushes

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alternate

type Alternate struct {
	Items []Item `xml:"item" json:"items"`
}

type Border

type Border struct {
	ID    int          `xml:"id,attr" json:"id"`
	Group int          `xml:"group,attr" json:"group,omitempty"`
	Items []BorderItem `xml:"borderitem" json:"items"`
}

type BorderItem

type BorderItem struct {
	Edge string `xml:"edge,attr" json:"edge"`
	Item int    `xml:"item,attr" json:"item"`
}

type BorderRef

type BorderRef struct {
	Align string `xml:"align,attr" json:"align"`
	ID    int    `xml:"id,attr" json:"id,omitempty"`
	To    string `xml:"to,attr" json:"to,omitempty"`
}

type Brush

type Brush struct {
	Name         string        `xml:"name,attr" json:"name"`
	Type         string        `xml:"type,attr" json:"type"`
	ServerLookID int           `xml:"server_lookid,attr" json:"serverLookId,omitempty"`
	ZOrder       int           `xml:"z-order,attr" json:"zOrder,omitempty"`
	Draggable    string        `xml:"draggable,attr" json:"draggable,omitempty"`
	OnBlocking   string        `xml:"on_blocking,attr" json:"onBlocking,omitempty"`
	Thickness    string        `xml:"thickness,attr" json:"thickness,omitempty"`
	Items        []Item        `xml:"item" json:"items,omitempty"`
	Borders      []BorderRef   `xml:"border" json:"borders,omitempty"`
	Friends      []FriendRef   `xml:"friend" json:"friends,omitempty"`
	Composites   []Composite   `xml:"composite" json:"composites,omitempty"`
	Carpets      []CarpetPiece `xml:"carpet" json:"carpets,omitempty"`
	Tables       []TableAlign  `xml:"table" json:"tables,omitempty"`
	Walls        []WallSection `xml:"wall" json:"walls,omitempty"`
	Alternates   *Alternate    `xml:"alternate" json:"alternate,omitempty"`
}

type CarpetPiece

type CarpetPiece struct {
	Align string `xml:"align,attr" json:"align"`
	ID    int    `xml:"id,attr" json:"id"`
}

type Composite

type Composite struct {
	Chance int             `xml:"chance,attr" json:"chance"`
	Tiles  []CompositeTile `xml:"tile" json:"tiles"`
}

type CompositeTile

type CompositeTile struct {
	X     int    `xml:"x,attr" json:"x"`
	Y     int    `xml:"y,attr" json:"y"`
	Items []Item `xml:"item" json:"items"`
}

type Door

type Door struct {
	ID   int    `xml:"id,attr" json:"id"`
	Type string `xml:"type,attr" json:"type"`
	Open string `xml:"open,attr" json:"open,omitempty"`
}

type ExtensionMeta

type ExtensionMeta struct {
	Name        string `json:"name"`
	Author      string `json:"author"`
	Description string `json:"description"`
	Brushes     int    `json:"brushes"`
	Tilesets    int    `json:"tilesets"`
}

type FriendRef

type FriendRef struct {
	Name string `xml:"name,attr" json:"name"`
}

type Item

type Item struct {
	ID     int `xml:"id,attr" json:"id"`
	Chance int `xml:"chance,attr" json:"chance,omitempty"`
}

type Registry

type Registry struct {
	Grounds   []Brush   `json:"grounds"`
	Borders   []Border  `json:"borders"`
	Walls     []Brush   `json:"walls"`
	WallDecos []Brush   `json:"wallDecos"`
	Doodads   []Brush   `json:"doodads"`
	Carpets   []Brush   `json:"carpets"`
	Tables    []Brush   `json:"tables"`
	Tilesets  []Tileset `json:"tilesets"`
}

func LoadFromDir

func LoadFromDir(dir string) (*Registry, error)

func (*Registry) BrushesByType

func (r *Registry) BrushesByType(typ string) []Brush

func (*Registry) LoadExtension

func (r *Registry) LoadExtension(data []byte) (*ExtensionMeta, error)

type TableAlign

type TableAlign struct {
	XMLName xml.Name `xml:"table"`
	Align   string   `xml:"align,attr" json:"align"`
	Items   []Item   `xml:"item" json:"items"`
}

type Tileset

type Tileset struct {
	Name           string          `xml:"name,attr" json:"name"`
	Terrain        *TilesetSection `xml:"terrain" json:"terrain,omitempty"`
	Doodad         *TilesetSection `xml:"doodad" json:"doodad,omitempty"`
	Raw            *TilesetSection `xml:"raw" json:"raw,omitempty"`
	WallDeco       *TilesetSection `xml:"wall_deco" json:"wall_deco,omitempty"`
	OptionalBorder *TilesetSection `xml:"optional_border" json:"optional_border,omitempty"`
	Creature       *TilesetSection `xml:"creature" json:"creature,omitempty"`
}

type TilesetBrushRef

type TilesetBrushRef struct {
	Name string `xml:"name,attr" json:"name"`
}

type TilesetItem

type TilesetItem struct {
	ID     int `xml:"id,attr" json:"id,omitempty"`
	FromID int `xml:"fromid,attr" json:"fromid,omitempty"`
	ToID   int `xml:"toid,attr" json:"toid,omitempty"`
}

type TilesetSection

type TilesetSection struct {
	Brushes []TilesetBrushRef `xml:"brush" json:"brushes,omitempty"`
	Items   []TilesetItem     `xml:"item" json:"items,omitempty"`
}

type WallSection

type WallSection struct {
	XMLName xml.Name `xml:"wall"`
	Type    string   `xml:"type,attr" json:"type"`
	Items   []Item   `xml:"item" json:"items"`
	Doors   []Door   `xml:"door" json:"doors,omitempty"`
}

Jump to

Keyboard shortcuts

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