Skip to content

Commit

Permalink
feat: 🎄rabbit - brown rudolph costume
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Dec 3, 2024
1 parent 8bdb927 commit 344985e
Show file tree
Hide file tree
Showing 7 changed files with 382 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ _New contributions may take up to 1 hour to be reflected._
|---------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SNOWMAN_MELT <br> <img src = "docs/snowman-melt.svg" width="100px" height="40px"/> | 0.001 | 🎄2024 Christmas pet🎄 |
| SNOWMAN <br> <img src = "docs/snowman.svg" width="100px" height="70px"/> | 0.005 | 🎄2024 Christmas pet🎄 |
| DESSERT_FOX_RUDOLPH <br> <img src="docs/dessert-fox-rudolph.svg" width="80px" height="70px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| DESSERT_FOX_RUDOLPH <br> <img src="docs/dessert-fox-rudolph.svg" width="80px" height="70px"/> | 0.005 | 🎄2024 Christmas pet🎄 |
| RABBIT_BROWN_RUDOLPH <br> <img src="docs/rabbit-brown-rudolph.svg" width="80px" height="60px"/> | 0.007 | 🎄2024 Christmas pet🎄 |
| LITTLE_CHICK_SANTA <br> <img src="docs/little-chick-santa.svg" width="45px" height="30px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| HAMSTER_SANTA <br> <img src = "docs/hamster-santa.svg" width="100px" height="60px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| HAMSTER_JS <br> <img src = "docs/hamster-js.svg" width="100px" height="50px"/> | 0.01 | |
Expand Down
3 changes: 2 additions & 1 deletion README-zhcn.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ _新的贡献可能需要1个小时才能显示_
|---------------------------------------------------------------------------------------------------------|-------|--------------------------------------------------------------------------------------------------------------------|
| SNOWMAN_MELT <br> <img src = "docs/snowman-melt.svg" width="100px" height="40px"/> | 0.001 | 🎄2024 Christmas pet🎄 |
| SNOWMAN <br> <img src = "docs/snowman.svg" width="100px" height="70px"/> | 0.005 | 🎄2024 Christmas pet🎄 |
| DESSERT_FOX_RUDOLPH <br> <img src="docs/dessert-fox-rudolph.svg" width="80px" height="70px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| DESSERT_FOX_RUDOLPH <br> <img src="docs/dessert-fox-rudolph.svg" width="80px" height="70px"/> | 0.005 | 🎄2024 Christmas pet🎄 |
| RABBIT_BROWN_RUDOLPH <br> <img src="docs/rabbit-brown-rudolph.svg" width="80px" height="60px"/> | 0.007 | 🎄2024 Christmas pet🎄 |
| LITTLE_CHICK_SANTA <br> <img src="docs/little-chick-santa.svg" width="45px" height="30px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| HAMSTER_SANTA <br> <img src = "docs/hamster-santa.svg" width="100px" height="60px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| HAMSTER_JS <br> <img src = "docs/hamster-js.svg" width="100px" height="50px"/> | 0.01 | |
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ _새로운 contribution 반영은 최대 1시간이 소요될 수 있어요._
|----------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SNOWMAN_MELT <br> <img src = "docs/snowman-melt.svg" width="100px" height="40px"/> | 0.001 | 🎄2024 Christmas pet🎄 |
| SNOWMAN <br> <img src = "docs/snowman.svg" width="100px" height="70px"/> | 0.005 | 🎄2024 Christmas pet🎄 |
| DESSERT_FOX_RUDOLPH <br> <img src="docs/dessert-fox-rudolph.svg" width="80px" height="70px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| LITTLE_CHICK_SANTA <br> <img src="docs/little-chick-santa.svg" width="45px" height="30px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| DESSERT_FOX_RUDOLPH <br> <img src="docs/dessert-fox-rudolph.svg" width="80px" height="70px"/> | 0.005 | 🎄2024 Christmas pet🎄 |
| RABBIT_BROWN_RUDOLPH <br> <img src="docs/rabbit-brown-rudolph.svg" width="80px" height="60px"/> | 0.007 | 🎄2024 Christmas pet🎄 |
| LITTLE_CHICK_SANTA <br> <img src="docs/little-chick-santa.svg" width="45px" height="35px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| HAMSTER_SANTA <br> <img src = "docs/hamster-santa.svg" width="100px" height="60px"/> | 0.01 | 🎄2024 Christmas pet🎄 |
| HAMSTER_JS <br> <img src = "docs/hamster-js.svg" width="100px" height="50px"/> | 0.01 | |
| HAMSTER_KOTLIN <br> <img src = "docs/hamster-kotlin.svg" width="100px" height="50px"/> | 0.01 | |
Expand Down
155 changes: 155 additions & 0 deletions docs/rabbit-brown-rudolph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,21 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
StringBuilder().moveRandomly("rabbit", id, 40, "180s", 5, 10.0)
.toString()
},
RABBIT_BROWN_RUDOLPH(0.007) {
override fun loadSvg(user: User, persona: Persona, mode: Mode): String {
return rabbitBrownRudolphSvg.replace("*{act}", act(persona.id))
.replace("*{id}", persona.id.toString())
.replace("*{level}", persona.level.value.toSvg(14.0, 2.0))
.replace(
"*{levelx}",
(-9 + (-1 * (persona.level.value.toString().length))).toString()
)
}

override fun act(id: Long): String =
StringBuilder().moveRandomly("rabbit", id, 40, "180s", 5, 10.0)
.toString()
},
RABBIT_COLLABORATOR(0.0) {
override fun loadSvg(user: User, persona: Persona, mode: Mode): String {
return rabbitCollaboratorSvg.replace("*{act}", act(persona.id))
Expand Down
3 changes: 3 additions & 0 deletions src/main/kotlin/org/gitanimals/render/domain/Svgs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ val hamsterSantaSvg: String = ClassPathResource("persona/animal/hamster-santa.sv
val dessertFoxRudolphSvg: String = ClassPathResource("persona/animal/dessert-fox-rudolph.svg")
.getContentAsString(Charset.defaultCharset())

val rabbitBrownRudolphSvg: String = ClassPathResource("persona/animal/rabbit-brown-rudolph.svg")
.getContentAsString(Charset.defaultCharset())

val largeTextSvgs = lazy {
val map = mutableMapOf<String, String>()
for (i in 'A'..'Z') {
Expand Down
Loading

0 comments on commit 344985e

Please sign in to comment.