Minor Lua API Documentation Error
Minor Lua API Documentation Error
On http://lua-api.factorio.com/latest/Data-Lifecycle.html under "3. control.lua initialization" the "script" object is hotlinked to LuaGameScript, however "script" is actually an instance of LuaBootstrap, as "game" represents LuaGameScript.
-
- Long Handed Inserter
- Posts: 73
- Joined: Wed Feb 20, 2013 6:57 pm
- Contact:
Re: Minor Lua API Documentation Error
http://lua-api.factorio.com/latest/
I count 4All of the API functionality is implemented via class members. To make any use of the API, therefore, you need to have access to instances of these classes. To facilitate that, three global objects are provided:
game :: LuaGameScript: This is the main object, through which most of the API is accessed. It is, however, not available inside handlers registered with LuaBootstrap::on_load.
script :: LuaBootstrap: Provides an interface for registering event handlers.
remote :: LuaRemote: Allows inter-mod communication by way of providing a repository of interfaces that is shared by all mods.
commands :: LuaCommandProcessor: Allows registering custom commands in the in-game console accessible via the ~ key.
-
- Filter Inserter
- Posts: 841
- Joined: Mon Sep 14, 2015 7:40 am
- Contact:
Re: Minor Lua API Documentation Error
Should probably just change "three" to "the following".
Re: Minor Lua API Documentation Error
Thanks for the report. I've fixed those sections for the next version of 0.15.
If you want to get ahold of me I'm almost always on Discord.