Skip to content

Conversation

@martiandweller
Copy link
Contributor

I'm working on a mod that automates the Farmer's actions, including movement. The animation breaks when I try to move the character with SetMovingUp() and similar methods. I believe this is because the Game1.UpdateControllerInput() method Halt() the character and resets an animation if there is no input.

if ((!moveUpHeld && !moveRightHeld && !moveDownHeld && !moveLeftHeld && !player.UsingTool) || activeClickableMenu != null) { player.Halt(); }

This PR exposes already existing OverrideButton method to the mod API.

@Pathoschild Pathoschild added the enhancement This is a general improvement that can be addressed with specific development changes. label Dec 28, 2025
@Pathoschild Pathoschild changed the title Expose OverrideButton. Add input API method to press a button Dec 28, 2025
@Pathoschild Pathoschild merged commit b3862b6 into Pathoschild:develop Dec 29, 2025
@Pathoschild
Copy link
Owner

Merged into develop for the upcoming SMAPI 4.4.0. Thanks for the help!

@Pathoschild Pathoschild added this to the 4.4.x milestone Dec 29, 2025
@martiandweller martiandweller deleted the ExposeInputOverride-clean branch December 30, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This is a general improvement that can be addressed with specific development changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants