The problem I'm having is that I want the flow to go like this:
* 'U'se ROM
* Select item to identify from list
* Hit 'I' to identify it.
=> Be told what the object is.
* Hit 'L' to leave dockscreen and return to navigation screen.
What actually happens is this.
* 'U'se ROM
* Select item to identify from list
* Hit 'I' to identify it.
=> Be told what the object is.
* Select item to identify from list
* Hit 'I' to identify it.
=> Be told what the object is.
* Hit 'L' to leave dockscreen and return to navigation screen.
Anyway I think it must be a pretty simple mistake I've made, could someone take a look and drop me a hint?
Code: Select all
<!-- The dockscreen for the ROM user interface: -->
<DockScreen UNID="&dsUseJanes;"
name= "Ship's Cargo Hold"
type= "itemPicker"
backgroundID= "&rsItemListScreen;"
>
<ListOptions
dataFrom= "player"
list= "* -Alien -Illegal"
>
(scrSetListFilter gScreen (lambda (itm)
(not (isItemKnown itm))
))
</ListOptions>
<Panes>
<Default
desc= "What item do you wish to identify?">
<Actions>
<Action name="Identify this item" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="I">
(scrShowPane gScreen 'Done)
</Action>
<Action name="Cancel" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="C">
<Exit/>
</Action>
</Actions>
</Default>
<Done
noListNavigation="true"
>
<Initialize>
(block Nil
(setq itm (scrGetItem gScreen))
(itmSetKnown itm)
;Check if player has wasted his Jane's ROM.
(setq strKnown (if (itmIsKnown itm) ". But you already knew that!" "."))
; Identify the Jane's ROM
(itmSetKnown gItem)
; Remove Jane's ROM
(objRemoveItem gSource gItem 1)
; Display what you've found out.
(scrSetDesc gScreen
(cat "The ROM's database identifies it as " (itmGetName itm 4) strKnown)
)
)
</Initialize>
<Actions>
<Action name="Leave" cancel="1" key="L">
<Exit/>
</Action>
</Actions>
</Done>
</Panes>
</DockScreen>