mirror of
https://github.com/1dot13/gamedir.git
synced 2026-08-05 14:00:28 +02:00
New minigame: Pong
git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@2353 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -411,6 +411,7 @@ ScreenTypes =
|
||||
MiniGames =
|
||||
{
|
||||
TETRIS = 0,
|
||||
PONG = 1,
|
||||
}
|
||||
|
||||
-- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
|
||||
@@ -498,6 +499,7 @@ ModSpecificActions =
|
||||
|
||||
-- |||||||||||||||||||||||||||||||||| minigames |||||||||||||||||||||||||||||||||||||
|
||||
MINIGAME_TETRIS = 50,
|
||||
MINIGAME_PONG = 51,
|
||||
-- |||||||||||||||||||||||||||||||||| minigames |||||||||||||||||||||||||||||||||||||
|
||||
}
|
||||
|
||||
@@ -1469,6 +1471,15 @@ function HandleInteractiveActionResult(sSectorX, sSectorY, bSectorZ, sGridNo, bL
|
||||
SetMiniGameType(MiniGames.TETRIS)
|
||||
SetPendingNewScreen(ScreenTypes.MINIGAME)
|
||||
|
||||
end
|
||||
elseif ( sLuaactionid == ModSpecificActions.MINIGAME_PONG ) then
|
||||
|
||||
-- playing a game costs $1
|
||||
if ( SoldierSpendMoney(ubID, 1) == 1 ) then
|
||||
|
||||
SetMiniGameType(MiniGames.PONG)
|
||||
SetPendingNewScreen(ScreenTypes.MINIGAME)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user