Skip to content

Commit

Permalink
Merge pull request #333 from eesast/dev
Browse files Browse the repository at this point in the history
v1.0.2
  • Loading branch information
DragonAura authored May 8, 2024
2 parents 9f62f28 + 4ce75f7 commit 7288ca7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CAPI/python/PyAPI/Communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import proto.Message2Clients_pb2 as Message2Clients
import threading
import grpc

import time
from typing import Union


Expand Down
2 changes: 1 addition & 1 deletion installer/Data/MD5FileData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class TVersion
{
// 代码库版本
[JsonInclude]
public Version LibVersion = new Version(1, 0, 2, 1);
public Version LibVersion = new Version(1, 0, 2, 2);
// 选手代码模板版本
[JsonInclude]
public Version TemplateVersion = new Version(1, 0, 0, 3);
Expand Down
4 changes: 2 additions & 2 deletions installer/ViewModel/DebugViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,15 @@ public bool LaunchPyAPI(int team, int player)
{
FileName = "cmd.exe",
Arguments = "/c python "
+ Downloader.Data.Config.DevPyPath ?? Path.Combine(Downloader.Data.Config.InstallPath, "CAPI", "python", "PyAPI", "main.py")
+ (Downloader.Data.Config.DevPyPath ?? Path.Combine(Downloader.Data.Config.InstallPath, "CAPI", "python", "PyAPI", "main.py"))
+ $" -I {IP} -P {Port} -t {team} -p {player} -o"
});
if (py is null)
{
Log.LogError($"未能启动main.py, team:{team}, player: {player}!");
return false;
}
Log.LogError($"main.py启动成功, team:{team}, player: {player}!");
Log.LogInfo($"main.py启动成功, team:{team}, player: {player}!");
children.Add(py);
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion logic/Client/ViewModel/GeneralViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ Show the error message

myLogger.LogInfo(String.Format("ip:{0}, port:{1}, playerid:{2}, teamid:{3}, shiptype:{4}, playbackfile:{5}, playbackspeed:{6}", ip, port, playerID, teamID, shipTypeID, playbackFile, playbackSpeed));

//Playback("E:\\program\\Project\\THUAI7\\logic\\Client\\114514.thuaipb", 2.0);
//Playback("E:\\program\\Project\\playback.thuaipb", 0.5);
if (playbackFile.Length == 0)
{
try
Expand Down Expand Up @@ -1106,6 +1106,7 @@ Show the error message
}
else
{
//myLogger.LogInfo(String.Format("PlaybackFile:{0}", playbackFile));
Playback(playbackFile, playbackSpeed);
}
//连接Server,comInfo[] 的格式:0 - ip 1 - port 2 - playerID 3 - teamID 4 - ShipType
Expand Down
2 changes: 1 addition & 1 deletion logic/GameClass/GameObj/Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Base : IPlayer
public Home Home { get; set; }
public MoneyPool MoneyPool { get; } = new();
public AtomicInt FactoryNum { get; } = new(0);
public int MoneyAddPerSecond => GameData.ScoreHomePerSecond + FactoryNum * GameData.ScoreFactoryPerSecond;
public int MoneyAddPerSecond => FactoryNum * GameData.ScoreFactoryPerSecond + (Home.HP > 0 ? GameData.ScoreHomePerSecond : 0);
public Base(Home home)
{
TeamID = new(home.TeamID);
Expand Down

0 comments on commit 7288ca7

Please sign in to comment.