From 605c7b4ca31b554bf314b51221d857997f126879 Mon Sep 17 00:00:00 2001 From: devxb Date: Sat, 18 May 2024 01:41:17 +0900 Subject: [PATCH 1/5] =?UTF-8?q?docs:=20=EB=A9=94=EC=9D=B8=ED=8E=AB?= =?UTF-8?q?=EC=9D=84=203=EB=A7=88=EB=A6=AC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ENGLISH.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ENGLISH.md b/ENGLISH.md index 20f1401..c30f10d 100644 --- a/ENGLISH.md +++ b/ENGLISH.md @@ -9,7 +9,7 @@
- + ⭐️ Please press the star! It greatly helps development! ⭐️
diff --git a/README.md b/README.md index a2b99cd..2bcc1ff 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@
- + ⭐스타를 눌러주세요 개발에 큰 도움이 됩니다!⭐️
From 261174b7b10038b164fbce2114014adcb1b97103 Mon Sep 17 00:00:00 2001 From: devxb Date: Sat, 18 May 2024 22:45:41 +0900 Subject: [PATCH 2/5] =?UTF-8?q?docs:=20QUOKKA=20=ED=8E=AB=EC=9D=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/quokka.svg | 109 +++++ .../gitanimals/render/domain/PersonaType.kt | 17 +- .../org/gitanimals/render/domain/Svgs.kt | 3 + src/main/resources/persona/animal/quokka.svg | 153 ++++++ src/test/resources/persona/goose/test.svg | 456 ++++++------------ 6 files changed, 422 insertions(+), 317 deletions(-) create mode 100644 docs/quokka.svg create mode 100644 src/main/resources/persona/animal/quokka.svg diff --git a/README.md b/README.md index 2bcc1ff..d854541 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._ | name | ratio | Description | |------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| QUOKKA
| 0.3 | | | FISH_MAN
| 0.001 | | | FISH_MAN_GLASSES
| 0.001 | | | flamingo
| 0.08 | | diff --git a/docs/quokka.svg b/docs/quokka.svg new file mode 100644 index 0000000..0bdc9b7 --- /dev/null +++ b/docs/quokka.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 9f1c7d6..2e47afe 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -1010,6 +1010,21 @@ enum class PersonaType(private val weight: Double) { override fun act(id: Long): String = StringBuilder().moveRandomly("fishman", id, 15, "180s", 5, 16.5) .toString() + }, + QUOKKA(0.3) { + override fun loadSvg(user: User, persona: Persona, mode: Mode): String { + return quokkaSvg.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() } ; @@ -1082,7 +1097,7 @@ enum class PersonaType(private val weight: Double) { speed: Int, duration: String, personaWidth: Long, - flippedWidth: Double, + flippedWidth: Double, // flippedWidth = persona width * 3 / 2 ): StringBuilder { val movingPoints = getMovingPoints(speed) diff --git a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt index 3884ade..822dd75 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -178,6 +178,9 @@ val fishManSvg: String = ClassPathResource("persona/animal/fishman.svg") val fishManGlassesSvg: String = ClassPathResource("persona/animal/fishman-glasses.svg") .getContentAsString(Charset.defaultCharset()) +val quokkaSvg: String = ClassPathResource("persona/animal/quokka.svg") + .getContentAsString(Charset.defaultCharset()) + val largeTextSvgs = lazy { val map = mutableMapOf() for (i in 'A'..'Z') { diff --git a/src/main/resources/persona/animal/quokka.svg b/src/main/resources/persona/animal/quokka.svg new file mode 100644 index 0000000..e59d10a --- /dev/null +++ b/src/main/resources/persona/animal/quokka.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + *{contribution} + + + + + + + + + + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/persona/goose/test.svg b/src/test/resources/persona/goose/test.svg index 54046b8..6924b02 100644 --- a/src/test/resources/persona/goose/test.svg +++ b/src/test/resources/persona/goose/test.svg @@ -1,330 +1,154 @@ - - + + + + + + + + + + + + + + + *{contribution} + - - - - - - - - - - - - - - - - + + + + + + + - - - - - - + + + + + + + *{level} + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + From 4df1fad3f258be080639fec8a28860e543a8394a Mon Sep 17 00:00:00 2001 From: devxb Date: Sat, 18 May 2024 22:49:55 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20QUOKKA=5FLEAF=20persona=EB=A5=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/quokka-leaf.svg | 178 +++++++++++++++ .../gitanimals/render/domain/PersonaType.kt | 17 +- .../org/gitanimals/render/domain/Svgs.kt | 3 + .../resources/persona/animal/quokka-leaf.svg | 209 ++++++++++++++++++ 5 files changed, 407 insertions(+), 1 deletion(-) create mode 100644 docs/quokka-leaf.svg create mode 100644 src/main/resources/persona/animal/quokka-leaf.svg diff --git a/README.md b/README.md index d854541..684ae9e 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._ | name | ratio | Description | |------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | QUOKKA
| 0.3 | | +| QUOKKA_LEAF
| 0.1 | | | FISH_MAN
| 0.001 | | | FISH_MAN_GLASSES
| 0.001 | | | flamingo
| 0.08 | | diff --git a/docs/quokka-leaf.svg b/docs/quokka-leaf.svg new file mode 100644 index 0000000..aaf6f7a --- /dev/null +++ b/docs/quokka-leaf.svg @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 2e47afe..0248039 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -1025,7 +1025,22 @@ enum class PersonaType(private val weight: Double) { override fun act(id: Long): String = StringBuilder().moveRandomly("quokka", id, 40, "180s", 5, 10.0) .toString() - } + }, + QUOKKA_LEAF(0.1) { + override fun loadSvg(user: User, persona: Persona, mode: Mode): String { + return quokkaLeafSvg.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 { diff --git a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt index 822dd75..085ea10 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -181,6 +181,9 @@ val fishManGlassesSvg: String = ClassPathResource("persona/animal/fishman-glasse val quokkaSvg: String = ClassPathResource("persona/animal/quokka.svg") .getContentAsString(Charset.defaultCharset()) +val quokkaLeafSvg: String = ClassPathResource("persona/animal/quokka-leaf.svg") + .getContentAsString(Charset.defaultCharset()) + val largeTextSvgs = lazy { val map = mutableMapOf() for (i in 'A'..'Z') { diff --git a/src/main/resources/persona/animal/quokka-leaf.svg b/src/main/resources/persona/animal/quokka-leaf.svg new file mode 100644 index 0000000..b7cd672 --- /dev/null +++ b/src/main/resources/persona/animal/quokka-leaf.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + *{contribution} + + + + + + + + + + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 65c8e23ed1056d458663dc78b153a9100cadfcab Mon Sep 17 00:00:00 2001 From: devxb Date: Sat, 18 May 2024 22:53:35 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20QUOKKA=5FSUNGLASSES=20=ED=8E=AB?= =?UTF-8?q?=EC=9D=84=20=EC=B6=94=EA=B0=80=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/quokka-leaf.svg | 41 ----- docs/quokka-sunglasses.svg | 120 +++++++++++++ .../gitanimals/render/domain/PersonaType.kt | 15 ++ .../org/gitanimals/render/domain/Svgs.kt | 4 + .../persona/animal/quokka-sunglasses.svg | 164 ++++++++++++++++++ 6 files changed, 304 insertions(+), 41 deletions(-) create mode 100644 docs/quokka-sunglasses.svg create mode 100644 src/main/resources/persona/animal/quokka-sunglasses.svg diff --git a/README.md b/README.md index 684ae9e..07ff9c7 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._ |------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | QUOKKA
| 0.3 | | | QUOKKA_LEAF
| 0.1 | | +| QUOKKA_SUNGLASSES
| 0.05 | | | FISH_MAN
| 0.001 | | | FISH_MAN_GLASSES
| 0.001 | | | flamingo
| 0.08 | | diff --git a/docs/quokka-leaf.svg b/docs/quokka-leaf.svg index aaf6f7a..0cfe851 100644 --- a/docs/quokka-leaf.svg +++ b/docs/quokka-leaf.svg @@ -61,47 +61,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/quokka-sunglasses.svg b/docs/quokka-sunglasses.svg new file mode 100644 index 0000000..c6a44f9 --- /dev/null +++ b/docs/quokka-sunglasses.svg @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 0248039..fc2155a 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -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 { diff --git a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt index 085ea10..fec10ae 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -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() for (i in 'A'..'Z') { diff --git a/src/main/resources/persona/animal/quokka-sunglasses.svg b/src/main/resources/persona/animal/quokka-sunglasses.svg new file mode 100644 index 0000000..a2fe10a --- /dev/null +++ b/src/main/resources/persona/animal/quokka-sunglasses.svg @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + *{contribution} + + + + + + + + + + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cfa7c563e3a3923803e0a7da6efa50ebb576ed94 Mon Sep 17 00:00:00 2001 From: devxb Date: Sat, 18 May 2024 22:54:23 +0900 Subject: [PATCH 5/5] =?UTF-8?q?docs:=20QUOKKA=20=ED=8E=AB=EB=93=A4?= =?UTF-8?q?=EC=9D=84=20=EC=98=81=EC=96=B4=20=EB=AC=B8=EC=84=9C=EC=97=90?= =?UTF-8?q?=EB=8F=84=20=EC=B6=94=EA=B0=80=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ENGLISH.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ENGLISH.md b/ENGLISH.md index c30f10d..2235cde 100644 --- a/ENGLISH.md +++ b/ENGLISH.md @@ -114,6 +114,9 @@ _New contributions may take up to 1 hour to be reflected._ | name | ratio | Description | |------------------------------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| QUOKKA
| 0.3 | | +| QUOKKA_LEAF
| 0.1 | | +| QUOKKA_SUNGLASSES
| 0.05 | | | FISH_MAN
| 0.001 | | | FISH_MAN_GLASSES
| 0.001 | | | flamingo
| 0.08 | |