Browse Source

fix(CAPI): 🐛 fix wrong print format

tags/0.1.0
DragonAura 2 years ago
parent
commit
6ffc421cbe
2 changed files with 14 additions and 14 deletions
  1. +8
    -8
      CAPI/cpp/API/src/DebugAPI.cpp
  2. +6
    -6
      CAPI/python/PyAPI/DebugAPI.py

+ 8
- 8
CAPI/cpp/API/src/DebugAPI.cpp View File

@@ -645,7 +645,7 @@ void StudentDebugAPI::PrintStudent() const
{
for (const auto& student : logic.GetStudents())
{
logger->info("\n******Student Info******");
logger->info("******Student Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y);
logger->info("speed={}, view range={}, place={}, radius={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place], student->radius);
std::string skillTime = "";
@@ -670,7 +670,7 @@ void TrickerDebugAPI::PrintStudent() const
{
for (const auto& student : logic.GetStudents())
{
logger->info("\n******Student Info******");
logger->info("******Student Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y);
logger->info("speed={}, view range={}, place={}, radius={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place], student->radius);
std::string skillTime = "";
@@ -695,7 +695,7 @@ void StudentDebugAPI::PrintTricker() const
{
for (const auto& tricker : logic.GetTrickers())
{
logger->info("\n******Tricker Info******");
logger->info("******Tricker Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y);
logger->info("speed={}, view range={}, place={}, radius={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place], tricker->radius);
std::string skillTime = "";
@@ -719,7 +719,7 @@ void TrickerDebugAPI::PrintTricker() const
{
for (auto tricker : logic.GetTrickers())
{
logger->info("\n******Tricker Info******");
logger->info("******Tricker Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y);
logger->info("speed={}, view range={}, place={}, radius={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place], tricker->radius);
std::string skillTime = "";
@@ -743,7 +743,7 @@ void StudentDebugAPI::PrintProp() const
{
for (auto prop : logic.GetProps())
{
logger->info("\n******Prop Info******");
logger->info("******Prop Info******");
logger->info("GUID={}, x={}, y={}, place={}, facing direction={}", prop->guid, prop->x, prop->y, THUAI6::placeTypeDict[prop->place], prop->facingDirection);
logger->info("*********************\n");
}
@@ -753,7 +753,7 @@ void TrickerDebugAPI::PrintProp() const
{
for (auto prop : logic.GetProps())
{
logger->info("\n******Prop Info******");
logger->info("******Prop Info******");
logger->info("GUID={}, x={}, y={}, place={}, facing direction={}", prop->guid, prop->x, prop->y, THUAI6::placeTypeDict[prop->place], prop->facingDirection);
logger->info("*********************\n");
}
@@ -762,7 +762,7 @@ void TrickerDebugAPI::PrintProp() const
void StudentDebugAPI::PrintSelfInfo() const
{
auto student = logic.StudentGetSelfInfo();
logger->info("\n******Self Info******");
logger->info("******Self Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", student->playerID, student->guid, student->x, student->y);
logger->info("speed={}, view range={}, place={}, radius={}", student->speed, student->viewRange, THUAI6::placeTypeDict[student->place], student->radius);
std::string skillTime = "";
@@ -785,7 +785,7 @@ void StudentDebugAPI::PrintSelfInfo() const
void TrickerDebugAPI::PrintSelfInfo() const
{
auto tricker = logic.TrickerGetSelfInfo();
logger->info("\n******Self Info******");
logger->info("******Self Info******");
logger->info("playerID={}, GUID={}, x={}, y={}", tricker->playerID, tricker->guid, tricker->x, tricker->y);
logger->info("speed={}, view range={}, place={}, radius={}", tricker->speed, tricker->viewRange, THUAI6::placeTypeDict[tricker->place], tricker->radius);
std::string skillTime = "";


+ 6
- 6
CAPI/python/PyAPI/DebugAPI.py View File

@@ -311,7 +311,7 @@ class StudentDebugAPI(IStudentAPI, IGameTimer):

def PrintStudent(self) -> None:
for student in self.__logic.GetStudents():
self.__logger.info("\n******Student Info******")
self.__logger.info("******Student Info******")
self.__logger.info(
f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}")
self.__logger.info(
@@ -335,7 +335,7 @@ class StudentDebugAPI(IStudentAPI, IGameTimer):

def PrintTricker(self) -> None:
for tricker in self.__logic.GetTrickers():
self.__logger.info("\n******Tricker Info******")
self.__logger.info("******Tricker Info******")
self.__logger.info(
f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}")
self.__logger.info(
@@ -364,7 +364,7 @@ class StudentDebugAPI(IStudentAPI, IGameTimer):

def PrintSelfInfo(self) -> None:
student = cast(THUAI6.Student, self.__logic.GetSelfInfo())
self.__logger.info("\n******Student Info******")
self.__logger.info("******Student Info******")
self.__logger.info(
f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}")
self.__logger.info(
@@ -763,7 +763,7 @@ class TrickerDebugAPI(ITrickerAPI, IGameTimer):

def PrintStudent(self) -> None:
for student in self.__logic.GetStudents():
self.__logger.info("\n******Student Info******")
self.__logger.info("******Student Info******")
self.__logger.info(
f"playerID={student.playerID}, GUID={student.guid}, x={student.x}, y={student.y}")
self.__logger.info(
@@ -787,7 +787,7 @@ class TrickerDebugAPI(ITrickerAPI, IGameTimer):

def PrintTricker(self) -> None:
for tricker in self.__logic.GetTrickers():
self.__logger.info("\n******Tricker Info******")
self.__logger.info("******Tricker Info******")
self.__logger.info(
f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}")
self.__logger.info(
@@ -816,7 +816,7 @@ class TrickerDebugAPI(ITrickerAPI, IGameTimer):

def PrintSelfInfo(self) -> None:
tricker = cast(THUAI6.Tricker, self.__logic.GetSelfInfo())
self.__logger.info("\n******Tricker Info******")
self.__logger.info("******Tricker Info******")
self.__logger.info(
f"playerID={tricker.playerID}, GUID={tricker.guid}, x={tricker.x}, y={tricker.y}")
self.__logger.info(


Loading…
Cancel
Save