lobby

package
v0.0.0-...-54eea7a Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewUser

func AddNewUser(ws *websocket.Conn, login string, id int)

func BaseStatus

func BaseStatus(user *player.Player)

func BaseStatusSender

func BaseStatusSender()

вокрер обновляет игрокам информацию состояния базы

func GetDetails

func GetDetails(user *player.Player)

func Reader

func Reader(ws *websocket.Conn)

func ReposeSender

func ReposeSender()

func SellDetail

func SellDetail(user *player.Player, msg Message)

func WorkerChecker

func WorkerChecker()

Types

type Message

type Message struct {
	Event  string `json:"event"`
	UserID int    `json:"user_id"`
	Error  string `json:"error"`

	ID int `json:"id"`

	StorageSlot  int   `json:"storage_slot"`
	RecyclerSlot int   `json:"recycler_slot"`
	StorageSlots []int `json:"storage_slots"`

	RecycleSlots        map[string]map[int]*lobby.RecycleItem `json:"recycle_slots"`
	InventorySlots      map[int]*inv.Slot                     `json:"inventory_slots"`
	PreviewRecycleSlots []*inv.Slot                           `json:"preview_recycle_slots"`
	UserRecycleSkill    int                                   `json:"user_recycle_skill"`
	Storage             *inv.Inventory                        `json:"storage"`

	BluePrint *blueprints.Blueprint        `json:"blue_print"`
	BlueWorks map[int]*blueprints.BlueWork `json:"blue_works"`
	BlueWork  *blueprints.BlueWork         `json:"blue_work"`
	BPItem    interface{}                  `json:"bp_item"`
	Count     int                          `json:"count"`
	MaxCount  int                          `json:"max_count"`
	Price     int                          `json:"price"`

	StartTime     int64  `json:"start_time"`
	ToTime        int64  `json:"to_time"`
	MineralSaving int    `json:"mineral_saving"`
	TimeSaving    int    `json:"time_saving"`
	BluePrintID   int    `json:"blue_print_id"`
	ItemSource    string `json:"item_source"`

	Fraction string `json:"fraction"`

	DialogPage *dialog.Page `json:"dialog_page"`

	UserWorkSkillDetailPercent int `json:"user_work_skill_detail_percent"`
	UserWorkSkillTimePercent   int `json:"user_work_skill_time_percent"`

	Base       *base.Base `json:"base"`
	Efficiency int        `json:"efficiency"`
}

Jump to

Keyboard shortcuts

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