From c00d9b84297ebec33b2a69a841cd8aeb5b71a736 Mon Sep 17 00:00:00 2001 From: MaD_CaT Date: Fri, 25 Apr 2025 10:58:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D1=81=D0=BF=D0=B0=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B8=20=D0=B8=D0=B7=20json=20id=20=D1=86?= =?UTF-8?q?=D0=B5=D0=BB=D0=B8=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D1=80=D1=83=D0=B7=D0=BA=D0=B5=20=D0=B8=D0=B7=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- threats.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/threats.gd b/threats.gd index 20df4dd..a31648c 100644 --- a/threats.gd +++ b/threats.gd @@ -302,12 +302,14 @@ func load_treats(table): var json_data = json_conv.get_data() for item in json_data: if item.has('id'): - var id = item['id'] + var id = int(item['id']) id_array.erase(int(id)) var threat : = Threat.new(id, table.get_rows_count()) treats['%d' % id] = threat for key in item: - threat.row[key] = [item[key], true] + if key == 'id': threat.row[key] = [int(item[key]), true] + elif key == 'tick': threat.row[key] = [int(item[key]), true] + else: threat.row[key] = [item[key], true] var row = threat.update_rows() table.add_row(TABLE_ROW_TYPES) table.set_row_text(table.get_rows_count()-1, row)