From a86df71cd0bff185c8aab88dcfa2abeb074e3018 Mon Sep 17 00:00:00 2001 From: RedbeanW Date: Sun, 20 Feb 2022 13:15:27 +0800 Subject: [PATCH] fix landtp. --- docs/_coverpage.md | 2 +- iland-core.lua | 20 ++++++++++++-------- iland/lang/en_US.json | 2 +- iland/lang/zh_CN.json | 2 +- iland/lang/zh_TW.json | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 8af5d32..707c729 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,4 +1,4 @@ # [AirLand Project](README) -> BDS可用的,基于LXL的全功能领地插件 +> BDS可用的,基于LiteLoader的全功能领地插件 [Start now!](#%f0%9f%97%ba%ef%b8%8f-airland-project) \ No newline at end of file diff --git a/iland-core.lua b/iland-core.lua index 19d2b7c..72f0baa 100644 --- a/iland-core.lua +++ b/iland-core.lua @@ -16,7 +16,7 @@ Plugin = { Version = { major = 2, minor = 8, - revision = 0, + revision = 1, toString = function() local ver = Plugin.Version return tostring(ver.major)..'.'..tostring(ver.minor*10 + ver.revision) @@ -924,8 +924,10 @@ DataStorage = { end, Update = function(origin) for landId,res in pairs(origin.Lands) do - local perm = origin.Lands[landId].permissions - local setting = origin.Lands[landId].settings + local land = origin.Lands[landId] + local perm = land.permissions + local setting = land.settings + local range = land.range if origin.version < 240 then return false end @@ -940,13 +942,15 @@ DataStorage = { perm.useitem = nil end if origin.version < 280 then - local ra = origin.Lands[landId].range - if ra.start_position[2] == -64 and ra.end_position[2] == 320 then - local dim = Dimension.Get(ra.dimid) - ra.start_position[2] = dim.min - ra.end_position[2] = dim.max + if range.start_position[2] == -64 and range.end_position[2] == 320 then + local dim = Dimension.Get(range.dimid) + range.start_position[2] = dim.min + range.end_position[2] = dim.max end end + if origin.version < 281 then + land.settings.teleport = table.clone(land.range.end_position) + end end return true end, diff --git a/iland/lang/en_US.json b/iland/lang/en_US.json index cf0f235..7d5102e 100644 --- a/iland/lang/en_US.json +++ b/iland/lang/en_US.json @@ -1,5 +1,5 @@ { - "VERSION": 280, + "VERSION": 281, "gui.land.title": "Land v", "gui.oplandmgr.trsland.title": "Forced transfer of land", diff --git a/iland/lang/zh_CN.json b/iland/lang/zh_CN.json index 67f7fa8..e535199 100644 --- a/iland/lang/zh_CN.json +++ b/iland/lang/zh_CN.json @@ -1,5 +1,5 @@ { - "VERSION": 280, + "VERSION": 281, "#1": "zh_CN 标准汉语翻译贡献者:RedbeanW", "gui.land.title": "Land v", diff --git a/iland/lang/zh_TW.json b/iland/lang/zh_TW.json index 9cc85e0..bb4e650 100644 --- a/iland/lang/zh_TW.json +++ b/iland/lang/zh_TW.json @@ -1,5 +1,5 @@ { - "VERSION": 280, + "VERSION": 281, "gui.land.title": "Land v", "gui.oplandmgr.trsland.title": "強製過戶領地",