-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(management/qbox): qbx-management support for BossManagedOutfits (#…
…296)
- Loading branch information
1 parent
3fd721d
commit db5090d
Showing
6 changed files
with
77 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Management = {} | ||
|
||
Management.ItemIDs = { | ||
Gang = nil, | ||
Boss = nil | ||
} | ||
|
||
function Management.IsQB() | ||
local resName = "qb-management" | ||
if GetResourceState(resName) ~= "missing" then | ||
Management.ResourceName = resName | ||
return true | ||
end | ||
return false | ||
end | ||
|
||
function Management.IsQBX() | ||
local resName = "qbx-management" | ||
if GetResourceState(resName) ~= "missing" then | ||
Management.ResourceName = resName | ||
return true | ||
end | ||
return false | ||
end | ||
|
||
function Management.RemoveItems() | ||
if GetResourceState(Management.ResourceName) ~= "started" then return end | ||
|
||
if Management.ItemIDs.Boss then | ||
exports[Management.ResourceName]:RemoveBossMenuItem(Management.ItemIDs.Boss) | ||
end | ||
if Management.ItemIDs.Gang then | ||
exports[Management.ResourceName]:RemoveGangMenuItem(Management.ItemIDs.Gang) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if not Management.IsQB() then return end | ||
|
||
function Management.AddItems() | ||
local menuItem = { | ||
header = _L("outfitManagement.title"), | ||
icon = "fa-solid fa-shirt", | ||
params = { | ||
event = "illenium-appearance:client:OutfitManagementMenu" | ||
} | ||
} | ||
menuItem.txt = _L("outfitManagement.jobText") | ||
menuItem.params.args.type = "Job" | ||
Management.ItemIDs.Boss = exports[Management.ResourceName]:AddBossMenuItem(menuItem) | ||
|
||
menuItem.txt = _L("outfitManagement.gangText") | ||
menuItem.params.args.type = "Gang" | ||
Management.ItemIDs.Gang = exports[Management.ResourceName]:AddGangMenuItem(menuItem) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
if not Management.IsQBX() then return end | ||
|
||
function Management.AddItems() | ||
local menuItem = { | ||
title = _L("outfitManagement.title"), | ||
icon = "fa-solid fa-shirt", | ||
event = "illenium-appearance:client:OutfitManagementMenu", | ||
args = {} | ||
} | ||
menuItem.description = _L("outfitManagement.jobText") | ||
menuItem.args.type = "Job" | ||
Management.ItemIDs.Boss = exports[Management.ResourceName]:AddBossMenuItem(menuItem) | ||
|
||
menuItem.description = _L("outfitManagement.gangText") | ||
menuItem.args.type = "Gang" | ||
Management.ItemIDs.Gang = exports[Management.ResourceName]:AddGangMenuItem(menuItem) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters