naev 0.11.5
nlua_spob.c File Reference

Lua spob module. More...

#include "nlua_spob.h"
#include "array.h"
#include "land.h"
#include "land_outfits.h"
#include "log.h"
#include "map.h"
#include "map_overlay.h"
#include "nlua_colour.h"
#include "nlua_commodity.h"
#include "nlua_faction.h"
#include "nlua_outfit.h"
#include "nlua_ship.h"
#include "nlua_system.h"
#include "nlua_tex.h"
#include "nlua_time.h"
#include "nlua_vec2.h"
#include "nluadef.h"
#include "nmath.h"
#include "nstring.h"
#include "rng.h"

Go to the source code of this file.

Functions

static int spobL_cur (lua_State *L)
 Gets the current spob - MUST BE LANDED.
 
static int spobL_get (lua_State *L)
 Gets a spob.
 
static int spobL_getS (lua_State *L)
 Gets a spob and its corresponding system.
 
static int spobL_getLandable (lua_State *L)
 Gets a spob only if it's landable.
 
static int spobL_getAll (lua_State *L)
 Gets all the spobs. Lua function parameter: boolean all_spob Whether or not to get all Spob, including those that may not be located in a system at the time. Lua return parameter: {Spob,...} An ordered list of all the spobs.
 
static int spobL_system (lua_State *L)
 Gets the system corresponding to a spob. Lua function parameter: Spob p Spob to get system of. Lua return parameter: System|nil The system to which the spob belongs or nil if it has none.
 
static int spobL_eq (lua_State *L)
 You can use the '==' operator within Lua to compare spobs with this.
 
static int spobL_name (lua_State *L)
 Gets the spob's translated name.
 
static int spobL_nameRaw (lua_State *L)
 Gets the spob's raw (untranslated) name.
 
static int spobL_population (lua_State *L)
 Gets the spob's population.
 
static int spobL_radius (lua_State *L)
 Gets the spob's radius.
 
static int spobL_faction (lua_State *L)
 Gets the spob's faction.
 
static int spobL_colour (lua_State *L)
 Gets a spob's colour based on its friendliness or hostility to the player.
 
static int spobL_colourChar (lua_State *L)
 Gets a spob's colour based on its friendliness or hostility to the player.
 
static int spobL_class (lua_State *L)
 Gets the spob's class.
 
static int spobL_classLong (lua_State *L)
 Gets the spob's class in long human-readable format already translated.
 
static int spobL_position (lua_State *L)
 Gets the position of the spob in the system.
 
static int spobL_services (lua_State *L)
 Checks for spob services.
 
static int spobL_flags (lua_State *L)
 Checks for spob flags.
 
static int spobL_canland (lua_State *L)
 Gets whether or not the player can land on the spob (or bribe it).
 
static int spobL_landAllow (lua_State *L)
 Allows the player land on a spob no matter what. The override lasts until the player jumps or lands.
 
static int spobL_landDeny (lua_State *L)
 Disallows a player from landing on a spob. The override lasts until the player jumps or lands.
 
static int spobL_getLandAllow (lua_State *L)
 Gets the land allow override status for a spob.
 
static int spobL_getLandDeny (lua_State *L)
 Gets the land deny override status for a spob.
 
static int spobL_gfxSpace (lua_State *L)
 Gets the texture of the spob in space.
 
static int spobL_gfxExterior (lua_State *L)
 Gets the texture of the spob in exterior.
 
static int spobL_gfxExteriorPath (lua_State *L)
 Gets the path of the spob in exterior.
 
static int spobL_gfxComm (lua_State *L)
 Gets the texture of the spob for the communication window.
 
static int spobL_shipsSold (lua_State *L)
 Gets the ships sold at a spob.
 
static int spobL_outfitsSold (lua_State *L)
 Gets the outfits sold at a spob.
 
static int spobL_commoditiesSold (lua_State *L)
 Gets the commodities sold at a spob.
 
static int spobL_isBlackMarket (lua_State *L)
 Checks to see if a spob is a black market.
 
static int spobL_isKnown (lua_State *L)
 Checks to see if a spob is known by the player.
 
static int spobL_setKnown (lua_State *L)
 Sets a spobs's known state.
 
static int spobL_recordCommodityPriceAtTime (lua_State *L)
 Records commodity prices at a given time, adding to players stats.
 
static int spobL_tags (lua_State *L)
 Gets the spob tags.
 
int nlua_loadSpob (nlua_env env)
 Loads the spob library.
 
LuaSpob lua_tospob (lua_State *L, int ind)
 This module allows you to handle the spobs from Lua.
 
LuaSpob luaL_checkspob (lua_State *L, int ind)
 Gets spob at index raising an error if isn't a spob.
 
SpobluaL_validspob (lua_State *L, int ind)
 Gets a spob directly.
 
LuaSpob * lua_pushspob (lua_State *L, LuaSpob spob)
 Pushes a spob on the stack.
 
int lua_isspob (lua_State *L, int ind)
 Checks to see if ind is a spob.
 
static int spobL_getBackend (lua_State *L, int system, int landable)
 
static int landAllowDeny (lua_State *L, int allowdeny)
 

Variables

static const luaL_Reg spob_methods []
 

Detailed Description

Lua spob module.

Definition in file nlua_spob.c.

Function Documentation

◆ landAllowDeny()

static int landAllowDeny ( lua_State * L,
int allowdeny )
static

Definition at line 722 of file nlua_spob.c.

◆ lua_isspob()

int lua_isspob ( lua_State * L,
int ind )

Checks to see if ind is a spob.

Parameters
LLua state to check.
indIndex position to check.
Returns
1 if ind is a spob.

Definition at line 216 of file nlua_spob.c.

◆ lua_pushspob()

LuaSpob * lua_pushspob ( lua_State * L,
LuaSpob spob )

Pushes a spob on the stack.

Parameters
LLua state to push spob into.
spobSpob to push.
Returns
Newly pushed spob.

Definition at line 201 of file nlua_spob.c.

◆ lua_tospob()

LuaSpob lua_tospob ( lua_State * L,
int ind )

This module allows you to handle the spobs from Lua.

Generally you do something like:

p,s = spob.get() -- Get current spob and system
if p:services()["inhabited"] > 0 then -- spob is inhabited
v = p:pos() -- Get the position
-- Do other stuff
end

Lua module: spob

Gets spob at index.

Parameters
LLua state to get spob from.
indIndex position to find the spob.
Returns
Spob found at the index in the state.

Definition at line 149 of file nlua_spob.c.

◆ luaL_checkspob()

LuaSpob luaL_checkspob ( lua_State * L,
int ind )

Gets spob at index raising an error if isn't a spob.

Parameters
LLua state to get spob from.
indIndex position to find the spob.
Returns
Spob found at the index in the state.

Definition at line 160 of file nlua_spob.c.

◆ luaL_validspob()

Spob * luaL_validspob ( lua_State * L,
int ind )

Gets a spob directly.

Parameters
LLua state to get spob from.
indIndex position to find the spob.
Returns
Spob found at the index in the state.

Definition at line 174 of file nlua_spob.c.

◆ nlua_loadSpob()

int nlua_loadSpob ( nlua_env env)

Loads the spob library.

Parameters
envEnvironment to load spob library into.
Returns
0 on success.

Definition at line 121 of file nlua_spob.c.

◆ spobL_canland()

static int spobL_canland ( lua_State * L)
static

Gets whether or not the player can land on the spob (or bribe it).

Lua usage parameter: can_land, can_bribe = p:canLand() Lua function parameter: Spob p Spob to get land and bribe status of. Lua return parameter: boolean The land status of the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: canLand

Definition at line 714 of file nlua_spob.c.

◆ spobL_class()

