diff --git a/processing_scripts/database_update/model_processor.py b/processing_scripts/database_update/model_processor.py index 9e2a2d9c6a..f4b5068961 100644 --- a/processing_scripts/database_update/model_processor.py +++ b/processing_scripts/database_update/model_processor.py @@ -1,14 +1,20 @@ -def _process_burmy(entry, key, model): +def _process_tex_only(entry, key, model): + model['key'] = key model['model'] = entry.name model['anim'] = entry.name - model['key'] = key model['tex'] = key +def _process_model_only(entry, key, model): + model['key'] = key + model['model'] = key + model['anim'] = entry.name + model['tex'] = entry.name + def _process_no_custom(entry, key, model): + model['key'] = key model['model'] = entry.name model['anim'] = entry.name - model['key'] = key model['tex'] = entry.name def _process_arceus_silvally(entry, key, model): @@ -20,14 +26,17 @@ def _process_arceus_silvally(entry, key, model): PROCESSORS = { 'arceus': _process_arceus_silvally, 'silvally': _process_arceus_silvally, - 'burmy': _process_burmy, + 'burmy': _process_tex_only, 'genesect': _process_no_custom, 'furfrou': _process_no_custom, 'flabebe': _process_no_custom, 'floette': _process_no_custom, 'florges': _process_no_custom, + 'sinistea': _process_model_only, + 'polteageist': _process_model_only, } def process_model(entry, key, model): if entry.name in PROCESSORS: - PROCESSORS[entry.name](entry, key, model) \ No newline at end of file + PROCESSORS[entry.name](entry, key, model) + return model \ No newline at end of file diff --git a/processing_scripts/database_update/old/pokemobs/pokemobs.json b/processing_scripts/database_update/old/pokemobs/pokemobs.json index 6374d68beb..2f62ee0f08 100644 --- a/processing_scripts/database_update/old/pokemobs/pokemobs.json +++ b/processing_scripts/database_update/old/pokemobs/pokemobs.json @@ -76631,10 +76631,10 @@ "mega": false, "gmax": false, "model": { - "key": "sinistea_nofake", + "key": "sinistea-antique", "tex": "sinistea", - "model": "sinistea_nofake", - "anim": "sinistea_nofake" + "model": "sinistea-antique", + "anim": "sinistea-antique" }, "stats": { "evolutions": [ @@ -76642,11 +76642,11 @@ "name": "Polteageist", "item_preset": "chippedpot", "evoMoves": "teatime", - "form_from": "sinistea_nofake", + "form_from": "sinistea-antique", "model": { - "key": "polteageist_nofake", + "key": "polteageist-antique", "tex": "polteageist", - "model": "polteageist_nofake", + "model": "polteageist-antique", "anim": "polteageist" } }, @@ -76654,11 +76654,11 @@ "name": "Polteageist", "item_preset": "crackedpot", "evoMoves": "teatime", - "form_from": "sinistea_fake", + "form_from": "sinistea-phony", "model": { - "key": "polteageist_fake", + "key": "polteageist-phony", "tex": "polteageist", - "model": "polteageist_fake", + "model": "polteageist-phony", "anim": "polteageist" } } @@ -76712,15 +76712,15 @@ }, "models": [ { - "key": "sinistea_nofake", + "key": "sinistea-antique", "tex": "sinistea", - "model": "sinistea_nofake", + "model": "sinistea-antique", "anim": "sinistea" }, { - "key": "sinistea_fake", + "key": "sinistea-phony", "tex": "sinistea", - "model": "sinistea_fake", + "model": "sinistea-phony", "anim": "sinistea" } ] @@ -76738,11 +76738,25 @@ "mega": false, "gmax": false, "model": { - "key": "polteageist_nofake", + "key": "polteageist-antique", "tex": "polteageist", - "model": "polteageist_nofake", - "anim": "polteageist_nofake" + "model": "polteageist-antique", + "anim": "polteageist" }, + "models": [ + { + "key": "polteageist-antique", + "tex": "polteageist", + "model": "polteageist-antique", + "anim": "polteageist" + }, + { + "key": "polteageist-phony", + "tex": "polteageist", + "model": "polteageist-phony", + "anim": "polteageist" + } + ], "stats": { "lootTable": "pokecube:entities/enderpearls_2", "stats": { diff --git a/processing_scripts/database_update/pokedex_converter.py b/processing_scripts/database_update/pokedex_converter.py index bf1a38565e..8eb0213a58 100644 --- a/processing_scripts/database_update/pokedex_converter.py +++ b/processing_scripts/database_update/pokedex_converter.py @@ -282,13 +282,23 @@ def __init__(self, species, dex, custom_moves, custom_sizes) -> None: # Copy old model info over if 'model' in old_entry: - entry.model = old_entry['model'] + model = old_entry['model'] + key = model['key'] + entry.model = process_model(entry, key, model) if 'male_model' in old_entry: - entry.male_model = old_entry['male_model'] + model = old_entry['male_model'] + key = model['key'] + entry.male_model = process_model(entry, key, model) if 'female_model' in old_entry: - entry.female_model = old_entry['female_model'] + model = old_entry['female_model'] + key = model['key'] + entry.female_model = process_model(entry, key, model) if 'models' in old_entry: - entry.add_models(old_entry['models']) + models = [m for m in old_entry['models']] + for model in models: + key = model['key'] + process_model(entry, key, model) + entry.add_models(models) elif len(forme.forms) > 1: models = [] # Automatically make and add models for each forme if multiple diff --git a/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/polteageist.json b/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/polteageist.json index 2ef8ba6000..0e40f80756 100644 --- a/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/polteageist.json +++ b/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/polteageist.json @@ -144,19 +144,23 @@ ] }, "model": { - "key": "polteageist-phony", - "tex": "polteageist-phony", - "model": "polteageist-phony", - "anim": "polteageist-phony", - "types": "ghost" + "key": "polteageist-antique", + "tex": "polteageist", + "model": "polteageist-antique", + "anim": "polteageist" }, "models": [ { "key": "polteageist-antique", - "tex": "polteageist-antique", + "tex": "polteageist", "model": "polteageist-antique", - "anim": "polteageist-antique", - "types": "ghost" + "anim": "polteageist" + }, + { + "key": "polteageist-phony", + "tex": "polteageist", + "model": "polteageist-phony", + "anim": "polteageist" } ], "loot_table": "pokecube:entities/enderpearls_2" diff --git a/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/sinistea.json b/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/sinistea.json index 25e41da54c..080fe2d873 100644 --- a/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/sinistea.json +++ b/src/generated/resources/data/pokecube_mobs/database/pokemobs/pokedex_entries/sinistea.json @@ -135,22 +135,22 @@ ] }, "model": { - "key": "sinistea_nofake", + "key": "sinistea-antique", "tex": "sinistea", - "model": "sinistea_nofake", - "anim": "sinistea_nofake" + "model": "sinistea-antique", + "anim": "sinistea" }, "models": [ { - "key": "sinistea_nofake", + "key": "sinistea-antique", "tex": "sinistea", - "model": "sinistea_nofake", + "model": "sinistea-antique", "anim": "sinistea" }, { - "key": "sinistea_fake", + "key": "sinistea-phony", "tex": "sinistea", - "model": "sinistea_fake", + "model": "sinistea-phony", "anim": "sinistea" } ], @@ -159,11 +159,11 @@ "name": "polteageist", "item_preset": "chippedpot", "evoMoves": "teatime", - "form_from": "sinistea_nofake", + "form_from": "sinistea-antique", "model": { - "key": "polteageist_nofake", + "key": "polteageist-antique", "tex": "polteageist", - "model": "polteageist_nofake", + "model": "polteageist-antique", "anim": "polteageist" } }, @@ -171,11 +171,11 @@ "name": "polteageist", "item_preset": "crackedpot", "evoMoves": "teatime", - "form_from": "sinistea_fake", + "form_from": "sinistea-phony", "model": { - "key": "polteageist_fake", + "key": "polteageist-phony", "tex": "polteageist", - "model": "polteageist_fake", + "model": "polteageist-phony", "anim": "polteageist" } } diff --git a/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist_nofake.x3d b/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist-antique.x3d similarity index 100% rename from src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist_nofake.x3d rename to src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist-antique.x3d diff --git a/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist_fake.x3d b/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist-phony.x3d similarity index 100% rename from src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist_fake.x3d rename to src/main/resources/assets/pokecube_mobs/models/entity/pokemob/polteageist-phony.x3d diff --git a/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea_nofake.x3d b/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea-antique.x3d similarity index 100% rename from src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea_nofake.x3d rename to src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea-antique.x3d diff --git a/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea_fake.x3d b/src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea-phony.x3d similarity index 100% rename from src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea_fake.x3d rename to src/main/resources/assets/pokecube_mobs/models/entity/pokemob/sinistea-phony.x3d