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 issue with enter_verb pattern type #1319

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

@alexwarren
Copy link
Contributor

What does "enter" clash with in the first place?

@KVonGit
Copy link
Collaborator Author

KVonGit commented Dec 29, 2024

What does "enter" clash with in the first place?

The room enter script , I think.

public void TestCanAddVerb_Rejected()
{
EditorController.CanAddVerbResult cavr = Controller.CanAddVerb("enter");
Assert.AreEqual("enter", cavr.ClashingCommand);

if (HasScript(game.pov.parent, "enter")) {

<!-- Need a special verb in English because of the name collision with the "enter" script rooms use -->
<verb name="enter_verb">
<pattern>enter #object#</pattern>
<property>enterverb</property>
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be a breaking change for people upgrading, as enterverb is now enter_verb? Or does it not matter because this wasn't working in the first place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, I thought I fixed that back to enterverb! I see I failed to push the commit... One sec...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Good catch! GitHub Desktop was just sitting there, waiting for me to push that commit.

@alexwarren
Copy link
Contributor

What does "enter" clash with in the first place?

The room enter script , I think.

public void TestCanAddVerb_Rejected()
{
EditorController.CanAddVerbResult cavr = Controller.CanAddVerb("enter");
Assert.AreEqual("enter", cavr.ClashingCommand);

if (HasScript(game.pov.parent, "enter")) {

Got it. I guess ideally we might rename this for rooms to onenter, but I imagine this is commonly used and we don't want to make a big breaking change like this (at least, not for a point release).

The last commit changed `enterverb` to `enter_verb`, which would break 5.8 works in progress.
@alexwarren alexwarren merged commit f680fc0 into textadventures:master Dec 29, 2024
@KVonGit KVonGit deleted the Fix-enter_verb branch December 30, 2024 15:35
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.

enter_verb pattern is set to "Regular expression", should be "Command pattern"
2 participants