![]() |
naev 0.12.6
|
Handles the shiplog Lua bindings. More...
#include "nlua_shiplog.h"#include "nlua.h"#include "shiplog.h"
Go to the source code of this file.
Functions | |
| int | shiplog_loadShiplog (nlua_env env) |
| static int | shiplog_createLog (lua_State *L) |
| Bindings for adding log entries to the ship log. | |
| static int | shiplog_appendLog (lua_State *L) |
| Appends to the shiplog. | |
| int | nlua_loadShiplog (nlua_env env) |
| Loads the mission Lua library. | |
Variables | |
| static const luaL_Reg | shiplog_methods [] |
Handles the shiplog Lua bindings.
Definition in file nlua_shiplog.c.
| int nlua_loadShiplog | ( | nlua_env | env | ) |
Loads the mission Lua library.
| env | Lua environment. |
Definition at line 30 of file nlua_shiplog.c.
|
static |
Appends to the shiplog.
Lua usage parameter: shiplog.append("MyLog", "Some message here")
Lua function parameter: string idstr ID string of the log to append to. Lua function parameter: string message Message to append to the log. Lua return parameter: boolean true on success.
| L | Lua State |
Lua function: append
Definition at line 94 of file nlua_shiplog.c.
|
static |
Bindings for adding log entries to the ship log.
A typical example would be:
Lua module: shiplog
Creates a shiplog for this mission.
Lua usage parameter: shiplog.create("MyLog", "My mission title", "Mission type") – Creates log "MyLog" without erasing anything Lua usage parameter: shiplog.create("MyOtherLog", "Any title","Anything can be a type", true, 10) – Erases any existing MyOtherLog entries and sets a limit of 10 entries
Lua function parameter: string idstr ID string to identify this log, or empty string for unnamed logsets. Lua function parameter: string logname Name for this log. Lua function parameter: string logtype Type of log (e.g travel, trade, etc, can be anything). Lua function parameter:[opt=false] boolean overwrite Whether to remove previous entries of this logname and type. Lua function parameter:[opt=0] number maxLen Maximum length of the log (zero for infinite) - if greater than this length, new entries appended will result in old entries being removed.
| L | Lua State |
Lua function: create
Definition at line 69 of file nlua_shiplog.c.
|
static |
Shiplog Lua methods.
Definition at line 18 of file nlua_shiplog.c.