static int spobL_class ( lua_State * L)
static

Gets the spob's class.

Usually classes are characters for spobs and numbers for stations.

Lua usage parameter: c = p:class() Lua function parameter: Spob p Spob to get the class of. Lua return parameter: string The class of the spob in a one char identifier.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: class

Definition at line 620 of file nlua_spob.c.

◆ spobL_classLong()

static int spobL_classLong ( lua_State * L)
static

Gets the spob's class in long human-readable format already translated.

Lua usage parameter: c = p:classLong() Lua function parameter: Spob p Spob to get the class of. Lua return parameter: string The class of the spob in descriptive form such as "Pelagic".

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: classLong

Definition at line 635 of file nlua_spob.c.

◆ spobL_colour()

static int spobL_colour ( lua_State * L)
static

Gets a spob's colour based on its friendliness or hostility to the player.

Lua usage parameter: col = p:colour()

Lua function parameter: Spob spb Spob to get the colour of. Lua return parameter: Colour The spob's colour.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: colour

Definition at line 582 of file nlua_spob.c.

◆ spobL_colourChar()

static int spobL_colourChar ( lua_State * L)
static

Gets a spob's colour based on its friendliness or hostility to the player.

Lua usage parameter: col = p:colourChar()

Lua function parameter: Spob spb Spob to get the colour of. Lua return parameter: string The spob's colour character for use with special printing sequences..

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: colourChar

Definition at line 599 of file nlua_spob.c.

◆ spobL_commoditiesSold()

static int spobL_commoditiesSold ( lua_State * L)
static

Gets the commodities sold at a spob.

Lua function parameter: Pilot p Spob to get commodities sold at. Lua return parameter: {Commodity,...} An ordered table containing all the commodities sold (empty if none sold).

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: commoditiesSold

Definition at line 940 of file nlua_spob.c.

◆ spobL_cur()

static int spobL_cur ( lua_State * L)
static

Gets the current spob - MUST BE LANDED.

Lua usage parameter: p,s = spob.cur() – Gets current spob (assuming landed)

Lua return parameter: Spob The spob the player is landed on. Lua return parameter: System The system it is in.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: cur

Definition at line 241 of file nlua_spob.c.

◆ spobL_eq()

static int spobL_eq ( lua_State * L)
static

You can use the '==' operator within Lua to compare spobs with this.

Lua usage parameter: if p.__eq( spob.get( "Anecu" ) ) then – Do something Lua usage parameter: if p == spob.get( "Anecu" ) then – Do something Lua function parameter: Spob p Spob comparing. Lua function parameter: Spob comp spob to compare against. Lua return parameter: boolean true if both spobs are the same.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: __eq

Definition at line 473 of file nlua_spob.c.

◆ spobL_faction()

static int spobL_faction ( lua_State * L)
static

Gets the spob's faction.

Lua usage parameter: f = p:faction() Lua function parameter: Spob p Spob to get the faction of. Lua return parameter: Faction The spob's faction, or nil if it has no faction.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: faction

Definition at line 564 of file nlua_spob.c.

◆ spobL_flags()

static int spobL_flags ( lua_State * L)
static

Checks for spob flags.

Possible services are:

  • "nomissionspawn"

Lua usage parameter: if p:flags()["nomissionspawn"] then – Spob doesn't spawn missions Lua function parameter: Spob p Spob to get the services of. Lua return parameter: table Table containing all the services.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: services

Definition at line 694 of file nlua_spob.c.

◆ spobL_get()

static int spobL_get ( lua_State * L)
static

Gets a spob.

Possible values of param:

  • bool : Gets a random spob.
  • faction : Gets random spob belonging to faction matching the number.
  • string : Gets the spob by raw (untranslated) name.
  • table : Gets random spob belonging to any of the factions in the table.

