aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/base/UParty.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-04 07:29:52 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-04 07:29:52 +0000
commit14e96597c65a2402ee4ddc068ff08c7659123a1d (patch)
treeebefcbd5ec72570f68bb7b043365b3d6fb93dd6b /Lua/src/base/UParty.pas
parent2449e4a979c23addcc9110a4dc876d9acd761005 (diff)
downloadusdx-14e96597c65a2402ee4ddc068ff08c7659123a1d.tar.gz
usdx-14e96597c65a2402ee4ddc068ff08c7659123a1d.tar.xz
usdx-14e96597c65a2402ee4ddc068ff08c7659123a1d.zip
old lua test stuff by hawkear removed or commented
new function: Party.SetWinner sets winner of current round new unit ULuaUtils w/ some functions that are or may become useful moved Lua_ClearStack and Lua_ToBinInt to ULuaUtils added first hooks (have a look at hooks.txt in game/plugins until documentation is finished) lua module for TextGl written and finished lua testfile (game/scripts/main.lua) ported to new interface, see game/plugins/LuaTest.usdx git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1709 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Lua/src/base/UParty.pas')
-rw-r--r--Lua/src/base/UParty.pas23
1 files changed, 21 insertions, 2 deletions
diff --git a/Lua/src/base/UParty.pas b/Lua/src/base/UParty.pas
index 0be7cf61..1566e4e8 100644
--- a/Lua/src/base/UParty.pas
+++ b/Lua/src/base/UParty.pas
@@ -153,6 +153,10 @@ type
function StartGame(Rounds: ARounds): Boolean;
+ { sets the winner(s) of current round
+ returns true on success }
+ function SetWinner(WinBin: Integer): Boolean;
+
{ increases round counter by 1 and clears all round specific information;
returns the number of the current round or -1 if last round has already
been played }
@@ -531,6 +535,18 @@ begin
end;
end;
+{ sets the winner(s) of current round
+ returns true on success }
+function TPartyGame.SetWinner(WinBin: Integer): Boolean;
+begin
+ if (bPartyStarted) and (CurRound >= 0) and (CurRound <= High(Rounds)) then
+ begin
+ Rounds[CurRound].Winner := WinBin;
+ end
+ else
+ Result := false;
+end;
+
{ increases round counter by 1 and clears all round specific information;
returns the number of the current round or -1 if last round has already
been played }
@@ -674,8 +690,11 @@ begin
if (CallLua(Parent, Functions.AfterSing)) then
begin // execute default function:
- // display party score screen
- Display.FadeTo(@ScreenPartyScore);
+ if (bPartyGame) then
+ // display party score screen
+ Display.FadeTo(@ScreenPartyScore)
+ else //display standard score screen
+ Display.FadeTo(@ScreenScore);
end;
end;
end;