Giter Club home page Giter Club logo

jim_bridge's People

Contributors

bandgeekndb avatar jimathy avatar solareon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jim_bridge's Issues

Suggestion: Configurable Stash Options

Hello! I'm upgrading jim-mechanic to v3.3 and one thing I noticed was that the openStash function in jim_bridge didn't support customizing the stash options.

I made the following change to allow passing through a stashOptions variable:

function openStash(data)
    if (data.job or data.gang) and not jobCheck(data.job or data.gang) then return end
    if GetResourceState(OXInv):find("start") then
        exports[OXInv]:openInventory('stash', data.stash)
    elseif GetResourceState(CodeMInv):find("start") then
        exports[CodeMInv]:OpenStash(data.stash, 400000, 100)
    else
        TriggerEvent("inventory:client:SetCurrentStash", data.stash)
        TriggerServerEvent("inventory:server:OpenInventory", "stash", data.stash, data.stashOptions)
    end
    lookEnt(data.coords)
end

This way, when calling openStash from jim-mechanic, I can do this:

{ action = function()
	openStash({ job = loc.job, stash = repairStashName, stashOptions = { maxweight = 4000000, slots = 200, } }) end,
	icon = "fas fa-cogs",
	label = Loc[Config.Lan]["repair"].browse,
	job = loc.job
},

I know jim_bridge is still pretty new and if you're not looking for any feedback like this, go ahead and close this, no worries. I just wanted to share in case others are interested in doing the same thing and maybe it helps you in the future if you ever need to customize a stash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.