tworld icon indicating copy to clipboard operation
tworld copied to clipboard

Execute instancepane in a context with a location

Open erkyrath opened this issue 11 years ago • 1 comments

There's no reason not to. (Right now, location() is None, but location(player) is not. This is confusing and weird.)

However, we should still pull the realm-level instancepane property, not the one from the player's location. I think this means we call find_symbol in a non-locid context, and then execute it in the normal context.

erkyrath avatar Dec 03 '13 01:12 erkyrath

This is an easy change: (in the DIRTY_TOOL section of generate_update)

ctx = EvalPropContext(task, loctx=loctx, level=LEVEL_DISPLAY)

Unfortunately, this reveals a hidden assumption in the property-dependency code -- the generated description is really only meaningful within a location. (Bare-name property access creates a dependency on the prop name, but not on the location.) So this change leaves us open to an instancepane that doesn't refresh when you move.

The current system forces you to use location(player), which is awkward but not broken.

So I'm downgrading this to a suggestion. I may get back to it.

erkyrath avatar Dec 03 '13 21:12 erkyrath