Commit Graph

52 Commits

Author SHA1 Message Date
Bryan Hoyle
951a396e60 Added autorun option to tpt.getscript() 2011-08-25 11:14:27 -04:00
Simon Robertshaw
e9331794bd Improvements to getscript 2011-08-25 12:20:00 +01:00
Bryan Hoyle
80e10460b8 Use HTTP instead of sockets 2011-08-24 13:09:21 -04:00
Bryan Hoyle
309ec4b07a Small ui for confirming script download as to make script downloads within scripts noticable 2011-08-24 11:44:16 -04:00
Bryan Hoyle
e120c9853f Changing server address for script repository 2011-08-24 11:06:51 -04:00
Bryan Hoyle
578144c48a Merge remote branch 'origin/master' 2011-08-23 20:29:26 -04:00
Bryan Hoyle
f577c319db Working tpt.getscriptid(<string: id>). Retrieves and runs a script from online 2011-08-23 20:28:55 -04:00
Simon Robertshaw
9bec43c45b Stray bracket, not cat+keyboard 2011-08-22 21:25:21 +01:00
Simon Robertshaw
42938cc2ea Lua keyevents bug, int keycode is cast to a char 2011-08-22 21:22:21 +01:00
jacksonmj
75cb924bd9 Fix electrode when in replace mode or specific delete mode
Also fix bomb when SLALT != 0
2011-08-22 01:02:02 +01:00
Simon Robertshaw
99b67598aa Changes to unify mouse and keyboard events for Lua 2011-08-20 18:18:09 +01:00
Bryan Hoyle
ad09f3040e Revert "Revert "added lua command: tpt.setfpscap(int FPSCap)""
This reverts commit a5db1d53da.
2011-08-16 12:45:44 -04:00
Bryan Hoyle
a5db1d53da Revert "added lua command: tpt.setfpscap(int FPSCap)"
This reverts commit aa56eca5c0.
2011-08-16 12:43:50 -04:00
Bryan Hoyle
aa56eca5c0 added lua command: tpt.setfpscap(int FPSCap) 2011-08-15 21:44:37 -04:00
Simon Robertshaw
d5435c50a9 Debug info for particles allocation 2011-08-11 20:12:52 +01:00
Simon Robertshaw
4f8720eecc OS X doesn't like the 'd' suffix 2011-08-11 17:10:38 +01:00
Simon Robertshaw
9e634b95cc Fire intensity from Lua 2011-08-11 13:02:00 +01:00
jacksonmj
39e1ffe5bf 0 is a valid menu number (walls) 2011-08-06 18:13:22 +08:00
cracker64
83e4f885da Added tmp2 for tpt.get_property and tpt.set_property 2011-08-06 00:16:30 -03:00
Simon Robertshaw
4ebe56f65c Mouse and keyboard events, replace luaL_openlib() with luaL_register() and move mousex and mousey out of the global table and into the 'tpt' table 2011-08-05 14:54:24 +01:00
Simon Robertshaw
98b6c4b001 Revert "allowed secret menu via lua"
This reverts commit 6c8d62389c.
2011-08-04 16:38:07 +01:00
me4502
6c8d62389c allowed secret menu via lua 2011-08-04 14:09:24 +10:00
Simon Robertshaw
ac2912f2d2 Ensure menu ID is valid for active_menu 2011-08-01 11:52:01 +02:00
Simon Robertshaw
8dfa09bf6a Edited src/luaconsole.c via GitHub 2011-08-01 10:59:33 +02:00
Simon Robertshaw
500cfc3746 Lua has a garbage collector, it may dispose of strings while we're using them, make throw_error a little more safe 2011-07-31 12:26:51 +01:00
Bryan Hoyle
d7a55f1f50 me4502 added tpt.throw_error and tpt.heat as lua commands 2011-07-30 20:31:34 -04:00
jacksonmj
7ed0255f04 Disable old life elements 2011-07-24 20:07:15 +08:00
cracker64
c5a8138dc9 Fix new luaconsole functions. 2011-07-22 06:51:29 -07:00
cracker64
f064227b7a me4502 luaconsole functions, edited from github. 2011-07-22 06:47:43 -07:00
jacksonmj
80fd7edd7f Some fixes for non-existent particles in Lua
Return 0 for get_property("type", ...) instead of erroring, to make checking for
particles easier. Also stop x coordinate being used as a particle index if
no particle exists at that location.
2011-07-04 00:11:43 +08:00
jacksonmj
34d76f8680 Check photon map in Lua functions, and allow any ctype
Also add some extra checks on ctype in the rest of the game
2011-06-25 15:59:30 +01:00
jacksonmj
c18009dd9c Check particle exists in tpt.set_property, and sdl_scale mouse coords for Lua step 2011-06-25 15:52:52 +01:00
ief015
be79233101 added functions to iterate through all particles
+ tpt.start_getPartIndex() --starts the iteration
+ bool tpt.next_getPartIndex() --increases the iteration, returns true if there are more particles to iterate through
+ int tpt.getPartIndex() --get the current iteration value
2011-06-25 01:32:54 -04:00
Simon Robertshaw
3ea25c83b7 message_box and input for Lua API, also autorun.lua 2011-06-08 16:30:36 +01:00
jacksonmj
b5856bfa47 console_error now optional for console_parse_type
Prevents lua step functions from clearing console_error in calls to
console_parse_type, hence preventing luacon_eval errors from being shown
2011-06-08 12:48:44 +01:00
jacksonmj
b3e0085606 Make step function registration work properly 2011-06-08 12:48:28 +01:00
jacksonmj
22b3ae9275 Fix tpt.get_name and limit tpt.log message length 2011-06-08 12:47:46 +01:00
jacksonmj
e182e7422c Loads of error messages for lua, and hopefully fix lua stack overflow
Also fix game exiting when an error occurs in a step function.

Returning -1 seems to prevent lua from restoring the stack to the
state it was in before the C function call - see bottom of
luaD_precall() in lua source (ldo.c)
2011-06-08 12:47:19 +01:00
Simon Robertshaw
fcb67622ff Added the ability to use legacy commands (prepend with a \!) 2011-06-04 14:43:18 +01:00
Simon Robertshaw
b850abe347 Fix setting of temp, x and y particle properties 2011-06-04 12:10:14 +01:00
Simon Robertshaw
3f072d9bc3 Better step function registration 2011-06-03 13:58:48 +01:00
Simon Robertshaw
a7330b9b26 tpt.set_property implementation 2011-06-02 18:49:31 +01:00
Simon Robertshaw
3d600c6955 Add gravity field manipulation to Lua api, move gravity processing to after the particle update (Means a delay of 1 frame, but we get the ability to manipulate the field with Lua) 2011-06-01 12:16:33 +01:00
Simon Robertshaw
2c8c4bc567 Pass mouse coordinates (mousex, mousey, mouseb, mousebq) and Lua click handling 2011-05-31 18:38:13 +01:00
Simon Robertshaw
2327d9678d implement create and delete functions 2011-05-31 17:07:38 +01:00
Simon Robertshaw
7a875dd846 Fix buffer overflow with huge error message 2011-05-31 00:05:01 +01:00
Simon Robertshaw
b0659e3dd1 Step code registration, just an example at the moment 2011-05-30 20:11:34 +01:00
Simon Robertshaw
d5f1a4cfd0 Many methods for Lua console 2011-05-30 19:44:17 +01:00
Simon Robertshaw
cad644824d Defaults for tpt.drawtext method 2011-05-30 18:25:02 +01:00
Simon Robertshaw
d8051926c8 More descriptive error messages for lua console 2011-05-30 18:15:56 +01:00