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

fix: use/move/trade/add/remove item from house logic #1239

Conversation

dudantas
Copy link
Member

@dudantas dudantas commented Jul 13, 2023

Description

The guest player (aleta sio) will no longer be able to:
• Using an item inside the house
• Trade an item inside the house
• Give "use with" item inside house
• Move item inside house
And no other type of interaction with the item (except the "look")

It is also no longer allowed to throw items in the house, unless you are a subowner (aleta som).

Behaviour

Actual

Guest can execute actions.

Expected

Guest cannot more execute actions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@dudantas dudantas changed the title fix: move/trade/add/remove item from house logic fix: use/move/trade/add/remove item from house logic Jul 13, 2023
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
21.6% 21.6% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@luan
Copy link
Contributor

luan commented Jul 13, 2023

The config ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS makes one think that guests would be able to move stuff. Invited -> Guest. I think the functionality implemented here would be good around something like ONLY_SUBOWNER_CAN_MOVE_HOUSE_ITEMS -- I thought the idea with ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS is to prevent invites with * from moving items. But maybe I misunderstood how it was supposed to work

@dudantas
Copy link
Member Author

The config ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS makes one think that guests would be able to move stuff. Invited -> Guest. I think the functionality implemented here would be good around something like ONLY_SUBOWNER_CAN_MOVE_HOUSE_ITEMS -- I thought the idea with ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS is to prevent invites with * from moving items. But maybe I misunderstood how it was supposed to work

Actually I just implemented the logic that is already used elsewhere. But, it is already used that way, I just followed what was already done.

But I don't know if there's a need to create a new tag, I think the two can be used for the same thing without any problem, it doesn't seem to me that the name "invited" necessarily means who was invited (from the list aleta sio/aleta som) but yes who has access to house. As soon as the if handles both cases, both the invited and the guest. If necessary, we can add a new tag, but I don't particularly see the need, it will be just another tag without much use.

@dudantas dudantas merged commit 77b9913 into opentibiabr:main Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants