Commit graph

54 commits

Author SHA1 Message Date
Yair Morgenstern
066dd615b4 Created stat parameter parsing and translation!
Genericified "[stats] from [terrain] tile" building unique
2020-07-24 17:47:55 +03:00
lishaoxia1985
59f6e10511
some bug fix (#2817)
* Scout won't be built when research "Scientific Theory". Fix the word "Can only build water units in coastal cities".

* Fix the bugs when you delete all maps close button disappears and you can't go to main menu.

* Basictests don't check that Scout can't upgrade.

* If the unit is obsolete it will remove from construction queue.
2020-07-16 22:22:47 +03:00
Alexander Korolyov
e74f7608d1
transfer simulateUntilWin from UncivGame to GameInfo class. (#2849)
* transfer simulateUntilWin from UncivGame to GameInfo class.

* update tests

* Update description comments
2020-07-16 13:52:39 +03:00
Alexander Korolyov
c51879cc5f
OptionsPopup with two experimental switches: Spectator mode, Extended Map editor. (#2834) 2020-07-12 12:59:32 +03:00
Alexander Korolyov
5356e63249
Refactor UncivGame initialization - add UncivGameParameters. (#2779) 2020-06-29 20:05:58 +03:00
Yair Morgenstern
79ff8c2ecf Fixed broken tests due to 'impassible' changes 2020-06-28 20:48:51 +03:00
Alexander Korolyov
4c7970f5d7
Slightly change mechanics of simulateUntilWin (#2772)
* Slightly change mechanics of simulateUntilWin

* Forgot to turn off some debugging switch
2020-06-25 22:32:00 +03:00
Daniel Bälz
5753115c30
Fix not translated notifications (#2715)
* Translate notification strings before they are shown. Fixes #2703

* Respect translations from active mods for placeholder translations

* Revert translation call to avoid issues in multiplayer. Still works without it.
2020-06-24 23:58:16 +03:00
Alexander Korolyov
c3da044c43
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>
2020-06-13 22:53:04 +03:00
Daniel Bälz
47d7e8ef09
Gradle Kotlin DSL (#2634)
* Ease migration to Gradle Kotlin DSL by changing quotes, function calls and plugin definitions

* Migrate build scripts to Gradle Kotlin DSL
2020-05-19 00:14:01 +03:00
SomeTroglodyte
4ff1e96892
Make tr() a little faster (#2538)
* Make tr() a little faster

* Make tr() a little faster - more consistent whitespace

* Make tr() a little faster - fix translation file generator

* Make tr() a little faster - adapted unit tests
2020-04-29 19:02:48 +03:00
Yair Morgenstern
745d48c2ae Can now permanently disable barbarians in mods 2020-04-18 23:59:26 +03:00
Jack Rainy
bd5c8130d9
Speedup of canPassThrough() method (#2394)
* Unit tests for "canPathThrough"

* Refactoring of canEnterTiles() and isAtWarWith()

* Do not check isEmpty() twice

* Using of the cached MapUnit uniques
2020-04-13 10:46:28 +03:00
Jack Rainy
29a077a803
Forts and citadels (with AI) (#2325)
* Enabled Forts & Citadels

* Friendly territory checks

* Citadel damage & notifications

* Sprites, Icons, Translation & Atlas

* Obsolete tests are removed

* NullReferenceException code is fixed

* Refactoring: using the static object

* AI for the forts and citadels

* Display defence stats

* Exclude enemies tiles as candidates

Co-authored-by: r3versi <fluo392@gmail.com>
2020-04-03 11:22:27 +03:00
Jack Rainy
dde01738de
New wonders: Mausoleum of Halicarnassus, Statue of Zeus (#2301)
* New wonder: Mausoleum of Halicarnassus

* New wonder: Statue of Zeus

* Obsolete tests are removed
2020-04-01 20:12:25 +03:00
Yair Morgenstern
62e78dec1c 3.6.14 2020-03-30 22:54:40 +03:00
Yair Morgenstern
0387ce4ff6
Translations (#2273)
* Translations for unit ability withdraw before melee (#2255)

* update Chinese translation. (#2263)

* Update Czech.properties (#2262)

* Update Czech.properties

fixed typo, used better Iver88's translations lost due to conflict

* Update Czech.properties

correct "achaemenid" form

* Portuguese translations (#2271)

* Updated Portuguese translations

* Fixed typos and missing letters.

* Update Polish.properties (#2258)

* Update Polish.properties

* fix "x"

* hotfix v2

* Cities Translations

* Update Polish.properties

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>

* Update Italian.properties (#2259)

* Translations (#2268)

* Translations

* Withdraw translations

* Translation file generation moved to game options,, so game modders can generate files in-game and not need to build Unciv from scratch

* Translation updates

Co-authored-by: proteus-anguinus <github2015@rheinig.de>
Co-authored-by: lishaoxia1985 <49801619+lishaoxia1985@users.noreply.github.com>
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
Co-authored-by: W Gomes <42829628+w-gomes@users.noreply.github.com>
Co-authored-by: RadioMagnetofonStereofoniczny <remixionmix@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Jack Rainy <JackRainy@users.noreply.github.com>
2020-03-28 22:32:32 +03:00
Yair Morgenstern
882ca6f22b Removed translation tests that are no longer necessary - 'check' passes successfully
'Wander' now gets its own distance to tiles, solving a really niche bug
2020-03-28 21:29:52 +03:00
Yair Morgenstern
136dac3582 Fixed Polish translations
Removed unnecessary (and breaking) unit unique translation tests
2020-03-26 11:09:00 +02:00
Jack Rainy
d7ac7f9173
Translation refactoring - part 3 (all JSONs) (#2205)
* Refactoring: Split reading and writing of translation files

* New generator of translation strings from JSONs

* Switch to the new strings generation approach

* Using the regex for similar strings + bugfix for Submarines

* Transfer of the existing translations

* Clean up of the template file and translated files based on it

* Unit tests are updated

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2020-03-21 20:32:04 +02:00
wrov
e308f1fe0c
Added logic to check Player- and Game-IDs according to new layout. (#2108)
Backwards compatible to old format.
2020-03-18 22:55:57 +02:00
Jack Rainy
dd438f16c8
Translation refactoring - part 2 (Tutorials) (#2114)
* Make TranslationFileReader as object class

* Generate strings from Tutorials.json

* Simplified storage and loading of the tutorials

* Transfer existing translations
2020-03-12 16:38:57 +02:00
Jack Rainy
15098d877c
Translations refactoring (#2096)
* Rename "translationsByLanguage" folder

* Minor refactoring

* Generate Nations strings

* Use the nations strings while creating the translation files

* Clean up of Nations files

* Transfer existing translations

* Get rid of the nation's translated name

* Transfer just few nations' translations for languages without Nations_Language.json

* Clean up of not used greetings

* Correct marking of not translated strings
2020-03-10 10:17:05 +02:00
JackRainy
241ce8b4f6
Make the test actually works (#2043)
* Make the test actually works

* Fix of Nations_German.json file
2020-02-29 20:10:55 +02:00
JackRainy
7a96a96d73
Unit tests for TileInfo (#1959) 2020-02-18 00:03:59 +02:00
Yair Morgenstern
4004c6ff76
Translation (#1951)
* Update Polish.properties (#1931)

* Update Russian.properties (#1932)

* Update Italian.properties (#1933)

Also added Research Agreement

* Update Japanese.properties (#1942)

* Update Japanese.properties

* Update Japanese.properties

* Update Japanese.properties

* Translations update (#1943)

* Translations update

* Render some missing characters in the Ukrainian translations

* More translations

* Fixed typo: Otto von Bismark -> Otto von Bismarck (#1954)

* Translation updates, added test to assure that translations in template file end with a space

* Disabled Maven - hopefully Travis check will not take 10 minutes and will pass

Co-authored-by: Freshy <60152907+GreenFreshy@users.noreply.github.com>
Co-authored-by: IraqLobster34 <56483230+IraqLobster34@users.noreply.github.com>
Co-authored-by: Smashfanful <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: paontv <57051667+paontv@users.noreply.github.com>
Co-authored-by: JackRainy <JackRainy@users.noreply.github.com>
Co-authored-by: schnippl0r <58435847+schnippl0r@users.noreply.github.com>
2020-02-17 19:38:14 +02:00
JackRainy
db5cc82ec7
"Sleep until healed" functionality (#1821)
* "Sleep until healed" functionality

* Unit test for actions translations is added

* "Fortify until healed" functionality

* Refactoring
2020-02-02 09:55:10 +02:00
lyrjie
58fa5d6dd5
Debug option: simulate game until certain turn (#1812) 2020-01-31 14:10:32 +02:00
Federico Luongo
f118be5d40 Adopted JSONC standard for assets files (#1674)
* Adopted JSONC standard for assets files

* Update Nations_Ukrainian.json

* Update Nations_Ukrainian.json

* Normalized Nations_Ukrainian too

Co-authored-by: Marerjh <40261003+Marerjh@users.noreply.github.com>
2020-01-13 19:01:27 +02:00
JackRainy
8a327fa7be Fix for the "Back button can't end Unciv (#1513)" (#1661)
* Callback to exit the game by 'Back' button

* Prompt dialog for the game exit

* Additional strings for translations are generated

* Do not show exit prompt dialog twice
2020-01-12 23:05:49 +02:00
lyrjie
5c6ae7c123 Added tests for development-only toggles (#1655)
* Added tests for development-only toggles

* Revert "Added tests for development-only toggles"

This reverts commit eee4de78

* Added the `rewriteTranslationFiles` check to debug test
2020-01-11 23:17:13 +02:00
Yair Morgenstern
c322a5da30 Fixed tests that I broke when changing ruleset logic 2020-01-05 23:00:03 +02:00
lyrjie
cedb6ff5e3 Added the notification for the third-party civilizations (#1558)
* Added the notification for the third-party civilizations

If a civilizations knows about some two civilizations, it will be notified when:
* They declare the war
* They make a peace
* They sign the declaration of peace
* One denounce the other

Additionally, when civ enters a new era, all civs that know about it get a notification

* Fixed the translation `.properties`

* Cleanup

* Fix: 2 notifications for each peace treaty

Russia and America...
America and Russia...

* Typo

* Code style changes

* Resolved conflicts

* Simple getCommonKnownCivs() tests
2019-12-30 18:12:14 +02:00
Vladimir Tanakov
1cc8227025 Fix civilopedia parsing, fix dialog does not call update to enable next turn button (#1553) 2019-12-30 18:04:12 +02:00
r3versi
aa034d73c2 Fix natural wonders (#1550)
* Natural Wonders Uniques

* Fix Natural Wonders in Map Editor

* Translation files

* Terrain uniques test

* GBR spawn update Fix #1552
2019-12-28 23:11:37 +02:00
Yair Morgenstern
87830bf8b2 Code cleanup - ruleset maps are now lowercased 2019-12-26 22:00:49 +02:00
lyrjie
539758b905 Translation placeholder testing (#1542)
* Added translation string placeholders test

* Fixed the placeholder typos in all translations

* [30] to 30 migration
2019-12-26 14:39:15 +02:00
Yair Morgenstern
fd8528af7a All tests are properly Koltinized! 2019-12-26 12:01:23 +02:00
Vladimir Tanakov
7f06ae0cce Refactor Tutorials and fix some issues, write tests (#1524) 2019-12-26 11:40:48 +02:00
Vladimir Tanakov
25a3467cb3 Add crash reporting controller and email sending on android (#1509) 2019-12-23 22:12:35 +02:00
Yair Morgenstern
33ad922343 Solved bug which was caused by obsoleting scouts when they have no upgrade 2019-12-22 19:39:54 +02:00
Yair Morgenstern
2c3441c536 Fixed translation tests 2019-12-18 23:42:17 +02:00
Yair Morgenstern
fc4eb01be8 Added tests to ensure we don't miss translations in the future 2019-12-17 19:16:31 +02:00
Yair Morgenstern
a13d6bc82e Package move & civilopedia scroll fix 2019-12-13 13:58:05 +02:00
Yair Morgenstern
d704b78034 We now fail a build if the debug parameters were commited to the repo 2019-12-12 23:56:39 +02:00
Yair Morgenstern
2b384c7d01 Added tests to check that Nations files are serializable, and fixed problems in Korean and Ukrainian files 2019-12-11 20:01:29 +02:00
Yair Morgenstern
38b9b13a0a Ruleset should have a lower-case s, because it's not, you know, a Set
Also, Rulesets can now read rules from any json folder
2019-12-06 13:59:12 +02:00
Yair Morgenstern
1903709f20 Tests now work again, yay 2019-12-05 18:44:07 +02:00
Yair Morgenstern
b7ffdb7cc3 Renamed GameBasics to RuleSet, because that's basically what it is 2019-12-05 00:01:00 +02:00
Yair Morgenstern
05fd40b306 Added tests to alert when we don't have translations for game basics 2019-12-03 22:11:04 +02:00