Fix config changes to trap/coffer locations not being applied when saving
This commit is contained in:
parent
e45b72a655
commit
8279bfe9bf
@ -110,6 +110,12 @@ namespace Pal.Client.Floors
|
|||||||
if (!_territoryState.IsInDeepDungeon() || !_floorService.IsReady(_territoryState.LastTerritory))
|
if (!_territoryState.IsInDeepDungeon() || !_floorService.IsReady(_territoryState.LastTerritory))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (_renderAdapter.RequireRedraw)
|
||||||
|
{
|
||||||
|
recreateLayout = true;
|
||||||
|
_renderAdapter.RequireRedraw = false;
|
||||||
|
}
|
||||||
|
|
||||||
ETerritoryType territoryType = (ETerritoryType)_territoryState.LastTerritory;
|
ETerritoryType territoryType = (ETerritoryType)_territoryState.LastTerritory;
|
||||||
MemoryTerritory memoryTerritory = _floorService.GetTerritoryIfReady(territoryType)!;
|
MemoryTerritory memoryTerritory = _floorService.GetTerritoryIfReady(territoryType)!;
|
||||||
if (_configuration.Mode == EMode.Online && memoryTerritory.SyncState == ESyncState.NotAttempted)
|
if (_configuration.Mode == EMode.Online && memoryTerritory.SyncState == ESyncState.NotAttempted)
|
||||||
|
@ -27,6 +27,8 @@ namespace Pal.Client.Rendering
|
|||||||
_implementation = Recreate(null);
|
_implementation = Recreate(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool RequireRedraw { get; set; }
|
||||||
|
|
||||||
private IRenderer Recreate(ERenderer? currentRenderer)
|
private IRenderer Recreate(ERenderer? currentRenderer)
|
||||||
{
|
{
|
||||||
ERenderer targetRenderer = _configuration.Renderer.SelectedRenderer;
|
ERenderer targetRenderer = _configuration.Renderer.SelectedRenderer;
|
||||||
@ -46,6 +48,7 @@ namespace Pal.Client.Rendering
|
|||||||
public void ConfigUpdated()
|
public void ConfigUpdated()
|
||||||
{
|
{
|
||||||
_implementation = Recreate(_implementation.GetConfigValue());
|
_implementation = Recreate(_implementation.GetConfigValue());
|
||||||
|
RequireRedraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
Loading…
Reference in New Issue
Block a user