Skip to content

Commit

Permalink
feat: QUOKKA_SUNGLASSES 펫을 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed May 18, 2024
1 parent 4df1fad commit 65c8e23
Show file tree
Hide file tree
Showing 6 changed files with 304 additions and 41 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._
|------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| QUOKKA <br> <img src = "docs/quokka.svg" width="23px" height="42px" /> | 0.3 | |
| QUOKKA_LEAF <br> <img src = "docs/quokka-leaf.svg" width="23px" height="42px" /> | 0.1 | |
| QUOKKA_SUNGLASSES <br> <img src = "docs/quokka-sunglasses.svg" width="23px" height="42px" /> | 0.05 | |
| FISH_MAN <br> <img src="docs/fishman.svg" width="35px" height="75px"/> | 0.001 | |
| FISH_MAN_GLASSES <br> <img src="docs/fishman-glasses.svg" width="35px" height="75px" /> | 0.001 | |
| flamingo <br> <img src="docs/flamingo.svg" width="50px" height="110"/> | 0.08 | |
Expand Down
41 changes: 0 additions & 41 deletions docs/quokka-leaf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions docs/quokka-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 @@ -1041,6 +1041,21 @@ enum class PersonaType(private val weight: Double) {
StringBuilder().moveRandomly("quokka", id, 40, "180s", 5, 10.0)
.toString()
},
QUOKKA_SUNGLASSES(0.05) {
override fun loadSvg(user: User, persona: Persona, mode: Mode): String {
return quokkaSunglassesSvg.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("quokka", id, 40, "180s", 5, 10.0)
.toString()
},
;

init {
Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/org/gitanimals/render/domain/Svgs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ val quokkaSvg: String = ClassPathResource("persona/animal/quokka.svg")
val quokkaLeafSvg: String = ClassPathResource("persona/animal/quokka-leaf.svg")
.getContentAsString(Charset.defaultCharset())

val quokkaSunglassesSvg: String = ClassPathResource("persona/animal/quokka-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 65c8e23

Please sign in to comment.