Esempio n. 1
0
        public void CloseOpenDealWith(Faction faction)
        {
            RequestDeal deal = GetOpenDealWith(faction);

            if (deal != null)
            {
                timeOfOccurences.Remove(deal);
            }
        }
Esempio n. 2
0
        public float GetTimeOfOccurenceWithFaction(Faction faction)
        {
            RequestDeal deal = GetOpenDealWith(faction);

            if (deal == null)
            {
                return(float.MaxValue);
            }
            return(timeOfOccurences[deal]);
        }
Esempio n. 3
0
        public void SetTimeOfOccurence(Faction faction, float time)
        {
            RequestDeal deal = GetOpenDealWith(faction);

            if (deal == null)
            {
                Log.Warning("Trying to set time of arrival for requested faction arrival, but no open deal with faction exists!");
                return;
            }
            timeOfOccurences[deal] = time;
        }
Esempio n. 4
0
        public void CloseSession()
        {
            if (GetTimeOfOccurenceWithFaction(faction) == float.MaxValue)
            {
                CloseOpenDealWith(faction);
            }

            faction    = null;
            negotiator = null;
            deal       = null;
        }
Esempio n. 5
0
        public void SetupWith(Faction setupFaction, Pawn playerNegotiator, out bool success)
        {
            if (HasOpenDealWith(setupFaction))
            {
                Messages.Message("IR.RequestSession.CannotRequestAgainYet".Translate(setupFaction.Name), MessageTypeDefOf.CautionInput, false);
                success = false;
                return;
            }

            faction    = setupFaction;
            negotiator = playerNegotiator;
            deal       = new RequestDeal(setupFaction);
            timeOfOccurences.Add(deal, float.MaxValue);
            success = true;
        }
Esempio n. 6
0
 public void CloseSession()
 {
     faction    = null;
     negotiator = null;
     deal       = null;
 }