Beispiel #1
0
        public void AddAlliance(Alliance alliance, bool sendMessage = true)
        {
            if (alliance.FactionOwner == Faction.OfPlayer)
            {
                alliance.PlayerOwner = true;
            }

            Alliances.Add(alliance);

            if (sendMessage)
            {
                Find.LetterStack.ReceiveLetter("GlobalFactionManager_NewAllianceTitle".Translate(), "GlobalFactionManager_NewAllianceDesc".Translate(alliance.FactionOwner.Name, alliance.AllianceGoalDef.LabelCap), LetterDefOf.NeutralEvent);
            }
        }
Beispiel #2
0
        public void Serialize(IGenericWriter writer)
        {
            writer.Write(0); // Version

            writer.Write(Name);
            writer.Write(m_Leader);

            writer.WriteGuildList(m_Members, true);
            writer.WriteGuildList(m_PendingMembers, true);

            if (!Alliances.ContainsKey(Name.ToLower()))
            {
                Alliances.Add(Name.ToLower(), this);
            }
        }
Beispiel #3
0
        public AllianceInfo(Guild leader, string name, Guild partner)
        {
            m_Leader = leader;
            Name     = name;

            m_Members        = new List <Guild>();
            m_PendingMembers = new List <Guild>();

            leader.Alliance  = this;
            partner.Alliance = this;

            if (!Alliances.ContainsKey(Name.ToLower()))
            {
                Alliances.Add(Name.ToLower(), this);
            }
        }
Beispiel #4
0
 public void AddAlliance(Race _toAdd)
 {
     Alliances.Add(_toAdd);
 }