Conversation
|
Can you elaborate on the use case? Don't really like this change as it is tbh... |
|
It's one of the case where the API doesn't expose enough. In Faxanadu, I need to know if the item received is from my own world. By testing if the player is mine. (See my other PR where I added If you dont like how its done, don't worry. You can implement it in a different way that you like. I'll keep it like this in my fork for now. |
|
I'd like to know what exactly it is being used for. |
|
I use it when I receive an item. I need to ignore my local items. Otherwise I will grab the item twice. It's common for NES/SNES games to have local items instead of remote in those cases. |
|
Bottom line: I wishes we could have the full content of the packet through the API callbacks. Exposing more is always better because you can't predict what use-case the user will have. The C# lib literally just convert the packet into a struct and pass it back to you. (+ do extra thing like caching datapackage obviously) But again: it's really not a big deal if you want to keep it like that. I have my own changes in my fork. I will open those PRs anyway just incase its stuff you would like. I have 2 PRs more coming up later :) |
|
We can agree do disagree on that; I want to expose as little as possible ^^' As for this change, you seem to want to emulate Is it not possible to do full remote items in your scenario? |
|
A flag to say only call this for remote item would work too if that's more in-line with your design philosophy :) |
|
In somewhat simular fashion i added a boolean to my own verison of APCpp to state if the item comes from starting inventory or cheat commands, i use this to send item strait to a players inventory bool isFromServer = root[i]["items"][j]["location"].asInt64() < 0;
(*getitemfunc)(item_id, notify, isFromServer); |
Useful for me in Faxanadu, so I know the item doesn't come from me. Faxanadu is using ROM save states so I need to store the list of items received myself in the rom ram. So I can't use the "notify player" flag.