Return to graphics mode when using an item (like TNT) per Seth's request.

This commit is contained in:
Martin Haye 2016-11-04 08:27:22 -07:00
parent b556041713
commit 99606c623c
2 changed files with 10 additions and 4 deletions

View File

@ -1920,8 +1920,13 @@ end
///////////////////////////////////////////////////////////////////////////////////////////////////
// Load the Party engine and show data for the given player
def showPlayerSheet(num)
loadEngine(MODULE_PARTY)=>party_showPlayerSheet(num)
word pItemToUse
pItemToUse = loadEngine(MODULE_PARTY)=>party_showPlayerSheet(num)
returnFromEngine()
// General 'use' handled here in case it triggers graphical effects
if pItemToUse
scriptEvent(@S_USE, pItemToUse=>s_name)
fin
end
def showPlayer1()

View File

@ -277,7 +277,8 @@ def addItem(player)
return
end
// Show player sheet and accept command
// Show player sheet and accept command. If using an item (not just for stats gain)
// the item is returned; else NULL is returned.
def _party_doPlayerSheet(num)
word player, item
word hMap, vMap, i_rows
@ -327,9 +328,9 @@ def _party_doPlayerSheet(num)
removeFromList(@player=>p_items, item)
fin
fin
else
return item // general 'use' handled by outer engine, because it might involve graphics
fin
scriptEvent(@S_USE, item=>s_name)
return // per Seth's request, once an item is used, exit inventory screen.
fin
else
beep