Documentation ¶
Overview ¶
Code generated by gen_strings. DO NOT EDIT.
Index ¶
- Constants
- Variables
- type AIStrength
- type Ability
- type Action
- type BasicAbility
- type BattleNet2Account
- type ChatMessage
- type Color
- type Expac
- type GameOptions
- type GameSpeed
- type GameType
- type GiveOrDropItem
- type ItemId
- type MsgDestination
- type MsgToAllies
- type MsgToEveryone
- type MsgToObservers
- type MsgToPlayer
- type ObjectId
- type ObjectTargetedAbility
- type ObserverSetting
- type Player
- type PointF
- type Race
- type Replay
- type Slot
- type StringsEntity
- type TargetedAbility
- type TwoTargetTwoItemAbility
- type UnexpectedValueError
- type Visibility
Constants ¶
View Source
const ( EmptySlot slotStatus = "Empty" ClosedSlot = "Closed" UsedSlot = "Used" )
View Source
const ( EasyAI AIStrength = 0x00 NormalAI = 0x01 InsaneAI = 0x02 )
View Source
const ( ObsOff ObserverSetting = 0 ObsOnDefeat = 2 ObsOn = 3 ObsReferees = 4 )
View Source
const ( SlowSpeed = iota NormalSpeed FastSpeed )
View Source
const ( Unknown GameType = 0x00 FFAor1on1 = 0x01 Custom = 0x09 Singleplayer = 0x1D LadderTeam = 0x20 // (AT or RT, 2on2/3on3/4on4) )
Variables ¶
View Source
var ( Red = Color{color.RGBA{255, 4, 2, 255}, "Red"} Blue = Color{color.RGBA{0, 66, 255, 255}, "Blue"} Teal = Color{color.RGBA{27, 230, 186, 255}, "Teal"} Purple = Color{color.RGBA{85, 0, 129, 255}, "Purple"} Yellow = Color{color.RGBA{255, 252, 0, 255}, "Yellow"} Orange = Color{color.RGBA{255, 138, 13, 255}, "Orange"} Green = Color{color.RGBA{32, 191, 0, 255}, "Green"} Pink = Color{color.RGBA{227, 91, 175, 255}, "Pink"} Grey = Color{color.RGBA{148, 150, 151, 255}, "Grey"} LightBlue = Color{color.RGBA{126, 191, 241, 255}, "LightBlue"} DarkGreen = Color{color.RGBA{16, 98, 71, 255}, "DarkGreen"} Brown = Color{color.RGBA{79, 43, 5, 255}, "Brown"} Maroon = Color{color.RGBA{156, 0, 0, 255}, "Maroon"} Turquoise = Color{color.RGBA{0, 235, 255, 255}, "Turquoise"} Violet = Color{color.RGBA{189, 0, 255, 255}, "Violet"} Wheat = Color{color.RGBA{236, 204, 134, 255}, "Wheat"} Peach = Color{color.RGBA{247, 164, 139, 255}, "Peach"} Mint = Color{color.RGBA{191, 255, 128, 255}, "Mint"} Lavender = Color{color.RGBA{219, 184, 236, 255}, "Lavender"} Coal = Color{color.RGBA{79, 79, 85, 255}, "Coal"} Snow = Color{color.RGBA{236, 240, 255, 255}, "Snow"} Emerald = Color{color.RGBA{0, 120, 30, 255}, "Emerald"} Peanut = Color{color.RGBA{164, 111, 52, 255}, "Peanut"} )
colour values from WorldEdit, names from https://gaming-tools.com/warcraft-3/patch-1-29/
View Source
var ( Human = Race{"Human"} Orc = Race{"Orc"} NightElf = Race{"Night Elf"} Undead = Race{"Undead"} RandomRace = Race{"Random"} )
View Source
var WC3Strings = map[string]StringsEntity{} /* 2370 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type AIStrength ¶
type AIStrength byte
func (AIStrength) MarshalText ¶
func (a AIStrength) MarshalText() ([]byte, error)
func (AIStrength) String ¶
func (a AIStrength) String() string
type Action ¶
func (Action) MarshalText ¶
func (Action) String ¶
func (a Action) MarshalJSON() ([]byte, error) { // FIXME: temporary until data is more structured // i.e. by default the action string representation won't be encoded return json.Marshal(struct { Time time.Duration Player *Player Data interface{} }{a.Time, a.Player, a.Ability}) }
type BasicAbility ¶
func (BasicAbility) APMChange ¶
func (a BasicAbility) APMChange() int
func (BasicAbility) String ¶
func (a BasicAbility) String() string
type BattleNet2Account ¶
type ChatMessage ¶
type ChatMessage struct { Timestamp time.Duration Author Slot Body string Destination MsgDestination }
type Color ¶
func (Color) MarshalText ¶
type GameOptions ¶
type GameOptions struct { MapName string CreatorName string TeamsTogether bool LockTeams bool RandomHero bool RandomRaces bool Speed GameSpeed Visibility Visibility ObserverSetting ObserverSetting GameName string }
type GiveOrDropItem ¶
type GiveOrDropItem struct { ObjectTargetedAbility ItemObjectId1, ItemObjectId2 ObjectId }
func (GiveOrDropItem) String ¶
func (g GiveOrDropItem) String() string
type MsgDestination ¶
type MsgToAllies ¶
type MsgToAllies struct{}
func (MsgToAllies) String ¶
func (MsgToAllies) String() string
type MsgToEveryone ¶
type MsgToEveryone struct{}
func (MsgToEveryone) String ¶
func (MsgToEveryone) String() string
type MsgToObservers ¶
type MsgToObservers struct{}
func (MsgToObservers) String ¶
func (MsgToObservers) String() string
type MsgToPlayer ¶
type MsgToPlayer struct{ Target Slot }
func (MsgToPlayer) String ¶
func (m MsgToPlayer) String() string
type ObjectTargetedAbility ¶
type ObjectTargetedAbility struct { TargetedAbility TargetObjectId1, TargetObjectId2 ObjectId }
func (ObjectTargetedAbility) String ¶
func (a ObjectTargetedAbility) String() string
func (ObjectTargetedAbility) TargetsGround ¶
func (a ObjectTargetedAbility) TargetsGround() bool
type ObserverSetting ¶
type ObserverSetting int
type Player ¶
type Player struct { Name string Id int SlotId int BattleNet *BattleNet2Account // contains filtered or unexported fields }
type Race ¶
type Race struct {
// contains filtered or unexported fields
}
func (Race) MarshalText ¶
type Replay ¶
type Replay struct { Duration time.Duration Version int BuildNumber int Expac Expac IsMultiplayer bool GameType GameType PrivateGame bool GameOptions GameOptions Players map[int]*Player Slots []Slot RandomSeed uint32 ChatMessages []ChatMessage Saver *Player WinnerTeam int // -1 represents a draw Actions []Action // contains filtered or unexported fields }
func ParseReplay ¶
ParseReplay parses an opened .w3g file.
type Slot ¶
type StringsEntity ¶
type StringsEntity struct { // Name is the full name of the entity, e.g. "Peasant" Name string // Code is the 4-char string it is stored under, e.g. "hpea" Code string // Tip is the imperative form, e.g. "Train Peasant" Tip string }
StringsEntity represents a definition from the WC3 *strings.txt files, which tools/gen_strings uses to generate mappings. Replay files only contain short codes, e.g. "hpea", from which we want to get "Peasant" (and possibly other data later).
type TargetedAbility ¶
type TargetedAbility struct { BasicAbility Target PointF }
func (TargetedAbility) String ¶
func (a TargetedAbility) String() string
type TwoTargetTwoItemAbility ¶
type TwoTargetTwoItemAbility struct { TargetedAbility ItemId2 ItemId Target2 PointF }
func (TwoTargetTwoItemAbility) String ¶
func (t TwoTargetTwoItemAbility) String() string
type UnexpectedValueError ¶
type UnexpectedValueError struct {
// contains filtered or unexported fields
}
func (UnexpectedValueError) Error ¶
func (u UnexpectedValueError) Error() string
type Visibility ¶
type Visibility int
const ( Default Visibility = iota AlwaysVisible MapExplored HideTerrain )
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
tools
|
|
gen_strings
This program generates strings.go from a directory containing *strings.txt extracted from the WC3 mpq/casc
|
This program generates strings.go from a directory containing *strings.txt extracted from the WC3 mpq/casc |
Click to show internal directories.
Click to hide internal directories.