Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Unturned
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ds
Rocket.Unturned
Commits
29a007e1
Unverified
Commit
29a007e1
authored
Aug 17, 2019
by
Enes Sadık Özbek
Committed by
GitHub
Aug 17, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Remove RocketMod's console input handling
It conflicts with Unturned's recently added own input handling.
parent
ab9f3c92
Branches
Branches containing commit
Tags
4.9.3.0
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Rocket.Unturned/UnturnedConsole.cs
+1
-64
1 addition, 64 deletions
Rocket.Unturned/UnturnedConsole.cs
with
1 addition
and
64 deletions
Rocket.Unturned/UnturnedConsole.cs
+
1
−
64
View file @
29a007e1
...
...
@@ -9,69 +9,6 @@ namespace Rocket.Unturned
{
public
class
UnturnedConsole
:
MonoBehaviour
{
FileStream
fileStream
=
null
;
StreamWriter
streamWriter
=
null
;
UnturnedConsoleWriter
writer
=
null
;
private
void
Awake
()
{
try
{
fileStream
=
new
FileStream
(
String
.
Format
(
Environment
.
ConsoleFile
,
Dedicator
.
serverID
),
FileMode
.
Create
,
FileAccess
.
Write
,
FileShare
.
ReadWrite
);
streamWriter
=
new
StreamWriter
(
fileStream
,
System
.
Text
.
Encoding
.
UTF8
)
{
AutoFlush
=
true
};
writer
=
new
UnturnedConsoleWriter
(
streamWriter
);
readingThread
=
new
Thread
(
new
ThreadStart
(
DoRead
));
readingThread
.
Start
();
}
catch
(
Exception
ex
)
{
Core
.
Logging
.
Logger
.
Log
(
"Error: "
+
ex
.
ToString
());
}
}
private
void
Destroy
()
{
if
(
fileStream
!=
null
)
{
fileStream
.
Close
();
fileStream
.
Dispose
();
}
if
(
streamWriter
!=
null
)
{
streamWriter
.
Close
();
streamWriter
.
Dispose
();
}
if
(
writer
!=
null
)
{
writer
.
Close
();
writer
.
Dispose
();
}
}
private
static
Thread
readingThread
;
private
static
void
DoRead
()
{
string
x
;
do
{
try
{
x
=
System
.
Console
.
ReadLine
();
if
(
x
!=
null
&&
CommandWindow
.
input
!=
null
&&
CommandWindow
.
input
.
onInputText
!=
null
&&
x
.
Trim
().
Length
!=
0
)
CommandWindow
.
input
.
onInputText
(
x
);
}
catch
(
Exception
ex
)
{
Core
.
Logging
.
Logger
.
LogException
(
ex
);
}
}
while
(
true
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment