Skip to content

Commit ae7b622

Browse files
author
hamstar0
committed
v2.0.0.1 - Fixed issue that might interrupt item auto use with hotbar emitters
1 parent 42f5b7c commit ae7b622

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Emitters/UI/EditorButton.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,21 @@ public void ReadyEditorButtonPress( Action func ) {
3737
this.EditorButtonAction = func;
3838
}
3939

40+
/// <summary></summary>
41+
/// <returns>`true` if mouse interaction has occurred.</returns>
4042
public bool PressEditorButtonIfInteracting() {
4143
if( this.EditorButtonAction == null ) {
4244
return false;
4345
}
4446

45-
if( Main.mouseLeft && Main.mouseLeftRelease ) {
47+
bool isMouse = Main.mouseLeft && Main.mouseLeftRelease;
48+
if( isMouse ) {
4649
this.EditorButtonAction.Invoke();
4750
}
51+
4852
this.EditorButtonAction = null;
4953

50-
return true;
54+
return isMouse;
5155
}
5256

5357

Emitters/build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
displayName = Emitters
22
author = hamstar
3-
version = 2.0.0
3+
version = 2.0.0.1
44
modReferences = HamstarHelpers@5.8.0
55
buildIgnore = *.csproj, *.user, *.bat, obj\*, bin\*, .vs\*, .git\*
66
homepage = https://forums.terraria.org/index.php?threads/emitters.87584/

0 commit comments

Comments
 (0)