mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-18 11:49:19 +07:00
Cleaning: platform specifics and UncivGame (#8773)
* Cleanup: platform specifics + UncivGame * Fix tests * Fix requests not clearing --------- Co-authored-by: vegeta1k95 <vfylfhby>
This commit is contained in:
@ -11,7 +11,6 @@ import com.badlogic.gdx.scenes.scene2d.Actor
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent
|
||||
import com.badlogic.gdx.scenes.scene2d.InputListener
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.UncivGameParameters
|
||||
import com.unciv.logic.files.UncivFiles
|
||||
import com.unciv.logic.multiplayer.throttle
|
||||
import com.unciv.ui.images.ImageGetter
|
||||
@ -61,10 +60,11 @@ object FasterUIDevelopment {
|
||||
}
|
||||
|
||||
class UIDevGame : Game() {
|
||||
val game = UncivGame(UncivGameParameters(
|
||||
fontImplementation = FontDesktop()
|
||||
))
|
||||
|
||||
private val game = UncivGame()
|
||||
|
||||
override fun create() {
|
||||
Fonts.fontImplementation = FontDesktop()
|
||||
UncivGame.Current = game
|
||||
UncivGame.Current.files = UncivFiles(Gdx.files)
|
||||
game.settings = UncivGame.Current.files.getGeneralSettings()
|
||||
|
@ -17,6 +17,7 @@ import com.unciv.models.stats.Stat
|
||||
import com.unciv.models.stats.Stats
|
||||
import com.unciv.models.translations.getPlaceholderParameters
|
||||
import com.unciv.models.translations.getPlaceholderText
|
||||
import com.unciv.utils.DebugUtils
|
||||
import com.unciv.utils.Log
|
||||
import com.unciv.utils.debug
|
||||
import org.junit.Assert
|
||||
@ -53,10 +54,10 @@ class BasicTests {
|
||||
fun gameIsNotRunWithDebugModes() {
|
||||
val game = UncivGame()
|
||||
Assert.assertTrue("This test will only pass if the game is not run with debug modes",
|
||||
!game.superchargedForDebug
|
||||
&& !game.viewEntireMapForDebug
|
||||
&& game.simulateUntilTurnForDebug <= 0
|
||||
&& !game.consoleMode
|
||||
!DebugUtils.SUPERCHARGED
|
||||
&& !DebugUtils.VISIBLE_MAP
|
||||
&& DebugUtils.SIMULATE_UNTIL_TURN <= 0
|
||||
&& !game.isConsoleMode
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user