Skip to content

Commit 4d617cb

Browse files
committed
feat: New winter pet ❄️HAMSTER_SNOW ❄️
1 parent e96c889 commit 4d617cb

6 files changed

Lines changed: 761 additions & 110 deletions

File tree

README.md

Lines changed: 111 additions & 110 deletions
Large diffs are not rendered by default.

docs/hamster-snow.svg

Lines changed: 275 additions & 0 deletions
Loading

src/main/kotlin/org/gitanimals/core/PersonaType.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,26 @@ enum class PersonaType(
21982198
StringBuilder().moveRandomly("snowman", id, 5, "1000s", 5, 21.0)
21992199
.toString()
22002200
},
2201+
HAMSTER_SNOW(0.01) {
2202+
override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String {
2203+
return hamsterSnowSvg.replace("*{act}", act(animationId))
2204+
.replace("*{id}", animationId.toString())
2205+
.replace("*{level}", level.toSvg(14.0, 2.0))
2206+
.replace(
2207+
"*{levelx}",
2208+
(-5 + (-1 * (level.toString().length))).toString()
2209+
)
2210+
.replace("*{username}", name.toSvg(14.0, 25.0))
2211+
.replace(
2212+
"*{usernamex}",
2213+
(17 + (-3 * name.length)).toString()
2214+
)
2215+
}
2216+
2217+
override fun act(id: Long, flippedWidth: Double): String =
2218+
StringBuilder().moveRandomly("hamster", id, 1, "1000s", 5, 21.0)
2219+
.toString()
2220+
},
22012221
MALTESE(0.02) {
22022222
override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String {
22032223
return malteseSvg.replace("*{act}", act(animationId))

src/main/kotlin/org/gitanimals/core/Svgs.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ val slimePumpkin2Svg: String = ClassPathResource("persona/animal/slime-pumpkin-2
296296
val hamsterSvg: String = ClassPathResource("persona/animal/hamster.svg")
297297
.getContentAsString(Charset.defaultCharset())
298298

299+
val hamsterSnowSvg: String = ClassPathResource("persona/animal/hamster-snow.svg")
300+
.getContentAsString(Charset.defaultCharset())
301+
299302
val hamsterSpringSvg: String = ClassPathResource("persona/animal/hamster-spring.svg")
300303
.getContentAsString(Charset.defaultCharset())
301304

0 commit comments

Comments
 (0)