mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-09 12:15:04 -04:00
Fix for null pointer in embassy trade (#13707)
* G&K feature - Embassy * fix spotted errors * add icon and gameplay test * fix invalid trade logic * make embassies work for G&K only * remove introduced bug * trade evaluation and decline embassy * update civilopedia for embassies * cleanup * diplomatic modifiers * fix embassies unique * make embassies unique global and bugfix * fix AI can not trade with cs * add embassies unique for mods * mods require uniques to enable embassies * fix mods require uniques to enable embassies * update uniques.md * apply reviewed changes * apply reviewed change 2 * bugfix and cleanup * remove obsolete import * null pointer bugfix * remove toList() and function rename * fix for null pointer * fix for null pointer 2
This commit is contained in:
parent
1a04a7764a
commit
79d237e373
@ -114,6 +114,7 @@ object DiplomacyAutomation {
|
||||
* @param civInfo Civilization which initiates trade
|
||||
*/
|
||||
internal fun offerToEstablishEmbassy(civInfo: Civilization) {
|
||||
if (civInfo.getCapital() == null) return
|
||||
val civsThatWeCanEstablishEmbassyWith = civInfo.getKnownCivs().filter {
|
||||
civInfo.diplomacyFunctions.canEstablishEmbassyWith(it)
|
||||
&& !civInfo.getDiplomacyManager(it)!!.hasFlag(DiplomacyFlags.DeclinedEmbassy)
|
||||
|
Loading…
x
Reference in New Issue
Block a user