aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/lua
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-02 15:29:37 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-02 15:29:37 +0000
commit94e4421ad3a7615c7ce91beff95634c98b4edd49 (patch)
tree7bcebb5913b9eb02757a6acabaf6274d3d82a51b /Lua/src/lua
parentd2c6680bc0c2354b6c972402951b6118bf6843af (diff)
downloadusdx-94e4421ad3a7615c7ce91beff95634c98b4edd49.tar.gz
usdx-94e4421ad3a7615c7ce91beff95634c98b4edd49.tar.xz
usdx-94e4421ad3a7615c7ce91beff95634c98b4edd49.zip
Display.AbortScreenChange added (used in ScreenSing and ScreenPartyOptions)
some minor fixes in UParty, ULuaParty and ULuaUsdx adapting of UScreenPartyNewRound, UScreenPartyPlayer and UScreenPartyOption nearly finished git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1705 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Lua/src/lua')
-rw-r--r--Lua/src/lua/ULuaParty.pas13
-rw-r--r--Lua/src/lua/ULuaUsdx.pas4
2 files changed, 8 insertions, 9 deletions
diff --git a/Lua/src/lua/ULuaParty.pas b/Lua/src/lua/ULuaParty.pas
index f8becdd5..c102b2ac 100644
--- a/Lua/src/lua/ULuaParty.pas
+++ b/Lua/src/lua/ULuaParty.pas
@@ -66,12 +66,11 @@ function ULuaParty_GetTeams(L: Plua_State): Integer; cdecl;
function ULuaParty_SetTeams(L: Plua_State): Integer; cdecl;
const
- ULuaParty_Lib_f: array [0..4] of lual_reg = (
+ ULuaParty_Lib_f: array [0..3] of lual_reg = (
(name:'Register'; func:ULuaParty_Register),
(name:'GameFinished'; func:ULuaParty_GameFinished),
(name:'GetTeams'; func:ULuaParty_GetTeams),
- (name:'SetTeams'; func:ULuaParty_SetTeams),
- (name:nil; func:nil)
+ (name:'SetTeams'; func:ULuaParty_SetTeams)
);
implementation
@@ -107,8 +106,6 @@ begin
// pop value, so key is on top
lua_pop(L, 1);
end;
-
-
end;
{ Party.Register - register party mode at party manager
@@ -160,9 +157,9 @@ begin
else if (Key = 'canparty') and lua_isBoolean(L, -1) then
Info.CanParty := lua_toBoolean(L, -1)
else if (Key = 'playercount') and lua_isTable(L, -1) then
- Info.playercount := lua_toBinInt(L, -1)
+ Info.PlayerCount := lua_toBinInt(L, -1)
else if (Key = 'teamcount') and lua_isTable(L, -1) then
- Info.teamcount := lua_toBinInt(L, -1)
+ Info.TeamCount := lua_toBinInt(L, -1)
else if (Key = 'beforesongselect') and lua_isString(L, -1) then
Info.Functions.BeforeSongSelect := lua_toString(L, -1)
else if (Key = 'aftersongselect') and lua_isString(L, -1) then
@@ -182,7 +179,7 @@ begin
lua_pop(L, lua_gettop(L));
if not Party.RegisterMode(Info) then
- luaL_error(L, PChar('can''t register party mode at party manager in Party.Register'));
+ luaL_error(L, PChar('can''t register party mode at party manager in Party.Register. Is Info.Name defined or is there another mode with this name?'));
end;
{ Party.GameFinished - returns true if no party game is running or all rounds
diff --git a/Lua/src/lua/ULuaUsdx.pas b/Lua/src/lua/ULuaUsdx.pas
index 4bbb64ea..dbeb496e 100644
--- a/Lua/src/lua/ULuaUsdx.pas
+++ b/Lua/src/lua/ULuaUsdx.pas
@@ -38,7 +38,7 @@ uses ULua;
{ some basic lua c functions from usdx table }
{ Usdx.Time - returns sdl_time to have time numbers comparable with
- ultrastar delux ones. no arguments }
+ ultrastar deluxe ones. no arguments }
function ULuaUsdx_Time(L: Plua_State): Integer; cdecl;
{ Usdx.Version - returns Usdx version string (the same that US_Version
@@ -60,6 +60,8 @@ const
implementation
uses SDL, ULuaCore, UHookableEvent, UConfig;
+{ Usdx.Time - returns sdl_time to have time numbers comparable with
+ ultrastar deluxe ones. no arguments }
function ULuaUsdx_Time(L: Plua_State): Integer; cdecl;
var top: Integer;
begin