Opt: Remove eta of weekly items since it's meaningless

This commit is contained in:
LmeSzinc 2024-06-18 12:41:52 +08:00
parent 2ac396b18b
commit 6be818dfd6
2 changed files with 5 additions and 3 deletions

View File

@ -396,8 +396,8 @@ def put_arg_planner(kwargs: T_Output_Kwargs) -> Output | None:
values = kwargs.pop("value", {}) values = kwargs.pop("value", {})
try: try:
progress = values["progress"] progress = float(values["progress"])
except KeyError: except (KeyError, ValueError):
# Hide items not needed by the planner # Hide items not needed by the planner
return None return None
eta = values.get("eta", 0) eta = values.get("eta", 0)
@ -413,7 +413,7 @@ def put_arg_planner(kwargs: T_Output_Kwargs) -> Output | None:
if isinstance(total, dict): if isinstance(total, dict):
total = tuple(total.values()) total = tuple(total.values())
if eta: if progress < 100:
row = put_scope(f"arg_stored-stored-value-{name}", [ row = put_scope(f"arg_stored-stored-value-{name}", [
put_text(f"{progress:.2f}%{eta}").style("--dashboard-bold--"), put_text(f"{progress:.2f}%{eta}").style("--dashboard-bold--"),
put_text(f"{value} / {total}").style("--dashboard-time--"), put_text(f"{value} / {total}").style("--dashboard-time--"),

View File

@ -297,6 +297,8 @@ class StoredPlannerProxy(BaseModelWithFallback):
return 0. return 0.
if self.item.dungeon is None: if self.item.dungeon is None:
return 0. return 0.
if self.item.is_ItemWeekly:
return 0.
remain = self.progress_remain remain = self.progress_remain
cost = self.combat_cost cost = self.combat_cost