Merge branch 'pr/n65_enable-disable-commands'

This commit is contained in:
Ottermandias 2021-10-19 11:08:55 +02:00
commit 5084bf603c
2 changed files with 39 additions and 1 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />

View file

@ -180,6 +180,44 @@ namespace Penumbra
SettingsInterface.MakeDebugTabVisible();
break;
}
case "enable":
{
if( Config.IsEnabled )
{
Dalamud.Chat.Print("Your mods are already enabled. To disable your mods, please run the following command instead: /penumbra disable");
}
else
{
Config.IsEnabled = true;
ObjectReloader.RedrawAll( RedrawType.WithSettings );
if( Config.EnablePlayerWatch )
{
Penumbra.PlayerWatcher.SetStatus( true );
}
Config.Save();
Dalamud.Chat.Print("Your mods have now been enabled.");
}
break;
}
case "disable":
{
if( !Config.IsEnabled )
{
Dalamud.Chat.Print("Your mods are already disabled. To enable your mods, please run the following command instead: /penumbra enable");
}
else
{
Config.IsEnabled = false;
ObjectReloader.RedrawAll( RedrawType.WithoutSettings );
if( Config.EnablePlayerWatch )
{
Penumbra.PlayerWatcher.SetStatus( false );
}
Config.Save();
Dalamud.Chat.Print("Your mods have now been disabled.");
}
break;
}
}
return;