handle modules larger than 1x1, widen door size to allow walking around it
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user