public static void AddQuestGiverThree(IncidentParms parms, List <Pawn> __result, IncidentWorker_TravelerGroup __instance)
        {
            if (__result == null || __result.Count == 0)
            {
                return;
            }

            if (__instance.def.defName != "TravelerGroup")
            {
                //Log.Message($"Skip Incident: {__instance.def.defName}");
                return;
            }

            var newQuestPawn = RimQuestUtility.GetNewQuestGiver(__result);

            if (newQuestPawn == null || newQuestPawn?.Faction == null)
            {
                return;
            }

            var questPawns = Find.World.GetComponent <RimQuestTracker>().questPawns;

            if (!questPawns.Any(x => x.pawn == newQuestPawn))
            {
                var questPawn = new QuestPawn(newQuestPawn);
                if (questPawn != null)
                {
                    questPawns.Add(questPawn);
                }
            }
        }
        //PawnGroupKindWorker_Trader
        public static void AddQuestGiverTwo(PawnGroupMakerParms parms, PawnGroupMaker groupMaker, Pawn trader,
                                            List <Thing> wares, List <Pawn> outPawns)
        {
            LongEventHandler.QueueLongEvent(() =>
            {
                var pawn = outPawns.FirstOrDefault(x => x.Spawned);
                Map map  = pawn?.MapHeld;
                if (map != null)
                {
                    List <Pawn> newPawnList = map.mapPawns.AllPawnsSpawned.FindAll(x => x.Faction == pawn.Faction && !x.IsPrisoner);
                    var newQuestPawn        = RimQuestUtility.GetNewQuestGiver(outPawns);
                    if (newQuestPawn?.Faction == null)
                    {
                        return;
                    }

                    var questPawns = Find.World.GetComponent <RimQuestTracker>().questPawns;
                    if (!questPawns.Any(x => x.pawn == newQuestPawn))
                    {
                        var questPawn = new QuestPawn(newQuestPawn);
                        if (questPawn != null)
                        {
                            questPawns.Add(questPawn);
                        }
                    }
                }
            }, "RQ_LoadingScreen".Translate(), true, null);
        }
        //public class PawnUIOverlay
        //public static void DrawPawnGUIOverlay(PawnUIOverlay __instance)
        //{

        //}


        //IncidentWorker_VisitorGroup
        //TryConvertOneSmallTrader
        public static void AddQuestGiver(List <Pawn> pawns, Faction faction, Map map, ref bool __result)
        {
            if (!__result || !(pawns?.Count > 1))
            {
                return;
            }

            var newQuestPawn = RimQuestUtility.GetNewQuestGiver(pawns);

            if (newQuestPawn == null || newQuestPawn?.Faction == null)
            {
                return;
            }

            var questPawns = Find.World.GetComponent <RimQuestTracker>().questPawns;

            if (!questPawns.Any(x => x.pawn == newQuestPawn))
            {
                var questPawn = new QuestPawn(newQuestPawn);
                if (questPawn != null)
                {
                    questPawns.Add(questPawn);
                }
            }
        }
 public Dialog_QuestGiver(QuestPawn newQuestPawn, Pawn newInteractor)
 {
     questPawn  = newQuestPawn;
     interactor = newInteractor;
     //this.closeOnEscapeKey = true;
     forcePause = true;
     absorbInputAroundWindow = true;
     //this.closeOnEscapeKey = false;
     creationRealTime     = RealTime.LastRealTime;
     onlyOneOfTypeAllowed = false;
     actualSilverCost     = DetermineSilverCost();
     actualPlayerSilver   = DetermineSilverAvailable(interactor);
 }