#include <lua/LUAS3DWeaponLib.h>#include <lua/LUAScript.h>#include <lua/LUAUtil.h>#include <weapons/AccessoryStore.h>#include <actions/Explosion.h>#include <actions/ExplosionParams.h>#include <actions/Napalm.h>#include <actions/Laser.h>#include <engine/ActionController.h>#include <common/Logger.h>#include "lua.h"#include "lauxlib.h"#include "lualib.h"Go to the source code of this file.
Defines | |
| #define | LUA_LIB |
Functions | |
| static LUAScript * | getScript (lua_State *L) |
| static int | s3d_random (lua_State *L) |
| static int | s3d_fire_weapon (lua_State *L) |
| static int | s3d_explosion (lua_State *L) |
| static int | s3d_napalm (lua_State *L) |
| static int | s3d_laser (lua_State *L) |
| LUALIB_API int | luaopen_s3dweapon (lua_State *L) |
Variables | |
| static const luaL_Reg | s3dweaponlib [] |
| #define LUA_LIB |
Definition at line 32 of file LUAS3DWeaponLib.cpp.
Definition at line 39 of file LUAS3DWeaponLib.cpp.
References DIALOG_ASSERT, lua_getglobal, lua_isnil, lua_pop, and lua_touserdata().
| LUALIB_API int luaopen_s3dweapon | ( | lua_State * | L | ) |
| static int s3d_explosion | ( | lua_State * | L | ) | [static] |
Definition at line 90 of file LUAS3DWeaponLib.cpp.
References ActionController::addAction(), ScorchedContext::getActionController(), LUAScript::getContext(), getScript(), LUAUtil::getVectorFromStack(), LUAScript::getWeapon(), int(), luaL_checknumber(), and ExplosionParams::parseLUA().
| static int s3d_fire_weapon | ( | lua_State * | L | ) | [static] |
Definition at line 58 of file LUAS3DWeaponLib.cpp.
References AccessoryPart::AccessoryWeapon, AccessoryStore::findByPrimaryAccessoryName(), Weapon::fireWeapon(), S3D::formatStringBuffer(), ScorchedContext::getAccessoryStore(), Accessory::getAction(), LUAScript::getContext(), getScript(), AccessoryPart::getType(), LUAUtil::getVectorFromStack(), Logger::log(), luaL_checknumber(), and luaL_checkstring.
| static int s3d_laser | ( | lua_State * | L | ) | [static] |
Definition at line 125 of file LUAS3DWeaponLib.cpp.
References ActionController::addAction(), ScorchedContext::getActionController(), LUAScript::getContext(), getScript(), LUAUtil::getVectorFromStack(), LUAScript::getWeapon(), int(), luaL_checknumber(), and LaserParams::parseLUA().
| static int s3d_napalm | ( | lua_State * | L | ) | [static] |
Definition at line 107 of file LUAS3DWeaponLib.cpp.
References ActionController::addAction(), ScorchedContext::getActionController(), LUAScript::getContext(), getScript(), LUAUtil::getVectorFromStack(), LUAScript::getWeapon(), int(), luaL_checknumber(), and NapalmParams::parseLUA().
| static int s3d_random | ( | lua_State * | L | ) | [static] |
Definition at line 48 of file LUAS3DWeaponLib.cpp.
References LUAScript::getContext(), fixed::getInternal(), getScript(), and lua_pushnumber().
const luaL_Reg s3dweaponlib[] [static] |
Initial value:
{
{"fire_weapon", s3d_fire_weapon},
{"explosion", s3d_explosion},
{"napalm", s3d_napalm},
{"laser", s3d_laser},
{"random", s3d_random},
{NULL, NULL}
}
Definition at line 145 of file LUAS3DWeaponLib.cpp.
1.5.3