[Ohrrpgce] [ohrrpgce/ohrrpgce] "add hero" command return value doesn't work (#1186)

Ralph Versteegen notifications at github.com
Sun Dec 27 11:36:43 PST 2020


We absolutely need to fix this, because scripts getting triggered indirectly by something called from a script command will become common when script multitasking/fibers are implemented and there's a proliferation of available hook points. There's possibly some other instances of this already which I can't think of, aside from `delete hero` and the swap commands. (Currently, a lot of commands which can trigger scripts, like `use npc`, cause an implicit wait.)

This fix would be made to the scriptinterpreter itself, rather than to any script commands. It shouldn't be necessary for any of them to be written with awareness of potentially triggered scripts; that would be a footgun.

As for whether it's useful for the add-hero hook to set the return value of `add hero`, I don't really think so. That would be a role for a global variable.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1186#issuecomment-751507659
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20201227/9c769326/attachment.html>


More information about the Ohrrpgce mailing list