I have two lockers, locker A and locker B.
Each locker has an interior space, plus a label on the exterior. Because I want to refer both to the label on the locker and the shelf in the locker, I have defined remapIn and remapOn subcomponents for each locker.
Works find, I can read the label on the locker and take the space helmet out of the locker.
But there is a vocab glitch.
The name of the objects are locker A and locker B. According to the documentation, I can suppress the leading the from game-generated text by preceding the name with an empty parenthesis pair, as i locker A[/i].
This works when I remove the remapping components from a locker object, but when the subcomponents are included, the game refers to them as the locker A/B instead of just locker A/B.
Here’s the game output with the subcomponents removed from locker A but present in locker B…
Here’s the code…
#charset "us-ascii"
#include <tads.h>
#include "advlite.h"
versionInfo: GameID
IFID = '445C38A3-AD1B-4729-957A-F584600DE5C1'
name = 'test'
byline = 'by Jerry Ford'
htmlByline = 'by <a href="mailto:jerry.o.ford@gmail.com">
Jerry Ford</a>'
version = '1'
authorEmail = 'Jerry Ford <jerry.o.ford@gmail.com>'
desc = 'Testing three person conversation.'
htmlDesc = 'Testing three person conversation.'
;
gameMain: GameMainDef
initialPlayerChar = me
paraBrksBtwnSubcontents = nil
;
me: Actor 'me' @lockerRoom
"The main man.<.p>"
isHim = true
person = 2
;
saturnExplorer: Actor 'Saturn explorer'
isHim = true
person = 3
firstName = 'John'
lastName = 'Smith'
;
otherSaturnExplorer: Actor 'other Saturn explorer'
isHim = true
person = 3
firstName = 'Jack'
lastName = 'Sprat'
;
lockerRoom: Room 'locker room'
"The locker room, the room where the lockers are. <.p>"
;
+ cmdrLocker: Thing, Fixture '() locker A;;locker'
"Locker A is one of two lockers on either side of the landing module entry
hatch. Just below the large red <b>A</b> painted on the front door panel,
there is a label with smaller lettering. <.p>"
;
+ majorLocker: Thing, Fixture '() locker B;;locker'
"Locker B is one of two lockers on either side of the landing module entry
hatch. Just below the large red <b>B</b> painted on the front door panel,
there is a label with smaller lettering. <.p>"
remapIn: SubComponent
{
isOpenable = true
dobjFor(Open)
{
action()
{
inherited;
// if(majorSpaceHelmet.isIn(topShelfLockerB))
"A space helmet rests on a shelf. <.p>";
}
}
}
remapOn: SubComponent { }
;
++ majorLockerLabel: Thing, Fixture '() label B;;label'
"The label is yellow with black lettering. <.p>"
isListed = nil
isReadable = true
readDesc = "<center>
<font size=+2 color=red bgcolor=white>B</font>
<table>
<tr><td bgcolor=yellow align=center><font color=black>MAJOR
<<otherSaturnExplorer.lastName>>\bUSAF</font></td></tr>
</table>
</center>"
subLocation = &remapOn
;
How can I fix this?
Jerry