Archipelago icon indicating copy to clipboard operation
Archipelago copied to clipboard

SNIClient data slot fix

Open lordlou opened this issue 1 year ago • 3 comments

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.

lordlou avatar Apr 21 '24 18:04 lordlou

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.

Berserker66 avatar Apr 21 '24 21:04 Berserker66

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?

qwint avatar Apr 21 '24 22:04 qwint

yes to the second part.

Berserker66 avatar Apr 22 '24 11:04 Berserker66

I found another way to do what I needed.

lordlou avatar Jul 27 '24 17:07 lordlou