Select Git revision
lua_maplib.c 68.30 KiB
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 2012-2016 by John "JTE" Muniz.
// Copyright (C) 2012-2023 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file lua_maplib.c
/// \brief game map library for Lua scripting
#include "doomdef.h"
#include "r_state.h"
#include "p_local.h"
#include "p_setup.h"
#include "z_zone.h"
#include "p_slopes.h"
#include "p_polyobj.h"
#include "r_main.h"
#include "lua_script.h"
#include "lua_libs.h"
#include "lua_hud.h" // hud_running errors
#include "lua_hook.h" // hook_cmd_running errors
#include "dehacked.h"
#include "fastcmp.h"
#include "doomstat.h"
enum sector_e {
sector_valid = 0,
sector_floorheight,
sector_ceilingheight,
sector_floorpic,
sector_floorxoffset,
sector_flooryoffset,
sector_floorangle,
sector_ceilingpic,
sector_ceilingxoffset,
sector_ceilingyoffset,
sector_ceilingangle,
sector_lightlevel,
sector_floorlightlevel,
sector_floorlightabsolute,
sector_floorlightsec,
sector_ceilinglightlevel,
sector_ceilinglightabsolute,
sector_ceilinglightsec,
sector_special,
sector_tag,
sector_taglist,
sector_thinglist,
sector_heightsec,
sector_camsec,
sector_lines,
sector_ffloors,
sector_fslope,
sector_cslope,
sector_flags,
sector_specialflags,
sector_damagetype,
sector_triggertag,
sector_triggerer,
sector_friction,
sector_gravity,
};
static const char *const sector_opt[] = {
"valid",