Skip to content

Commit

Permalink
some fixes and stuff for 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tposejank committed Jun 17, 2024
1 parent 53e95ab commit e99e991
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion psychtobase/src/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,4 @@
['/scripts/', '/scripts/'] # Do we need this? YES!
}

VERSION = "0.2"
VERSION = "0.3"
5 changes: 4 additions & 1 deletion psychtobase/src/FileContents.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,7 @@ class ChangeCharacterHandler extends Module {
# https://youtu.be/eB6txyhHFG4

# VocalFan, you are officially removed from the dev team! I hate this song. 😡
# https://youtu.be/22tVWwmTie8?si=2TNmHTDoT7UgQvZ-
# https://youtu.be/22tVWwmTie8?si=2TNmHTDoT7UgQvZ-

# Calm down, dude! This song is better!
# https://youtu.be/VMp55KH_3wo
5 changes: 3 additions & 2 deletions psychtobase/src/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from . import Constants
from re import sub

# modPath = ""

def getRuntime(start:float) -> float:
"""
Small function to keep track of runtime
"""
return start - time.time()

def character(name:str) -> str:
Expand Down
4 changes: 0 additions & 4 deletions psychtobase/src/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ def removeTrail(filename):
return filename.replace('.json', '')

def findAll(folder):
# return all files inside of a directory
# currently only used by the main
# update this!

logging.info(f'Finding all files or directories with glob: {folder}')
return glob(folder)

Expand Down
2 changes: 0 additions & 2 deletions psychtobase/src/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def setup() -> logging.RootLogger:
console_handler = CustomHandler()
console_handler.setFormatter(log_format)

_GB_ToolID = ''

logger.handlers.clear()
logger.addHandler(file_handler)
logger.addHandler(console_handler)
Expand Down
3 changes: 2 additions & 1 deletion psychtobase/src/tools/CharacterTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ def convert(self):
Use ShadowFi's XML Resizer app: https://drive.google.com/file/d/1GoROyQKnMxiM6I0JUZ2_WKM5Aim6nY2o/view
Eg: If the scale of your sprite was 0.6, you want to resize both Sprite Sheet and the XML to 60% of their original size.
"""

## It is fixed!
character['scale'] = psychCharacter['scale']
"""

character['isPixel'] = psychCharacter['scale'] >= 6
character['healthIcon']['id'] = psychCharacter['healthicon']
Expand Down
1 change: 1 addition & 0 deletions psychtobase/src/tools/StageLuaParse.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def parseStage(lua_script_path):

for arg in node.args:
#Me and the boys HATE Lua <3
# true.... better keep testing this!!!!! :imp:
try:
logging.info(f'Starting conversion of lua type: {type(arg)}')
match(type(arg)):
Expand Down
15 changes: 3 additions & 12 deletions psychtobase/src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,18 +538,14 @@ def convertCallback(self, what):

try:
optionsParsed = ''
for key in options.keys():
if type(options[key]) == bool:
optionsParsed += '\n ' + key + ': ' + 'Yes' if options[key] else 'No'
elif type(options[key]) == dict:
optionsParsed += '\n ' + key + ':'
for subkey in options[key].keys():
optionsParsed += '\n ' + subkey + ': ' + 'Yes' if bool(options[key][subkey]) else 'No'
for key in options:
optionsParsed += f'\n {key = }'

# Now writing the last log file, which we can query to the user
open(_defaultsFile, 'w').write(f'{psych_mod_folder_path}\n{result_path}\n\nLAST LOG: {log.logMemory.current_log_file}\n======================\nOPTIONS:{optionsParsed}')
except Exception as e:
logging.error(f'Problems with your save file: {e}')
self.throwError(f'Problems on your save file! {e}')

if psych_mod_folder_path != None and result_path != None:
# try:
Expand Down Expand Up @@ -609,12 +605,7 @@ def init():
try:
window.show()
except Exception as e:
#why does this never fire
logging.critical(f'Window could not show! {e}')

#work in progress
#Window.throwError(self=QDialog, text='d', actual_error_text='poooop')
# print('pooop')

app.exec()

Expand Down

0 comments on commit e99e991

Please sign in to comment.