Exemplo n.º 1
0
        public void AddQuestGiver(Pawn pawn, List <QuestScriptDef> specificQuests = null, DialogDef startDialog = null)
        {
            var comp = new CompQuestGiver();

            comp.parent         = pawn;
            comp.specificQuests = specificQuests;
            comp.startDialog    = startDialog;
            Log.Message("Giving comp to " + pawn);
            pawn.AllComps.Add(comp);
        }
 private static void Postfix(Pawn __result)
 {
     Log.Message("Postfix 2");
     if (Rand.Chance(0.8f) && __result != null && __result.def.race.Humanlike &&
         __result.TryGetComp <CompQuestGiver>() == null)
     {
         var comp      = new CompQuestGiver();
         var questComp = Current.Game.GetComponent <QuestTracker>();
         questComp.CreateQuestGiver(__result);
     }
 }
Exemplo n.º 3
0
 private static void RenderExclamationPointOverlay(Thing t)
 {
     if (t.Spawned)
     {
         Vector3 drawPos = t.DrawPos;
         drawPos.y = Altitudes.AltitudeFor(AltitudeLayer.MetaOverlays) + 0.28125f;
         if (t is Pawn)
         {
             drawPos.x += (float)t.def.size.x - 1f;
             drawPos.z += (float)t.def.size.z + 0.2f;
         }
         CompQuestGiver.RenderPulsingOverlayQuest(t, CompQuestGiver.QuestionMarkMat, drawPos, MeshPool.plane05);
     }
 }
Exemplo n.º 4
0
 public override void PostDraw()
 {
     base.PostDraw();
     CompQuestGiver.RenderExclamationPointOverlay(this.parent);
 }