work on door opening possibility while the elevator is stopped

This commit is contained in:
2024-05-25 01:06:48 -04:00
parent 61153b53e1
commit c9f0074217
7 changed files with 119 additions and 75 deletions

View File

@@ -28,7 +28,9 @@ type ElevatorAttributes = {
}
type DoorAttributes = {
Open: BoolValue
Relay: {
Open: BoolValue
}
}
export type RelayAlgorithmConstructor = ClassConstructor
@@ -78,7 +80,7 @@ end
function RelayAlgorithm:AddFloor(ElevatorGoingUp, RequestedLevel)
self:RawInsert(ElevatorGoingUp, RequestedLevel)
return not self.ElevatorAttributes.Moving.Value and self.DoorAttributes.Open.Value
return not self.ElevatorAttributes.Moving.Value and self.DoorAttributes.Relay.Open.Value
end
return RelayAlgorithm