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:
Flugente
2017-01-04 19:30:46 +00:00
parent 71eb36b662
commit 7aaab52e4b
3 changed files with 20 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

+11
View File
@@ -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
@@ -1004,6 +1004,15 @@
<sActionType>5</sActionType>
<luaactionid>50</luaactionid>
</ACTION>
<!-- one-armed bandit -->
<ACTION>
<szTileSetName>lawless.sti</szTileSetName>
<usTileIndex>1</usTileIndex>
<usTileIndex>2</usTileIndex>
<sActionType>5</sActionType>
<luaactionid>51</luaactionid>
</ACTION>
<!-- |||||||||||||||||||| MINIGAME |||||||||||||||||||| -->
</INTERACTIVEACTIONS>