Skip to content

Commit c34f7ca

Browse files
fix GetFromMap fetching elevator doors
1 parent f809d52 commit c34f7ca

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Code/MethodSystem/Methods/MapMethods/GetFromMapMethod.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ public class GetFromMapMethod : ReturningMethod<CollectionValue<ReferenceValue>>
2424
Option.ReferenceCollection<LightsController>("roomLights"),
2525
Option.ReferenceCollection<Ragdoll>("ragdolls"))
2626
];
27-
27+
2828
public override void Execute()
2929
{
3030
ReturnValue = Args.GetOption("object") switch
3131
{
32-
"doors" => new(Map.Doors.Select(d => new ReferenceValue<Door>(d))),
32+
"doors" => new(Map.Doors
33+
.Where(d => d is not ElevatorDoor and not NonInteractableDoor) // not sure about non interactible still
34+
.Select(d => new ReferenceValue<Door>(d))),
3335
"elevators" => new(Map.Elevators.Select(e => new ReferenceValue<Elevator>(e))),
3436
"generators" => new(Map.Generators.Select(g => new ReferenceValue<Generator>(g))),
3537
"cameras" => new(Map.Cameras.Select(c => new ReferenceValue<Camera>(c))),
@@ -40,4 +42,4 @@ public override void Execute()
4042
_ => throw new ArgumentOutOfRangeException()
4143
};
4244
}
43-
}
45+
}

0 commit comments

Comments
 (0)