Skip to content

Commit

Permalink
Moved some files to folders
Browse files Browse the repository at this point in the history
  • Loading branch information
loco-choco committed May 29, 2022
1 parent eb0d3ea commit cf4882b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion OWAML.Manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Locochoco",
"name": "OWAML",
"uniqueName": "Locochoco.OWAML",
"version": "1.0.1",
"version": "1.0.2",
"minBepInExVersion": "5.4.17",
"maxBepInExVersion": "5.4.19"
}
8 changes: 8 additions & 0 deletions OWAML.Manifest.json.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"author": "Locochoco",
"name": "OWAML",
"uniqueName": "Locochoco.OWAML",
"version": "1.0.1",
"minBepInExVersion": "5.4.17",
"maxBepInExVersion": "5.4.19"
}
File renamed without changes.
11 changes: 1 addition & 10 deletions OWAML/SocketListener.cs → OWAML/ModConsole/SocketListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,13 @@ private void ListenToSocket()
while (true)
{
var client = _server.AcceptTcpClient();

ConsoleUtils.WriteByType("Console connected to socket!", MessageType.Success);

var stream = client.GetStream();

int i;

while ((i = stream.Read(bytes, 0, bytes.Length)) != 0)
{
ProcessMessage(bytes, i);
}

ConsoleUtils.WriteByType("Closing client!", MessageType.Success);
client.Close();
Expand All @@ -83,9 +79,7 @@ private void ProcessMessage(byte[] bytes, int count)
foreach (var json in jsons)
{
if (string.IsNullOrWhiteSpace(json))
{
continue;
}

ModSocketMessage data;
try
Expand All @@ -100,13 +94,10 @@ private void ProcessMessage(byte[] bytes, int count)
}

if (data.Type == MessageType.Quit && !_hasReceivedFatalMessage)
{
Environment.Exit(0);
}

else if (data.Type == MessageType.Fatal)
{
_hasReceivedFatalMessage = true;
}

var nameTypePrefix = $"[{data.SenderName}] : ";

Expand Down
4 changes: 2 additions & 2 deletions OWAML/OWAML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
<Compile Include="ConfigurationFileCheckData.cs" />
<Compile Include="ConsoleUtil.cs" />
<Compile Include="FileVerificationAndInitialization.cs" />
<Compile Include="ModSocketMessage.cs" />
<Compile Include="ModConsole\ModSocketMessage.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SocketListener.cs" />
<Compile Include="ModConsole\SocketListener.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down

0 comments on commit cf4882b

Please sign in to comment.