Documentation ¶
Overview ¶
Package extra provides handling for the extra data that may be appended on to a save.Entity
The type of the Extra depends on the TypePath of the save.Entity.
Index ¶
- type Circuit
- type CircuitSubsystem
- type ConveyorBelt
- type ConveyorBeltItem
- type Extra
- func (e *Extra) GetCircuitSubsystem() (*CircuitSubsystem, error)
- func (e *Extra) GetConveyorBelt() (*ConveyorBelt, error)
- func (e *Extra) GetGameMode() (*GameMode, error)
- func (e *Extra) GetGameState() (*GameState, error)
- func (e *Extra) GetPlayerState() (*PlayerState, error)
- func (e *Extra) GetPowerLine() (*PowerLine, error)
- func (e *Extra) GetTrain() (*Train, error)
- func (e *Extra) GetUnknown() (*UnknownExtra, error)
- func (e *Extra) GetVehicle() (*Vehicle, error)
- func (e *Extra) Serialize(d *data.Data) error
- type GameMode
- type GameState
- type PlayerState
- type PowerLine
- type Reference
- type Train
- type Type
- type UnknownExtra
- type Value
- type Vehicle
- type VehicleData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitSubsystem ¶
type CircuitSubsystem struct {
Circuits []*Circuit
}
type ConveyorBelt ¶
type ConveyorBelt struct {
Items []*ConveyorBeltItem
}
type ConveyorBeltItem ¶
type Extra ¶
type Extra struct { Type Type // The Value of the Extra. // // Accessing the value can be achieved by calling the appropriate Get method // on the Extra based on its Type. Value Value }
func (*Extra) GetCircuitSubsystem ¶
func (e *Extra) GetCircuitSubsystem() (*CircuitSubsystem, error)
func (*Extra) GetConveyorBelt ¶
func (e *Extra) GetConveyorBelt() (*ConveyorBelt, error)
func (*Extra) GetGameMode ¶
func (*Extra) GetGameState ¶
func (*Extra) GetPlayerState ¶
func (e *Extra) GetPlayerState() (*PlayerState, error)
func (*Extra) GetPowerLine ¶
func (*Extra) GetUnknown ¶
func (e *Extra) GetUnknown() (*UnknownExtra, error)
func (*Extra) GetVehicle ¶
type PlayerState ¶
type PlayerState struct { Data []byte // contains filtered or unexported fields }
type Type ¶
type Type string
const ( CircuitSubsystemExtraType Type = "CircuitSubsystem" ConveyorBeltExtraType Type = "ConveyorBelt" GameModeExtraType Type = "GameMode" GameStateExtraType Type = "GameState" PlayerStateExtraType Type = "PlayerState" PowerLineExtraType Type = "PowerLine" TrainExtraType Type = "Train" UnknownExtraType Type = "Unknown" VehicleExtraType Type = "Vehicle" )
type UnknownExtra ¶
type UnknownExtra struct { Data []byte // contains filtered or unexported fields }
UnknownExtra is the default extra that will be returned if we encounter extra data in a save.Entity with a TypePath that we don't have explicit handling for.
type Vehicle ¶
type Vehicle struct {
Data []VehicleData
}
type VehicleData ¶
Click to show internal directories.
Click to hide internal directories.