Skip to content

feat: Add extensions available in DoorType #496

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

Closed
wants to merge 7 commits into from
Closed

feat: Add extensions available in DoorType #496

wants to merge 7 commits into from

Conversation

GoldenPig1205
Copy link

@GoldenPig1205 GoldenPig1205 commented Apr 20, 2025

Description

Describe the changes
Added extensions available in DoorType and modified some of the behavior of functions that existed in the existing DoorType.

What is the current behavior? (You can also link to an open issue here)
There were 3 extension functions (IsGate(), IsCheckpoint(), IsElevator()) and they were working fine.

What is the new behavior? (if this is a feature change)
Added 8 extension functions (IsHID(), IsScp(), IsEscape(), IsLcz(), IsHcz(), IsEz(), IsSurface(), IsUnknown()).
All extension functions belonging to DoorType now derive bool values ​​from String values.

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

Other information:
This PR does not change the way existing features work. It also does not change the result.
Even if the DoorType enum is added, you don't need to manually update the extension functions of DoorType.

This PR is possible because DoorType names follow a set of rules.


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

Copy link

@louis1706 louis1706 left a comment

Choose a reason for hiding this comment

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

Please do not use .ToString().Contains() that do not fit our way to handling it

@GoldenPig1205 GoldenPig1205 requested a review from louis1706 April 21, 2025 04:02
@louis1706 louis1706 changed the base branch from master to dev April 21, 2025 15:43
@GoldenPig1205 GoldenPig1205 requested a review from louis1706 April 21, 2025 16:47
@GoldenPig1205 GoldenPig1205 closed this by deleting the head repository May 19, 2025
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.

2 participants