Skip to content

Instantly share code, notes, and snippets.

@JackCeparou
Created May 13, 2018 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JackCeparou/bd711d31909c1be209f59cb74cae6f34 to your computer and use it in GitHub Desktop.
Save JackCeparou/bd711d31909c1be209f59cb74cae6f34 to your computer and use it in GitHub Desktop.
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