Lua usage parameter: p = spob.get( "Anecu" ) – Gets spob by name Lua usage parameter: p = spob.get( faction.get( "Empire" ) ) – Gets random Empire spob Lua usage parameter: p = spob.get(true) – Gets completely random spob Lua usage parameter: p = spob.get( { faction.get("Empire"), faction.get("Dvaered") } ) – Random spob belonging to Empire or Dvaered Lua function parameter: boolean|Faction|string|table param See description. Lua return parameter: Spob The matching spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: get

Definition at line 379 of file nlua_spob.c.

◆ spobL_getAll()

static int spobL_getAll ( lua_State * L)
static

Gets all the spobs. Lua function parameter: boolean all_spob Whether or not to get all Spob, including those that may not be located in a system at the time. Lua return parameter: {Spob,...} An ordered list of all the spobs.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: getAll

Definition at line 430 of file nlua_spob.c.

◆ spobL_getBackend()

static int spobL_getBackend ( lua_State * L,
int system,
int landable )
static

Definition at line 252 of file nlua_spob.c.

◆ spobL_getLandable()

static int spobL_getLandable ( lua_State * L)
static

Gets a spob only if it's landable.

It works exactly the same as spob.get(), but it can only return landable spobs. So if the target is not landable it returns nil.

Lua function parameter: boolean|Faction|string|table param See spob.get() description. Lua return parameter: Spob The matching spob, if it is landable. Lua return parameter: System The system it is in.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: getLandable

Definition at line 419 of file nlua_spob.c.

◆ spobL_getLandAllow()

static int spobL_getLandAllow ( lua_State * L)
static

Gets the land allow override status for a spob.

Lua usage parameter: if p:getLandAllow() then – Player can definitely land. Lua function parameter: Spob p Spob to check. Lua return parameter: b Whether or not the player is always allowed to land.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: getLandAllow

Definition at line 775 of file nlua_spob.c.

◆ spobL_getLandDeny()

static int spobL_getLandDeny ( lua_State * L)
static

Gets the land deny override status for a spob.

Lua usage parameter: if p:getLandDeny() then – Player can definitely not land Lua function parameter: Spob p Spob to check. Lua return parameter: b Whether or not the player is always disallowed to land.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: getLandDeny

Definition at line 790 of file nlua_spob.c.

◆ spobL_getS()

static int spobL_getS ( lua_State * L)
static

Gets a spob and its corresponding system.

Possible values of param:

  • bool : Gets a random spob.
  • faction : Gets random spob belonging to faction matching the number.
  • string : Gets the spob by raw (untranslated) name.
  • table : Gets random spob belonging to any of the factions in the table.

Lua usage parameter: p,s = spob.get( "Anecu" ) – Gets spob by name Lua usage parameter: p,s = spob.get( faction.get( "Empire" ) ) – Gets random Empire spob Lua usage parameter: p,s = spob.get(true) – Gets completely random spob Lua usage parameter: p,s = spob.get( { faction.get("Empire"), faction.get("Dvaered") } ) – Random spob belonging to Empire or Dvaered Lua function parameter: boolean|Faction|string|table param See description. Lua return parameter: Spob The matching spob. Lua return parameter: System The system it is in.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: getS

Definition at line 403 of file nlua_spob.c.

◆ spobL_gfxComm()

static int spobL_gfxComm ( lua_State * L)
static

Gets the texture of the spob for the communication window.

Lua usage parameter: gfx = p:gfxComm() Lua function parameter: Spob p Spob Spob to get texture of. Lua return parameter: Tex The communication texture of the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: gfxComm

Definition at line 878 of file nlua_spob.c.

◆ spobL_gfxExterior()

static int spobL_gfxExterior ( lua_State * L)
static

Gets the texture of the spob in exterior.

Lua usage parameter: gfx = p:gfxExterior() Lua function parameter: Spob p Spob Spob to get texture of. Lua return parameter: Tex The exterior texture of the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: gfxExterior

Definition at line 844 of file nlua_spob.c.

◆ spobL_gfxExteriorPath()

static int spobL_gfxExteriorPath ( lua_State * L)
static

Gets the path of the spob in exterior.

Lua function parameter: Spob p Spob Spob to get texture of. Lua return parameter: string The path to the exterior texture.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: gfxExteriorPath

Definition at line 863 of file nlua_spob.c.

◆ spobL_gfxSpace()

static int spobL_gfxSpace ( lua_State * L)
static

Gets the texture of the spob in space.

Lua usage parameter: gfx = p:gfxSpace() Lua function parameter: Spob p Spob to get texture of. Lua return parameter: Tex The space texture of the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: gfxSpace

Definition at line 820 of file nlua_spob.c.

◆ spobL_isBlackMarket()

static int spobL_isBlackMarket ( lua_State * L)
static

Checks to see if a spob is a black market.

Lua usage parameter: b = p:blackmarket()

Lua function parameter: Spob p Spob to check if it's a black market. Lua return parameter: boolean true if the spob is a black market.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: blackmarket

Definition at line 964 of file nlua_spob.c.

◆ spobL_isKnown()

static int spobL_isKnown ( lua_State * L)
static

Checks to see if a spob is known by the player.

Lua usage parameter: b = p:known()

Lua function parameter: Spob p Spob to check if the player knows. Lua return parameter: boolean true if the player knows the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: known

Definition at line 980 of file nlua_spob.c.

◆ spobL_landAllow()

static int spobL_landAllow ( lua_State * L)
static

Allows the player land on a spob no matter what. The override lasts until the player jumps or lands.

Lua usage parameter: p:landAllow( true ) – Player can land on spob p now. Lua function parameter: Spob p Spob to forcibly allow the player to land on. Lua function parameter:[opt=false] boolean b Whether or not the player should be allowed to land, true enables, false disables override. Lua function parameter:[opt=nil] string msg Message to give the player when allowing them to land. Setting a message will bypass any custom Lua, otherwise it'll default to using Lua and, in the case there is no Lua, a default message.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: landAllow

Definition at line 748 of file nlua_spob.c.

◆ spobL_landDeny()

static int spobL_landDeny ( lua_State * L)
static

Disallows a player from landing on a spob. The override lasts until the player jumps or lands.

Lua usage parameter: p:landDeny( true ) – Player can land on spob p now. Lua function parameter: Spob p Spob to forcibly disallow the player to land on. Lua function parameter:[opt=false] boolean b Whether or not the player should be disallowed to land, true disables, false disables override. Lua function parameter:[opt=nil] string msg Message to give the player when disallowing them to land. Setting a message will bypass any custom Lua, otherwise it'll default to using Lua and, in the case there is no Lua, a default message.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: landDeny

Definition at line 762 of file nlua_spob.c.

◆ spobL_name()

static int spobL_name ( lua_State * L)
static

Gets the spob's translated name.

This translated name should be used for display purposes (e.g. messages). It cannot be used as an identifier for the spob; for that, use spob.nameRaw() instead.

Note that it can be overwritten by the spob's display name which makes it not equivalent to _(p:nameRaw()) in some cases.

Lua usage parameter: name = p:name() Lua function parameter: Spob p Spob to get the translated name of. Lua return parameter: string The translated name of the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: name

See also
nameRaw

Definition at line 498 of file nlua_spob.c.

◆ spobL_nameRaw()

static int spobL_nameRaw ( lua_State * L)
static

Gets the spob's raw (untranslated) name.

This untranslated name should be used for identification purposes (e.g. can be passed to spob.get()). It should not be used directly for display purposes without manually translating it with _().

Lua usage parameter: name = p:nameRaw() Lua function parameter: Spob p Spob to get the raw name of. Lua return parameter: string The raw name of the spob.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: nameRaw

Definition at line 517 of file nlua_spob.c.

◆ spobL_outfitsSold()

static int spobL_outfitsSold ( lua_State * L)
static

