新增仓库锁

This commit is contained in:
Lenheart 2025-12-20 22:54:54 +08:00
parent 42fa6a03ef
commit 78c8449b9f
3 changed files with 132 additions and 0 deletions

View File

@ -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": [

View File

@ -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);

View File

@ -217,5 +217,8 @@
},
"Project/ItemTool/ItemInherit": {
"description": "装备继承"
},
"Project/WarehouseLock": {
"description": "仓库锁"
}
}