Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bump kotlin version to 2.0.0 #240

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ kotlin {
plugins {
application
java
kotlin("jvm") version "1.9.23"
kotlin("jvm") version "2.0.0"
}

repositories {
Expand Down
1 change: 0 additions & 1 deletion gradle.properties.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
org.gradle.caching=true
org.gradle.parallel=true
kotlin.experimental.tryK2=true
# fill in your steam directory ending with '/steamapps'
userSteamDir=
5 changes: 4 additions & 1 deletion src/main/kotlin/marisa/Action.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ import kotlin.reflect.full.primaryConstructor
val p: AbstractPlayer get() = AbstractDungeon.player
val monsters: ArrayList<AbstractMonster> get() = AbstractDungeon.getCurrRoom().monsters.monsters

/** Add actions to bottom of the action queue */
fun addToBot(vararg actions: AbstractGameAction) =
actions.forEach { AbstractDungeon.actionManager.addToBottom(it) }

/** Add actions to bottom of the action queue */
fun addToBot(actions: List<AbstractGameAction>) =
actions.forEach { AbstractDungeon.actionManager.addToBottom(it) }

/** Add actions to top of the action queue */
fun addToTop(vararg actions: AbstractGameAction) =
actions.forEach { AbstractDungeon.actionManager.addToTop(it) }

/** Add actions to top of the action queue */
fun addToTop(actions: List<AbstractGameAction>) =
actions.forEach { AbstractDungeon.actionManager.addToTop(it) }


fun ApplyPowerToPlayerAction(powerClass: KClass<out AbstractPower>) =
powerClass.primaryConstructor?.call(p).let { power -> ApplyPowerAction(p, p, power) }

Expand Down
Loading