Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: game stash window #695

Merged
merged 1 commit into from
Jan 22, 2024
Merged

feat: game stash window #695

merged 1 commit into from
Jan 22, 2024

Conversation

pennaor
Copy link
Contributor

@pennaor pennaor commented Jan 7, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Behaviour

Actual

Unimplemented stash window. When requested, it does not open.

Expected

Implemented stash window. When required, it opens and allows you to view the stored items, filter by item name, and extract them.

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
    (IMPORTANT: it seems that due to a particularity of the server it is necessary to always enter the sqm next to the depot. In other words, if you login while in the sqm, walk out and then into the sqm again to be able to extract items from the stash. in GOD ghost mode it also seems to prevent the process).

Open the depot. Place some stackables by dragging them to the stash icon. Click on the stash icon. A window containing the stash items should open. In the upper space of the window, search for the name of an item that is or is not in the stash. Check if the items shown match your search. Click on an item to extract it. A small window should appear to select the quantity. Select the quantity, click "Ok" and check that it has been debited from the stash window and is in your inventory.
Repeat the previous procedures, but checking if the "Close" button in the stash window and if the "Cancel" button in the small quantity selection window are closing their respective containers.

Test Configuration:

  • Server Version: Canary 3.1.2
  • Client: 3.x
  • Operating System: Win 10

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@@ -196,7 +198,7 @@ void ThingType::unserializeAppearance(uint16_t clientId, ThingCategory category,
m_market.category = static_cast<ITEM_CATEGORY>(flags.market().category());
m_market.tradeAs = flags.market().trade_as_object_id();
m_market.showAs = flags.market().show_as_object_id();
m_market.name = flags.market().name();
m_market.name = m_name;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, are you sure this will not break compatibility with older versions?

Would be better to check version here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Do you happen to know in which version apparences.dat started to be used? I believe that if there is any incompatibility it must be from this version, as the others use other means to load the sprites, right? Im without time to test it, but I'll do it as soon as possible.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfurtunatelly I don't know which version this change was made. But apparences started after 10.98.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pennaor any update on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pennaor any update on this?

Hello friend, well, I don't know how to obtain servers for specific versions, since the canary repository only has releases of version 13.x. I did some research and the market was introduced in version 9.4. This way, it would be good to test with versions 9.4 and 10.98, in addition to 11.x. I'll try with the latest release of TFS, which is 10.98. Any ideas on how to get other versions?

Copy link
Collaborator

@conde2 conde2 Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be enought, if anyone complain about it in the future we just fix it, don't worry too much about that, better to include this feature than not having it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I'll test 10.98 now and let you know

Copy link
Contributor Author

@pennaor pennaor Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, 10.98 still uses .spr/.dat files, but the name of the item and its search in the market works properly. Item details don't show up, but i don't think its because of this changes. Furthermore, there is no option to create sales offers in the market, even if the item is in the depot.
Stash was introduced in version 11.80, so it has not been tested.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should be good to go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, yeah!

@mehah mehah merged commit 6b112c2 into mehah:main Jan 22, 2024
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants