diff --git a/psychjsontocodenamexml.py b/psychjsontocodenamexml.py index 09a5a5a..02354af 100644 --- a/psychjsontocodenamexml.py +++ b/psychjsontocodenamexml.py @@ -24,21 +24,28 @@ def convAnim(a): print('CONVERTING"' + a['anim'] + '" SUCCESS') return b +ch = [['isPlayer="false"', 'dad'], ['isPlayer="true"', 'bf'], ['isPlayer="false" isGF="true"', 'gf']] def sC(): - sc = False + sc = 'isPlayer="false"' textfileee = open('config.json', "r").read() textfileee2 = json.loads(textfileee) if (textfileee2['askIfPlayer'] == True): - sc = (input('Do you wish for ' + str(sys.argv[1]).rstrip('.json')+' to be a player character (y/n): ') == 'y') + sc = (input('What is the character type for ' + str(sys.argv[1]).rstrip('.json')+'? (dad/bf/gf): ')) + for i in range(len(ch)): + if ch[i][1]==sc: sc = ch[i][0] + if not sc.startswith('i'): + print('wtffff invalid input!?!?!?, crashin!!!') + sys.exit() + return sc def convert(jsonfile): #turns psych char json into codename xml jsonthing = json.loads(jsonfile) print('SUCCESSFULLY LOADED JSON') - specialChoice = str(sC()).lower() + specialChoice = sC() print('CONVERTING') codenamefile = '' - codenamefile+='\n