mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix the dumb
This commit is contained in:
parent
972187d8ed
commit
5df00b0c7f
1 changed files with 15 additions and 10 deletions
|
|
@ -34,7 +34,9 @@ namespace Penumbra;
|
||||||
|
|
||||||
public class Penumbra : IDalamudPlugin
|
public class Penumbra : IDalamudPlugin
|
||||||
{
|
{
|
||||||
public const string Repository = "https://raw.githubusercontent.com/xivdev/Penumbra/master/repo.json";
|
public const string Repository = "https://raw.githubusercontent.com/xivdev/Penumbra/master/repo.json";
|
||||||
|
public const string RepositoryLower = "https://raw.githubusercontent.com/xivdev/penumbra/master/repo.json";
|
||||||
|
public const string TestRepositoryLower = "https://raw.githubusercontent.com/xivdev/penumbra/test/repo.json";
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
=> "Penumbra";
|
=> "Penumbra";
|
||||||
|
|
@ -344,7 +346,7 @@ public class Penumbra : IDalamudPlugin
|
||||||
collectionName = split[ 0 ];
|
collectionName = split[ 0 ];
|
||||||
characterName = split[ 1 ];
|
characterName = split[ 1 ];
|
||||||
|
|
||||||
identifier = Actors.CreatePlayer( ByteString.FromStringUnsafe( characterName, false ), ushort.MaxValue );
|
identifier = Actors.CreatePlayer( ByteString.FromStringUnsafe( characterName, false ), ushort.MaxValue );
|
||||||
if( !identifier.IsValid )
|
if( !identifier.IsValid )
|
||||||
{
|
{
|
||||||
Dalamud.Chat.Print( $"{characterName} is not a valid character name." );
|
Dalamud.Chat.Print( $"{characterName} is not a valid character name." );
|
||||||
|
|
@ -566,7 +568,7 @@ public class Penumbra : IDalamudPlugin
|
||||||
{
|
{
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
var path = Path.Combine( Dalamud.PluginInterface.DalamudAssetDirectory.Parent?.FullName ?? "INVALIDPATH", "devPlugins", "Penumbra" );
|
var path = Path.Combine( Dalamud.PluginInterface.DalamudAssetDirectory.Parent?.FullName ?? "INVALIDPATH", "devPlugins", "Penumbra" );
|
||||||
var dir = new DirectoryInfo( path );
|
var dir = new DirectoryInfo( path );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -587,9 +589,12 @@ public class Penumbra : IDalamudPlugin
|
||||||
{
|
{
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
var checkedDirectory = Dalamud.PluginInterface.AssemblyLocation.Directory?.Parent?.Parent?.Name;
|
var checkedDirectory = Dalamud.PluginInterface.AssemblyLocation.Directory?.Parent?.Parent?.Name;
|
||||||
var ret = checkedDirectory?.Equals( "installedPlugins", StringComparison.OrdinalIgnoreCase ) ?? false;
|
var ret = checkedDirectory?.Equals( "installedPlugins", StringComparison.OrdinalIgnoreCase ) ?? false;
|
||||||
if (!ret)
|
if( !ret )
|
||||||
Log.Error($"Penumbra is not correctly installed. Application loaded from \"{Dalamud.PluginInterface.AssemblyLocation.Directory!.FullName}\"." );
|
{
|
||||||
|
Log.Error( $"Penumbra is not correctly installed. Application loaded from \"{Dalamud.PluginInterface.AssemblyLocation.Directory!.FullName}\"." );
|
||||||
|
}
|
||||||
|
|
||||||
return !ret;
|
return !ret;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -602,10 +607,10 @@ public class Penumbra : IDalamudPlugin
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
return Dalamud.PluginInterface.SourceRepository.Trim().ToLowerInvariant() switch
|
return Dalamud.PluginInterface.SourceRepository.Trim().ToLowerInvariant() switch
|
||||||
{
|
{
|
||||||
null => false,
|
null => false,
|
||||||
Repository => true,
|
RepositoryLower => true,
|
||||||
"https://raw.githubusercontent.com/xivdev/Penumbra/test/repo.json" => true,
|
TestRepositoryLower => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue