gamecomm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorldChan   = "WorldChan"
	CorpChan    = "CorpChan"
	MissionChan = "MissionChan"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChanResponse

type ChanResponse struct {
	Val any
	Err error
}

type CommandType

type CommandType int
const (
	GetCorporation CommandType = iota
	GetSquad
	AddResourcesToSquad
	RemoveResourcesFromSquad
	AddResourcesToBase
	RemoveResourcesFromBase
	AddCredits
	RemoveCredits
)

type CorpCommand

type CorpCommand struct {
	Action          CommandType
	ResponseChannel chan ChanResponse
	CorporationId   uint64
	SquadIndex      int
	BaseIndex       int
	Resource        string
	Amount          int
	AmountDecimal   float64
}

Corporation Channels

type GameChannelType

type GameChannelType string

type GameChannels

type GameChannels struct {
	WorldChannel   chan WorldCommand
	CorpChannel    chan CorpCommand
	MissionChannel chan MissionCommand
}

type MissionCommand

type MissionCommand struct {
	Id               string
	CorporationId    uint64
	Squads           []int
	PlanetId         string
	DestinationTime  time.Time
	ReturnalTime     time.Time
	Status           string
	Type             MissionType
	Resources        []string
	NotificationChan chan string
	Amount           int
}

Mission Channels

type MissionType

type MissionType int
const (
	SquadMission MissionType = iota
	QuestMission
	TransferMission
)

type WorldCommand

type WorldCommand struct {
	PlanetId        string
	Action          WorldCommandType
	Amount          int
	ResponseChannel chan ChanResponse
	Resource        string
}

World Channels

type WorldCommandType

type WorldCommandType int
const (
	GetPlanet WorldCommandType = iota
	AddResourcesToPlanet
	RemoveResourcesFromPlanet
)

Jump to

Keyboard shortcuts

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