Implemented Comparison Nodes and Low Health Alerts
This commit is contained in:
@ -36,7 +36,7 @@ def get_draw_stat_port(color, border_color=None, alpha=127):
|
||||
|
||||
class CharacterStatusNode(BaseNode):
|
||||
__identifier__ = 'bunny-lab.io.flyff_character_status_node'
|
||||
NODE_NAME = 'Character Status'
|
||||
NODE_NAME = 'Flyff - Character Status'
|
||||
|
||||
def __init__(self):
|
||||
super(CharacterStatusNode, self).__init__()
|
||||
@ -58,7 +58,7 @@ class CharacterStatusNode(BaseNode):
|
||||
self.add_output("FP: Total", painter_func=get_draw_stat_port((36, 197, 28)))
|
||||
self.add_output("EXP", painter_func=get_draw_stat_port((52, 195, 250)))
|
||||
|
||||
self.set_name("Character Status (API Disconnected)")
|
||||
self.set_name("Flyff - Character Status (API Disconnected)")
|
||||
|
||||
# Start polling timer
|
||||
self.timer = QtCore.QTimer()
|
||||
@ -95,7 +95,7 @@ class CharacterStatusNode(BaseNode):
|
||||
else:
|
||||
print(f"[WARNING] Unexpected API key: {key} (not mapped)")
|
||||
|
||||
self.set_name("Character Status (API Connected)")
|
||||
self.set_name("Flyff - Character Status (API Connected)")
|
||||
self.update()
|
||||
self.transmit_data()
|
||||
|
||||
@ -104,14 +104,14 @@ class CharacterStatusNode(BaseNode):
|
||||
print("[ERROR] Stack Trace:\n", traceback.format_exc())
|
||||
else:
|
||||
print("[ERROR] Unexpected API response format (not a dict):", data)
|
||||
self.set_name("Character Status (API Disconnected)")
|
||||
self.set_name("Flyff - Character Status (API Disconnected)")
|
||||
|
||||
else:
|
||||
print(f"[ERROR] API request failed with status code {response.status_code}")
|
||||
self.set_name("Character Status (API Disconnected)")
|
||||
self.set_name("Flyff - Character Status (API Disconnected)")
|
||||
|
||||
except Exception as e:
|
||||
self.set_name("Character Status (API Disconnected)")
|
||||
self.set_name("Flyff - Character Status (API Disconnected)")
|
||||
print("[ERROR] Error polling API in CharacterStatusNode:", str(e))
|
||||
print("[ERROR] Stack Trace:\n", traceback.format_exc())
|
||||
|
||||
|
Reference in New Issue
Block a user