Skip to content

Commit

Permalink
fix(plugin24): disqualify points for stuck ship
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Mar 22, 2024
1 parent 09a4e18 commit 7fc0eb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/src/main/kotlin/sc/plugin2024/GameState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,10 @@ data class GameState @JvmOverloads constructor(

override fun getPointsForTeam(team: ITeam): IntArray =
ships[team.index].let { ship ->
intArrayOf(ship.points, ship.passengers)
if(ship.stuck)
intArrayOf(0, 0)
else
intArrayOf(ship.points, ship.passengers)
}

override fun getPointsForTeamExtended(team: ITeam): IntArray =
Expand Down

0 comments on commit 7fc0eb3

Please sign in to comment.