public void DoFirstContact(Empire e) { this.Relationships[e].SetInitialStrength(e.data.Traits.DiplomacyMod * 100f); this.Relationships[e].Known = true; if (!e.GetRelations()[this].Known) e.DoFirstContact(this); #if PERF if (Empire.universeScreen.player == this) return; #endif if (GlobalStats.perf && Empire.universeScreen.player == this) return; try { if (EmpireManager.GetEmpireByName(Empire.universeScreen.PlayerLoyalty) == this && !e.isFaction && !e.MinorRace) { Empire.universeScreen.ScreenManager.AddScreen((GameScreen)new DiplomacyScreen(e, EmpireManager.GetEmpireByName(Empire.universeScreen.PlayerLoyalty), "First Contact")); } else { if (EmpireManager.GetEmpireByName(Empire.universeScreen.PlayerLoyalty) != this || !e.isFaction) return; foreach (Encounter e1 in ResourceManager.Encounters) { if (e1.Faction == e.data.Traits.Name && e1.Name == "First Contact") Empire.universeScreen.ScreenManager.AddScreen((GameScreen)new EncounterPopup(Empire.universeScreen, EmpireManager.GetEmpireByName(Empire.universeScreen.PlayerLoyalty), e, (SolarSystem)null, e1)); } } } catch (ArgumentException) { //this feels bad } }