From 467e260d8076edefc361df00353431268e2cf1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Fri, 24 Jul 2026 14:59:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8E=E7=AB=AF=20export=5Fstate=20?= =?UTF-8?q?=E6=9A=B4=E9=9C=B2=E4=B8=96=E7=95=8C=E5=90=8D=E7=A7=B0,=20?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A1=B6=E6=A0=8F=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/yt_world/models/yt_world.py | 1 + world.html | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/addons/yt_world/models/yt_world.py b/addons/yt_world/models/yt_world.py index cd9bfff..3c13062 100644 --- a/addons/yt_world/models/yt_world.py +++ b/addons/yt_world/models/yt_world.py @@ -47,6 +47,7 @@ class YtWorld(models.Model): }) return { 'world_id': self.id, + 'name': self.name, 'seed': self.seed, 'world_version': self.world_version, 'settings': self.settings or {}, diff --git a/world.html b/world.html index da070f0..0a81dd2 100644 --- a/world.html +++ b/world.html @@ -3387,6 +3387,10 @@ window.addEventListener('keydown', e => { try { const ws = await API.world(); applyWorldState(ws); + if (ws.name) { + const wn = document.getElementById('worldName'); + if (wn) wn.textContent = ws.name; + } } catch (e) { console.warn('加载世界存档失败,使用确定性底图', e); }