diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 15e027d..8fd17a8 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -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 { diff --git a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt index b9fbc5d..25293e1 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -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() for (i in 'A'..'Z') { diff --git a/src/main/resources/persona/animal/mole-grass.svg b/src/main/resources/persona/animal/mole-grass.svg new file mode 100644 index 0000000..7017a9e --- /dev/null +++ b/src/main/resources/persona/animal/mole-grass.svg @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + *{contribution} + + + + + + + + + + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +