File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ private void Awake()
26
26
botcmd_path = Cmdpath . Value ;
27
27
28
28
Debug . Log ( "Created by Rayss and InfernalPlacebo." ) ;
29
-
30
29
}
31
30
32
31
[ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Code Quality" , "IDE0051:Remove unused private members" ) ]
@@ -35,35 +34,23 @@ private void Start()
35
34
Reading ( ) ;
36
35
}
37
36
38
- /**
39
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Code Quality", "IDE0051:Remove unused private members")]
40
- private void Update()
41
- {
42
-
43
- }
44
- **/
45
-
46
37
private async void Reading ( )
47
38
{
48
39
using ( StreamReader reader = new StreamReader ( new FileStream ( botcmd_path ,
49
40
FileMode . Open , FileAccess . Read , FileShare . ReadWrite ) ) )
50
41
{
51
42
//start at the end of the file
52
43
long lastMaxOffset = reader . BaseStream . Length ;
44
+ string line ;
53
45
54
46
while ( true )
55
47
{
56
48
await Task . Delay ( 1000 ) ;
57
49
58
- //if the file size has not changed, idle (RAYSS NOTE: MAY NOT BE NEEDED)
59
- if ( reader . BaseStream . Length == lastMaxOffset )
60
- continue ;
61
-
62
50
//seek to the last max offset
63
51
reader . BaseStream . Seek ( lastMaxOffset , SeekOrigin . Begin ) ;
64
52
65
53
//read out of the file until the EOF
66
- string line = "" ;
67
54
while ( ( line = reader . ReadLine ( ) ) != null )
68
55
RoR2 . Console . instance . SubmitCmd ( null , line ) ;
69
56
You can’t perform that action at this time.
0 commit comments