RhostMUSH / trunk

RhostMUSH 4.0: This is the official main repository of RhostMUSH. Visit us at rhostdev.mushpark.com 4201
23 stars 21 forks source link

goto @hook issues #215

Closed volundmush closed 3 months ago

volundmush commented 4 months ago

I was trying to use @hook/permit on goto to block exit usage based on some conditions. This would be for "being unable to take actions at all" as an example, rather than something about THAT PARTICULAR EXIT (which is what I'd use a @lock for.)

Although @hook/permit DOES work, and it also works with expand_goto both enabled and disabled...

@hook/fail goto does not trigger at all. AF_GOTO isn't evaluating when I type "north", with expand_goto at 1. Even if expand_goto IS set to 1, then typing "north" still doesn't trigger AF_GOTO to evaluate. Only when I explicitly type "goto north" does the @hook/fail trigger.

Additionally, registers don't appear to be shared between hook function evaluations. is this the intended behavior? It'd be nice to capture my error message from the P_GOTO and then display it using AF_GOTO but I'm currently stuffing it into an attribute as a workaround. That's not a problem, just a weird thing.

mrsenile commented 3 months ago

Fixed in https://github.com/RhostMUSH/trunk/commit/2e6a6067c133297b82abaf8685081a6329ac2fa0

And yes, right now registers are not passed between hooks.