Naev

Module shiplog

Bindings for adding log entries to the ship log.

A typical example would be:

 shiplog.create( "idstring", "log name", "log type", 0, 0 )
 shiplog.append( "idstring", "message to append to log" )
 

Functions

create (idstr, logname, logtype[, overwrite=false[, maxLen=0]]) Creates a shiplog for this mission.
append (idstr, message) Appends to the shiplog.


Functions

create (idstr, logname, logtype[, overwrite=false[, maxLen=0]])
Creates a shiplog for this mission.

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)
  • maxLen number Maximum length of the log (zero for infinite) - if greater than this length, new entries appended will result in old entries being removed. (default 0)

Usage:

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

Parameters:

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

Returns:

    boolean true on success.

Usage:

    shiplog.append("MyLog", "Some message here")
    
generated by LDoc 1.5.0 Last updated 2024-12-21 08:10:17