Skip to content

Commit

Permalink
feat: MOLE_GRASS 캐릭터를 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed May 26, 2024
1 parent 397f5af commit cd11ee5
Show file tree
Hide file tree
Showing 3 changed files with 226 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,22 @@ enum class PersonaType(private val weight: Double) {
override fun act(id: Long): String =
StringBuilder().moveRandomly("mole", id, 40, "180s", 5, 14.0)
.toString()
}
},
MOLE_GRASS(0.1){
override fun loadSvg(user: User, persona: Persona, mode: Mode): String {
return moleGrassSvg.replace("*{act}", act(persona.id))
.replace("*{id}", persona.id.toString())
.replace("*{level}", persona.level.value.toSvg(14.0, 2.0))
.replace(
"*{levelx}",
(-8 + (-1 * (persona.level.value.toString().length))).toString()
)
}

override fun act(id: Long): String =
StringBuilder().moveRandomly("mole", id, 40, "180s", 5, 14.0)
.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 @@ -190,6 +190,9 @@ val quokkaSunglassesSvg: String = ClassPathResource("persona/animal/quokka-sungl
val moleSvg: String = ClassPathResource("persona/animal/mole.svg")
.getContentAsString(Charset.defaultCharset())

val moleGrassSvg: String = ClassPathResource("persona/animal/mole-grass.svg")
.getContentAsString(Charset.defaultCharset())

val largeTextSvgs = lazy {
val map = mutableMapOf<String, String>()
for (i in 'A'..'Z') {
Expand Down
207 changes: 207 additions & 0 deletions src/main/resources/persona/animal/mole-grass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd11ee5

Please sign in to comment.