-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `Controller.SkipSave` exposed (set to false to enable saving) * Save/loading of files now restricted to `StardewTAS/Saves` folder * remove lua reloading because it was crashing on mac (mac has a reported NLua bug where import fails (NLua/NLua#501), lua will generally fail ~40% of the time on initial load) * Added dynamic text panel in the bottom left * Added lua advance throttling (you can define the target FPS for lua advancing or let it run uncapped, helps with playback/testing) * Added lua advance ejection: press both `-=` to throw an error and stop lua frame advancing (useful when you find yourself in an infinte frame advance loop...) * Path finding now won't freak out about flooring/torches
- Loading branch information
1 parent
901db50
commit ed91d3c
Showing
15 changed files
with
285 additions
and
17 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using Microsoft.Xna.Framework.Graphics; | ||
using StardewValley; | ||
using StardewValley.BellsAndWhistles; | ||
namespace TASMod.Overlays | ||
{ | ||
public class TextPanel : IOverlay | ||
{ | ||
public string Text {get;set;} = ""; | ||
//"012345678901234567890".Length; | ||
public readonly int MaxLength = 21; | ||
public int LeftPadding {get;set;} = 1; | ||
public int HeightPadding {get;set;} = 34; | ||
public override string Name => "TextPanel"; | ||
|
||
public override string Description => "Define some custom text to display on the screen"; | ||
|
||
public override void ActiveDraw(SpriteBatch spriteBatch) | ||
{ | ||
if (Game1.currentLocation == null) return; | ||
|
||
Microsoft.Xna.Framework.Rectangle tsarea = Game1.game1.GraphicsDevice.Viewport.GetTitleSafeArea(); | ||
tsarea.X += SpriteText.getWidthOfString(new string(' ', LeftPadding)) + 16; | ||
int fontHeight = (int)(SpriteText.getHeightOfString(" ") + HeightPadding); | ||
if (Text != "") { | ||
SpriteText.drawString( | ||
spriteBatch, | ||
Text.Substring(0, Math.Min(Text.Length, MaxLength)), | ||
tsarea.Left, tsarea.Bottom - fontHeight, | ||
999999, -1, 999999, 1f, 1f, false, 2, "", 4 | ||
); | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.