Skip to content

Commit 722108d

Browse files
committed
finished python interop
1 parent 1379240 commit 722108d

File tree

4 files changed

+180
-90
lines changed

4 files changed

+180
-90
lines changed

python/bot/bot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ def Updating(self, stepping: bool):
3535
case 5:
3636
self.AssignRandomRecipes()
3737

38-
def __init__(self):
38+
def Run(self):
3939
game.LogInfo("bot-py start")
40-
st = game.GameState()
41-
print(f"{st}")
4240
if not game.TryReconnect():
4341
game.SetConnectStartGui(True)
4442
if not game.ConnectEnvironment():

python/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
if __name__ == "__main__":
55
with UwapiLibrary():
6-
Bot()
6+
Bot().Run()

python/uwapi/game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _ExceptionCallback(self, message: str) -> None:
2626
breakpoint
2727

2828
def _LogCallback(self, log: UwLogCallback) -> None:
29-
print(log.message)
29+
pass
3030

3131
def _ConnectionStateCallback(self, state: UwConnectionStateEnum) -> None:
3232
print(state)

0 commit comments

Comments
 (0)