Skip unsupported commission offers and explain acceptance blockers
This commit is contained in:
+14
-3
@@ -1777,9 +1777,20 @@ class Window(ProgressionPages, ActivityPages, W.QMainWindow):
|
||||
def render_quests(self, snapshot):
|
||||
quest_policy = self.read_quest_policy()
|
||||
quest_rows = self.engine.tasks.rows(snapshot, quest_policy, self.read_policy())
|
||||
fill_table(self.quests_table, [[key, name, status,
|
||||
self.catalog.data["task_info"][key].get("reward", {}).get("money", 0),
|
||||
self.catalog.data["task_info"][key].get("reward", {}).get("ke", 0), text] for key, name, status, text, _ in quest_rows])
|
||||
diagnostics = {str(row.get("task_type_id")): row for row in self.engine.progression_rows()
|
||||
if row.get("category") == "commission"}
|
||||
rows = []
|
||||
for key, name, status, text, meta in quest_rows:
|
||||
diagnostic = diagnostics.get(str(key), {})
|
||||
reason = diagnostic.get("block_reason") or diagnostic.get("blocked_reason")
|
||||
if reason:
|
||||
status = "暂不接取" if "city" in meta else "等待条件"
|
||||
text = reason
|
||||
elif diagnostic.get("next_action"):
|
||||
text = diagnostic["next_action"]
|
||||
reward = self.catalog.data["task_info"][key].get("reward", {})
|
||||
rows.append([key, name, status, reward.get("money", 0), reward.get("ke", 0), battle_message(text)])
|
||||
fill_table(self.quests_table, rows)
|
||||
|
||||
@staticmethod
|
||||
def update_combo(widget, rows):
|
||||
|
||||
Reference in New Issue
Block a user