Naev

Module shiplog

Bindings for adding log entries to the ship log.

A typical example would be:

 logid = shiplog.createLog( "idstring", "log name", "log type", 0, 0 )
 shiplog.appendLog( "idstring", "message to append to log" )
 

Functions

createLog (idstr, logname, logtype[, overwrite[, maxLen]]) Creates a shiplog for this mission.
appendLog (idstr, message) Appends to the shiplog.


Functions

createLog (idstr, logname, logtype[, overwrite[, maxLen]])
Creates a shiplog for this mission. ( idstr, logname, logtype, overwrite, maxLen )

Parameters:

  • idstr string ID string to identify this log, or empty string for unnamed logsets.
  • logname string Name for this log.
  • logtype string Type of log (e.g travel, trade, etc, can be anything).
  • overwrite boolean Whether to remove previous entries of this logname and type (default false). (optional)
  • maxLen number Maximum length of the log (zero or nil for infinite) - if greater than this length, new entries appended will result in old entries being removed. (optional)

Usage:

  • shiplog.createLog("MyLog", "My mission title", "Mission type") -- Creates log "MyLog" without erasing anything
  • shiplog.createLog("MyOtherLog", "Any title","Anything can be a type", true, 10) -- Erases any existing MyOtherLog entries and sets a limit of 10 entries
appendLog (idstr, message)
Appends to the shiplog. ( idstr, message )

Parameters:

  • idstr string ID string of the log to append to.
  • message string Message to append to the log.

Usage:

    shiplog.appendLog("MyLog", "Some message here")
generated by LDoc 1.4.6 Last updated 2020-11-29 21:27:05