Wait for daemon hull conductivity state
This commit is contained in:
parent
1e79431a9e
commit
8104f5eb67
2 changed files with 21 additions and 8 deletions
|
|
@ -8810,6 +8810,23 @@ static void RequireHullConductivityRequestAuthority(string root)
|
|||
"Hull conductivity still has renderer-local UI write authority: " +
|
||||
string.Join("; ", hits));
|
||||
}
|
||||
|
||||
var submissionAcceptanceHits = Directory.EnumerateFiles(uiRoot, "*.cs", SearchOption.AllDirectories)
|
||||
.SelectMany(path => File.ReadLines(path)
|
||||
.Select((line, index) => new { Path = path, LineNumber = index + 1, Line = line }))
|
||||
.Where(line =>
|
||||
line.Line.Contains("if (GameManager.RequestHullConductivityToggle", StringComparison.Ordinal) ||
|
||||
line.Line.Contains("if (RequestHullConductivityToggle", StringComparison.Ordinal) ||
|
||||
line.Line.Contains("RefreshCells(new []{v,int2", StringComparison.Ordinal))
|
||||
.Select(line => $"{Path.GetRelativePath(root, line.Path)}:{line.LineNumber}: {line.Line.Trim()}")
|
||||
.ToArray();
|
||||
|
||||
if (submissionAcceptanceHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Hull conductivity UI still treats daemon submission as accepted cell state: " +
|
||||
string.Join("; ", submissionAcceptanceHits));
|
||||
}
|
||||
}
|
||||
|
||||
static void RequireInventoryEntityRenameRequestAuthority(string root)
|
||||
|
|
|
|||
|
|
@ -664,23 +664,19 @@ private void Update()
|
|||
// Debug.Log($"Clicked at pos {data.position}, normalized {point}");
|
||||
if (_displayedHullShape[int2(v.x - 1, v.y)] && point.x < ThermalToggleRegionSize)
|
||||
{
|
||||
if (GameManager.RequestHullConductivityToggle(entity, int2(v.x - 1, v.y), 0))
|
||||
RefreshCells(new []{v,int2(v.x - 1, v.y)});
|
||||
GameManager.RequestHullConductivityToggle(entity, int2(v.x - 1, v.y), 0);
|
||||
}
|
||||
if (_displayedHullShape[int2(v.x + 1, v.y)] && point.x > 1 - ThermalToggleRegionSize)
|
||||
{
|
||||
if (GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 0))
|
||||
RefreshCells(new []{v,int2(v.x + 1, v.y)});
|
||||
GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 0);
|
||||
}
|
||||
if (_displayedHullShape[int2(v.x, v.y - 1)] && point.y < ThermalToggleRegionSize)
|
||||
{
|
||||
if (GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y - 1), 1))
|
||||
RefreshCells(new []{v,int2(v.x, v.y - 1)});
|
||||
GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y - 1), 1);
|
||||
}
|
||||
if (_displayedHullShape[int2(v.x, v.y + 1)] && point.y > 1 - ThermalToggleRegionSize)
|
||||
{
|
||||
if (GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 1))
|
||||
RefreshCells(new []{v,int2(v.x, v.y + 1)});
|
||||
GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue