尝试修复陷阱放置错误
This commit is contained in:
@@ -527,10 +527,12 @@ class WPSGardenBase(WPSAPI):
|
||||
remaining = plot["remaining_fruit"]
|
||||
theft_users = len(json.loads(plot["theft_users"])) if plot.get("theft_users") else 0
|
||||
trap_info = ""
|
||||
if show_trap and plot.get("trap_item_id"):
|
||||
if show_trap:
|
||||
trap_item_id = plot.get("trap_item_id")
|
||||
if trap_item_id and isinstance(trap_item_id, str) and trap_item_id.strip():
|
||||
trap_durability = int(plot.get("trap_durability", 0))
|
||||
from .garden_models import GARDEN_TRAPS_DICT
|
||||
trap = GARDEN_TRAPS_DICT.get(plot["trap_item_id"])
|
||||
trap = GARDEN_TRAPS_DICT.get(trap_item_id)
|
||||
if trap:
|
||||
trap_info = f"|陷阱:{trap.display_name}({trap_durability}次)"
|
||||
status = f"✅ 已成熟(成熟于 {formatted_time})"
|
||||
|
||||
Reference in New Issue
Block a user