I have a abstract class named MotorizedVehicle that contains an implemented gas- and brake-function. I want to make a Truck class that extends this class and uses gas exactly in the same way as MotorizedVehicle, but with the limitation that it can't move if it's ramp is lowered.
My thought is that I am then restricting the behaviour of gas, which seems to me to go against the Liskov substitution principle? That is to say, is this bad OOP design?
Possible solutions (in my head) would be to delegate this behaviour to maybe an engine class and make Truck and MotorizedVehicle implement a common interface instead?
TLDR; Is it acceptable to override a method with an additional limiting factor if following the Liskov substitution principle?