mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
only print new check once in web ui
This commit is contained in:
@@ -35,6 +35,8 @@ import WebUI
|
|||||||
import Regions
|
import Regions
|
||||||
import Utils
|
import Utils
|
||||||
|
|
||||||
|
# logging note:
|
||||||
|
# logging.* gets send to only the text console, logger.* gets send to the WebUI as well, if it's initialized.
|
||||||
logger = logging.getLogger("Client")
|
logger = logging.getLogger("Client")
|
||||||
|
|
||||||
|
|
||||||
@@ -1160,7 +1162,7 @@ async def track_locations(ctx : Context, roomid, roomdata):
|
|||||||
|
|
||||||
def new_check(location):
|
def new_check(location):
|
||||||
ctx.unsafe_locations_checked.add(location)
|
ctx.unsafe_locations_checked.add(location)
|
||||||
logger.info("New check: %s (%d/216)" % (location, len(ctx.unsafe_locations_checked)))
|
logging.info("New check: %s (%d/216)" % (location, len(ctx.unsafe_locations_checked)))
|
||||||
ctx.ui_node.send_location_check(ctx, location)
|
ctx.ui_node.send_location_check(ctx, location)
|
||||||
|
|
||||||
for location, (loc_roomid, loc_mask) in location_table_uw.items():
|
for location, (loc_roomid, loc_mask) in location_table_uw.items():
|
||||||
@@ -1168,7 +1170,7 @@ async def track_locations(ctx : Context, roomid, roomdata):
|
|||||||
if location not in ctx.unsafe_locations_checked and loc_roomid == roomid and (roomdata << 4) & loc_mask != 0:
|
if location not in ctx.unsafe_locations_checked and loc_roomid == roomid and (roomdata << 4) & loc_mask != 0:
|
||||||
new_check(location)
|
new_check(location)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.info(f"Exception: {e}")
|
logger.exception(f"Exception: {e}")
|
||||||
|
|
||||||
uw_begin = 0x129
|
uw_begin = 0x129
|
||||||
uw_end = 0
|
uw_end = 0
|
||||||
|
Reference in New Issue
Block a user