File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
1717along with this program. If not, see <http://www.gnu.org/licenses/>.
1818*/
1919using System ;
20- using System . IO ;
20+ using System . IO ;
2121using System . Linq ;
2222
2323namespace OTAPI . Common ;
@@ -71,6 +71,20 @@ public static ClientInstallPath<ITarget> DetermineClientInstallPath<ITarget>(ITa
7171 else Console . Error . WriteLine ( "Invalid option, expected a number." ) ;
7272 }
7373
74+ // prompt for path
75+ Console . Write ( "Please enter the path to your Terraria installation: " ) ;
76+ var inputPath = Console . ReadLine ( ) ;
77+ if ( inputPath != null )
78+ {
79+ foreach ( var discover in discoverers )
80+ {
81+ if ( discover . IsValidInstallPath ( inputPath ) )
82+ {
83+ return new ClientInstallPath < ITarget > { Path = inputPath , Target = ( ITarget ) discover } ;
84+ }
85+ }
86+ }
87+
7488 throw new DirectoryNotFoundException ( ) ;
7589 }
7690
Original file line number Diff line number Diff line change 1919 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
2020 <PackageReference Include =" System.Private.Uri" Version =" 4.3.2" />
2121 <PackageReference Include =" System.Security.Permissions" Version =" 9.0.2" />
22+ <PackageReference Include =" System.Drawing.Common" Version =" 9.0.2" />
2223 </ItemGroup >
2324 <ItemGroup >
2425 <ProjectReference Include =" ..\FNA\FNA.Core.csproj" />
You can’t perform that action at this time.
0 commit comments