Skip to content

Commit

Permalink
Add a button to the experimental tab to clear active effects
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordmau5 committed Aug 7, 2024
1 parent 6258d86 commit 1965a33
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions GTAChaos/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions GTAChaos/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1742,5 +1742,24 @@ private void UpdateStreamTab()
}
}
}

private void buttonExperimentalClearActiveEffects_Click(object sender, EventArgs e)
{
AbstractEffect effect = EffectDatabase.GetByID("clear_active_effects");

if (effect != null)
{
EffectDatabase.ShouldCooldown = false;
this.CallEffect(effect);
EffectDatabase.ShouldCooldown = true;
return;
}

int duration = Config.GetEffectDuration();
WebsocketHandler.INSTANCE.SendEffectToGame(this.textBoxExperimentalEffectName.Text, new
{
seed = RandomHandler.Next(9999999)
}, duration);
}
}
}

0 comments on commit 1965a33

Please sign in to comment.