-
-
Save JackCeparou/bd711d31909c1be209f59cb74cae6f34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Turbo.Plugins.Default; | |
namespace Turbo.Plugins.User | |
{ | |
public class SampleStoryPlugin : BasePlugin, INewAreaHandler, IInGameTopPainter | |
{ | |
private bool _isStoryMode; | |
public SampleStoryPlugin() | |
{ | |
Enabled = true; | |
} | |
public void OnNewArea(bool newGame, ISnoArea area) | |
{ | |
if (newGame) | |
{ | |
_isStoryMode = Hud.Game.SpecialArea == SpecialArea.None && !Hud.Game.Bounties.Any(); | |
} | |
} | |
public void PaintTopInGame(ClipState clipState) | |
{ | |
if (!_isStoryMode) return; | |
// do whatever you want when in story mode. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment