Search results

  1. ikzann

    Bug Mafia performance

    Hi all, After getting a little frustrated with how quickly Mafia chews up my laptop battery, I decided to run it through a profiler to see what seems to be generating the most CPU usage. Below are some quick highlights from a first run while running a farming script, and I'd be happy to dive...
  2. ikzann

    Bug - Fixed After a free rest in Chateau Mantegna, Mafia assumes you have no more free rests

    I have a PR up at https://github.com/kolmafia/kolmafia/pull/1162 and just need to finish the tests. Bizarrely, the chateau_restbox action works for both free and non-free rests - which action fires depends exactly where you click on the bed/text in the Chateau.
  3. ikzann

    User-submitted PRs

    Hi Veracity, Just to double check, did you fork the project first? Since you don't have direct permissions to push to main on that repository, you will have to push to a fork of the project and then file a PR across repositories. That's how contributors to Mafia who don't have commit access...
  4. ikzann

    Bug JavaScript bugs

    We should fix the ultimate exception not being caught, but these are currently catchable in JS: > jsq Item.get("sword") Internal exception: Wrapped net.sourceforge.kolmafia.textui.ScriptException: Bad item value: sword (command line#1) at command line:1 Unexpected error, debug log...
  5. ikzann

    Bug JavaScript bugs

    This is unfortunately a tricky limitation to work around in the JS-to-Java-to-ASH conversion chain and any fix is going to be a little bit of a hack. I'd recommend using TypeScript to avoid typing issues like this. I will think about how to fix this particular issue.
  6. ikzann

    Bug JavaScript bugs

    Here's a fix for the value conversion issue that philmasterplus was seeing, test with js Monster.get(33).phylum === Phylum.get('undead')
  7. ikzann

    Bug JavaScript bugs

    Yes, I meant merge them both in sequence.
  8. ikzann

    Bug JavaScript bugs

    Can someone merge those two patches?
  9. ikzann

    Bug JavaScript bugs

    Thanks for finding that fix. I'll take a look at the value conversion issues you mentioned. A fix to another problem with importing ASH scripts that overload functions:
  10. ikzann

    Bug JavaScript bugs

    That is not Mafia's current behavior when loading cli/ash files. If that's an issue we should probably take this to PM
  11. ikzann

    Bug JavaScript bugs

    Yeah, it should probably just be "undefined".
  12. ikzann

    Bug JavaScript bugs

    Alright, this patch fixes both the sandbox issue and the issue with trying to print require("kolmafia"). I've left the behavior with no input unchanged for now as we should fix the ASH command as well. The sandboxing rule is now that any file in the Mafia directories can be run by the JS...
  13. ikzann

    Bug JavaScript bugs

    OK. I'll investigate.
  14. ikzann

    Bug JavaScript bugs

    Okay. I'll set up the dev environment on my Windows computer this evening and see if I can come up with a fix. Thanks for flagging this.
  15. ikzann

    Bug JavaScript bugs

    Huh, that's odd. Might be a Windows issue specifically since I have been doing all my development on a Mac... If you have time, it would be helpful to see where in the Rhino code that exception is coming from. It's supposed to be restricting execution only to scripts that reside within the...
  16. ikzann

    Bug JavaScript bugs

    You may want to coordinate with gausie, who is also working on type definitions here. I have an example of a fully-working TS project with webpack and babel up here: https://github.com/phulin/bean-daily. My plan was to leave the types as global, like JS's built-in types. Gausie also made the...
  17. ikzann

    Bug JavaScript bugs

    The previous patch fixes some pretty breaking bugs, so would love to get it merged whenever possible. Here's another (applies only against the previous patch) that moves the standard library onto require("kolmafia") instead of a global. It also fixes some of the interrupt problems.
  18. ikzann

    Bug JavaScript bugs

    Fixes some bugs with argument inversion on library functions, and some type conversion issues. It also reworks some of the proxy record code to work in a more consistent way.
  19. ikzann

    Bug JavaScript bugs

    And... a patch to make enumerated type equality work correctly.
Back
Top