File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,14 +64,12 @@ class UIImageExplorer extends UIFileExplorer {
6464 directoryBG .members .push (directoryTextBox );
6565
6666 if (image != null ) {
67- var fullImagePath : String = ' ${Path .normalize (Sys .getCwd ())}/ ${Paths .image (image )}' .replace (' /' , ' \\ ' );
68- if (! FileSystem .exists (fullImagePath ))
69- fullImagePath = fullImagePath .replace (' assets' , ' ${ModsFolder .modsPath }\\ ${ModsFolder .currentModFolder }' );
70-
71- var noExt = Path .withoutExtension (fullImagePath );
72- if (FileSystem .exists (' $noExt \\ spritemap1.png' ))
73- fullImagePath = ' $noExt \\ spritemap1.png' ;
74-
67+ var imagePath : String = Paths .image (image );
68+ var noExt = Path .withoutExtension (imagePath );
69+ if (Paths .assetsTree .getPath (' $noExt \\ spritemap1.png' ) != null )
70+ imagePath = ' $noExt \\ spritemap1.png' ;
71+
72+ var fullImagePath : String = ' ${Path .normalize (Sys .getCwd ())}/ ${Paths .assetsTree .getPath (imagePath )}' .replace (' /' , ' \\ ' );
7573 if (FileSystem .exists (fullImagePath ))
7674 loadFile (fullImagePath );
7775
You can’t perform that action at this time.
0 commit comments