Commit Graph

3276 Commits

Author SHA1 Message Date
Yair Morgenstern
8ff2a79e9b New fantasy hex layering works well with natural wonders 2021-04-04 19:32:16 +03:00
Yair Morgenstern
c1844fb58e Fixed water improvement unique crash for mods with non existent improvements 2021-04-04 19:31:49 +03:00
Yair Morgenstern
0233aa1bc5 Code reorg - moved all 'city moves between civs' functions to a separate class 2021-04-04 19:31:06 +03:00
Yair Morgenstern
187eea82a4 Base FantasyHex now contains all of the NewFantasyHex, for easier handoff (first 'use new layering rules' and then 'change tileset') 2021-04-02 10:02:56 +03:00
lishaoxia1985
a95406055b
Redraw CivilopediaScreen (#3747) 2021-04-01 23:39:08 +03:00
Yair Morgenstern
8b4d82167b Resolved #3753 - Fallout is no longer added multiple times 2021-04-01 23:25:46 +03:00
Yair Morgenstern
bc1c9ad921 Tileset for new layering is now in base game
New layering now supports natural wonders
2021-04-01 23:19:07 +03:00
Yair Morgenstern
0c06237570 ALL tile images now support era-specific images! But only if the base tile exists as well. 2021-04-01 22:36:27 +03:00
Yair Morgenstern
8c7c0a0f91 Added new experimental tile layering - see #3716 2021-04-01 22:08:29 +03:00
Yair Morgenstern
2da49da716 Can now handle mods with any default branch name!
Pantheon choices now scroll
2021-04-01 21:14:22 +03:00
Yair Morgenstern
a26bf30c28 Merge branch 'master' of https://github.com/yairm210/Unciv 2021-04-01 20:44:49 +03:00
Yair Morgenstern
9cb017c8a5 Added Faith icon and display for games with Religion 2021-04-01 20:44:27 +03:00
GGGuenni
387693512c
Fixed roads not getting wrapped correctly (#3752) 2021-04-01 14:36:05 +03:00
Yair Morgenstern
50e3f62018 3.13.12-patch1 2021-04-01 13:05:49 +03:00
Yair Morgenstern
f3e0867817 Resolved #3746 - background picture recentered, but also not scaled down so that the image covers most of the screen 2021-03-31 23:12:11 +03:00
GGGuenni
bf32bd5400
Readd smooth transition for wrapped maps (#3749) 2021-03-31 18:01:56 +03:00
GGGuenni
5d6bfbfb31
Fixed can't press nextTurn in multiplayer game (#3748)
* Fixed game crashes on create multiplayer game

* Update isPlayersTurn on update()
2021-03-30 18:14:07 +03:00
Yair Morgenstern
cb50732ec4 'Years of peace' modifier reset when war is declared 2021-03-29 20:18:03 +03:00
lishaoxia1985
807444d2c5
Replace padding with leftAndRightPadding & topAndBottomPadding in TileGroupMap (#3742)
* Replace padding with leftAndRightPadding & topAndBottomPadding in class TileGroupMap, edit MainMenuScreen

* Remove TableBackground.png
2021-03-29 18:21:31 +03:00
Yair Morgenstern
bf9954a042 Un-blurred the tile images 2021-03-29 18:18:23 +03:00
Yair Morgenstern
46e845d6ff Resolved #3568 - text buttons are less grainy 2021-03-29 17:50:04 +03:00
Yair Morgenstern
bc5cc4e28d Added Bulgarian, by antonpetrov145! 2021-03-29 17:32:42 +03:00
Yair Morgenstern
29c9f3b3e4 HUGE memory savings (120MB -> 75MB) By saving atlases between ruleset resets! 2021-03-29 17:07:59 +03:00
Yair Morgenstern
12147e0a67 Merge branch 'temp' 2021-03-29 14:26:19 +03:00
Yair Morgenstern
3ed701508e 3.13.11-patch2 2021-03-29 14:25:54 +03:00
Yair Morgenstern
4647928f29 Start of work on Religion!
Added Beliefs, faith accumulation, and Pantheon founding. Still missing a Faith image though.
2021-03-29 11:07:43 +03:00
Yair Morgenstern
30c1861788 Added mod pagination - even when we exceed 100 mods, we'll be able to download them all 2021-03-29 10:02:51 +03:00
Yair Morgenstern
b7d07ca2da Button for current civilopedia entry is now marked 2021-03-28 22:07:05 +03:00
Yair Morgenstern
63e10dde71 Modded "Remove" commands to nonexistant features no longer crashes the game 2021-03-28 21:59:57 +03:00
Yair Morgenstern
1f057831d8 AI no longer tries to attack with carriers, crashing the game. 2021-03-28 21:59:29 +03:00
Yair Morgenstern
24c0be2950 Welp broke build with a silly mistake 2021-03-28 21:27:42 +03:00
Yair Morgenstern
d3f2027416 National wonder does not require building to be built in puppeted cities 2021-03-28 21:25:35 +03:00
Yair Morgenstern
51125b68a8 City attack notifications show icon 2021-03-28 21:22:45 +03:00
Yair Morgenstern
eda9ceb140 Custom improvements for water resources now moddable 2021-03-25 10:46:45 +02:00
Yair Morgenstern
5ac2ee19c7 Linting - removed about 40 lines, hopefully makes the file easier to parse 2021-03-25 10:28:21 +02:00
Yair Morgenstern
db75067b7c Resolved #3740 - units retain individual names when upgrading 2021-03-24 22:51:05 +02:00
Yair Morgenstern
20e5d56644 Resolved #3732 - Mark target tile while moving toward it 2021-03-23 22:44:56 +02:00
Yair Morgenstern
5e34d8d9c3 Resolved #3734 - "Loading" popup when loading game remains until game is fully loaded 2021-03-23 22:44:24 +02:00
Yair Morgenstern
1e25cc0db3 Resolved #3735 - The civ launching - not receiving - the nuke is considered the civ that declared war 2021-03-23 22:28:31 +02:00
lishaoxia1985
b5c12ec17c
Carrier cannot attack, AS update to 4.1.3 (#3700) 2021-03-23 20:20:38 +02:00
Yair Morgenstern
0aeee8d974 Removed some more static usages 2021-03-21 21:04:11 +02:00
Yair Morgenstern
d184a829a2 Removed usages of global UncivGame.gameInfo, where more local usage is possible 2021-03-21 20:58:18 +02:00
Yair Morgenstern
4c1f5bb097 Resolved #3721 - Fixed edge-case "images are temporarily applied from mods set in other places" 2021-03-21 20:46:19 +02:00
Yair Morgenstern
0425e1d711 Resolved #3722 - fixed resistance icon display in notifications 2021-03-21 20:43:09 +02:00
Yair Morgenstern
5a5d0a980f Removed ALL color-based notifications! 2021-03-21 00:28:58 +02:00
Yair Morgenstern
d4b19a7bb3 Many notification conversions 2021-03-20 23:49:33 +02:00
Yair Morgenstern
36131cb7c1 Extended battle notifications 2021-03-19 15:52:50 +02:00
Yair Morgenstern
d515955b30 Better icons for notifications (there's a lot of work to do here) 2021-03-19 15:38:14 +02:00
Yair Morgenstern
4c260ca954 Changed notification to accept multiple icons, like in Civ VI - this allows for more informative iconography 2021-03-19 15:11:47 +02:00
Yair Morgenstern
50d5b0d7ce Added specific icons to certain notification types 2021-03-19 11:26:54 +02:00
Yair Morgenstern
ba51222841 Barbarians only heal by pillaging, simplified barbarian automation 2021-03-19 10:39:55 +02:00
Yair Morgenstern
a08a5a7435 Resolved #3713 - Fixed misspelled "fresh water" in farm unique check 2021-03-18 23:01:47 +02:00
Yair Morgenstern
87ff4c91f5 3.13.9 2021-03-18 20:59:42 +02:00
Yair Morgenstern
fa709d2944 Can now add leader portrait images to mods! 2021-03-18 18:37:27 +02:00
Yair Morgenstern
c98100f1a7 Added "permanent visual mods" option to mod management 2021-03-18 18:36:05 +02:00
GGGuenni
7ba12ad5c6
Adding fallout again (#3711) 2021-03-18 15:36:24 +02:00
GGGuenni
b12c5df28e
last refactoring of terrain feature (#3702)
* last terrainFeature refactorings

* cut down terrainFeature as much as possible

* aerialDistanceTo fixed

wrapped distance should only be considered on wrapped worlds

* Adding spaces

* fixed tests not compiling

* prevent floodplains from spawning on oasis

* Check if terrain feature can be placed on tile in editor

* Adding reviewed changes
2021-03-18 13:54:52 +02:00
GGGuenni
25ef92f3eb
fixed baseTerrain can differ from getBaseTerrain (#3710) 2021-03-18 13:19:02 +02:00
Yair Morgenstern
8472715509 Resolved #3614 - tileFilter works with natural wonders 2021-03-18 13:13:31 +02:00
Yair Morgenstern
37903435f5 Trade overview now more uniform
"Gold" and "Gold per turn" are now correctly translated
2021-03-18 13:08:59 +02:00
GGGuenni
1a4051fa3f
toast popup not screen blocking again (#3709) 2021-03-18 12:47:40 +02:00
Yair Morgenstern
57b1a01e2c Resolved #3705 - loading game popup stays until the game is loaded 2021-03-18 10:57:02 +02:00
Yair Morgenstern
dd4778495e Added "Provides yield without assigned population" uniques to tile improvements 2021-03-17 23:10:21 +02:00
Yair Morgenstern
755586eecd Added TileInfo.providsYield() - this will help us later 2021-03-17 22:47:21 +02:00
GGGuenni
cdc7739784
overlaying existing terrainFeatures now (#3706) 2021-03-17 21:58:48 +02:00
GGGuenni
5fa14b9533
More terrainFeature refactoring (#3695)
* call convertTerrainFeature on setTerrainTransients

setTransients doesn't get called on deserialization only setTerrainTransients and setUnitTransients...

* refactored terrainFeature in TileGroup

* rulesetIncompatibility support for multiple terrain features

+fixed typo IncompatAbility -> IncompatIbility

* Make use of TileSetStrings optimization

* Seperate multiple terrain features with "+"
2021-03-16 16:14:04 +02:00
Yair Morgenstern
cde1b150d3 Unit name is translated when unit has a unique name 2021-03-15 23:18:00 +02:00
Yair Morgenstern
3bbac04303 Deprecated uniques replaced in 3.12.10 2021-03-15 22:37:07 +02:00
Yair Morgenstern
c7bd528052 Shortened initial loading time by removing double loading of atlas 2021-03-15 22:13:55 +02:00
Yair Morgenstern
4fa0a2b4b8 Resolved #3401, Resolved #3598, possibly resolved #3643 - game can be instantly closed and reopened on Android
From a practical standpoint - Reset all GL objects upon create(), since they lose all relevance when we have a new GL context
2021-03-15 21:56:16 +02:00
lishaoxia1985
d7214b7a46
Method getImprovementIcon can Setsize for all icon (#3685)
* Method getImprovementIcon can Setsize for all icon

* categoryButton doesn't change background-color if it's disabled
2021-03-15 21:00:09 +02:00
Yair Morgenstern
dc55d31a58 Remove tile improvements not in the current ruleset on normalizeTile
Mitigated mysterious crash in WorldMapHolder.updateTiles()
2021-03-15 20:54:41 +02:00
GGGuenni
57f6c99d86
More terrainFeature refactors (#3694) 2021-03-13 23:38:11 +02:00
Yair Morgenstern
20f5672337 Resolved #3686 - world wrapped 'continents' map now separates continents properly 2021-03-13 23:02:57 +02:00
Yair Morgenstern
aab037b409 Resolved #3691 - 'new map' from map editor copies existing map parameters 2021-03-13 22:39:57 +02:00
Yair Morgenstern
a37ac74fa9 'in all coastal cities' now translated 2021-03-13 22:38:53 +02:00
Yair Morgenstern
309e29b922 Merge branch 'master' of https://github.com/yairm210/Unciv 2021-03-13 22:38:25 +02:00
Yair Morgenstern
5564d4db7e Game no longer crashes due to incorrect building-improvement modding combinations 2021-03-13 22:35:24 +02:00
GGGuenni
aa61fd0f40
multiple terrain features (TileInfo) (#3689)
* Changed getTerrainFeature to getTerrainFeatures

* Changed equals to contains

for getHeight and forestOrJungleIsRoads

* Changed equal to contains

for matchesUniqueFilter

* Last changes in TileInfo for now

* make sure terrainFeature field is null

we cant be certain if setTransients got called so we have make sure we set field = null inside the getter
2021-03-13 22:23:29 +02:00
absolutebull
b658e04048
Fix the Military Caste policy (#3692) 2021-03-13 22:16:54 +02:00
GGGuenni
fd177b1200
remove transient (#3688)
since it not only blocks serialization it also blocks deserialization
2021-03-12 13:43:14 +02:00
GGGuenni
d1df2fd128
Adding convert Function (#3687)
* Adding convert Function

* field = null to be safe
2021-03-12 12:20:55 +02:00
Yair Morgenstern
02cd1a2ef3 More multiple terrain feature changes 2021-03-11 23:09:05 +02:00
Yair Morgenstern
01877fee7c Fixed Great Barrier Reef spawn rules 2021-03-11 22:17:59 +02:00
Yair Morgenstern
9eaf4f4826 Copy all terrain features on clone(), not just first
Use terrainFeatures in naturalWonderGenerator
2021-03-11 21:58:24 +02:00
Yair Morgenstern
c7e424d661 Merge branch 'master' of https://github.com/yairm210/Unciv 2021-03-11 21:58:19 +02:00
lishaoxia1985
b3a62f4b1a
Withdraw before melee is the same as original game (#3674) 2021-03-11 21:40:44 +02:00
Yair Morgenstern
972bf2ba1c Resolved #3681 - translation fix, "in every city" -> "in all cities" 2021-03-11 21:08:48 +02:00
GGGuenni
1286fc1dff
Support for multiple terrain features Part 1 (#3678)
* Adding terrainFeatures ArrayList

* fixed existing save loses all terrainFeatures
2021-03-11 19:07:44 +02:00
Yair Morgenstern
7bb2c70245 Mods with no techs should work again 2021-03-10 20:27:37 +02:00
GGGuenni
7d3e2a4e78
Adding world wrap support to map editor (#3667)
* Adding world wrap support to MapEditor

* better readability
2021-03-08 22:19:55 +02:00
Yair Morgenstern
87c9729e52 Resolved #3663 - fixed settler automation bug 2021-03-08 22:05:59 +02:00
Yair Morgenstern
7eab616352 Added titles to mod management screen 2021-03-07 17:49:53 +02:00
Yair Morgenstern
011c1de102 Resolved #3635 - can remove natural wonders and roads/railroads in map editor 2021-03-07 11:41:09 +02:00
Yair Morgenstern
7ddcc58955 Can convert maps between different rulesets! 2021-03-07 10:02:19 +02:00
Yair Morgenstern
a654937ad3 ImageGetter.reload() is private, you should use ImageGetter.setRuleset() from outside 2021-03-07 10:01:51 +02:00
Yair Morgenstern
d15456baa8 Fixed hurry cost modifiers, and unit gold costs scaling according to game speed 2021-03-06 23:45:50 +02:00
Yair Morgenstern
43be37a3b8 Resolved #3651 - "Free great person" unique is compatible with techs even for Spectator 2021-03-06 23:10:48 +02:00
Yair Morgenstern
b9c6874a3f Removed deprecated "kotlin-android-extensions" reference 2021-03-06 23:02:13 +02:00
Yair Morgenstern
3bdff7dec3 Merge branch 'temp' 2021-03-06 22:30:46 +02:00
Yair Morgenstern
fd207d55c6 Game can handle resources "disappearing" between versions (esp. for mods) 2021-03-06 22:30:29 +02:00
Yair Morgenstern
9cdba66fd5 Merge branch 'master' of https://github.com/yairm210/Unciv 2021-03-06 20:52:00 +02:00
Yair Morgenstern
d8093eb282 Resolved #3653 - Settler AI no longer aims for 'really far' tiles 2021-03-06 20:51:00 +02:00
GGGuenni
d161e8393e
Fixed wrapped tiles costing way to much gold (#3648) 2021-03-06 19:49:59 +02:00
lishaoxia1985
d290ca3d33
Update translation and Android studio to 4.1.2 (#3642) 2021-03-04 18:56:05 +02:00
GGGuenni
d3ae6d600c
World Wrap Fixes (#3644)
* Citys Screen gets unwrapped now

When a city got build on the worlds edge the city screen displayed a non wrapped world

* Fixed CityBorder getting shifted

when city gets build on on the world's edge
2021-03-04 18:54:39 +02:00
GGGuenni
0bf7c2e07e
Fixed rectangular maps center point (#3646) 2021-03-04 18:50:34 +02:00
Yair Morgenstern
eb47272d09 Tech info can display more than one revealed resource 2021-03-03 23:49:57 +02:00
Yair Morgenstern
87e0dedaf4 "Obsolete with [techName]" unique works with improvements 2021-03-03 23:49:31 +02:00
Yair Morgenstern
0f109e31a0 Resolved #3639 - City states that can't be connected by land no longer assign road connection quests 2021-03-03 22:43:07 +02:00
Yair Morgenstern
9e98fb5b59 Added World Wrap as a game setting, so bleeding edge users can test it
Can now create maps as World Wrap maps and play with them :)
2021-03-03 22:30:06 +02:00
GGGuenni
25db68fa2a
World wrap Part 2 (#3609)
* Changed map generation for hex maps

* Adding WorldWrap UI

* Is now compileable again

* Changed map gen for rec maps

well that was easy

* Units can now move and see across wrap

* well this is smarter

* World wrap checkbox commented ou

should be available only after everything has been merged

* simplify WW gen conditions

* reduced indentation

* Refactoring for better readablity
2021-03-03 12:54:49 +02:00
GGGuenni
9a7e637891
World Wrap Part 1 (#3604)
* Adding fake infinite scroll functionality

* improve scroll jump

* really smooth jump now

* World wrap has functionality now

This is not compileable on its own!
Needs branches WorldWrap-v1 and WorldWrap-v2 to be mergeable

* Mirror tiles rendering

* changed to run v2-alternative code

* Use generic type

* default worldWrap to false

* forward continousScrollingX as parameter

* added unit movement button for mirror tiles

* Add clickable tile layer

* Smooth wrap jump

* code a bit better to read

* Removed unnecessary overrides and catches

* mirrorTiles are stored in one HashMap now

instead of two seperate ones
2021-03-03 12:54:21 +02:00
lishaoxia1985
f65de81c21
Fix when Trade Gold = 0 it also shows in offer. (#3637) 2021-03-02 19:32:24 +02:00
Yair Morgenstern
639be3b01d 3.13.4 2021-03-01 21:05:53 +02:00
david.howard
12e3005294
[663] Allow unit rename on promote (#3620)
* Add nullable "instanceName" field to MapUnit to capture name for individual units
* Add "displayName" property to MapUnit which takes instanceName if set, name
  otherwise
* Add dialog to PromotionPicker to allow setting instanceName of unit, if not
  already set
2021-03-01 20:52:46 +02:00
Yair Morgenstern
a390df8b36 Merged save map functionality into load map screen - now map saving is more streamlined! 2021-02-28 23:56:09 +02:00
Yair Morgenstern
29360938c6 Added color to map buttons in map loading screen 2021-02-28 23:33:55 +02:00
Yair Morgenstern
be7fd4cb01 Resolved #3626 - can rename multiplayer games now.
Also organized multiplayer screens better.
2021-02-28 23:21:12 +02:00
Yair Morgenstern
97546a7499 Resolved #3622 - Can no longer try to send air units into unexplored tiles 2021-02-28 23:03:12 +02:00
Yair Morgenstern
7eeeee5212 Strength bonus from capital is now part of the Palace bonuses to make it moddable 2021-02-28 22:40:54 +02:00
Yair Morgenstern
32ca9884ce 3.13.3-patch2
Multiplayer auto-load working again
2021-02-28 00:10:05 +02:00
Yair Morgenstern
ed8d642036 3.13.3-patch1 2021-02-27 23:47:08 +02:00
Yair Morgenstern
d6e75c7ea2 Solved crash for badly defined mods like REKmod 2021-02-25 19:25:04 +02:00
Jack Rainy
ff05fa601d
Translations update (#3618)
* Translations update

* Minor changes to the translation
2021-02-25 19:01:58 +02:00
Yair Morgenstern
e464ba5328 Map generation parameters are moddable, allowing players to create custom terrains for map generation! 2021-02-24 20:34:01 +02:00
Yair Morgenstern
53c919eef9 Custom mods with no water or grassland can now work! 2021-02-24 20:02:25 +02:00
Yair Morgenstern
c9a96358da Changed "Gold" resource to be called "Gold Ore" to not conflict with the yield type for translations - #2458 2021-02-23 20:05:00 +02:00
Yair Morgenstern
241aecb52f Maps incompatible with ruleset no longer popup errors when generating a new map 2021-02-22 23:31:18 +02:00
Yair Morgenstern
4bd40125b0 All resource stats from buildings converted to building uniques 2021-02-22 23:00:48 +02:00
Yair Morgenstern
0ef44fc4da Changed deprecated StringBuilder.appendln with .appendLine 2021-02-22 21:13:16 +02:00
Yair Morgenstern
737dcea4dc Should now be able to create tech trees with over 10 rows 2021-02-20 23:10:37 +02:00
Yair Morgenstern
a01b11484a Added mod check for 'provides free building' which does not exist 2021-02-20 23:04:06 +02:00
Yair Morgenstern
675e47868b Resolved #3601 - selected current tech no longer looks like unresearchable tech 2021-02-20 22:58:16 +02:00
Yair Morgenstern
5bac35d36d Cleaned up map editor 2021-02-20 22:23:17 +02:00
Yair Morgenstern
3d8e7fa99d tileFilter now works with resources for most uniques! 2021-02-18 16:22:15 +02:00
Yair Morgenstern
92b82b22b0 Resolved #3610 - city sorting in overview is now done by translated, not original, name 2021-02-18 13:22:36 +02:00
Yair Morgenstern
36949410a7 Resolved #3586 - Added 'Destroy' translation for capturing cities in one-city challenge 2021-02-18 13:20:49 +02:00
Yair Morgenstern
2b33bb9873 Map editor knows to remove resources that don't exist in mods 2021-02-16 20:10:36 +02:00
Yair Morgenstern
5fa08d9f2d Can now create as many tech rows as you wish in mods :) 2021-02-16 20:02:54 +02:00
Yair Morgenstern
105d9690ff Resolved #3600 - multiplayer game reloading and screen resize no longer reset map zoom and position 2021-02-16 20:00:47 +02:00
Yair Morgenstern
7c09663271 Resolved #3495 - Added scrollbars to civilopedia and picker screens
Better Civilopedia layout
2021-02-15 22:38:54 +02:00
Johannes Schreiber
1e981abe53
Display scroll position on minimap (#3593) 2021-02-14 11:48:57 +02:00
Yair Morgenstern
b7a6967fe6 Movement algorithm updated - can no longer see whether you can move to unknown tiles 2021-02-13 21:50:47 +02:00
Yair Morgenstern
e92a1dd088 Better tech descriptions for increased improvement stats 2021-02-12 14:13:11 +02:00
Yair Morgenstern
4876687e48 Solved "AI doesn't declare war" bug 2021-02-12 11:58:25 +02:00
Yair Morgenstern
fff22e66cd Mod-specific maps are go! :D
Resolves #3517
2021-02-12 11:16:54 +02:00
Yair Morgenstern
9db073ff25 getComplexRuleset now accepts list of mods and not gameParameters 2021-02-12 10:47:12 +02:00
Yair Morgenstern
c1a259ea7d Another change towards unified mod management 2021-02-12 10:45:18 +02:00
Yair Morgenstern
a9fe8c42d8 Simplified mod management, in preparation for mod information within the maps 2021-02-12 10:42:35 +02:00