Skip to content

Commit

Permalink
fixes for sinistea line
Browse files Browse the repository at this point in the history
  • Loading branch information
Thutmose committed Oct 28, 2022
1 parent 913d264 commit 5f9da7e
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 46 deletions.
19 changes: 14 additions & 5 deletions processing_scripts/database_update/model_processor.py
Original file line number Diff line number Diff line change
@@ -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):
Expand All @@ -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)
PROCESSORS[entry.name](entry, key, model)
return model
46 changes: 30 additions & 16 deletions processing_scripts/database_update/old/pokemobs/pokemobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -76631,34 +76631,34 @@
"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": [
{
"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"
}
},
{
"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"
}
}
Expand Down Expand Up @@ -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"
}
]
Expand All @@ -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": {
Expand Down
18 changes: 14 additions & 4 deletions processing_scripts/database_update/pokedex_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
],
Expand All @@ -159,23 +159,23 @@
"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"
}
},
{
"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"
}
}
Expand Down

0 comments on commit 5f9da7e

Please sign in to comment.