Archipelago
Archipelago copied to clipboard
SNIClient data slot fix
What is this fixing or adding?
Adds slot_data to SNIContext when want_slot_data is set (as the documentation states).
I need this for sm_map_rando world so the client can exclude Nothing items from being received (which cant be prevented from the ROM side anymore).
How was this tested?
I was getting AttributeError: 'SNIContext' object has no attribute 'slot_data' in the client before the fix. I get the intented behavior (slot_data is populated and Nothing items are filtered out) after the fix.
This will need a bit more revamping to do properly. Currently, SNIClient always sends want_slot_data, but all current games do not actually use it. In case of LttP there is tracker data that is needlessly transferred. Personally, I think want_slot_data should be transferred to be a core CommonClient responsibility, from which SNIClient can then inherit.
want_slot_data is a CommonClient thing, it is defined and used in CommonClient (notably default True but set to False in run_as_textclient() so anyone who doesn't opt out will grab their slot data) or do you mean that this update should be done in CommonClient so everything can inherit self.slot_data being set automatically?
yes to the second part.
I found another way to do what I needed.