aboutsummaryrefslogtreecommitdiff
path: root/codegen/genentities.py
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-11-06 14:05:01 -0600
committerGitHub <noreply@github.com>2022-11-06 14:05:01 -0600
commitd112856ff6353592a50658b0ddd316f54dd97b87 (patch)
tree6c408ecab96012e3bffaf15843fad5b9b6817796 /codegen/genentities.py
parent9bc517511663193f3166320db4cb5ca02701b039 (diff)
downloadazalea-drasl-d112856ff6353592a50658b0ddd316f54dd97b87.tar.xz
Entity metadata (#37)
* add example generated metadata.rs * metadata.rs codegen * add the files * add comment to top of metadata.rs * avoid clone * metadata * defaults * defaults * fix metadata readers and writers * fix bad bitmasks and ignore some clippy warnings in generated code * add set_index function to entity metadatas * applying metadata
Diffstat (limited to 'codegen/genentities.py')
-rw-r--r--codegen/genentities.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/codegen/genentities.py b/codegen/genentities.py
new file mode 100644
index 00000000..cdd1653e
--- /dev/null
+++ b/codegen/genentities.py
@@ -0,0 +1,19 @@
+import lib.code.version
+import lib.code.entity
+import lib.code.utils
+import lib.download
+import lib.extract
+import sys
+
+version_id = lib.code.version.get_version_id()
+
+mappings = lib.download.get_mappings_for_version(version_id)
+burger_data = lib.extract.get_burger_data_for_version(version_id)
+
+burger_entity_data = burger_data[0]['entities']['entity']
+
+lib.code.entity.generate_entity_metadata(burger_entity_data, mappings)
+
+lib.code.utils.fmt()
+
+print('Done!')