Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ce983fb
fix: crap ton of changes and bug fixes
DuckySoLucky Feb 24, 2026
8cacc9c
feat: forgot to add texture here
DuckySoLucky Feb 24, 2026
bf20bf4
fix: 64x32 skulls being white
DuckySoLucky Feb 25, 2026
a20f15e
fix: back left being flipped
DuckySoLucky Feb 25, 2026
7fcdfc2
fix: openapi docs
DuckySoLucky Feb 26, 2026
05a756e
fix: endpoint
DuckySoLucky Feb 26, 2026
1da4032
chore: regenerate openapi schema
DarthGigi Feb 26, 2026
89fe057
refactor: small consistency fixes, add consumable secton
DuckySoLucky Feb 26, 2026
48f458e
feat: sort items based on the inventory index as well, not only rarit…
DuckySoLucky Feb 26, 2026
a09c70d
fix: sunflower garden milestone
DuckySoLucky Feb 26, 2026
41239d0
feat: add sea creatures
DuckySoLucky Feb 26, 2026
962ba87
fix: replacing entire accessory data for dupes
DuckySoLucky Feb 26, 2026
6fc085b
feat: add mutations
DuckySoLucky Feb 26, 2026
7a36fb5
feat: add attribute_shards endpoint
DuckySoLucky Mar 3, 2026
bb25c7a
perf: do not fetch if it's bot
DuckySoLucky Mar 3, 2026
c319d89
feat: add missing accessories
DuckySoLucky Mar 3, 2026
6fc6c4f
perf: better username resolving caching
DuckySoLucky Mar 4, 2026
8472f22
feat: add ability to toggle verbose logging & forensics
DuckySoLucky Mar 4, 2026
714f06d
feat: add new museum categories
DuckySoLucky Mar 4, 2026
41e46c6
Fix: Bukkit Case 351 damage 2 maps to cactus_green (#37)
JoonaFinland Mar 5, 2026
42698b7
perf: make startup a lot faster, especially dev
DuckySoLucky Mar 8, 2026
a115b8c
Fix: use green_dye instead of cactus_green for dye ID 351 (#38)
JoonaFinland Mar 8, 2026
4cad981
panic: failed to connect to Redis: could not connect to Redis: LOADIN…
DuckySoLucky Mar 8, 2026
05656e3
refactor: do not use go git
DuckySoLucky Mar 8, 2026
51dcf96
fix: start update loop only on main thread
DuckySoLucky Mar 8, 2026
03587e9
fix: update on all threads, forgot to add on last commit
DuckySoLucky Mar 8, 2026
1da304b
fix: trophy fish
DuckySoLucky Mar 9, 2026
d6ad2b8
feat(inventory): add sacks
DuckySoLucky Mar 9, 2026
b31a9c6
very important fix, trust me nocap
DuckySoLucky Mar 9, 2026
a5df7dd
fix: error
DuckySoLucky Mar 9, 2026
1d9a3b4
fix: hypixelCase at SkyCrypt, gen types
DuckySoLucky Mar 10, 2026
1d4e856
fix: consumables texture
DuckySoLucky Mar 10, 2026
a8b20cd
fix: foraging lvl cap
DuckySoLucky Mar 10, 2026
9a129af
fix: embed
DuckySoLucky Mar 12, 2026
c58fc4a
Merge branch 'prod' into dev
DuckySoLucky Mar 12, 2026
9b197a8
build: bump mongodb to v2
DuckySoLucky Mar 13, 2026
e7d80fd
fix: FS link
DuckySoLucky Mar 14, 2026
ade61f1
H+ link
DuckySoLucky Mar 14, 2026
1a2e321
feat: add rank to the embed
DuckySoLucky Mar 14, 2026
0071071
bump docs
DuckySoLucky Mar 14, 2026
423bc9a
disable bot detection to test smth
DuckySoLucky Mar 15, 2026
88ebae0
reenable bot detection
DuckySoLucky Mar 15, 2026
f3c5269
change format of embed data
DuckySoLucky Mar 15, 2026
c0484d4
fix: datatype
DuckySoLucky Mar 15, 2026
a606fae
Merge branch 'prod' into dev
DuckySoLucky Mar 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/swagger.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ components:
type: integer
type: object
xp:
type: number
type: integer
type: object
models.EmbedNetworth:
properties:
Expand Down
2 changes: 1 addition & 1 deletion src/models/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type EmbedDataDungeons struct {
}

type EmbedDataSlayers struct {
Experience float64 `json:"xp"`
Experience int `json:"xp"`
Slayers map[string]int `json:"slayers"`
}

Expand Down
22 changes: 11 additions & 11 deletions src/stats/discord_embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
skycrypttypes "github.com/DuckySoLucky/SkyCrypt-Types"
)

func roundToTwoDecimals(value float64) float64 {
rounded := math.Round(value*100) / 100
func RoundToOneDecimal(value float64) float64 {
rounded := math.Round(value*10) / 10
if rounded == math.Floor(rounded) {
return math.Floor(rounded)
}
Expand All @@ -21,7 +21,7 @@ func roundToTwoDecimals(value float64) float64 {

func getSkillsForEmbed(skills *models.Skills) models.EmbedDataSkills {
output := models.EmbedDataSkills{
SkillAverage: roundToTwoDecimals(skills.AverageSkillLevelWithProgress),
SkillAverage: math.Floor(skills.AverageSkillLevelWithProgress),
Skills: make(map[string]int, len(skills.Skills)),
}

Expand All @@ -34,8 +34,8 @@ func getSkillsForEmbed(skills *models.Skills) models.EmbedDataSkills {

func getDungeonsForEmbed(dungeons *models.DungeonsOutput) models.EmbedDataDungeons {
output := models.EmbedDataDungeons{
Dungeoneering: roundToTwoDecimals(dungeons.Level.LevelWithProgress),
ClassAverage: roundToTwoDecimals(dungeons.Classes.ClassAverageWithProgress),
Dungeoneering: math.Floor(dungeons.Level.LevelWithProgress),
ClassAverage: math.Floor(dungeons.Classes.ClassAverageWithProgress),
Classes: make(map[string]int, len(dungeons.Classes.Classes)),
}

Expand All @@ -48,7 +48,7 @@ func getDungeonsForEmbed(dungeons *models.DungeonsOutput) models.EmbedDataDungeo

func getSlayersForEmbed(slayers *models.SlayersOutput) models.EmbedDataSlayers {
output := models.EmbedDataSlayers{
Experience: roundToTwoDecimals(float64(slayers.TotalSlayerExperience)),
Experience: slayers.TotalSlayerExperience,
Slayers: make(map[string]int, len(slayers.Data)),
}

Expand All @@ -70,8 +70,8 @@ func StoreEmbedData(mowojang *models.MowojangReponse, player *skycrypttypes.Play
}

formattedNetworth := models.EmbedNetworth{
Normal: roundToTwoDecimals(networth["normal"]),
NonCosmetic: roundToTwoDecimals(networth["nonCosmetic"]),
Normal: RoundToOneDecimal(networth["normal"]),
NonCosmetic: RoundToOneDecimal(networth["nonCosmetic"]),
}

output := models.EmbedData{
Expand All @@ -83,11 +83,11 @@ func StoreEmbedData(mowojang *models.MowojangReponse, player *skycrypttypes.Play
ProfileCuteName: profile.CuteName,
Joined: userProfile.Profile.FirstJoin,
GameMode: profile.GameMode,
SkyBlockLevel: roundToTwoDecimals(GetSkyBlockLevel(userProfile).LevelWithProgress),
SkyBlockLevel: math.Floor(GetSkyBlockLevel(userProfile).LevelWithProgress),
Skills: getSkillsForEmbed(skills),
Networth: formattedNetworth,
Purse: roundToTwoDecimals(userProfile.Currencies.CoinPurse),
Bank: roundToTwoDecimals(bank),
Purse: RoundToOneDecimal(userProfile.Currencies.CoinPurse),
Bank: RoundToOneDecimal(bank),
Dungeons: getDungeonsForEmbed(&dungeons),
Slayers: getSlayersForEmbed(&slayers),
}
Expand Down
Loading