protected override void OnSetupHandle(RimWorld.Quest handle) { handle.AddPart(new QuestPart_CityQuest { factions = new[] { alliedFaction }, targets = new GlobalTargetInfo[] { target }, }); }
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(); }
protected virtual void OnSetupHandle(RimWorld.Quest handle) { }
protected override void OnSetupHandle(RimWorld.Quest handle) { handle.AddPart(new QuestPart_CityQuest { targets = new GlobalTargetInfo[] { city }, }); }