Skip to content

Commit

Permalink
feat: DESSERT_FOX_COLLABORATOAR를 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Jun 15, 2024
1 parent cde9f75 commit 9adcf74
Show file tree
Hide file tree
Showing 7 changed files with 656 additions and 208 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ _새로운 contribution은 반영은 최대 1시간이 소요될 수 있어요._
| slime_green <br> <img src="docs/slime-green.svg" width="50px" height="40px"/> | 0.1 | |
| slime_blue <br> <img src="docs/slime-blue.svg" width="50px" height="40px"/> | 0.1 | |
| cheese_cat_collaborator <br> <img src="docs/cheese-cat-collaborator.svg" width="100px" height="70px"/> | 0.0 | Pet made for collaborator [devxb](https://github.com/devxb) |
| dessert_fox_collaborator <br> <img src="docs/dessert-fox-collaborator.svg" width="80px" height="65px"/> | 0.0 | Pet made for collaborator [sumi-001](https://github.com/sumi-0011) |
| white_cat_collaborator <br> <img src="docs/white-cat-collaborator.svg" width="100px" height="70px"/> | 0.0 | Pet made for collaborator [Ha youna](https://www.behance.net/hyn991022a6be) |
| pig_collaborator <br> <img src="docs/pig-collaborator.svg" width="120px" height="90px"/> | 0.0 | Pet made for collaborator [hyesungoh](https://github.com/hyesungoh) |

Expand Down
191 changes: 191 additions & 0 deletions docs/dessert-fox-collaborator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/dessert-fox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,22 @@ enum class PersonaType(val weight: Double, private var dropRate: String? = null)
override fun act(id: Long): String =
StringBuilder().moveRandomly("dessert-fox", id, 40, "180s", 5, 26.0)
.toString()
}
},
DESSERT_FOX_COLLABORATOR(0.0) {
override fun loadSvg(user: User, persona: Persona, mode: Mode): String {
return dessertFoxCollaboratorSvg.replace("*{act}", act(persona.id))
.replace("*{id}", persona.id.toString())
.replace("*{level}", persona.level.value.toSvg(14.0, 2.0))
.replace(
"*{levelx}",
(-3 + (-1 * (persona.level.value.toString().length))).toString()
)
}

override fun act(id: Long): String =
StringBuilder().moveRandomly("dessert-fox", id, 40, "180s", 5, 26.0)
.toString()
},
;

init {
Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/org/gitanimals/render/domain/Svgs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ val whiteCatCollaboratorSvg: String = ClassPathResource("persona/animal/white-ca
val dessertFoxSvg: String = ClassPathResource("persona/animal/dessert-fox.svg")
.getContentAsString(Charset.defaultCharset())

val dessertFoxCollaboratorSvg: String = ClassPathResource("persona/animal/dessert-fox-collaborator.svg")
.getContentAsString(Charset.defaultCharset())


val largeTextSvgs = lazy {
val map = mutableMapOf<String, String>()
for (i in 'A'..'Z') {
Expand Down
Loading

0 comments on commit 9adcf74

Please sign in to comment.