albibong 1.0.7__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- albibong/__init__.py +92 -8
- albibong/__main__.py +6 -0
- albibong/classes/character.py +7 -23
- albibong/classes/dungeon.py +53 -32
- albibong/classes/event_handler/__init__.py +17 -1
- albibong/classes/event_handler/handle_event_character_equipment_changed.py +2 -10
- albibong/classes/event_handler/handle_event_might_and_favor_received_event.py +18 -0
- albibong/classes/event_handler/handle_event_other_grabbed_loot.py +9 -0
- albibong/classes/event_handler/handle_event_party.py +6 -13
- albibong/classes/event_handler/handle_event_update_fame.py +9 -0
- albibong/classes/event_handler/handle_event_update_re_spec_points.py +9 -0
- albibong/classes/event_handler/handle_operation_change_cluster.py +17 -22
- albibong/classes/event_handler/handle_operation_farmable_harvest.py +17 -0
- albibong/classes/event_handler/handle_operation_join.py +14 -36
- albibong/classes/event_handler/world_data_utils.py +62 -30
- albibong/classes/item.py +19 -4
- albibong/classes/location.py +136 -5
- albibong/classes/utils.py +20 -0
- albibong/gui_dist/assets/index-B31tZ4Ku.css +1 -0
- albibong/gui_dist/assets/index-BkyL_QUY.js +168 -0
- albibong/gui_dist/favor.png +0 -0
- albibong/gui_dist/index.html +2 -2
- albibong/gui_dist/might.png +0 -0
- albibong/migrations/001_init.py +97 -0
- albibong/migrations/002_alter_dungeon_table.py +53 -0
- albibong/models/__init__.py +0 -0
- albibong/models/models.py +12 -0
- albibong/requirements.txt +2 -0
- albibong/resources/items_by_unique_name.json +55282 -0
- albibong/resources/maps.json +259 -259
- albibong/threads/http_server.py +4 -0
- albibong/threads/sniffer_thread.py +39 -2
- albibong/threads/websocket_server.py +80 -43
- {albibong-1.0.7.dist-info → albibong-1.1.1.dist-info}/METADATA +3 -1
- {albibong-1.0.7.dist-info → albibong-1.1.1.dist-info}/RECORD +39 -32
- albibong/gui_dist/assets/index-DZvgNqlG.css +0 -1
- albibong/gui_dist/assets/index-Dt6hyZiS.css +0 -1
- albibong/gui_dist/assets/index-E7pha23k.js +0 -161
- albibong/gui_dist/assets/index-WIuC9Mnh.js +0 -161
- /albibong/resources/{items.json → items_by_id.json} +0 -0
- {albibong-1.0.7.dist-info → albibong-1.1.1.dist-info}/WHEEL +0 -0
- {albibong-1.0.7.dist-info → albibong-1.1.1.dist-info}/entry_points.txt +0 -0
- {albibong-1.0.7.dist-info → albibong-1.1.1.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
albibong/gui_dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/Albibong.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Albibong - Albion Data Tracker</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BkyL_QUY.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B31tZ4Ku.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
|
Binary file
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"""Peewee migrations -- 001_init.py.
|
|
2
|
+
|
|
3
|
+
Some examples (model - class or model name)::
|
|
4
|
+
|
|
5
|
+
> Model = migrator.orm['table_name'] # Return model in current state by name
|
|
6
|
+
> Model = migrator.ModelClass # Return model in current state by name
|
|
7
|
+
|
|
8
|
+
> migrator.sql(sql) # Run custom SQL
|
|
9
|
+
> migrator.run(func, *args, **kwargs) # Run python function with the given args
|
|
10
|
+
> migrator.create_model(Model) # Create a model (could be used as decorator)
|
|
11
|
+
> migrator.remove_model(model, cascade=True) # Remove a model
|
|
12
|
+
> migrator.add_fields(model, **fields) # Add fields to a model
|
|
13
|
+
> migrator.change_fields(model, **fields) # Change fields
|
|
14
|
+
> migrator.remove_fields(model, *field_names, cascade=True)
|
|
15
|
+
> migrator.rename_field(model, old_field_name, new_field_name)
|
|
16
|
+
> migrator.rename_table(model, new_table_name)
|
|
17
|
+
> migrator.add_index(model, *col_names, unique=False)
|
|
18
|
+
> migrator.add_not_null(model, *field_names)
|
|
19
|
+
> migrator.add_default(model, field_name, default)
|
|
20
|
+
> migrator.add_constraint(model, name, sql)
|
|
21
|
+
> migrator.drop_index(model, *col_names)
|
|
22
|
+
> migrator.drop_not_null(model, *field_names)
|
|
23
|
+
> migrator.drop_constraints(model, *constraints)
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from contextlib import suppress
|
|
28
|
+
|
|
29
|
+
import peewee as pw
|
|
30
|
+
from peewee_migrate import Migrator
|
|
31
|
+
|
|
32
|
+
with suppress(ImportError):
|
|
33
|
+
import playhouse.postgres_ext as pw_pext
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def migrate(migrator: Migrator, database: pw.Database, *, fake=False):
|
|
37
|
+
"""Write your migrations here."""
|
|
38
|
+
|
|
39
|
+
print("001_init")
|
|
40
|
+
|
|
41
|
+
@migrator.create_model
|
|
42
|
+
class BaseModel(pw.Model):
|
|
43
|
+
id = pw.AutoField()
|
|
44
|
+
|
|
45
|
+
class Meta:
|
|
46
|
+
table_name = "basemodel"
|
|
47
|
+
|
|
48
|
+
@migrator.create_model
|
|
49
|
+
class Dungeon(pw.Model):
|
|
50
|
+
id = pw.UUIDField(unique=True)
|
|
51
|
+
type = pw.CharField(max_length=255)
|
|
52
|
+
name = pw.CharField(max_length=255)
|
|
53
|
+
tier = pw.IntegerField(default=0)
|
|
54
|
+
fame = pw.FloatField(default=0.0)
|
|
55
|
+
silver = pw.FloatField(default=0.0)
|
|
56
|
+
re_spec = pw.FloatField(default=0.0)
|
|
57
|
+
start_time = pw.DateTimeField()
|
|
58
|
+
end_time = pw.DateTimeField(null=True)
|
|
59
|
+
meter = pw.TextField()
|
|
60
|
+
|
|
61
|
+
class Meta:
|
|
62
|
+
table_name = "dungeon"
|
|
63
|
+
|
|
64
|
+
@migrator.create_model
|
|
65
|
+
class Island(pw.Model):
|
|
66
|
+
uuid = pw.UUIDField(unique=True)
|
|
67
|
+
id = pw.CharField(max_length=255)
|
|
68
|
+
name = pw.CharField(max_length=255)
|
|
69
|
+
type = pw.CharField(max_length=255)
|
|
70
|
+
start_time = pw.DateTimeField()
|
|
71
|
+
crops = pw.TextField()
|
|
72
|
+
animals = pw.TextField()
|
|
73
|
+
|
|
74
|
+
class Meta:
|
|
75
|
+
table_name = "island"
|
|
76
|
+
|
|
77
|
+
@migrator.create_model
|
|
78
|
+
class Location(pw.Model):
|
|
79
|
+
uuid = pw.UUIDField(unique=True)
|
|
80
|
+
id = pw.CharField(max_length=255)
|
|
81
|
+
name = pw.CharField(max_length=255)
|
|
82
|
+
type = pw.CharField(max_length=255)
|
|
83
|
+
|
|
84
|
+
class Meta:
|
|
85
|
+
table_name = "location"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def rollback(migrator: Migrator, database: pw.Database, *, fake=False):
|
|
89
|
+
"""Write your rollback migrations here."""
|
|
90
|
+
|
|
91
|
+
migrator.remove_model("location")
|
|
92
|
+
|
|
93
|
+
migrator.remove_model("island")
|
|
94
|
+
|
|
95
|
+
migrator.remove_model("dungeon")
|
|
96
|
+
|
|
97
|
+
migrator.remove_model("basemodel")
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Peewee migrations -- 002_alter_dungeon_table.py.
|
|
2
|
+
|
|
3
|
+
Some examples (model - class or model name)::
|
|
4
|
+
|
|
5
|
+
> Model = migrator.orm['table_name'] # Return model in current state by name
|
|
6
|
+
> Model = migrator.ModelClass # Return model in current state by name
|
|
7
|
+
|
|
8
|
+
> migrator.sql(sql) # Run custom SQL
|
|
9
|
+
> migrator.run(func, *args, **kwargs) # Run python function with the given args
|
|
10
|
+
> migrator.create_model(Model) # Create a model (could be used as decorator)
|
|
11
|
+
> migrator.remove_model(model, cascade=True) # Remove a model
|
|
12
|
+
> migrator.add_fields(model, **fields) # Add fields to a model
|
|
13
|
+
> migrator.change_fields(model, **fields) # Change fields
|
|
14
|
+
> migrator.remove_fields(model, *field_names, cascade=True)
|
|
15
|
+
> migrator.rename_field(model, old_field_name, new_field_name)
|
|
16
|
+
> migrator.rename_table(model, new_table_name)
|
|
17
|
+
> migrator.add_index(model, *col_names, unique=False)
|
|
18
|
+
> migrator.add_not_null(model, *field_names)
|
|
19
|
+
> migrator.add_default(model, field_name, default)
|
|
20
|
+
> migrator.add_constraint(model, name, sql)
|
|
21
|
+
> migrator.drop_index(model, *col_names)
|
|
22
|
+
> migrator.drop_not_null(model, *field_names)
|
|
23
|
+
> migrator.drop_constraints(model, *constraints)
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
from contextlib import suppress
|
|
28
|
+
|
|
29
|
+
import peewee as pw
|
|
30
|
+
from peewee_migrate import Migrator
|
|
31
|
+
|
|
32
|
+
with suppress(ImportError):
|
|
33
|
+
import playhouse.postgres_ext as pw_pext
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def migrate(migrator: Migrator, database: pw.Database, *, fake=False):
|
|
37
|
+
"""Write your migrations here."""
|
|
38
|
+
|
|
39
|
+
print("002_alter_dungeon_table")
|
|
40
|
+
|
|
41
|
+
migrator.add_fields(
|
|
42
|
+
"dungeon", favor=pw.FloatField(default=0.0), might=pw.FloatField(default=0.0)
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
migrator.change_fields("dungeon", tier=pw.FloatField(default=0.0))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def rollback(migrator: Migrator, database: pw.Database, *, fake=False):
|
|
49
|
+
"""Write your rollback migrations here."""
|
|
50
|
+
|
|
51
|
+
migrator.remove_fields("dungeon", "favor", "might")
|
|
52
|
+
|
|
53
|
+
migrator.change_fields("dungeon", tier=pw.IntegerField(default=0))
|
|
File without changes
|