Documentation ¶
Index ¶
- func AddNewUser(ws *websocket.Conn, login string, id int)
- func Open(ws *websocket.Conn, msg Message)
- func Reader(ws *websocket.Conn)
- func RemoveAmmo(ws *websocket.Conn, msg Message)
- func RemoveBody(ws *websocket.Conn, msg Message)
- func RemoveEquip(ws *websocket.Conn, msg Message)
- func RemoveWeapon(ws *websocket.Conn, msg Message)
- func Repair(ws *websocket.Conn, msg Message)
- func SetAmmo(ws *websocket.Conn, msg Message)
- func SetBody(ws *websocket.Conn, msg Message)
- func SetEquip(ws *websocket.Conn, msg Message)
- func SetWeapon(ws *websocket.Conn, msg Message)
- func UpdateInventory(userID int)
- func UpdateSquad(event string, user *player.Player, err error, ws *websocket.Conn, msg Message)
- func UpdateStorage(userID int)
- type Message
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveAmmo ¶
func RemoveBody ¶
func RemoveEquip ¶
func RemoveWeapon ¶
func UpdateInventory ¶
func UpdateInventory(userID int)
func UpdateSquad ¶
func UpdateStorage ¶
func UpdateStorage(userID int)
Types ¶
type Message ¶
type Message struct { Event string `json:"event"` SquadID int `json:"squad_id"` BodyID int `json:"id_body"` WeaponID int `json:"weapon_id"` EquipID int `json:"equip_id"` AmmoID int `json:"ammo_id"` InventorySlot int `json:"inventory_slot"` InventorySlots []int `json:"inventory_slots"` StorageSlot int `json:"storage_slot"` StorageSlots []int `json:"storage_slots"` EquipSlot int `json:"equip_slot"` EquipSlotType int `json:"equip_slot_type"` UnitSlot int `json:"unit_slot"` ThoriumSlot int `json:"thorium_slot"` Source string `json:"source"` Destination string `json:"destination"` SrcSlot int `json:"src_slot"` DstSlot int `json:"dst_slot"` Name string `json:"name"` Storage bool `json:"storage"` Count int `json:"count"` ThrowItems []inventory.Slot `json:"throw_items"` BodyColor1 string `json:"body_color_1"` BodyColor2 string `json:"body_color_2"` WeaponColor1 string `json:"weapon_color_1"` WeaponColor2 string `json:"weapon_color_2"` }
type Response ¶
type Response struct { Event string `json:"event"` Squad *squad.Squad `json:"squad"` BaseSquads []*squad.Squad `json:"base_squads"` InventorySize float32 `json:"inventory_size"` InBase bool `json:"in_base"` Error string `json:"error"` Storage *inventory.Inventory `json:"inventory"` UnitSlot int `json:"unit_slot"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.