Skip to content

Commit

Permalink
Merge pull request #1254 from StoiaCode/master
Browse files Browse the repository at this point in the history
Disable and uncheck NPC Face when Penumbra API is turned on.
  • Loading branch information
Yuki-Codes authored Dec 13, 2022
2 parents 18379dd + a04c28b commit 0028192
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
15 changes: 8 additions & 7 deletions Anamnesis/Actor/Refresh/AnamnesisActorRefresher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@ public async Task RefreshActor(ActorMemory actor)
await Task.Delay(16);
if (SettingsService.Current.EnableNpcHack && actor.ObjectKind == ActorTypes.Player)
{
actor.ObjectKind = ActorTypes.BattleNpc;
actor.RenderMode = RenderModes.Unload;
await Task.Delay(75);
actor.RenderMode = RenderModes.Draw;
await Task.Delay(75);
actor.ObjectKind = ActorTypes.Player;
actor.RenderMode = RenderModes.Draw;
actor.ObjectKind = ActorTypes.BattleNpc;
actor.RenderMode = RenderModes.Unload;
await Task.Delay(75);
actor.RenderMode = RenderModes.Draw;
await Task.Delay(75);
actor.ObjectKind = ActorTypes.Player;
actor.RenderMode = RenderModes.Draw;
}
else
{
actor.RenderMode = RenderModes.Unload;
await Task.Delay(75);
actor.RenderMode = RenderModes.Draw;
}

await Task.Delay(150);
}
}
2 changes: 1 addition & 1 deletion Anamnesis/Languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
"Settings_UseExternalRefresh": "Penumbra Redraw benutzen",
"Settings_UseExternalRefreshWarning": "Benötigt aktivierte Penumbra HTTP API.",
"Settings_EnableNpcHack": "Aktiviere NPC Gesichter auf PCs",
"Settings_EnableNpcHackWarning": "Mit dieser Option kannst du NPC Gesichter ausserhalb von GPose auf deinem Character nutzen, jedoch werden Penumbra Kollektionen nicht in GPose übertragen. Beachte das NPC Gesichter innerhalb GPose auch hiermit nicht möglich sind.",
"Settings_EnableNpcHackWarning": "NPC Gesichter werden nur ausserhalb von GPose funktionieren. Penumbra Kollektionen funktionieren hiermit nicht mehr. Funktioniert nur ohne Penumbra API",
"Settings_GameHotkeysTooltip": "Hotkeys verwenden wenn FFXIV im Fokus ist und man in GPose ist.\nDies verhindert, das FFXIV folgende Hotkeys registriert.",
"Settings_EnableHotkeys": "Hotkeys aktivieren",
"Settings_EnableHotkeys_Tooltip": "Auf Tastendrücke reagieren und Hotkeys ausführen",
Expand Down
2 changes: 1 addition & 1 deletion Anamnesis/Languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@
"Settings_UseExternalRefresh": "Use Penumbra Redraw",
"Settings_UseExternalRefreshWarning": "Requires the Penumbra HTTP API to be enabled in Penumbra. This option is found under the Advanced section of the Settings tab of the plugin. .",
"Settings_EnableNpcHack": "Enable NPC Faces on PC",
"Settings_EnableNpcHackWarning": "This option enables NPC Option on your Character outside of GPose, but it will break Penumbra Collections when entering GPose. Note that even with this, NPC options will not persist on PCs in GPose.",
"Settings_EnableNpcHackWarning": "NPC Faces will only work outside of GPose. This will break Penumbra Collections. Currently only works with the API turned off.",
"Settings_GameHotkeysTooltip": "Enable the use of hotkeys even when FFXIV has focus while in GPose.\nThis will prevent FFXIV from recieving the used keys.",
"Settings_EnableHotkeys": "Enable Hotkeys",
"Settings_EnableHotkeys_Tooltip": "Enable listening for keys and performing actions",
Expand Down
21 changes: 18 additions & 3 deletions Anamnesis/Tabs/SettingsTab.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,28 @@
</Grid.RowDefinitions>

<XivToolsWPF:TextBlock Grid.Column="0" Grid.Row="0" Key="Settings_UseExternalRefresh" Style="{StaticResource Label}"/>
<CheckBox IsChecked="{Binding SettingsService.Settings.UseExternalRefresh}" Grid.Column="1" Grid.Row="0" Margin="6"/>
<CheckBox IsChecked="{Binding SettingsService.Settings.UseExternalRefresh}" Grid.Column="1" Grid.Row="0" Margin="6" x:Name="Settings_UseExternalRefresh"/>

<XivToolsWPF:InfoControl Grid.Row="1" Key="Settings_UseExternalRefreshWarning" Width="237" Grid.ColumnSpan="2"/>

<XivToolsWPF:TextBlock Grid.Column="0" Grid.Row="2" Key="Settings_EnableNpcHack" Style="{StaticResource Label}"/>
<CheckBox IsChecked="{Binding SettingsService.Settings.EnableNpcHack}" Grid.Column="1" Grid.Row="2" Margin="6"/>

<CheckBox Grid.Column="1" Grid.Row="2" Margin="6">
<CheckBox.Style>
<Style TargetType="CheckBox" BasedOn="{StaticResource MaterialDesignCheckBox}">
<Setter Property="IsChecked" Value="{Binding SettingsService.Settings.EnableNpcHack}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=Settings_UseExternalRefresh,Path=IsChecked}" Value="True">
<Setter Property="IsChecked" Value="False"/>
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=Settings_UseExternalRefresh,Path=IsChecked}" Value="False">
<Setter Property="IsEnabled" Value="True"/>
</DataTrigger>
</Style.Triggers>
</Style>
</CheckBox.Style>
</CheckBox>

<XivToolsWPF:InfoControl Grid.Row="3" Key="Settings_EnableNpcHackWarning" Width="237" Grid.ColumnSpan="2"/>
</Grid>
</GroupBox>
Expand Down

0 comments on commit 0028192

Please sign in to comment.