feat: economy system with minigames, bank, rob, jobs, fishing, blackjack, slots
+ economy domain (EconomyAccount, Job, SlotCombination, EconomyTransaction) + EconomyRepository + SqlEconomyRepository + DB schema + EconomyService (transfer, daily, deposit/withdraw, stat upgrades) + FishingService (fish grid with difficulty levels, speed bonus) + BlackjackService (dealer stands on 16, ties lose) + SlotService (weighted combos up to x50) + JobService (6 jobs with level reqs and efficiency stat) + 11 commands: balance, baltop, pay, daily, bank, rob, fish, blackjack, slot, job, work + Tests for SqlEconomyRepository + EconomyModule + EconomyCommandRegistrar wired into BotModule
This commit is contained in:
parent
fcb5cd7207
commit
fe121c8546
270 changed files with 18632 additions and 11656 deletions
65
build.gradle
65
build.gradle
|
|
@ -1,6 +1,8 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'checkstyle'
|
||||
alias(libs.plugins.spotbugs)
|
||||
}
|
||||
|
||||
group = 'creator.loki'
|
||||
|
|
@ -11,47 +13,33 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
// JDA - Discord API
|
||||
implementation('net.dv8tion:JDA:5.0.0-beta.20') {
|
||||
implementation(libs.jda) {
|
||||
exclude module: 'opus-java'
|
||||
}
|
||||
implementation libs.lavaplayer
|
||||
implementation libs.dotenv
|
||||
implementation libs.slf4j.api
|
||||
implementation libs.logback.classic
|
||||
implementation libs.gson
|
||||
implementation libs.caffeine
|
||||
implementation libs.guice
|
||||
implementation libs.sqlite.jdbc
|
||||
implementation libs.hikaricp
|
||||
|
||||
// LavaPlayer для голосового TTS
|
||||
implementation 'dev.arbjerg:lavaplayer:2.2.2'
|
||||
|
||||
// dotenv для загрузки .env
|
||||
implementation 'io.github.cdimascio:dotenv-java:3.0.0'
|
||||
|
||||
// Logging
|
||||
implementation 'org.slf4j:slf4j-api:2.0.12'
|
||||
implementation 'ch.qos.logback:logback-classic:1.5.3'
|
||||
|
||||
// JSON
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
// Caffeine Cache
|
||||
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
|
||||
|
||||
// Google Guice - Dependency Injection
|
||||
implementation 'com.google.inject:guice:7.0.0'
|
||||
|
||||
// SQLite Database
|
||||
implementation 'org.xerial:sqlite-jdbc:3.45.1.0'
|
||||
|
||||
// Testing
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
|
||||
testImplementation 'org.mockito:mockito-core:5.11.0'
|
||||
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
testImplementation libs.junit.jupiter
|
||||
testImplementation libs.mockito.core
|
||||
testImplementation libs.mockito.junit.jupiter
|
||||
testRuntimeOnly libs.junit.platform.launcher
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
options.compilerArgs << '-Xlint:all'
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
@ -59,13 +47,13 @@ test {
|
|||
}
|
||||
|
||||
application {
|
||||
mainClass = 'creator.loki.App'
|
||||
mainClass = 'creator.loki.bootstrap.App'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
'Main-Class': 'creator.loki.App'
|
||||
'Main-Class': 'creator.loki.bootstrap.App'
|
||||
)
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
|
@ -73,3 +61,14 @@ jar {
|
|||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
|
||||
maxErrors = 999
|
||||
maxWarnings = 999
|
||||
}
|
||||
|
||||
spotbugs {
|
||||
excludeFilter = file("${rootDir}/config/spotbugs/exclude.xml")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue