From 78c8449b9f9f6fe981a833f4652a9b3b01bf012c Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Sat, 20 Dec 2025 22:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=93=E5=BA=93=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FileConfig.json | 15 ++++ Project/WarehouseLock/WarehouseLock.nut | 114 ++++++++++++++++++++++++ folder-alias.json | 3 + 3 files changed, 132 insertions(+) create mode 100644 Project/WarehouseLock/WarehouseLock.nut diff --git a/FileConfig.json b/FileConfig.json index bfa213a..439efe8 100644 --- a/FileConfig.json +++ b/FileConfig.json @@ -305,6 +305,21 @@ }, "imgPath": "WorldBoss" }, + "仓库锁": { + "Private": true, + "price": 100, + "Script": [ + "Project/WarehouseLock/WarehouseLock.nut" + ], + "info": { + "ProjectAuthor": "100", + "ProjectVersion": "1.0.0", + "ProjectDescribe": "🔥 打破原版桎梏,重塑世界 BOSS 核心乐趣", + "ProjectDetails": [ + ] + }, + "imgPath": "WorldBoss" + }, "圣者遗物箱": { "price": 30, "Script": [ diff --git a/Project/WarehouseLock/WarehouseLock.nut b/Project/WarehouseLock/WarehouseLock.nut new file mode 100644 index 0000000..426703b --- /dev/null +++ b/Project/WarehouseLock/WarehouseLock.nut @@ -0,0 +1,114 @@ +/* +文件名:WarehouseLock.nut +路径:Project/WarehouseLock/WarehouseLock.nut +创建日期:2025-12-20 02:08 +文件用途:仓库锁 +*/ +class WarehouseLockC extends LenheartNewUI_Windows { + //调试模式 + // DeBugMode = true; + + //不是窗口 + // NoWindow = true; + + //是否可见 + Visible = false; + + Img = Rindro_Image("safety/warehouse.img"); + + //输入框 + InputObject = null; + + constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { + Childrens = []; + //注册控件 + RegisterWidget(); + + LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); + + + + Pack_Control.rawset(21008010, function(Chunk) { + Visible = true; + Sq_Memory_WriteByteArr(L_sq_I2P(0xFCF380), [0xC3]); + }.bindenv(this)); + + Pack_Control.rawset(21008002, function(Chunk) { + Visible = false; + Sq_Memory_WriteByteArr(L_sq_I2P(0xFCF380), [0x55]); + }.bindenv(this)); + + SendPackEx({ + op = 21008009, + }); + } + + function RegisterWidget() { + //关闭按钮 + local CloseButton = LenheartNewUI_BaseButton(322, 4, 11, 12, "interface/lenheartwindowcommon.img", 276); + CloseButton.OnClick = function() { + this.Visible = false; + }.bindenv(this); + Childrens.append(CloseButton); + + InputObject = LenheartNewUI_BaseInput(88, 126, 152, 20); + AddChild(InputObject); + + //确认按钮 + local ConfirmButton = LenheartNewUI_ButtonText(131, 156, 15, "验证"); + ConfirmButton.DWidth = 18; + ConfirmButton.Width = 74; + ConfirmButton.SetTextOffset(7, 1); + ConfirmButton.OnClickEx = function(Btn) { + local T = { + op = 21008001, + passwd = InputObject.str + } + SendPackEx(T); + this.Visible = false; + }.bindenv(this); + AddChild(ConfirmButton); + } + + //绘制主界面 + function DrawMain(obj) { + //背景框 + DrawNineBox(X, Y, 336, 206, "interface/lenheartwindowcommon.img", 213); + //标题 + DrawWindowTitle(339); + //绘制标题名 + L_sq_DrawCode("公告", X + 156, Y + 5, sq_RGBA(230, 200, 155, 255), 0, 1); + + + Img.DrawPng(0, X + 8, Y + 32); + } + + function Show(obj) { + DrawMain(obj); + LenheartNewUI_Windows.Show(obj); + + } + + //逻辑入口 + function Proc(obj) { + LenheartNewUI_Windows.SyncPos(X, Y); + } + +} + + +L_Windows_List <- []; +getroottable().rawdelete("LenheartPluginsInitFlag"); +getroottable().rawdelete("EventList_Obj") +getroottable().rawdelete("WarehouseLock_Obj"); + + +function Lenheart_WarehouseLock_Fun(obj) { + local RootTab = getroottable(); + if (!RootTab.rawin("WarehouseLock_Obj")) { + RootTab.rawset("WarehouseLock_Obj", true); + LenheartNewUI_CreateWindow(WarehouseLockC, "仓库锁窗口", ((getroottable().Rindro_Scr_Width - 336) / 2).tointeger(), 180, 336, 206, 28); + } +} + +getroottable()["LenheartFuncTab"].rawset("WarehouseLockFuncN", Lenheart_WarehouseLock_Fun); \ No newline at end of file diff --git a/folder-alias.json b/folder-alias.json index c33dd58..5febfc1 100644 --- a/folder-alias.json +++ b/folder-alias.json @@ -217,5 +217,8 @@ }, "Project/ItemTool/ItemInherit": { "description": "装备继承" + }, + "Project/WarehouseLock": { + "description": "仓库锁" } } \ No newline at end of file