Skip to content

Improved Door.Lock method#173

Merged
VALERA771 merged 4 commits intoExMod-Team:devfrom
JustMarfix:master
Nov 25, 2024
Merged

Improved Door.Lock method#173
VALERA771 merged 4 commits intoExMod-Team:devfrom
JustMarfix:master

Conversation

@JustMarfix
Copy link
Copy Markdown

@JustMarfix JustMarfix commented Nov 10, 2024

Description

Improved Door.Lock method

What is the current behavior? (You can also link to an open issue here)
The Door.Lock method unlocks the door when the same DoorLockType has been used multiple times due to the code in Door.ChangeLock. It doesn't match the method name, so I fixed it.

What is the new behavior? (if this is a feature change)
Now, the Door.Lock method doesn't call the ChangeLock, but adds lock flags inside itself.
UPD: also, now there is one more Door.Lock method, that has no time argument

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

louis1706 and others added 2 commits November 9, 2024 21:30
…me DoorLockType

Signed-off-by: Mikhail Reznichenko <justmarfix@vk.com>
Copy link
Copy Markdown

@vladflotsky vladflotsky left a comment

Choose a reason for hiding this comment

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

PRs should target the dev branch, not master

@JustMarfix JustMarfix changed the base branch from master to dev November 10, 2024 16:49
@Mikihero
Copy link
Copy Markdown

https://discord.com/channels/656673194693885975/656674085425643534/1305208899288436779

tl;dr Door::Lock is named a bit confusingly for what it does, changes should be made to the Lock method directly and not ChangeLock

…new code

Signed-off-by: Mikhail Reznichenko <justmarfix@vk.com>
@VALERA771
Copy link
Copy Markdown

Will your fix display active locks correctly?

@louis1706
Copy link
Copy Markdown

Will your fix display active locks correctly?

DoorEvents.TriggerAction that what it does

@louis1706
Copy link
Copy Markdown

i have an suggestion can you add Lock method without the time argument

Signed-off-by: Mikhail Reznichenko <justmarfix@vk.com>
@JustMarfix JustMarfix changed the title Fixed door unlocking after calling Door.Lock multiple times with the same DoorLockType Improved Door.Lock method Nov 12, 2024
@JustMarfix
Copy link
Copy Markdown
Author

i have an suggestion can you add Lock method without the time argument

done

@louis1706 louis1706 removed the Events label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants