Jump to content

DEVBLOG: MERCURY LUA API REVAMP - discussion thread


NQ-Wanderer

Recommended Posts

Bug (feature?)

The default Command Seat Widget that shows the throttle does NOT update if the throttle or target speed is set strictly from Lua with no corresponding key press event. 

so lets say you are cruising along at 50% throttle, and the widget shows 50%

Nav.axisCommandManager:setThrottleCommand(axisCommandId.longitudinal,0.1) bound to a key.start() will set speed to 10% but if you do it somewhere else based on something other then a key press (like a proximity detector) it changes the throttle just fine, but the widget keeps showing the previous value.

Link to comment
Share on other sites

@NQ-Ligo

Let me start with saying that I appreciate the extra effort and work you are putting into the revamp in providing tools and reference for the Lua community for the game.

 

I do want to get back to my request for a dump of the codex HTML for the game to an offline version which seems to have been left behind. And please do not take what I am about to say the wrong way, but I'd really like you to take off your "Lua Nerd" hat and look at what you are providing from a layman's perspective. What you will find is that it is way too complex and focused for your average joe who decided he wants to dabble in Lua.

 

And the average Jose’s will far outnumber the Lua Nerds  ;)

 

It is and will be very important for a simple and straight forward source of basic information to be available and the community will no doubt make sure that a nicely formatted webpage is there for that purpose. if we can just get our hands on the raw HTML as it's used in game for the codex.

 

As I've said, the argument that maintaining this would mean extra work as that is simply not true, unless you mean you will not maintain the in-game codex. Creating the offline version from there is, or should be, a simple matter of "copy paste the codex HTML from the codebase to a separate file".

Link to comment
Share on other sites

FYI if you do a dumb replacement of receiver.setChannels by receiver.setChannelList, you get a game crash. Took me a while to figure out since I kind of swapped all deprecated functions, and when I started my programming board, I was getting a game crash with no indication why.

 

I just forgot that setChannelList receive an array, and setChannels a string.

 

I'll fill a bug report.

 

Edited by P4rty_Boy
Link to comment
Share on other sites

  • 2 weeks later...

Currently "core.getElementIndustryInfoById" returns a schematic id of 0 for stopped industry units.

Also, can we get the name of the schematic returned from "system.getSchematic"? At this time the best we can do is get the names of the product(s) produced by the schematic and that does not work for Transfer Units which have an empty product list.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...