Close #167: Now all InteractivePawns can handle quests
There's more refactoring to the quest system with this commit. It removes extra code and scenes. Quests work from start to finish technically-speaking, although there's more work left to get the QuestBubble to display properly and to solidify interactions from the player. I haven't decided yet where to handle that last part: on the actions themselves or in the QuestSystem. Now, Quests are the one element that emit signals about their state (started, completed, delivered). To use the QuestSystem, you have to get the real quest object in the QuestSystem's database using the reference scene in the corresponding MapActions. The quest doesn't pass itself through these signals. If you need a reference to it on callbacks, you have to bind the quest as the last argument in the connect method: ```quest.connect('completed', self, '_on_Quest_completed', [quest])``` One of the advantages of this code redesign is that each NPC should only connect to and track the quest that's referenced in its `[Give/Complete]QuestAction.` Thus there's no need for safety checks anymore or looping over all existing quests in the game to find which is active, if it's the tracked quest, etc. The system's functionality is limited but imo we shouldn't try to create too big of a system, as we won't have the content to justify it. Now I see how time consuming a quest system can be, and it'd be easy to go down the rabbit hole trying to make an advanced one (handling all possible events, cinematics, spawning npcs or modifying the game world, etc.).
Loading
Please register or sign in to comment