forked from liza/Questionable
Hide steps from debug overlay that aren't in the same territory
This commit is contained in:
parent
2003906bb2
commit
0ac2757a57
@ -15,15 +15,18 @@ internal sealed class DebugOverlay : Window
|
|||||||
{
|
{
|
||||||
private readonly QuestController _questController;
|
private readonly QuestController _questController;
|
||||||
private readonly IGameGui _gameGui;
|
private readonly IGameGui _gameGui;
|
||||||
|
private readonly IClientState _clientState;
|
||||||
private readonly Configuration _configuration;
|
private readonly Configuration _configuration;
|
||||||
|
|
||||||
public DebugOverlay(QuestController questController, IGameGui gameGui, Configuration configuration)
|
public DebugOverlay(QuestController questController, IGameGui gameGui, IClientState clientState,
|
||||||
|
Configuration configuration)
|
||||||
: base("Questionable Debug Overlay###QuestionableDebugOverlay",
|
: base("Questionable Debug Overlay###QuestionableDebugOverlay",
|
||||||
ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoBackground |
|
ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoBackground |
|
||||||
ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoSavedSettings, true)
|
ImGuiWindowFlags.NoInputs | ImGuiWindowFlags.NoSavedSettings, true)
|
||||||
{
|
{
|
||||||
_questController = questController;
|
_questController = questController;
|
||||||
_gameGui = gameGui;
|
_gameGui = gameGui;
|
||||||
|
_clientState = clientState;
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
|
|
||||||
Position = Vector2.Zero;
|
Position = Vector2.Zero;
|
||||||
@ -53,7 +56,10 @@ internal sealed class DebugOverlay : Window
|
|||||||
for (int i = currentQuest.Step; i <= sequence.Steps.Count; ++i)
|
for (int i = currentQuest.Step; i <= sequence.Steps.Count; ++i)
|
||||||
{
|
{
|
||||||
QuestStep? step = sequence.FindStep(i);
|
QuestStep? step = sequence.FindStep(i);
|
||||||
if (step == null || step.Position == null || step.Disabled)
|
if (step == null ||
|
||||||
|
step.Position == null ||
|
||||||
|
step.Disabled ||
|
||||||
|
step.TerritoryId != _clientState.TerritoryType)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool visible = _gameGui.WorldToScreen(step.Position.Value, out Vector2 screenPos);
|
bool visible = _gameGui.WorldToScreen(step.Position.Value, out Vector2 screenPos);
|
||||||
|
Loading…
Reference in New Issue
Block a user