Gets the outfits sold at a spob.

Lua function parameter: Spob p Spob to get outfits sold at. Lua return parameter: {Outfit,...} An ordered table containing all the outfits sold (empty if none sold).

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: outfitsSold

Definition at line 917 of file nlua_spob.c.

◆ spobL_population()

static int spobL_population ( lua_State * L)
static

Gets the spob's population.

Lua function parameter: Spob p Spob to get the population of. Lua return parameter: number The spob's population.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: population

Definition at line 531 of file nlua_spob.c.

◆ spobL_position()

static int spobL_position ( lua_State * L)
static

Gets the position of the spob in the system.

Lua usage parameter: v = p:pos() Lua function parameter: Spob p Spob to get the position of. Lua return parameter: Vec2 The position of the spob in the system.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: pos

Definition at line 805 of file nlua_spob.c.

◆ spobL_radius()

static int spobL_radius ( lua_State * L)
static

Gets the spob's radius.

Lua usage parameter: radius = p:radius() Lua function parameter: Spob p Spob to get the radius of. Lua return parameter: number The spob's graphics radius.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: radius

Definition at line 546 of file nlua_spob.c.

◆ spobL_recordCommodityPriceAtTime()

static int spobL_recordCommodityPriceAtTime ( lua_State * L)
static

Records commodity prices at a given time, adding to players stats.

Lua usage parameter: p:recordCommodityPriceAtTime( t ) Lua function parameter: Spob p Spob to record prices at Lua function parameter: ntime_t t Time at which to record prices.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: recordCommodityPriceAtTime

Definition at line 1024 of file nlua_spob.c.

◆ spobL_services()

static int spobL_services ( lua_State * L)
static

Checks for spob services.

Possible services are:

  • "land"
  • "inhabited"
  • "refuel"
  • "bar"
  • "missions"
  • "commodity"
  • "outfits"
  • "shipyard"
  • "blackmarket"

Lua usage parameter: if p:services()["refuel"] then – Spob has refuel service. Lua usage parameter: if p:services()["shipyard"] then – Spob has shipyard service. Lua function parameter: Spob p Spob to get the services of. Lua return parameter: table Table containing all the services.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: services

Definition at line 662 of file nlua_spob.c.

◆ spobL_setKnown()

static int spobL_setKnown ( lua_State * L)
static

Sets a spobs's known state.

Lua usage parameter: p:setKnown( false ) – Makes spob unknown. Lua function parameter: Spob p Spob to set known. Lua function parameter:[opt=false] boolean b Whether or not to set as known.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: setKnown

Definition at line 995 of file nlua_spob.c.

◆ spobL_shipsSold()

static int spobL_shipsSold ( lua_State * L)
static

Gets the ships sold at a spob.

Lua function parameter: Spob p Spob to get ships sold at. Lua return parameter: {Ship,...} An ordered table containing all the ships sold (empty if none sold).

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: shipsSold

Definition at line 894 of file nlua_spob.c.

◆ spobL_system()

static int spobL_system ( lua_State * L)
static

Gets the system corresponding to a spob. Lua function parameter: Spob p Spob to get system of. Lua return parameter: System|nil The system to which the spob belongs or nil if it has none.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: system

Definition at line 451 of file nlua_spob.c.

◆ spobL_tags()

static int spobL_tags ( lua_State * L)
static

Gets the spob tags.

Lua usage parameter: if spob.cur():tags["fancy"] then – Has "fancy" tag

Lua function parameter: Spob p Spob to get tags of. Lua return parameter: table Table of tags where the name is the key and true is the value.

Parameters
LLua State
Returns
Number of variables on the Lua State stack.

Lua function: tags

Definition at line 1041 of file nlua_spob.c.

Variable Documentation

◆ spob_methods

const luaL_Reg spob_methods[]
static

Spob metatable methods.

Definition at line 74 of file nlua_spob.c.