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: House lock downs and secure ownership bugs #940

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Arthrutus
Copy link
Contributor

Currently reworking house lockdowns/Secures. This closely resemble OSI but still needs fixes before release.

  1. When a co-owner or owner locks down an item, access levels below them should not be able to release them (E.g., an owner locks down an item, the co-owner should not be able to release said item).
  2. When a player secures a container, the security access gump should list that player as an owner of the container. As it stands, the code currently defaults the house owner as the owner. This causes co-owners who select the "Owner Only" option to lose access to the container and become unable to release it.

@@ -2070,7 +2070,7 @@ private void SetLockdown(Item i, bool locked, bool checkContains = false)

public bool LockDown(Mobile m, Item item, bool checkIsInside)
{
if (!IsCoOwner(m) || !IsActive)
if (!IsFriend(m) || !IsActive)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if this is right. Let's do some testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Friends of the house have always been allowed to lock things down. This was tested via OSI and is at the link: https://uo.com/wiki/ultima-online-wiki/gameplay/houses-placing-a-house/house-ownership-4-managing-your-home/

@@ -2408,7 +2423,17 @@ public void AddSecure(Mobile m, Item item)
}
else
{
info = new SecureInfo((Container)item, SecureLevel.Owner);
/* There seems to be some confusion regarding security access on secured containers.
Copy link
Contributor

Choose a reason for hiding this comment

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

The owner of the house should have access to everything.
This is both necessary and a problem since owners can hijack co-owner/friend property.
I am not sure this can be resolved.

Copy link
Contributor Author

@Arthrutus Arthrutus Feb 21, 2022

Choose a reason for hiding this comment

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

I agree. House owners should automatically have access to everything. Perhaps we can make a new securelevel.HouseOwner and Co-Owners can become securelevel.Owners?

Copy link
Contributor Author

@Arthrutus Arthrutus Feb 21, 2022

Choose a reason for hiding this comment

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

Maybe we need to separate the security access levels and the house access levels. These are obviously not interchangeable. The security access levels only apply to each individual container in question and are applicable to the individual who secured said container, NOT the house owner (although they have access/control over it regardless).

For things like doors and teleporters, the house owner is automatically the owner.

@kamronbatman kamronbatman self-requested a review July 6, 2022 06:35
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ kamronbatman
❌ Arthrutus
You have signed the CLA already but the status is still pending? Let us recheck it.

@kamronbatman
Copy link
Contributor

It feels like the first item on the list is a bug. I agree that this should be fixed if that is the case. The default security level should be the highest for that person's current access. If they are a friend, it is friend. If they are a co-owner, it is co-owner, etc.

The second one is also clearly a bug.

Let's move forward with this. I'll find some time to look into this more and clean up this PR.

@kamronbatman kamronbatman added the bug Something isn't working label Apr 16, 2024
@kamronbatman kamronbatman changed the title Reworked House Lockdowns/Secures fix: House lock downs and secure ownership bugs Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants