diff --git a/ENGLISH.md b/ENGLISH.md index d219cb8..341d5e6 100644 --- a/ENGLISH.md +++ b/ENGLISH.md @@ -1,5 +1,5 @@
- 한국어로 번역하기고 + 한국어로 번역하기

@@ -9,7 +9,7 @@
- + ⭐️ Please press the star! It greatly helps development! ⭐️
@@ -42,14 +42,19 @@ You can easily apply by copying the following link to your GitHub Readme. ### Line Mode -Line mode allows you to specify one of your pets to move within the specified width and height range. -When using line mode, if you request the image in markdown, you cannot set width and height, so please use HTML format instead. +Line mode allows you to specify one of your pets to move within the specified width and height +range. +When using line mode, if you request the image in markdown, you cannot set width and height, so +please use HTML format instead. > [!TIP] > **Adjust the width and height of the Img to adjust the pet's movement area.** -> If you make the width long and the height short (width = 1000, height = 60), the pet will move horizontally for a long distance. -> Conversely, if you make the width short and the height long (width = 60, height = 1000), the pet will move vertically for a long distance. -> If the pet is not visible, please make the height of the img larger than the vertical length of the pet. +> If you make the width long and the height short (width = 1000, height = 60), the pet will move +> horizontally for a long distance. +> Conversely, if you make the width short and the height long (width = 60, height = 1000), the pet +> will move vertically for a long distance. +> If the pet is not visible, please make the height of the img larger than the vertical length of +> the pet. @@ -63,10 +68,12 @@ When using line mode, if you request the image in markdown, you cannot set width If you don't enter any value for pet-id, the first pet will be responsed. -You can check the available pet-ids in https://render.gitanimals.org/users/{username} to your GitHub username and requesting the API. +You can check the available pet-ids in https://render.gitanimals.org/users/{username} to your GitHub +username and requesting the API. Enter the value corresponding to $.personas.[].id in the API response into pet-id. -In line mode, the total number of contributions is displayed above the pet's level. If you don't want this, include contribution-view=false as a query parameter in your request. +In line mode, the total number of contributions is displayed above the pet's level. If you don't +want this, include contribution-view=false as a query parameter in your request. ### Farm Mode @@ -89,69 +96,74 @@ Farm mode shows all your animals and additional information. Pets can be acquired in two ways: 1. **Contributions 30 times** - When you accumulate 30 commits, a new pet will appear. At this point, all pets have different probabilities of appearing. - The maximum number of pets you can have is 30. If you have more than 30 pets, they will go into your inventory, and you can swap them with the pets displayed at any time. <- Under development + When you accumulate 30 commits, a new pet will appear. At this point, all pets have different + probabilities of appearing. + The maximum number of pets you can have is 30. If you have more than 30 pets, they will go into + your inventory, and you can swap them with the pets displayed at any time. <- Under development 2. **Purchase Pets <- Under development** -You can buy pets sold by other users with commit points. -A certain amount of points will be given per commit. Alternatively, you can sell your own pets to earn commit points. + You can buy pets sold by other users with commit points. + A certain amount of points will be given per commit. Alternatively, you can sell your own pets to + earn commit points. ### Total Contributions + Total contributions represent the sum of contributions accumulated after joining GitHub. -_New contributions may take up to 1 hour to be reflected._ +_New contributions may take up to 1 hour to be reflected._ ### Available Pets - -| name | ratio | Description | -|------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------| -| goose | 1.0 | | -| goose_sunglasses | 0.05 | | -| | | | -| goose_kotlin | 0.01 | | -| goose_java | 0.01 | | -| goose_js | 0.01 | | -| goose_node | 0.01 | | -| goose_swift | 0.01 | | -| goose_linux | 0.01 | | -| goose_spring | 0.01 | | -| little_chick | 0.9 | | -| little_chick_suglasses | 0.4 | | -| little_chick_kotlin | 0.01 | | -| little_chick_java | 0.01 | | -| little_chick_js | 0.01 | | -| little_chick_node | 0.01 | | -| little_chick_swift | 0.01 | | -| little_chick_linux | 0.01 | | -| little_chick_spring | 0.01 | | -| penguin | 0.5 | | -| penguin_sunglasses | 0.2 | | -| penguin_kotlin | 0.01 | | -| penguin_java | 0.01 | | -| penguin_js | 0.01 | | -| penguin_node | 0.01 | | -| penguin_swift | 0.01 | | -| penguin_linux | 0.01 | | -| penguin_spring | 0.01 | | -| pig | 0.2 | | -| pig_sunglasses | 0.08 | | -| pig_kotlin | 0.01 | | -| pig_java | 0.01 | | -| pig_js | 0.01 | | -| pig_node | 0.01 | | -| pig_swift | 0.01 | | -| pig_linux | 0.01 | | -| pig_spring | 0.01 | | -| slime_red | 0.1 | | -| slime_red_kotlin | 0.001 | | -| slime_red_java | 0.001 | | -| slime_red_js | 0.001 | | -| slime_red_node | 0.001 | | -| slime_red_swift | 0.001 | | -| slime_red_linux | 0.001 | | -| slime_green | 0.1 | | -| slime_blue | 0.1 | | -| flamingo
| 0.08 | | -| TEN_MM
| 0.00 | Character created by `10MM` donations
Only buy in shop
10MM | +| name | ratio | Description | +|------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------| +| goose | 1.0 | | +| goose_sunglasses | 0.05 | | +| | | | +| goose_kotlin | 0.01 | | +| goose_java | 0.01 | | +| goose_js | 0.01 | | +| goose_node | 0.01 | | +| goose_swift | 0.01 | | +| goose_linux | 0.01 | | +| goose_spring | 0.01 | | +| little_chick | 0.9 | | +| little_chick_suglasses | 0.4 | | +| little_chick_kotlin | 0.01 | | +| little_chick_java | 0.01 | | +| little_chick_js | 0.01 | | +| little_chick_node | 0.01 | | +| little_chick_swift | 0.01 | | +| little_chick_linux | 0.01 | | +| little_chick_spring | 0.01 | | +| penguin | 0.5 | | +| penguin_sunglasses | 0.2 | | +| penguin_kotlin | 0.01 | | +| penguin_java | 0.01 | | +| penguin_js | 0.01 | | +| penguin_node | 0.01 | | +| penguin_swift | 0.01 | | +| penguin_linux | 0.01 | | +| penguin_spring | 0.01 | | +| pig | 0.2 | | +| pig_sunglasses | 0.08 | | +| pig_kotlin | 0.01 | | +| pig_java | 0.01 | | +| pig_js | 0.01 | | +| pig_node | 0.01 | | +| pig_swift | 0.01 | | +| pig_linux | 0.01 | | +| pig_spring | 0.01 | | +| slime_red | 0.1 | | +| slime_red_kotlin | 0.001 | | +| slime_red_java | 0.001 | | +| slime_red_js | 0.001 | | +| slime_red_node | 0.001 | | +| slime_red_swift | 0.001 | | +| slime_red_linux | 0.001 | | +| slime_green | 0.1 | | +| slime_blue | 0.1 | | +| flamingo
| 0.08 | | +| TEN_MM
| 0.00 | Character created by `10MM` donations
Only buy in shop
10MM | +| goblin
| 0.06 | | +| goblin-bag
| 0.03 | | ## diff --git a/README.md b/README.md index ac37db2..238248f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@
- + ⭐스타를 눌러주세요 개발에 큰 도움이 됩니다!⭐️
@@ -107,57 +107,58 @@ _새로운 contribtuion은 반영은 최대 1시간이 소요될 수 있어요. ### 등장 가능한 펫들 -| name | ratio | Description | -|------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------| -| goose | 1.0 | | -| goose_sunglasses | 0.05 | | -| | | | -| goose_kotlin | 0.01 | | -| goose_java | 0.01 | | -| goose_js | 0.01 | | -| goose_node | 0.01 | | -| goose_swift | 0.01 | | -| goose_linux | 0.01 | | -| goose_spring | 0.01 | | -| little_chick | 0.9 | | -| little_chick_suglasses | 0.4 | | -| little_chick_kotlin | 0.01 | | -| little_chick_java | 0.01 | | -| little_chick_js | 0.01 | | -| little_chick_node | 0.01 | | -| little_chick_swift | 0.01 | | -| little_chick_linux | 0.01 | | -| little_chick_spring | 0.01 | | -| penguin | 0.5 | | -| penguin_sunglasses | 0.2 | | -| penguin_kotlin | 0.01 | | -| penguin_java | 0.01 | | -| penguin_js | 0.01 | | -| penguin_node | 0.01 | | -| penguin_swift | 0.01 | | -| penguin_linux | 0.01 | | -| penguin_spring | 0.01 | | -| pig | 0.2 | | -| pig_sunglasses | 0.08 | | -| pig_kotlin | 0.01 | | -| pig_java | 0.01 | | -| pig_js | 0.01 | | -| pig_node | 0.01 | | -| pig_swift | 0.01 | | -| pig_linux | 0.01 | | -| pig_spring | 0.01 | | -| slime_red | 0.1 | | -| slime_red_kotlin | 0.001 | | -| slime_red_java | 0.001 | | -| slime_red_js | 0.001 | | -| slime_red_node | 0.001 | | -| slime_red_swift | 0.001 | | -| slime_red_linux | 0.001 | | -| slime_green | 0.1 | | -| slime_blue | 0.1 | | -| flamingo
| 0.08 | | -| TEN_MM
| 0.00 | Character created by `10MM` donations
Only buy in shop
10MM | -| goblin
| 0.06 | | +| name | ratio | Description | +|------------------------------------------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------| +| goose | 1.0 | | +| goose_sunglasses | 0.05 | | +| | | | +| goose_kotlin | 0.01 | | +| goose_java | 0.01 | | +| goose_js | 0.01 | | +| goose_node | 0.01 | | +| goose_swift | 0.01 | | +| goose_linux | 0.01 | | +| goose_spring | 0.01 | | +| little_chick | 0.9 | | +| little_chick_suglasses | 0.4 | | +| little_chick_kotlin | 0.01 | | +| little_chick_java | 0.01 | | +| little_chick_js | 0.01 | | +| little_chick_node | 0.01 | | +| little_chick_swift | 0.01 | | +| little_chick_linux | 0.01 | | +| little_chick_spring | 0.01 | | +| penguin | 0.5 | | +| penguin_sunglasses | 0.2 | | +| penguin_kotlin | 0.01 | | +| penguin_java | 0.01 | | +| penguin_js | 0.01 | | +| penguin_node | 0.01 | | +| penguin_swift | 0.01 | | +| penguin_linux | 0.01 | | +| penguin_spring | 0.01 | | +| pig | 0.2 | | +| pig_sunglasses | 0.08 | | +| pig_kotlin | 0.01 | | +| pig_java | 0.01 | | +| pig_js | 0.01 | | +| pig_node | 0.01 | | +| pig_swift | 0.01 | | +| pig_linux | 0.01 | | +| pig_spring | 0.01 | | +| slime_red | 0.1 | | +| slime_red_kotlin | 0.001 | | +| slime_red_java | 0.001 | | +| slime_red_js | 0.001 | | +| slime_red_node | 0.001 | | +| slime_red_swift | 0.001 | | +| slime_red_linux | 0.001 | | +| slime_green | 0.1 | | +| slime_blue | 0.1 | | +| flamingo
| 0.08 | | +| TEN_MM
| 0.00 | Character created by `10MM` donations
Only buy in shop
10MM | +| goblin
| 0.06 | | +| goblin-bag
| 0.03 | | ## diff --git a/docs/goblin-bag.svg b/docs/goblin-bag.svg new file mode 100644 index 0000000..1084d3c --- /dev/null +++ b/docs/goblin-bag.svg @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index d88c275..57e64e5 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -973,7 +973,25 @@ enum class PersonaType(private val weight: Double) { override fun act(id: Long): String = StringBuilder().moveRandomly("goblin", id, 15, "180s", 5) .toString() - } + }, + + GOBLIN_BAG(0.03) { + override fun loadSvg(user: User, persona: Persona, mode: Mode): String { + check(persona.id != null) { "Save persona first before call load()" } + + return goblinBagSvg.replace("*{act}", act(persona.id)) + .replace("*{id}", persona.id.toString()) + .replace("*{level}", persona.level.value.toSvg(14.0, 2.0)) + .replace( + "*{levelx}", + (-6.5 + (-1 * (persona.level.value.toString().length))).toString() + ) + } + + override fun act(id: Long): String = + StringBuilder().moveRandomly("goblin-bag", id, 15, "180s", 5) + .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 02b0a82..d7118b0 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -153,6 +153,9 @@ val tenmmSvg: String = ClassPathResource("persona/animal/tenmm.svg") val goblinSvg: String = ClassPathResource("persona/animal/goblin.svg") .getContentAsString(Charset.defaultCharset()) +val goblinBagSvg: String = ClassPathResource("persona/animal/goblin-bag.svg") + .getContentAsString(Charset.defaultCharset()) + val largeTextSvgs = lazy { val map = mutableMapOf() for (i in 'A'..'Z') { diff --git a/src/main/resources/persona/animal/goblin-bag.svg b/src/main/resources/persona/animal/goblin-bag.svg new file mode 100644 index 0000000..b252f04 --- /dev/null +++ b/src/main/resources/persona/animal/goblin-bag.svg @@ -0,0 +1,153 @@ + + + + + + + *{contribution} + + + + + + + + + + + *{level} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +