BotWithUs / AbyssAPI

3 stars 8 forks source link

Fixes crash due to null options on Npcs #7

Closed cantankerousminer closed 1 year ago

cantankerousminer commented 1 year ago

https://discord.com/channels/973830420858810378/993110548021514360/1056350163674861648

Root cause not visible from API source.

Cipher27 commented 1 year ago

+1. This fixes a bug that breaks Npc interaction when the string interact option that you want to interact with is iterated after one (or many) null options.

Cipher27 commented 1 year ago

Some additional info here, while this fix can be pushed in the API, it looks like there is a consistency issue with how entity options are handled behind the scenes (maybe its just how it is in the cache, idk)

For example, SceneObject options that are "null" appear to be an empty string rather than an actual null value. Npcs as discussed above, provide explicit null values for options that aren't configured. Perhaps rather than only accounting for this in the API, we should also take a consistent approach to optionnames - maybe null NPC options should be converted to an empty string.

ccarpenter04 commented 1 year ago

Closed, resolved in a commit in dev already.