server/slots.go (1498B)
1 package main 2 3 import "fmt" 4 5 // Native equipment positions are shared by both supported game protocols. 6 var equipmentSlots = map[uint32]string{ 7 1: "weapons_hud_1", 2: "weapons_hud_3", 3: "weapons_util_1", 4: "weapons_util_2", 5: "weapons_util_3", 8 6: "weapons_right_hand", 7: "weapons_belt", 8: "weapons_left_hand", 9 9: "weapons_deck_1", 10: "weapons_deck_2", 11: "weapons_deck_3", 12: "weapons_deck_4", 13: "weapons_deck_5", 14: "weapons_deck_6", 15: "weapons_hud_2", 10 17: "clothes_neck", 18: "clothes_head", 19: "clothes_back", 20: "clothes_right_shoulder", 21: "clothes_chest", 11 22: "clothes_left_shoulder", 23: "clothes_right_arm", 24: "clothes_hands", 25: "clothes_left_arm", 12 26: "clothes_right_wrist", 27: "clothes_legs", 28: "clothes_left_wrist", 29: "clothes_right_finger", 30: "clothes_feet", 31: "clothes_left_finger", 13 33: "implants_eyes", 34: "implants_head", 35: "implants_ears", 36: "implants_right_arm", 37: "implants_chest", 38: "implants_left_arm", 14 39: "implants_right_wrist", 40: "implants_waist", 41: "implants_left_wrist", 42: "implants_right_hand", 43: "implants_legs", 44: "implants_left_hand", 45: "implants_feet", 15 } 16 17 func emptyInventorySlots() map[string]*uint32 { 18 slots := make(map[string]*uint32) 19 for slot := 1; slot <= 30; slot++ { 20 slots[fmt.Sprintf("inventory_slot_%d", slot)] = nil 21 } 22 return slots 23 } 24 25 func emptyEquipmentSlots() map[string]*uint32 { 26 slots := make(map[string]*uint32) 27 for _, name := range equipmentSlots { 28 slots[name] = nil 29 } 30 return slots 31 }