Config.go 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. package config
  2. // ARKShopConfig 总配置
  3. type Config struct {
  4. Mysql Mysql `json:"Mysql"` //数据库
  5. General General `json:"General"` //概述
  6. Kits map[string]Kit `json:"Kits"` //礼包?
  7. ShopItems map[string]ShopItem `json:"ShopItems"` //商品
  8. SellItems map[string]SellItem `json:"SellItems"` //回收
  9. Messages Messages `json:"Messages"` //消息
  10. }
  11. type Mysql struct {
  12. UseMysql bool `json:"UseMysql"`
  13. MysqlHost string `json:"MysqlHost"`
  14. MysqlUser string `json:"MysqlUser"`
  15. MysqlPass string `json:"MysqlPass"`
  16. MysqlDB string `json:"MysqlDB"`
  17. MysqlPort int `json:"MysqlPort"`
  18. }
  19. // General 概述
  20. type General struct {
  21. Discord Discord `json:"Discord"` //联系方式
  22. TimedPointsReward TimedPointsReward `json:"TimedPointsReward"` //计时积分奖励
  23. ItemsPerPage int `json:"ItemsPerPage"` //每页项目数
  24. ShopDisplayTime float64 `json:"ShopDisplayTime"` //店铺展示时间
  25. ShopTextSize float64 `json:"ShopTextSize"` //店铺文字大小
  26. DbPathOverride string `json:"DbPathOverride"` //db文件位置
  27. DefaultKit string `json:"DefaultKit"` //默认礼包?
  28. GiveDinosInCryopods bool `json:"GiveDinosInCryopods"` //在低温仓给恐龙
  29. UseSoulTraps bool `json:"UseSoulTraps"` //使用灵魂陷阱?
  30. CryoLimitedTime bool `json:"CryoLimitedTime"` //低温仓有限时间?
  31. }
  32. type Discord struct {
  33. Enabled bool `json:"Enabled"` //启用
  34. SenderName string `json:"SenderName"` //发件人
  35. URL string `json:"URL"` //地址
  36. }
  37. type TimedPointsReward struct {
  38. Enabled bool `json:"Enabled"` //启用
  39. Interval int `json:"Interval"` //间隔(应该是分钟为单位)
  40. StackRewards bool `json:"StackRewards"` //堆栈奖励
  41. Groups map[string]Group `json:"Groups"` //vip 组(key: vip名称(英文),金额)
  42. }
  43. type Group struct {
  44. Amount int `json:"Amount"`
  45. }
  46. type Messages struct {
  47. Sender string `json:"Sender"` //发件人
  48. BoughtItem string `json:"BoughtItem"` //已购买商品
  49. BoughtDino string `json:"BoughtDino"` //已购买恐龙
  50. BoughtBeacon string `json:"BoughtBeacon"` //已购买信标?
  51. BoughtExp string `json:"BoughtExp"` //已购买经验
  52. ReceivedPoints string `json:"ReceivedPoints"` //已获得积分
  53. HavePoints string `json:"HavePoints"` //拥有积分
  54. NoPoints string `json:"NoPoints"` //没有积分
  55. WrongId string `json:"WrongId"` //错误的id
  56. NoPermissionsKit string `json:"NoPermissionsKit"` //没有权限
  57. CantBuyKit string `json:"CantBuyKit"` //无法购买
  58. BoughtKit string `json:"BoughtKit"` //已购买礼包
  59. AvailableKits string `json:"AvailableKits"` //可用礼包
  60. NoKits string `json:"NoKits"` //没有礼包
  61. KitsLeft string `json:"KitsLeft"` //礼包剩余
  62. NoKitsLeft string `json:"NoKitsLeft"` //没有礼包
  63. CantGivePoints string `json:"CantGivePoints"` //无法发送积分
  64. RidingDino string `json:"RidingDino"` //正在骑乘恐龙
  65. SentPoints string `json:"SentPoints"` //已发送积分
  66. GotPoints string `json:"GotPoints"` //已获得积分
  67. NoPlayer string `json:"NoPlayer"` //没有玩家
  68. FoundMorePlayers string `json:"FoundMorePlayers"` //找到多个玩家
  69. BuyUsage string `json:"BuyUsage"` //购买命令
  70. ShopUsage string `json:"ShopUsage"` //商店命令
  71. KitUsage string `json:"KitUsage"` //交易命令
  72. BuyKitUsage string `json:"BuyKitUsage"` //购买礼包命令
  73. TradeUsage string `json:"TradeUsage"` //交易命令
  74. PointsCmd string `json:"PointsCmd"` //积分命令
  75. TradeCmd string `json:"TradeCmd"` //交易命令
  76. BuyCmd string `json:"BuyCmd"` //购买命令
  77. ShopCmd string `json:"ShopCmd"` //商店命令
  78. KitCmd string `json:"KitCmd"` //交易命令
  79. BuyKitCmd string `json:"BuyKitCmd"` //购买礼包命令
  80. SellCmd string `json:"SellCmd"` //出售命令
  81. ShopSellCmd string `json:"ShopSellCmd"` //商店出售命令
  82. SellUsage string `json:"SellUsage"` //出售命令
  83. NotEnoughItems string `json:"NotEnoughItems"` //没有足够的物品
  84. SoldItems string `json:"SoldItems"` //已出售物品
  85. BadLevel string `json:"BadLevel"` //错误的等级
  86. KitsListPrice string `json:"KitsListPrice"` //礼包列表价格
  87. KitsListFormat string `json:"KitsListFormat"` //礼包列表格式
  88. StoreListDino string `json:"StoreListDino"` //商店列表恐龙
  89. StoreListItem string `json:"StoreListItem"` //商店列表物品
  90. StoreListFormat string `json:"StoreListFormat"` //商店列表格式
  91. OnlyOnSpawnKit string `json:"OnlyOnSpawnKit"` //只能购买在出生点礼包
  92. HelpCmd string `json:"HelpCmd"` //帮助命令
  93. ShopMessage string `json:"ShopMessage"` //商店消息
  94. HelpMessage string `json:"HelpMessage"` //帮助消息
  95. RefundError string `json:"RefundError"` //退款错误
  96. ShopFindCmd string `json:"ShopFindCmd"` //商店查找命令
  97. ShopFindUsage string `json:"ShopFindUsage"` //商店查找用法
  98. ShopFindNotFound string `json:"ShopFindNotFound"` //商店查找不存在
  99. ShopFindTooManyResults string `json:"ShopFindTooManyResults"` //商店发现太多结果
  100. NoPermissionsStore string `json:"NoPermissionsStore"` //没有权限
  101. }
  102. // SellItem 允许玩家出售物资,以换取积分
  103. type SellItem struct {
  104. Type string `json:"Type"`
  105. Description string `json:"Description"`
  106. Price int `json:"Price"`
  107. Amount int `json:"Amount"`
  108. Blueprint string `json:"Blueprint"`
  109. }
  110. // ShopItem 商城出售的商品
  111. type ShopItem struct {
  112. Description string `json:"Description"` //描述
  113. Items []Item `json:"Items"` //物品信息
  114. Price int `json:"Price"` //价格
  115. Type string `json:"Type"` //类型,item,beacon,dino,experience,unlockengram,command
  116. }
  117. // Item 物品信息
  118. type Item struct {
  119. Amount int `json:"Amount"` //金额
  120. Blueprint string `json:"Blueprint"` //图纸
  121. Fixed bool `json:"Fixed"` //固定
  122. ForceBlueprint bool `json:"ForceBlueprint"` //
  123. Quality float64 `json:"Quality"` //质量
  124. }
  125. // Kit 礼包
  126. type Kit struct {
  127. DefaultAmount int `json:"DefaultAmount"` //数量?
  128. Price int `json:"Price"` //价格
  129. Description string `json:"Description"` //描述
  130. Permissions string `json:"Permissions"` //购买权限,例如"Admins,VIP1"
  131. Dinos []Dino `json:"Dinos"` //恐龙
  132. Items []Item `json:"Items"`
  133. }
  134. type Dino struct {
  135. Level int `json:"Level"` //等级
  136. Neutered bool `json:"Neutered"` //是否绝育
  137. Blueprint string `json:"Blueprint"` //指令?
  138. }