Adding units on map editor. (#2667)

* Adding units to map editor.

* loadScenario checkbox Prototype added to MapOptions table.

* adds switch for Scenario and Unit editor debug

* New Scenario class

* Background step1:
1. Create a new class Scenario, containing TileMap, GameParameters and string name (doesn't really matter where, we can move it around later)
2. Create SaveScenario and LoadScenario functions in MapSaver (save to/ load from scenario name)

* Prototype of Save/Load scenario implementation.

* Add update method to NewGameOptionsTable

* First working Save/Load scenario prototype

* First working prototype of Load/Save scenario

* Added test conditions for the new debug modes

* Resolve merge conflict

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
This commit is contained in:
Alexander Korolyov
2020-06-13 15:53:04 -04:00
committed by GitHub
parent 1961aa7245
commit c3da044c43
16 changed files with 297 additions and 81 deletions

View File

@ -39,7 +39,9 @@ class BasicTests {
Assert.assertTrue("This test will only pass if the game is not run with debug modes",
!game.superchargedForDebug
&& !game.viewEntireMapForDebug
&& game.simulateUntilTurnForDebug <= 0)
&& game.simulateUntilTurnForDebug <= 0
&& game.simulateUntilWinOrLose <= 0
&& !game.scenarioDebugSwitch)
}
// If there's a unit that obsoletes with no upgrade then when it obsoletes