Hi,
I created a Honeycomb class and am trying to use it in an IF condition but the condition fails. When the honeycomb was a Container object, the condition worked. I made a class because I need more than one segments of honeycomb.
beeNest: Container, Fixture 'bee nest;old abandoned' @terraceRoom
"An old bee nest. It's gray and dry. <<if Honeycomb.isIn(beeNest)>>The bees are long gone but segments of honeycomb are still present.<<end>> "
cannotTakeMsg="You don't need the entire nest, just a section of honeycomb will do. "
;
+Honeycomb;
+Honeycomb;
class Honeycomb: Container 'honeycomb;wax soft segment; honeycomb'
"A segment of waxy honeycomb. The wax could be formed into a variety of shapes. "
bulk = 1
bulkCapacity = 1
isUsed = nil
;
//The condition
crack: OpenableContainer 'crack;small opening hole fracture' @exteriorWall
"A small crack in the exterior wall of the ice palace. <<if meltwater.isSpraying>>A stream of frigid water sprays from the crack.<<else>>The crack is sealed closed.<<end>> "
bulkCapacity = 1
isOpen = true
allowInsert = true
isListed = nil
iobjFor(PutIn)
{
action(){
local direct = gDobj;
if(gDobj == tallow || gDobj == Honeycomb){
"You mash the <<direct.theName>> into the hole, sealing the crack. The spraying water is diverted down the inside of the wall. You are now free to continue down the ledge. ";
meltwater.isSpraying = nil;
gDobj.moveInto(crack);
crack.isOpen = nil;
crackAchievement.awardPointsOnce();
}else{
"The pressure forces the <<direct.theName>> out of the crack. ";
abort;
}
}
}
;
As always, thank you for your help.
Deborah