I have a widget and a socket. The socket is a container, the widget is a thing.
I can put the widget into the socket and all is well. but push into instead of put does not work…
I’ve read the discussion of push-travel actions in the Adv3Lite Manual…
file:////lib/adv3Lite/docs/manual/thing.htm#pushing
…and tried implementing describePushTravel(Into) and describeMovePushable(connector, dest), even dobjFor(PushIn) asDobjFor(PutIn) on the widget object, but nothing works.
Here’s sample game window output…
…and the code that produced it…
#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 push into.'
htmlDesc = 'Testing push into.'
;
gameMain: GameMainDef
initialPlayerChar = me
paraBrksBtwnSubcontents = nil
;
me: Actor 'me' @room
"The main man.<.p>"
isHim = true
person = 2
;
room: Room 'room'
"In the room, there is a widget that fits into a socket in the wall.<.p>"
;
+ socket: Container, Fixture 'socket'
"A hole matching the size and and shape of the widget is in the wall."
canPutInMe = true
dobjFor(PutIn)
{
check()
{
if (gDobj != widget)
{
"It does not fit. </p>";
}
}
}
;
+ widget: Thing 'widget'
"A gizmo."
canPushTravel = true
describePushTravel(Into)
{
if(gIobj == socket)
{
"You push the widget gently into the socket. <.p>";
}
}
describeMovePushable(connector, dest)
{
if(gIobj == socket)
{
"You push the widget gently into the socket. <.p>";
}
}
dobjFor(PushIn) asDobjFor(PutIn)
dobjFor(PutIn)
{
check()
{
if(gDobj.isIn(socket))
{
"The widdget is already in the socket. </p>";
}
if(gIobj != socket)
{
"The widget does not fit into that. <.p>";
}
}
}
;
What am I missing?
Jerry