@@ -18,7 +18,6 @@ if not X.AssertVersion(MODULE_NAME, _L[MODULE_NAME], '^27.0.0') then
1818 return
1919end
2020--[[ #DEBUG BEGIN]] X .ReportModuleLoading (MODULE_PATH , ' START' )--[[ #DEBUG END]]
21- X .RegisterRestriction (' MY_BagEx_Bag' , { remake = true })
2221---- ----------------------------------------------------------------------------
2322
2423local O = X .CreateUserSettingsModule (MODULE_NAME , _L [' General' ], {
@@ -31,7 +30,6 @@ local O = X.CreateUserSettingsModule(MODULE_NAME, _L['General'], {
3130 }),
3231 xSchema = X .Schema .Boolean ,
3332 xDefaultValue = false ,
34- szRestriction = ' MY_BagEx_Bag' ,
3533 },
3634 bConfirm = {
3735 ePathType = X .PATH_TYPE .ROLE ,
@@ -42,7 +40,6 @@ local O = X.CreateUserSettingsModule(MODULE_NAME, _L['General'], {
4240 }),
4341 xSchema = X .Schema .Boolean ,
4442 xDefaultValue = true ,
45- szRestriction = ' MY_BagEx_Bag' ,
4643 },
4744 tLock = {
4845 ePathType = X .PATH_TYPE .ROLE ,
@@ -54,13 +51,12 @@ local O = X.CreateUserSettingsModule(MODULE_NAME, _L['General'], {
5451 }),
5552 xSchema = X .Schema .Map (X .Schema .String , X .Schema .Boolean ),
5653 xDefaultValue = {},
57- szRestriction = ' MY_BagEx_Bag' ,
5854 },
5955})
6056local D = {}
6157
6258function D .IsEnabled ()
63- return O .bEnable and not X .IsInInventoryPackageLimitedMap () and not X . IsRestricted ( ' MY_BagEx_Bag ' )
59+ return O .bEnable and not X .IsInInventoryPackageLimitedMap ()
6460end
6561
6662function D .ShowItemShadow (frame , dwBox , dwX , bEditLock )
@@ -222,28 +218,24 @@ function D.OnEnableChange()
222218end
223219
224220function D .OnPanelActivePartial (ui , nPaddingX , nPaddingY , nW , nH , nX , nY , nLH )
225- if not X .IsRestricted (' MY_BagEx_Bag' ) then
226- nX = nX + ui :Append (' WndCheckBox' , {
227- x = nX , y = nY , w = 200 ,
228- text = _L [' Bag package sort and stack' ],
229- checked = O .bEnable ,
230- onCheck = function (bChecked )
231- O .bEnable = bChecked
232- D .OnEnableChange ()
233- end ,
234- }):AutoWidth ():Width () + 5
235- nX = nX + ui :Append (' WndCheckBox' , {
236- x = nX , y = nY , w = 200 ,
237- text = _L [' Need confirm' ],
238- checked = O .bConfirm ,
239- onCheck = function (bChecked )
240- O .bConfirm = bChecked
241- end ,
242- autoEnable = function () return O .bEnable end ,
243- }):AutoWidth ():Width () + 5
244- nX = nPaddingX
245- nY = nY + nLH
246- end
221+ nX = nX + ui :Append (' WndCheckBox' , {
222+ x = nX , y = nY , w = 200 ,
223+ text = _L [' Bag package sort and stack' ],
224+ checked = O .bEnable ,
225+ onCheck = function (bChecked )
226+ O .bEnable = bChecked
227+ D .OnEnableChange ()
228+ end ,
229+ }):AutoWidth ():Width () + 5
230+ nX = nX + ui :Append (' WndCheckBox' , {
231+ x = nX , y = nY , w = 200 ,
232+ text = _L [' Need confirm' ],
233+ checked = O .bConfirm ,
234+ onCheck = function (bChecked )
235+ O .bConfirm = bChecked
236+ end ,
237+ autoEnable = function () return O .bEnable end ,
238+ }):AutoWidth ():Width () + 5
247239 return nX , nY
248240end
249241
0 commit comments