Open Door Patterns

Spent some time with it, and it looks pretty close to what I wanted. I tweaked it just a bit to be in line with my door model:

modify RemoteViewConnector
	masterDoor = nil
	locationList = (masterDoor == nil ?
          nil : [masterDoor.location, masterDoor.destination])

	// Connector starts out totally opaque.
	connectorMaterial() {
		if(_remoteViewToggle != true) return(adventium);
		//======================================================
		//   if tied to Door, make sure its open
		if ((masterDoor != nil) && !masterDoor.isOpen) return(adventium);
		//======================================================
		if(oneWay == true) {
			if(gActor.isIn(locationList[1]))
				return(glass);
			else
				return(adventium);
		}
		return(glass);
	}
;

Added a nestedAction(Examine, otherLocation); to the dobjFor(LookThrough)

Need to look at some weird Connector scope cases, but I suspect other code is the problem there. The only rough patch was it seemed to behave oneway, regardless of property setting. I traced it to this:

	dobjFor(LookThrough) {
		verify() {
			if(!gActor.isIn(locationList[1])) {
				if(oneWayFailure)
					illogicalNow(oneWayFailure);
				// else       // fails with these two lines in, works if comment out these two
					// illogicalNow(&remoteViewFailure);
			}
		}

I couldn’t figure out the point of this test, the non one-way else clause I mean. Fails like one way, but with different error message? Running with it commented out and plowing ahead. Thanks for the leg up! Will let you know if anything comes of the scope thing.

@inventor200 still going to poke at your version a bit, just not tonight!

2 Likes