Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NameStrToString ¶
NameStrToString converts a NameStr U8Array to a string.
Types ¶
type AppearanceOverride ¶
type AppearanceOverride struct { Element *etree.Element `json:"-"` DataXML string Attributes Attributes }
mEditPawn (main pawn appearance override). TODO remove DataXML and use Element.
func NewAppearanceOverrideFromRootNode ¶
func NewAppearanceOverrideFromRootNode(root *etree.Element, parent string) (*AppearanceOverride, error)
NewAppearanceOverrideFromRootNode creates a new appearance override from their root node. Parent: mEdit, mEditPawn, so it can be reused without reparsing AOs from different sources.
type Attributes ¶
type Pawn ¶
type Pawn struct { Category PawnCategory Element *etree.Element `json:"-"` Attributes Attributes AppearanceOverride AppearanceOverride }
func NewPawnFromDataXML ¶
NewPawnFromDataXML creates a new pawn from DataXML (string of the root node of a pawn).
func NewPawnFromRootNode ¶
func NewPawnFromRootNode(root *etree.Element, c PawnCategory) (*Pawn, error)
NewPawnFromRootNode creates a new pawn from their root node.
type PawnCategory ¶
type PawnCategory string
PawnCategory is an enum of pawn categories.
const ( MainPawn PawnCategory = "MAIN_PAWN" FirstPawn PawnCategory = "FIRST_PAWN" SecondPawn PawnCategory = "SECOND_PAWN" )
func ToPawnCategory ¶
func ToPawnCategory(c string) (*PawnCategory, error)
ToPawnCategory returns the PawnCategory from a string (the frontend representation).
Click to show internal directories.
Click to hide internal directories.