Bug in reachability?

I think there’s a problem w/ reachability.

(trace reachability $Obj to $Obj or $)
(trace reachability $Obj to $ or $Obj)
(trace reachability $Obj to $Ceil1 or $Ceil2)
	($Obj is $Rel $Parent)
	~{ ($Rel = #in) ($Parent is closed) }
	(trace reachability $Parent to $Ceil1 or $Ceil2)

This is failing in my case, where both the object and the player are in the same place:

> (tree)
#middle-of-nowhere (dark, around the tower, in range of headlights)
    #tower #in
    #sagebrush #in
    #desert-sand #in
    #tire-tracks #in
    #pickup-truck #in
        #knock #in (lit)
            #lighter #heldby (handled)
            #wallet #heldby (handled)
                #license #in
                #receipt #in (hidden)
            #jacket #wornby
            #emotional-baggage #heldby (handled)
        #jade #in
        #glove-compartment #partof
            #cigarettes #in
        #headlights #partof
    #wiffs-of-gasoline #in
    #saguaro #in
Query succeeded: (tree)
> take jade
You can't reach the piece of jade.

>   

My local fix is:

#pickup-truck
...
($Obj is reachable by player)
    ($Obj is #in *)
    (#knock is #in *)
    (just)

… because #pickup-truck is my only actor container.

Does the following work?

You will have to remove the old definition from the library. If this solves the issue, I’ll include the change in the next version of the library.

(trace reachability $Obj to $Obj or $)
(trace reachability $Obj to $ or $Obj)
(trace reachability $Obj to $Ceil1 or $Ceil2)
        ($Obj is $Rel $Parent)
        (if) ($Rel = #in) ($Parent is closed) (then)
                ($Parent = $Ceil2)
        (else)
                (trace reachability $Parent to $Ceil1 or $Ceil2)
        (endif)
1 Like

I’ll test when I can. Work kind of gets in the way :frowning: