eliw00d Posted February 23, 2014 Share Posted February 23, 2014 Is it possible to add new, or edit old, Context Menu actions via Lua? If not, where? Also, in the Reloadable Lua scripts, there are functions that return text for the reload context menu action, but changing it does nothing. Are they not implemented yet? Link to comment Share on other sites More sharing options...
RoboMat Posted February 23, 2014 Share Posted February 23, 2014 Is it possible to add new, or edit old, Context Menu actions via Lua? If not, where? Yes it is possible. Take a look at my lockpicking mod for world context menus or at my unpack bags mod for inventory context menus. Link to comment Share on other sites More sharing options...
eliw00d Posted February 23, 2014 Author Share Posted February 23, 2014 Thanks for the quick response, I will take a look at those. Any thoughts on the Reloadable context menu action's text? Link to comment Share on other sites More sharing options...
RoboMat Posted February 23, 2014 Share Posted February 23, 2014 You mean the pistol mechanics? The menu entry for it should be located in the ISInventoryContextMenu (not sure if that's the exact name of the file but it is something pretty similar). You could simply overwrite the function with your mod if that's what you are asking. I've done the same for the sleeping menu entry in my Sleeping Overhaul. Link to comment Share on other sites More sharing options...
eliw00d Posted February 23, 2014 Author Share Posted February 23, 2014 Ah, I see now. The getReloadText functions are never used, but I have an idea of where to go now. Thanks! Link to comment Share on other sites More sharing options...
eliw00d Posted February 23, 2014 Author Share Posted February 23, 2014 A somewhat related question: how can I add a remaining bar/count to the magazine inventory item that is tied to currentCapacity of a reloadable magazine? Link to comment Share on other sites More sharing options...
RoboMat Posted February 23, 2014 Share Posted February 23, 2014 Hm depending on where you want to display it you'll probably have to write a custom UI for it. I hate the UI code... I went through it for my story mod and hated every second of doing it Link to comment Share on other sites More sharing options...
eliw00d Posted February 23, 2014 Author Share Posted February 23, 2014 Well, where do other items pull data from for their "Remaining" bars? Just so we're on the same page, I took a screenshot: Something like that is what I have in mind, using currentCapacity/maxCapacity. Yes, a lot of the code is very messy, and not just for the UI! Link to comment Share on other sites More sharing options...
eliw00d Posted February 24, 2014 Author Share Posted February 24, 2014 Figured it out! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now