Update Terminal.py for 1.7.24+ (API 8)

This commit is contained in:
! Freaku 2023-07-29 13:18:21 +05:30 committed by GitHub
parent 3c4f2e2e9a
commit b80f89a3f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
#Made by your friend: Freaku / @[Just] Freak#4999
# Made by your friend: Freaku
# Defines a simple plugin that allows you to:
@ -91,7 +91,7 @@ def make_config(entry):
def dump_cache_logs():
# Dumps all cache logs (including DEBUG ones)
for entry in baenv._g_env_config.log_handler.get_cached().entries:
for entry in baenv._EnvGlobals.get().config.log_handler.get_cached().entries:
write_logs(entry.message)
def make_logs(entry):
@ -154,7 +154,7 @@ class get_logs(babase.Plugin):
make_folder()
open(log_post, 'w+').close()
dump_cache_logs()
baenv._g_env_config.log_handler.add_callback(make_logs)
baenv._EnvGlobals.get().config.log_handler.add_callback(make_logs)
# ba_meta export plugin
@ -255,3 +255,4 @@ class Terminal_get3Dpoint(bs.TeamGameActivity[Player, Team]):
else:
return super().handlemessage(msg)
return None
return None