Skip to content

Commit

Permalink
release: 0.3.2 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored Apr 20, 2024
2 parents cd82251 + 6a91293 commit 813feca
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 118 deletions.
142 changes: 77 additions & 65 deletions ENGLISH.md

Large diffs are not rendered by default.

105 changes: 53 additions & 52 deletions README.md

Large diffs are not rendered by default.

186 changes: 186 additions & 0 deletions docs/goblin-bag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions src/main/kotlin/org/gitanimals/render/domain/Svgs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String>()
for (i in 'A'..'Z') {
Expand Down
153 changes: 153 additions & 0 deletions src/main/resources/persona/animal/goblin-bag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 813feca

Please sign in to comment.