Example #1
0
        internal void remove_support_this_chapter(int actorId1, int actorId2)
        {
            if (Supports_This_Chapter.ContainsKey(actorId1))
            {
                Supports_This_Chapter[actorId1].Remove(actorId2);
            }

            if (Supports_This_Chapter.ContainsKey(actorId2))
            {
                Supports_This_Chapter[actorId2].Remove(actorId1);
            }
        }
Example #2
0
        /// <summary>
        /// Adds an actor pair to the list of units who have supported already this chapter.
        /// They will be prevented from supporting again on this map (changing maps will allow them to, in a two part chapter)
        /// </summary>
        /// <param name="actor_id1">Id of the first actor</param>
        /// <param name="actor_id2">Id of the second actor</param>
        protected void add_support_this_chapter(int actor_id1, int actor_id2)
        {
            if (!Supports_This_Chapter.ContainsKey(actor_id1))
            {
                Supports_This_Chapter.Add(actor_id1, new HashSet <int>());
            }
            Supports_This_Chapter[actor_id1].Add(actor_id2);

            if (!Supports_This_Chapter.ContainsKey(actor_id2))
            {
                Supports_This_Chapter.Add(actor_id2, new HashSet <int>());
            }
            Supports_This_Chapter[actor_id2].Add(actor_id1);
        }