No, when the game kills the quest by itself because can't find valid events, it probably still should show a popup (atm it doesn't, if I'm not mistaken). So I wonder if we should write something in the log quest in such cases.
Wouldn't hurt.
def next_day(self):
"""Fails quests that have no valid events.
"""
garbage = list()
# Find incomplete quests with no existing events
for i in self.active:
for j in pytfall.world_events.events_cache:
if j.quest == i.name:
break
else:
if not i.manual: garbage.append(i)
while garbage:
devlog.warning("Garbage Quest found! \"%s\" was failed."%garbage[-1].name)
self.fail_quest(garbage.pop())
Ok, I've fixed a tiny bit of this code because it wasn't logging sh!t right, but logically it did... something...
So, basically what it does is this:
It iterates over all currently
active quests, checks if there are
any events in cache that are bound to those events and
fail the quests if not so but only if the quest is not set to manual controls.
===>>
It feels (to me), a bit weird because for example:
- We move the quest to the next stage, with an existing event BUT that event is set to activate only in three days onward so it is not cached until then... BOOM... quest is auto-failed for no good reason...
- Shit gets even weirder with menu extension system because there is no event... it's just there.
- The system doesn't account for any quest that may no longer ever start (with their own conditions no longer realistic and no events bound to them (killed off by the event garbage collector, which is some what smarter)). But this isn't a big thing.
- Prolly more...
====>>
I believe it is meant to be used only with quests in auto mode, like the idol quests but even then, only if the newly registered events are cached on the very next day and happen without delay. In either case, if we set quests to manual control, garbage system is not even a thing, I will also change the code a bit one more time because we obviously should check for manual first, before we iterate over a potential 100s of quests and events while we wish to do something to them ONLY if there are no manual controls.