handle modules larger than 1x1, widen door size to allow walking around it

This commit is contained in:
2022-11-24 19:32:51 +01:00
parent 74fd757d20
commit 2eec53fe87
11 changed files with 649 additions and 43 deletions

View File

@@ -14,8 +14,17 @@ namespace EscapeRoomEngine.Engine.Runtime.Requirements
candidates.RemoveAll(candidate =>
{
var position = candidate.position;
return position.x > 0 && position.x < right && position.z > 0 && position.z < top;
var keep = false;
candidate.ForEachPosition(position =>
{
if (!keep)
{
keep = position.x == 0 || position.x == right || position.z == 0 || position.z == top;
}
});
return !keep;
});
return candidates;