File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public partial class Credits : Node2D {
1010 public override void _Ready ( ) {
1111 log . Information ( "Now rolling the credits!" ) ;
1212 try {
13- creditsText = System . IO . File . ReadAllText ( "./ Text/credits.txt") ;
13+ creditsText = System . IO . File . ReadAllText ( ProjectSettings . GlobalizePath ( @"res:// Text/credits.txt") ) ;
1414 } catch ( System . Exception ex ) {
1515 log . Error ( ex , "Failed to read from credits.txt!" ) ;
1616 }
Original file line number Diff line number Diff line change @@ -58,10 +58,11 @@ public ConfigEntry() {
5858
5959 static TextureLoader ( ) {
6060 lua = new Lua ( ) ;
61- lua . DoString ( $ "package.path = './Text/TextureConfigs/?.lua;./Text/TextureConfigs/*/?.lua'") ;
61+ string textureConfigFolder = ProjectSettings . GlobalizePath ( @"res://Text/TextureConfigs" ) ;
62+ lua . DoString ( $ "package.path = '{ textureConfigFolder } /?.lua;{ textureConfigFolder } /*/?.lua'") ;
6263
63- civ3TextureConfig = ( LuaTable ) lua . DoFile ( "./Text/TextureConfigs /civ3.lua") [ 0 ] ;
64- c7TextureConfig = ( LuaTable ) lua . DoFile ( "./Text/TextureConfigs /c7.lua") [ 0 ] ;
64+ civ3TextureConfig = ( LuaTable ) lua . DoFile ( $ " { textureConfigFolder } /civ3.lua") [ 0 ] ;
65+ c7TextureConfig = ( LuaTable ) lua . DoFile ( $ " { textureConfigFolder } /c7.lua") [ 0 ] ;
6566
6667 textureConfig = civ3TextureConfig ;
6768 modernGraphics = false ;
You can’t perform that action at this time.
0 commit comments