DEADSOFTWARE

made TRIGGER_SCRIPT work
[d2df-sdl.git] / src / game / g_scriptprocs.pas
1 (* Copyright (C) DooM 2D:Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *)
16 {$MODE DELPHI}
17 unit g_scriptprocs;
19 interface
21 uses
22 g_scripts;
24 function SP_Lua_ConPrint(L: PScriptContext): Integer; cdecl;
26 implementation
28 uses
29 <<<<<<< HEAD
30 lua, g_console;
31 =======
32 lua, lauxlib,
33 g_player, g_map, Math, g_gfx, g_game, g_textures,
34 g_console, g_monsters, g_items, g_phys, g_weapons,
35 g_main, SysUtils, e_log, g_language, g_basic,
36 g_options, g_net, g_netmsg, g_triggers, g_panel,
37 g_sound, MAPDEF;
39 function CheckArgs(L: PScriptContext; MinArgs: Integer; Error: Boolean = True): Boolean; inline;
40 begin
41 Result := True;
42 if lua_gettop(L) < MinArgs then
43 begin
44 if Error then g_Console_Add('SCRIPT: ERROR: expected at least ' + IntToStr(MinArgs) + ' argument(s)');
45 Result := False;
46 end;
47 end;
49 // system //
50 >>>>>>> 3132944... made TRIGGER_SCRIPT work
52 function SP_Lua_ConPrint(L: PScriptContext): Integer; cdecl;
53 begin
54 g_Console_Add(lua_tostring(L, -1));
55 Result := 0;
56 end;
58 end.