Esempio n. 1
0
 protected override void OnSetupHandle(RimWorld.Quest handle)
 {
     handle.AddPart(new QuestPart_CityQuest {
         factions = new[] { alliedFaction },
         targets  = new GlobalTargetInfo[] { target },
     });
 }
Esempio n. 2
0
        public void Start()
        {
            if (Started)
            {
                Log.Error("Quest already started: " + Name);
                return;
            }

            state      = QuestState.Started;
            expireTime = Find.TickManager.TicksGame + RandomExpiryTicks();
            Find.World.GetComponent <WorldComponent_QuestTracker>().quests.Add(this);
            foreach (var part in def.questParts)
            {
                part.OnStart(this);
            }

            var slate = new Slate();

            handle                 = RimWorld.QuestUtility.GenerateQuestAndMakeAvailable(DefDatabase <QuestScriptDef> .GetNamed("CityQuest"), slate);
            handle.name            = Name;
            handle.description     = DetailText;
            handle.challengeRating = ChallengeRating;
            OnSetupHandle(handle);
            handle.Initiate();

            OnStart();
        }
Esempio n. 3
0
 protected virtual void OnSetupHandle(RimWorld.Quest handle)
 {
 }
Esempio n. 4
0
 protected override void OnSetupHandle(RimWorld.Quest handle)
 {
     handle.AddPart(new QuestPart_CityQuest {
         targets = new GlobalTargetInfo[] { city },
     });
 }