Skip to content

Commit

Permalink
feat: SLOTH_SUNGLASSES 펫을 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Jun 23, 2024
1 parent c162b78 commit 14e490e
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._

| name | ratio | Description |
|----------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SLOTH_SUNGLASSES <br> <img src = "docs/sloth-sunglasses.svg" width="40px" height="80px"/> | 0.06 | |
| SLOTH_KING <br> <img src = "docs/sloth-king.svg" width="40px" height="80px"/> | 0.05 | |
| SLOTH <br> <img src = "docs/sloth.svg" width="40px" height="80px"/> | 0.7 | |
| DESSERT_FOX <br> <img src = "docs/dessert-fox.svg" width="80px" height="65px"/> | 0.05 | |
Expand Down
156 changes: 156 additions & 0 deletions docs/sloth-sunglasses.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 @@ -1211,6 +1211,21 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
StringBuilder().moveRandomly("sloth", id, 5, "180s", 5, 16.5)
.toString()
},
SLOTH_SUNGLASSES(0.06) {
override fun loadSvg(user: User, persona: Persona, mode: Mode): String {
return slothSunglassesSvg.replace("*{act}", act(persona.id))
.replace("*{id}", persona.id.toString())
.replace("*{level}", persona.level.value.toSvg(14.0, 2.0))
.replace(
"*{levelx}",
(-6 + (-1 * (persona.level.value.toString().length))).toString()
)
}

override fun act(id: Long): String =
StringBuilder().moveRandomly("sloth", id, 5, "180s", 5, 16.5)
.toString()
},
;

init {
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 @@ -217,6 +217,9 @@ val slothSvg: String = ClassPathResource("persona/animal/sloth.svg")
val slothKingSvg: String = ClassPathResource("persona/animal/sloth-king.svg")
.getContentAsString(Charset.defaultCharset())

val slothSunglassesSvg: String = ClassPathResource("persona/animal/sloth-sunglasses.svg")
.getContentAsString(Charset.defaultCharset())

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

0 comments on commit 14e490e

Please sign in to comment.