Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
fix bugs, try to release 2.82
Browse files Browse the repository at this point in the history
  • Loading branch information
Redbeanw44602 committed Feb 26, 2022
1 parent b66634c commit 0f8614b
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 29 deletions.
7 changes: 2 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
> **2.82**
- [ ] 在含水方块放水
- [x] 管理员领地管理器搜索后打开的领地错误
- [ ] 冲突领地检测没有提示冲突坐标,领地名称未显示
- [ ] LandInfo 领地名称未显示
- [ ] Event:Before - onCreate 回传无mRange
- [ ] schedule随机性失效?
- [x] 冲突领地检测没有提示冲突坐标,领地名称未显示
- [x] Event:Before - onCreate 回传无mRange

> ILAPI 示例插件计划
- [ ] Land Edge Shower
Expand Down
42 changes: 38 additions & 4 deletions iland-core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Plugin = {
Version = {
major = 2,
minor = 8,
revision = 1,
revision = 2,
toString = function()
local ver = Plugin.Version
return tostring(ver.major)..'.'..tostring(ver.minor*10 + ver.revision)
Expand Down Expand Up @@ -1463,10 +1463,30 @@ Land = {
IsCollision = function(AABB,ignoreList)
ignoreList = ignoreList or {}
local ignores = Array.ToKeyMap(ignoreList)

--- Check 1/2.
local edge = Cube.GetEdge(AABB)
for n,pos in pairs(edge) do
Pos.SetDimId(pos,AABB.dimid)
local Id = Land.Query.Pos(pos)
if Id and not ignores[Id] then
return {
status = false,
id = Id,
info = _Tr('gui.rangecheck.pos','<a>',Pos.ToString(pos))
}
end
end

--- Check 2/2.
local lands = Land.Query.Area(AABB)
for i,landId in pairs(lands) do
if not ignores[landId] then
return { status = false, id = landId }
return {
status = false,
id = landId,
info = _Tr('gui.rangecheck.included')
}
end
end
return { status = true }
Expand Down Expand Up @@ -2981,12 +3001,22 @@ RangeSelector = {
local sp = cfg.land.min_space
local chkNearby = Land.Util.IsCollision(Cube.Create(Pos.Add(mem.posA,sp),Pos.Reduce(mem.posB,sp),dimid),chkIgnores)
if not chkNearby.status then
SendText(player,_Tr('title.rangeselector.fail.space','<a>',chkNearby.id))
player:sendModalForm(
_Tr('gui.rangecheck.title'),
_Tr('gui.rangecheck.msg','<a>',Land.Options.Nickname.get(chkNearby.id,3),'<b>',chkNearby.info),
_Tr('gui.general.iknow'),_Tr('gui.general.close'),
Callback.Form.NULL
)
else
passed = true
end
else
SendText(player,_Tr('title.rangeselector.fail.collision','<a>',chkColl.id))
player:sendModalForm(
_Tr('gui.rangecheck.title'),
_Tr('gui.rangecheck.msg','<a>',Land.Options.Nickname.get(chkColl.id,3),'<b>',chkColl.info),
_Tr('gui.general.iknow'),_Tr('gui.general.close'),
Callback.Form.NULL
)
end
end

Expand Down Expand Up @@ -3280,6 +3310,10 @@ Pos = {
if A.y>B.y then A.y,B.y = B.y,A.y end
if A.z>B.z then A.z,B.z = B.z,A.z end
return A,B
end,
SetDimId = function(pos,dimid)
pos.dimid = dimid
return pos
end
}

Expand Down
28 changes: 16 additions & 12 deletions iland/lang/en_US.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"VERSION": 281,
"VERSION": 282,

"gui.land.title": "Land v<a>",
"gui.oplandmgr.trsland.title": "Forced transfer of land",
Expand Down Expand Up @@ -173,7 +173,7 @@
"gui.buyland.button.confirm": "Confirm Purchase",
"gui.buyland.button.close": "Staging",
"gui.buyland.button.cancel": "Cancel order",
"gui.delland.content": "Are you sure you want to delete your realm?\nIf so, you will receive a <a><b>refund. Your realm will then lose its protection and the data will be deleted immediately. ",
"gui.delland.content": "Are you sure you want to delete your realm?\\nIf so, you will receive a <a><b>refund. Your realm will then lose its protection and the data will be deleted immediately. ",
"gui.landdescribe.tip": "Land notes are sent to other visitors when they come to your land.\n\nSupported variables:\n$visitor = visitor name\n$n = newline",
"gui.landtrust.tip": "Select operation mode",
"gui.landtrust.addtrust": "Add trusted player",
Expand All @@ -184,9 +184,9 @@
"gui.landtrust.rmsuccess": "Removed from trust list",
"gui.landtrust.trusted": "§lCurrently trusted:§r ",
"gui.landtag.tip": "Land Nickname helps you to distinguish between multiple lands without changing the original lands configuration",
"gui.landtransfer.tip": "After the land transfer is completed, all permissions will be transferred, you are no longer the owner of the land, but all the configuration of the original land will not be changed.",
"gui.landtransfer.tip": "After the land transfer is completed, all permissions will be transferred, you are no longer the owner of the land, but all configurations of the original land will not be changed.",
"gui.reselectland.title": "Reselect Land Range",
"gui.reselectland.tip": "Re-enclosure is to completely reselect the range of the land, not directly expanding/reducing the range of the existing land.\\nThe price of reselectland is calculated as\\\"New range price — old range Value \\\", continue?","gui.reselectland.content": "Original territory range (<a>) value: <b>,\\nCurrent territory range (<c>) value: <d>,\\nwill <e>you<f ><g>.",
"gui.reselectland.tip": "Re-enclosure is to completely reselect the scope of the territory, not directly expanding/reducing the scope of the existing territory.\\nThe price calculation method of reselectland is\\\"New scope price — old scope Value \\\", continue?","gui.reselectland.content": "Original territory range (<a>) value: <b>,\\nCurrent territory range (<c>) value: <d>,\\nwill <e>you<f ><g>.",
"gui.reselectland.refund": "Refund to",
"gui.reselectland.pay": "Charge",

Expand Down Expand Up @@ -251,14 +251,17 @@
"title.rangeselector.fail.toobig": "The enclosed territory is too big, please re-enclose it.\n",
"title.rangeselector.fail.toosmall": "The enclosed territory is too small, please re-enclosure.\n",
"title.rangeselector.fail.toolow": "The enclosed territory is too low, please re-enclosure\n",
"title.rangeselector.fail.collision": "The enclosure range conflicts with <a>, please re-enclave.\n",
"title.rangeselector.fail.space": "The enclosure range is too close to <a>, please re-enclosure.\n",
"title.rangeselector.fail.height": "Not a valid height, please re-enclosure",
"title.rangeselector.largeparticle": "The territory is large, particle effects have been turned off to avoid lag",
"title.rangeselector.pointed": "Point <a> selected: <b> (<c>, <d>, <e>)",
"title.selectland.complete1": "Enclosure completed",
"title.selectland.complete2": "Please hold <a>\nUse /<b> or click any square again to create an order.",

"gui.rangecheck.included": "included",
"gui.rangecheck.pos": "Conflict at <a>",
"gui.rangecheck.title": "There was a problem",
"gui.rangecheck.msg": "The selected range conflicts with or is too close to §l<a>§r.\n\nDetails: <b>",

"title.land.nolicense": "Please use /land new request to create a new territory first",
"title.getlicense.alreadyexists": "Do not repeat the request\n",
"title.getlicense.succeed": "Requested to create a new territory\n",
Expand Down Expand Up @@ -286,8 +289,8 @@
"title.landsign.visitorbuttom": "This is <a>'s territory",
"title.landtp.fail.noland": "You need to stand on the ground first",
"title.landtp.fail.notowner": "You are not the owner of this land",
"title.landtp.removed": "Removed teleportation point for this land",
"title.landtp.success":"Successful delivery",
"title.landtp.removed": "Removed teleportation point for this territory",
"title.landtp.success": "Successful transfer",

"sign.listener.ownertitle": "<a>",
"sign.listener.ownersubtitle": "Welcome back",
Expand Down Expand Up @@ -355,7 +358,7 @@
"console.loading.land.broken": "The land data file is broken.",
"console.loading.relationship.notfound": "The relationship data (relationship.json) does not exist, creating...",
"console.loading.relationship.xuidinvalid": "Invalid XUID (<a>), skip loading...",
"console.loading.relationship.xuidinvalidtip": "Some players were not loaded because their XUIDs were not in the database. Reloading these players could fix this.",
"console.loading.relationship.xuidinvalidtip": "Some players were not loaded because their XUIDs were not in the database. Reloading these players could fix the problem.",
"console.loading.relationship.broken": "The territory relationship data file is broken.",
"console.loading.map.load": "Building the tables needed to run...",
"console.loading.map.complete": "Complete, using memory: <a>M.",
Expand Down Expand Up @@ -398,7 +401,8 @@
"console.getonline.failbyver": "Unparseable version of cloud info file (<a>), your iLand may be out of date.",
"console.getonline.failbybroken": "Unable to parse cloud information, JSON parsing failed.",

"console.languages.sign": "This server is using language <a>, version: <b>.","console.languages.list.count": "Installed languages: <a>",
"console.languages.sign": "This server is using language <a>, version: <b>. ",
"console.languages.list.count": "Installed languages: <a>",
"console.languages.list-online.wait": "Please wait, getting language warehouse data...",
"console.languages.official": "Official languages:",
"console.languages.3rd": "Languages ​​provided by third parties:",
Expand All @@ -409,9 +413,9 @@
"console.languages.install.fail.verify": "Error verifying language <a>, MD5 mismatch, installation process interrupted.",
"console.languages.install.fail.version": "The language <a> being installed does not match the version of iLand currently running and the installation process has been interrupted.",
"console.languages.install.fail.broken": "The language pack <a> being installed is broken and the installation process was interrupted.",
"console.languages.install.succeed": "Language pack <a> installed successfully! Please use \"land language set <a>\" to set the language to use.",
"console.languages.install.succeed": "Language pack <a> installed successfully! Please use \"land language set <a>\" to set the language used.",
"console.languages.update.alreadylatest": "This language version is up to date and does not require an upgrade.",
"console.languages.update.notfound": "Language pack <a> not found, try installing this language with \"land language install <a>\".",
"console.languages.update.notfound": "Language pack <a> not found, please try installing this language with \"land language install <a>\".",
"console.languages.update.notfoundonline": "Language <a> was not found on the server, maybe it is not yet included, the update is aborted.",
"console.languages.update.succeed": "Language pack <a> updated successfully!",
"console.languages.update.completed": "Updated <a> language packs.",
Expand Down
9 changes: 6 additions & 3 deletions iland/lang/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"VERSION": 281,
"VERSION": 282,
"#1": "zh_CN 标准汉语翻译贡献者:RedbeanW",

"gui.land.title": "Land v<a>",
Expand Down Expand Up @@ -253,14 +253,17 @@
"title.rangeselector.fail.toobig": "所圈领地太大,请重新圈地。\n",
"title.rangeselector.fail.toosmall": "所圈领地太小,请重新圈地。\n",
"title.rangeselector.fail.toolow": "所圈领地太低,请重新圈地\n",
"title.rangeselector.fail.collision": "圈地范围与 <a> 存在冲突,请重新圈地。\n",
"title.rangeselector.fail.space": "圈地范围与 <a> 距离太近,请重新圈地。\n",
"title.rangeselector.fail.height": "不是有效的高度,请重新圈地",
"title.rangeselector.largeparticle": "领地范围较大,为避免卡顿已关闭粒子特效",
"title.rangeselector.pointed": "点 <a> 已选定:<b> (<c>, <d>, <e>)",
"title.selectland.complete1": "圈地完成",
"title.selectland.complete2": "请手持 <a>\n使用 /<b> 或再次点击任意方块以创建订单。",

"gui.rangecheck.included": "包含",
"gui.rangecheck.pos": "在 <a> 冲突",
"gui.rangecheck.title": "出现问题",
"gui.rangecheck.msg": "所选范围与 §l<a>§r 存在冲突或距离太近。\n\n详细信息: <b>",

"title.land.nolicense": "请先使用 /land new 请求创建新领地",
"title.getlicense.alreadyexists": "请勿重复请求\n",
"title.getlicense.succeed": "已请求新建领地\n",
Expand Down
14 changes: 9 additions & 5 deletions iland/lang/zh_TW.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"VERSION": 281,
"VERSION": 282,

"gui.land.title": "Land v<a>",
"gui.oplandmgr.trsland.title": "強製過戶領地",
Expand Down Expand Up @@ -251,14 +251,17 @@
"title.rangeselector.fail.toobig": "所圈領地太大,請重新圈地。\n",
"title.rangeselector.fail.toosmall": "所圈領地太小,請重新圈地。\n",
"title.rangeselector.fail.toolow": "所圈領地太低,請重新圈地\n",
"title.rangeselector.fail.collision": "圈地範圍與 <a> 存在衝突,請重新圈地。\n",
"title.rangeselector.fail.space": "圈地範圍與 <a> 距離太近,請重新圈地。\n",
"title.rangeselector.fail.height": "不是有效的高度,請重新圈地",
"title.rangeselector.largeparticle": "領地範圍較大,為避免卡頓已關閉粒子特效",
"title.rangeselector.pointed": "點 <a> 已選定:<b> (<c>, <d>, <e>)",
"title.selectland.complete1": "圈地完成",
"title.selectland.complete2": "請手持 <a>\n使用 /<b> 或再次點擊任意方塊以創建訂單。",

"gui.rangecheck.included": "包含",
"gui.rangecheck.pos": "在 <a> 衝突",
"gui.rangecheck.title": "出現問題",
"gui.rangecheck.msg": "所選範圍與 §l<a>§r 存在衝突或距離太近。\n\n詳細信息: <b>",

"title.land.nolicense": "請先使用 /land new 請求創建新領地",
"title.getlicense.alreadyexists": "請勿重複請求\n",
"title.getlicense.succeed": "已請求新建領地\n",
Expand Down Expand Up @@ -287,7 +290,7 @@
"title.landtp.fail.noland": "你需要先站在領地上一點",
"title.landtp.fail.notowner": "你不是這塊領地的主人",
"title.landtp.removed": "已移除這塊領地的傳送點",
"title.landtp.success":"傳送成功",
"title.landtp.success": "傳送成功",

"sign.listener.ownertitle": "<a>",
"sign.listener.ownersubtitle": "歡迎回來",
Expand Down Expand Up @@ -398,7 +401,8 @@
"console.getonline.failbyver": "無法解析的雲端信息文件版本(<a>),您的iLand可能已過時。",
"console.getonline.failbybroken": "無法解析雲端信息,JSON解析失敗。",

"console.languages.sign": "此服務器正在使用 <a> 語言,版本為:<b>。","console.languages.list.count": "已安裝語言:<a> 個",
"console.languages.sign": "此服務器正在使用 <a> 語言,版本為:<b>。 ",
"console.languages.list.count": "已安裝語言:<a> 個",
"console.languages.list-online.wait": "請稍等,正在獲取語言倉庫數據...",
"console.languages.official": "官方提供的語言:",
"console.languages.3rd": "第三方提供的語言:",
Expand Down

0 comments on commit 0f8614b

Please sign in to comment.