diff --git a/ENGLISH.md b/ENGLISH.md index be3f983..d0d4e9d 100644 --- a/ENGLISH.md +++ b/ENGLISH.md @@ -189,6 +189,7 @@ _New contributions may take up to 1 hour to be reflected._ | dessert_fox_collaborator
| 0.0 | Pet made for collaborator [sumi-001](https://github.com/sumi-0011) | | white_cat_collaborator
| 0.0 | Pet made for collaborator [Ha youna](https://www.behance.net/hyn991022a6be) | | pig_collaborator
| 0.0 | Pet made for collaborator [hyesungoh](https://github.com/hyesungoh) | +| rabbit_collaborator
| 0.0 | Pet made for collaborator [Choi jiwoo](https://www.behance.net/sopungcjw42af) | ## diff --git a/README.md b/README.md index e7d6837..a4cf458 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._ | dessert_fox_collaborator
| 0.0 | Pet made for collaborator [sumi-001](https://github.com/sumi-0011) | | white_cat_collaborator
| 0.0 | Pet made for collaborator [Ha youna](https://www.behance.net/hyn991022a6be) | | pig_collaborator
| 0.0 | Pet made for collaborator [hyesungoh](https://github.com/hyesungoh) | +| rabbit_collaborator
| 0.0 | Pet made for collaborator [Choi jiwoo](https://www.behance.net/sopungcjw42af) | ## diff --git a/docs/rabbit-collaborator.svg b/docs/rabbit-collaborator.svg new file mode 100644 index 0000000..18cd147 --- /dev/null +++ b/docs/rabbit-collaborator.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 13f71e0..67e2f0b 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -1152,6 +1152,21 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null) 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)) + .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() + }, DESSERT_FOX(0.05) { override fun loadSvg(user: User, persona: Persona, mode: Mode): String { return dessertFoxSvg.replace("*{act}", act(persona.id)) diff --git a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt index 532869b..98102c5 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -220,6 +220,9 @@ val slothKingSvg: String = ClassPathResource("persona/animal/sloth-king.svg") val slothSunglassesSvg: String = ClassPathResource("persona/animal/sloth-sunglasses.svg") .getContentAsString(Charset.defaultCharset()) +val rabbitCollaboratorSvg: String = ClassPathResource("persona/animal/rabbit-collaborator.svg") + .getContentAsString(Charset.defaultCharset()) + val largeTextSvgs = lazy { val map = mutableMapOf() for (i in 'A'..'Z') { diff --git a/src/main/resources/persona/animal/rabbit-collaborator.svg b/src/main/resources/persona/animal/rabbit-collaborator.svg new file mode 100644 index 0000000..47a3379 --- /dev/null +++ b/src/main/resources/persona/animal/rabbit-collaborator.svg @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + *{contribution} + + + + + + + + + + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +