File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44using System . Configuration ;
55using Microsoft . WindowsAPICodePack . Dialogs ;
66
7- namespace TF2ScriptGen
7+ namespace TF2SpamScriptGen
88{
99 static class Program
1010 {
@@ -74,7 +74,7 @@ static void Main(string[] args)
7474
7575 static void OnLinesInputTextBoxKeyDown ( object sender , KeyEventArgs e )
7676 {
77- // allow the use of ctrl- A to select all, which usually possible by default
77+ // allow the use of ctrl+ A to select all, which isn't usually possible by default
7878 if ( e . Modifiers . HasFlag ( Keys . Control ) && e . KeyCode == Keys . A )
7979 {
8080 e . SuppressKeyPress = true ;
@@ -181,14 +181,14 @@ static string[] GetInputFromScript(string scriptFilePath)
181181
182182 // modify the script line count to get the line count of the plain text.
183183 int lineCount = scriptLines . Length - 2 ;
184- lineCount = ( int ) ( ( float ) lineCount * ( 5f / 6f ) ) ;
184+ lineCount = ( int ) ( ( float ) lineCount * ( 5f / 6f ) ) + 1 ;
185185
186186 string [ ] lines = new string [ lineCount ] ;
187187
188188 for ( int i = 0 ; i < lineCount ; i ++ )
189189 {
190190 // turn from a script line back to just the plain text
191- lines [ i ] = scriptLines [ i + 2 ] . Split ( '"' ) [ 1 ] . Remove ( 0 , 4 ) ;
191+ lines [ i ] = scriptLines [ i + 1 ] . Split ( '"' ) [ 1 ] . Remove ( 0 , 4 ) ;
192192 }
193193 return lines ;
194194 }
You can’t perform that action at this time.
0 commit comments