TrashMonks / cryptogull

Discord bot for the Caves of Qud server
https://discordapp.com/invite/cavesofqud
GNU Affero General Public License v3.0
10 stars 2 forks source link

Currently choking on some tests #31

Closed syntaxaire closed 3 years ago

syntaxaire commented 3 years ago

Check decoding for build code BAIIMLLRB5CHDADCDDDX.

Jan 24 19:15:15 nugget pipenv[3983]: Traceback (most recent call last):
Jan 24 19:15:15 nugget pipenv[3983]:   File "/home/cryptogull/cryptogull/cogs/decode.py", line 39, in on_message
Jan 24 19:15:15 nugget pipenv[3983]:     char = Character.from_charcode(code)
Jan 24 19:15:15 nugget pipenv[3983]:   File "/home/cryptogull/cryptogull/helpers/qud_decode.py", line 105, in from_charcode
Jan 24 19:15:15 nugget pipenv[3983]:     extensions.append(gamecodes['mod_codes'][charcode[:2]])
Jan 24 19:15:15 nugget pipenv[3983]: KeyError: 'CH'
egocarib commented 3 years ago

Not sure what exactly needs to be updated here, but the issue is that "CH" is not a valid build code.

I added slightly better error handling in cfdefede6c980e513f02f1c4384061baf4fb93a0 to throw a better error for this. Let me know if you were looking for something else.

egocarib commented 3 years ago

Ah, CH was the old code for hemophilia. It's no longer in Mutations.xml and was removed from the game. So I don't think we can cleanly backwards-support it. I'll update the test code, but I don't actually know how to run the tests myself. 😄

syntaxaire commented 3 years ago

OK, that makes more sense now. I think we should fully drop support for interpreting old build codes, especially since hagadias makes a point of loading the mutation codes from game files.

egocarib commented 3 years ago

Now fixed