Skip to content

Commit dbda1b4

Browse files
🎨 改进代码样式 (#723)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b7e21fc commit dbda1b4

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

plugin/mcfish/fish.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func init() {
153153
ctx.SendChain(message.Text("[ERROR at fish.go.5.1]:", err))
154154
return
155155
}
156-
if number > 100 || equipInfo.Equip == "美西螈" { //放大概率
156+
if number > 100 || equipInfo.Equip == "美西螈" { // 放大概率
157157
probabilities["treasure"] = probabilityLimit{
158158
Min: 0,
159159
Max: 2,

plugin/mcfish/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ type jsonInfo struct {
3232
ArticleInfo []articleInfo `json:"物品"` // 物品信息
3333
}
3434
type zoneInfo struct {
35-
Name string `json:"类型"` //类型
35+
Name string `json:"类型"` // 类型
3636
Probability int `json:"概率[0-100)"` // 概率
3737
}
3838
type articleInfo struct {
39-
Name string `json:"名称"` //名称
39+
Name string `json:"名称"` // 名称
4040
Type string `json:"类型"` // 类型
4141
Probability int `json:"概率[0-100),omitempty"` // 概率
4242
Durable int `json:"耐久上限,omitempty"` // 耐久
@@ -135,7 +135,7 @@ var (
135135
)
136136

137137
func init() {
138-
//go func() {
138+
// go func() {
139139
_, err := engine.GetLazyData("articlesInfo.json", false)
140140
if err != nil {
141141
panic(err)
@@ -202,7 +202,7 @@ func init() {
202202
}
203203
min[info.Type] += info.Probability
204204
}
205-
//}()
205+
// }()
206206
}
207207

208208
// 更新上限信息

plugin/mcfish/pack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func init() {
6969
probableList[3] = info.Probability
7070
}
7171
}
72-
if number > 100 || equipInfo.Equip == "美西螈" { //放大概率
72+
if number > 100 || equipInfo.Equip == "美西螈" { // 放大概率
7373
probableList = []int{2, 8, 35, 45}
7474
}
7575
if equipInfo.Favor > 0 {

plugin/mcfish/store.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ func init() {
8989
msg = append(msg, message.Text(
9090
"[", i, "]", info.Name, " 数量: ", info.Number, "\n"))
9191
}
92-
9392
}
9493
msg = append(msg, message.Reply(ctx.Event.MessageID), message.Text("————————\n输入对应序号进行装备,或回复“取消”取消"))
9594
ctx.Send(msg)
@@ -300,7 +299,6 @@ func init() {
300299
thingPice := priceList[info.Name] * discountList[info.Name] / 100
301300
pice = append(pice, thingPice)
302301
}
303-
304302
}
305303
if len(thingInfos) > 1 {
306304
msg := make(message.Message, 0, 3+len(thingInfos))
@@ -313,7 +311,6 @@ func init() {
313311
msg = append(msg, message.Text(
314312
"[", i, "]", info.Name, " 数量:", info.Number, " 价格:", pice[i], "\n"))
315313
}
316-
317314
}
318315
msg = append(msg, message.Text("————————\n输入对应序号进行装备,或回复“取消”取消"))
319316
ctx.Send(message.ReplyWithMessage(ctx.Event.MessageID, msg...))

0 commit comments

Comments
 (0)