mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Added interactive actions example: cooking a steak
git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@2598 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -596,6 +596,7 @@ InteractiveAction =
|
|||||||
PICTURE_DELIVERY = 63, -- 2-tile Poster: 'Delivery'
|
PICTURE_DELIVERY = 63, -- 2-tile Poster: 'Delivery'
|
||||||
PICTURE_GENERALSTORE = 64, -- 2-tile Poster: 'General Store'
|
PICTURE_GENERALSTORE = 64, -- 2-tile Poster: 'General Store'
|
||||||
PICTURE_SHADYLADY = 65, -- 2-tile Poster: 'Shady Lady'
|
PICTURE_SHADYLADY = 65, -- 2-tile Poster: 'Shady Lady'
|
||||||
|
COOK_COWMEAT_TO_STEAK = 66, -- take cow meat from merc, add steak to merc
|
||||||
}
|
}
|
||||||
|
|
||||||
-- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
|
-- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
|
||||||
@@ -1745,6 +1746,23 @@ function HandleInteractiveActionResult(sSectorX, sSectorY, bSectorZ, sGridNo, bL
|
|||||||
|
|
||||||
DisplayPictureTactical("Interface\\shady_lady.png", 0)
|
DisplayPictureTactical("Interface\\shady_lady.png", 0)
|
||||||
|
|
||||||
|
elseif ( sLuaactionid == InteractiveAction.COOK_COWMEAT_TO_STEAK ) then
|
||||||
|
|
||||||
|
-- 1565 cow meat
|
||||||
|
-- 1559 Steak
|
||||||
|
|
||||||
|
if ( HasItemInInventory(ubID, 1565) ) then
|
||||||
|
|
||||||
|
CreateItemInvOrFloor(ubID, 1559)
|
||||||
|
|
||||||
|
DestroyOneItemInInventory(ubID, 1565)
|
||||||
|
|
||||||
|
PlaySound("Sounds\\cooking.wav")
|
||||||
|
|
||||||
|
SetScreenMsg(FontColour.FONT_MCOLOR_DKWHITE, "Cooked a steak.")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1178,6 +1178,15 @@
|
|||||||
<sActionType>6</sActionType>
|
<sActionType>6</sActionType>
|
||||||
<luaactionid>65</luaactionid>
|
<luaactionid>65</luaactionid>
|
||||||
</ACTION>
|
</ACTION>
|
||||||
|
|
||||||
|
<!-- oven -->
|
||||||
|
<ACTION>
|
||||||
|
<szTileSetName>furn_6.sti</szTileSetName>
|
||||||
|
<usTileIndex>22</usTileIndex>
|
||||||
|
<usTileIndex>23</usTileIndex>
|
||||||
|
<sActionType>6</sActionType>
|
||||||
|
<luaactionid>66</luaactionid>
|
||||||
|
</ACTION>
|
||||||
<!-- |||||||||||||||||||| VARIOUS |||||||||||||||||||| -->
|
<!-- |||||||||||||||||||| VARIOUS |||||||||||||||||||| -->
|
||||||
|
|
||||||
</INTERACTIVEACTIONS>
|
</INTERACTIVEACTIONS>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user