mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
crafting menu workarounds for missing info
This commit is contained in:
15
crafting.lua
15
crafting.lua
@@ -129,9 +129,9 @@ function makeItem(data)
|
||||
CraftLock = true
|
||||
|
||||
local bartime = data.craftable.progressBar and data.craftable.progressBar.time or 5000
|
||||
local bartext = data.craftable.progressBar and data.craftable.progressBar.label or Loc[Config.Lan].progressbar["progress_make"]
|
||||
local animDict = data.craftable.Anims.animDict or "amb@prop_human_parking_meter@male@idle_a"
|
||||
local anim = data.craftable.Anims.anim or "idle_a"
|
||||
local bartext = (data.craftable.progressBar and data.craftable.progressBar.label) or (Loc[Config.Lan].progressbar and Loc[Config.Lan].progressbar["progress_make"]) or "Making a"
|
||||
local animDict = data.craftable.Anims and data.craftable.Anims.animDict or "amb@prop_human_parking_meter@male@idle_a"
|
||||
local anim = data.craftable.Anims and data.craftable.Anims.anim or "idle_a"
|
||||
local amount = data.amount and (data.amount ~= 1) and data.amount or 1
|
||||
|
||||
local crafted, crafting = true, true
|
||||
@@ -226,15 +226,18 @@ function hasItem(items, amount, src) local amount = amount and amount or 1
|
||||
if type(items) ~= "table" then items = { [items] = amount and amount or 1, } end
|
||||
if GetResourceState(OXInv):find("start") then
|
||||
foundInv = OXInv
|
||||
grabInv = src and exports.ox_inventory:GetInventoryItems(src) or exports[OXInv]:GetPlayerItems()
|
||||
if src then grabInv = exports[OXInv]:GetInventoryItems(src)
|
||||
else grabInv = exports[OXInv]:GetPlayerItems() end
|
||||
|
||||
elseif GetResourceState(QSInv):find("start") then
|
||||
foundInv = QSInv
|
||||
grabInv = src and exports[QSInv]:GetInventory(src) or exports[QSInv]:getUserInventory()
|
||||
if src then grabInv = exports[QSInv]:GetInventory(src)
|
||||
else grabInv = exports[QSInv]:getUserInventory() end
|
||||
|
||||
elseif GetResourceState(OrigenInv):find("start") then
|
||||
foundInv = OrigenInv
|
||||
grabInv = src and exports[OrigenInv]:getPlayerInventory(src) or exports[OrigenInv]:getPlayerInventory()
|
||||
if src then grabInv = exports[OrigenInv]:getPlayerInventory(src)
|
||||
else grabInv = exports[OrigenInv]:getPlayerInventory() end
|
||||
|
||||
elseif GetResourceState(CoreInv):find("start") then
|
||||
foundInv = CoreInv
|
||||
|
||||
Reference in New Issue
Block a user