Skip to content

Commit

Permalink
fix FloatTech#154: 优化代码结构
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Mar 20, 2022
1 parent cdf844b commit 206a38e
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 331 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ print("run[CQ:image,file="+j["img"]+"]")
- **每日运势** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin/fortune`
- [x] 运势 | 抽签
- [x] 设置底图[车万 DC4 爱因斯坦 星空列车 樱云之恋 富婆妹 李清歌 公主连结 原神 明日方舟 碧蓝航线 碧蓝幻想 战双 阴阳师 赛马娘 东方归言录]
- **原神抽卡** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin/genshin`
- [x] 切换原神卡池
- [x] 原神十连
- **睡眠管理** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin/sleep_manage`
- [x] 早安 | 晚安
- **浅草寺求签** `import _ github.com/FloatTech/ZeroBot-Plugin/plugin/omikuji`
Expand Down
2 changes: 1 addition & 1 deletion data
Submodule data updated 1 files
+ Genshin/Genshin.zip
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/fumiama/gofastTEA v0.0.10
github.com/fumiama/gotracemoe v0.0.3
github.com/fumiama/sqlite3 v1.14.6
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/jinzhu/gorm v1.9.16
github.com/mroth/weightedrand v0.4.1
github.com/pkumza/numcn v1.0.0
Expand All @@ -31,7 +32,6 @@ require (
github.com/disintegration/imaging v1.6.2 // indirect
github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/epidemic" // 城市疫情查询
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/fortune" // 运势
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/funny" // 笑话
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/genshin" // 原神抽卡
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/gif" // 制图
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/github" // 搜索GitHub仓库
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/hs" // 炉石
Expand Down
16 changes: 16 additions & 0 deletions plugin/genshin/data.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package genshin

type storage uint64

func (s *storage) is5starsmode() bool {
return *s&1 == 1
}

func (s *storage) setmode(is5stars bool) bool {
if is5stars {
*s |= 1
} else {
*s &= 0xffffffff_fffffffe
}
return is5stars
}
Loading

0 comments on commit 206a38e

Please sign in to comment.