public void CloseOpenDealWith(Faction faction) { RequestDeal deal = GetOpenDealWith(faction); if (deal != null) { timeOfOccurences.Remove(deal); } }
public float GetTimeOfOccurenceWithFaction(Faction faction) { RequestDeal deal = GetOpenDealWith(faction); if (deal == null) { return(float.MaxValue); } return(timeOfOccurences[deal]); }
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; }
public void CloseSession() { if (GetTimeOfOccurenceWithFaction(faction) == float.MaxValue) { CloseOpenDealWith(faction); } faction = null; negotiator = null; deal = null; }
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; }
public void CloseSession() { faction = null; negotiator = null; deal = null; }