I miss you guys! Been on kind of a roll, in the sense that WIP is progressing and am effectively debugging strange behavior on my own. Debugging is time consuming still, but able to get there. Which is why you haven’t heard from me. Here’s something maybe of interest?
Been using SenseConnector and Occluder what felt like pretty effectively to manage PC’s visual messages until I engaged RoomParts. The scenario is an OutdoorRoom SenseConnected to a (Indoor) Room. I had been managing shouldn’t-see things kinda like this:
occludeObj(obj, sense, pov) {
// these items not visible if not collocated
//
if ((obj is in (rock, path, flower))
&& (!pov.isIn(obj.getOutermostRoom())))
return true;
return inherited(obj, sense, pov);
}
This breaks down in roomparts. Specifically when outdoors (no walls), thanks to connector, examining walls gives:
>x walls
west wall: You see nothing unusual about it.
east wall: You see nothing unusual about it.
north wall: You see nothing unusual about it.
south wall: You see nothing unusual about it.
SenseConnected indoor walls are quietly in scope and giving what I deem an unacceptably deceptive message. My solution is to mandate that roomParts in connected locations are uninteresting, like so:
occludeObj(obj, sense, pov) {
// make roomparts only visible if included in room
//
if (obj.ofKind(RoomPart)
&& !pov.getOutermostRoom().roomParts.indexOf(obj))
return true;
return inherited(obj, sense, pov);
}
Since I have a class that combines SenseConnector and Occluder I can do it globally. Would need to be manually added to local SenseConnectors in this situation otherwise. Will be playing with RoomPartItem
later in my WIP, to see if the solution holds or needs further attention. Will update if interesting.
Yes, this is a really niche problem, but the fix’s lines of code/hour rate was embarrassingly small because I failed to realize that indexOf(obj)
returned nil, not 0 if no match.
The latest from JJMcC’s FIDIW (Fixing Issues Deep In the Weeds).