From b4bfb5bcbf628e9df7d281475e2ab652d1b24b7a Mon Sep 17 00:00:00 2001 From: devxb Date: Sun, 26 Jan 2025 10:38:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20hamster-collaborator.svg=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-en.md | 1 + README-ja.md | 1 + README-zhcn.md | 1 + README.md | 3 +- docs/hamster-collaborator.svg | 126 ++++++++++++ .../kotlin/org/gitanimals/core/PersonaType.kt | 20 ++ src/main/kotlin/org/gitanimals/core/Svgs.kt | 3 + .../persona/animal/hamster-collaborator.svg | 184 ++++++++++++++++++ 8 files changed, 338 insertions(+), 1 deletion(-) create mode 100644 docs/hamster-collaborator.svg create mode 100644 src/main/resources/persona/animal/hamster-collaborator.svg diff --git a/README-en.md b/README-en.md index d58a30c..b70f63d 100644 --- a/README-en.md +++ b/README-en.md @@ -233,6 +233,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) | | 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) | +| hamster_collaborator
| 0.8 | Pet made for collaborator [Orchemi](https://github.com/Orchemi) | ## diff --git a/README-ja.md b/README-ja.md index 95a8b10..0b52ff6 100644 --- a/README-ja.md +++ b/README-ja.md @@ -230,6 +230,7 @@ _新しいコントリビューションの反映には最大で1時間かかる | dessert_fox_collaborator
| 0.0 | コラボレーター [sumi-001](https://github.com/sumi-0011) のために作られたペット | | pig_collaborator
| 0.0 | コラボレーター [hyesungoh](https://github.com/hyesungoh) のために作られたペット | | rabbit_collaborator
| 0.0 | コラボレーター [Choi jiwoo](https://www.behance.net/sopungcjw42af) のために作られたペット | +| hamster_collaborator
| 0.8 | Pet made for collaborator [Orchemi](https://github.com/Orchemi) | ## diff --git a/README-zhcn.md b/README-zhcn.md index 78a34e3..536b0f3 100644 --- a/README-zhcn.md +++ b/README-zhcn.md @@ -232,6 +232,7 @@ _新的贡献可能需要1个小时才能显示_ | dessert_fox_collaborator
| 0.0 | 协作者 [sumi-001](https://github.com/sumi-0011) 制作 | | pig_collaborator
| 0.0 | 协作者 [hyesungoh](https://github.com/hyesungoh) 制作 | | rabbit_collaborator
| 0.0 | 协作者 [Choi jiwoo](https://www.behance.net/sopungcjw42af) 制作 | +| hamster_collaborator
| 0.8 | Pet made for collaborator [Orchemi](https://github.com/Orchemi) | ## diff --git a/README.md b/README.md index 5d03de3..7b761ec 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ farm mode는 가지고 있는 모든 동물과 추가적인 정보를 보여줘 ### guild mode 길드를 만들고 친구와 함께 펫을 키울 수 있어요. -[길드 만들러 가기](https://gitanimals.org/guild) +[길드 만들러 가기](https://gitanimals.org/guild) gitanimals @@ -229,6 +229,7 @@ _새로운 contribution 반영은 최대 1시간이 소요될 수 있어요._ | dessert_fox_collaborator
| 0.0 | Pet made for collaborator [sumi-001](https://github.com/sumi-0011) | | 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) | +| hamster_collaborator
| 0.8 | Pet made for collaborator [Orchemi](https://github.com/Orchemi) | ## diff --git a/docs/hamster-collaborator.svg b/docs/hamster-collaborator.svg new file mode 100644 index 0000000..b23cf04 --- /dev/null +++ b/docs/hamster-collaborator.svg @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/kotlin/org/gitanimals/core/PersonaType.kt b/src/main/kotlin/org/gitanimals/core/PersonaType.kt index 574a441..2c181f5 100644 --- a/src/main/kotlin/org/gitanimals/core/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/core/PersonaType.kt @@ -2001,6 +2001,26 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null) StringBuilder().moveRandomly("maltese", id, 40, "180s", 5, 12.0) .toString() }, + HAMSTER_COLLABORATOR(0.0) { + override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String { + return hamsterCollaboratorSvg.replace("*{act}", act(animationId)) + .replace("*{id}", animationId.toString()) + .replace("*{level}", level.toSvg(14.0, 2.0)) + .replace( + "*{levelx}", + (-5 + (-1 * (level.toString().length))).toString() + ) + .replace("*{username}", name.toSvg(14.0, 25.0)) + .replace( + "*{usernamex}", + (17 + (-3 * name.length)).toString() + ) + } + + override fun act(id: Long, flippedWidth: Double): String = + StringBuilder().moveRandomly("hamster", id, 5, "1000s", 5, 21.0) + .toString() + }, ; init { diff --git a/src/main/kotlin/org/gitanimals/core/Svgs.kt b/src/main/kotlin/org/gitanimals/core/Svgs.kt index f25a0de..0ead418 100644 --- a/src/main/kotlin/org/gitanimals/core/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/core/Svgs.kt @@ -305,6 +305,9 @@ val hamsterKotlinSvg: String = ClassPathResource("persona/animal/hamster-kotlin. val hamsterJsSvg: String = ClassPathResource("persona/animal/hamster-js.svg") .getContentAsString(Charset.defaultCharset()) +val hamsterCollaboratorSvg: String = ClassPathResource("persona/animal/hamster-collaborator.svg") + .getContentAsString(Charset.defaultCharset()) + val snowmanSvg: String = ClassPathResource("persona/animal/snowman.svg") .getContentAsString(Charset.defaultCharset()) diff --git a/src/main/resources/persona/animal/hamster-collaborator.svg b/src/main/resources/persona/animal/hamster-collaborator.svg new file mode 100644 index 0000000..fbe4a87 --- /dev/null +++ b/src/main/resources/persona/animal/hamster-collaborator.svg @@ -0,0 +1,184 @@ + + + + + + + + + + + + + *{contribution} + + + + + + + + + + + + + + + + + *{username} + + + + + + + + + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +