Class VehicleSeatRestrictionService
public class VehicleSeatRestrictionService : IEventListener<EnterVehicleRequested>, IEventListener<VehicleSwapSeatRequested>, IEventListener<ExitVehicleRequested>
- Inheritance
-
VehicleSeatRestrictionService
- Implements
- Inherited Members
Constructors
VehicleSeatRestrictionService(ChatService, TranslationInjection<VehicleTweaksTranslations>, ZoneStore?, IPlayerService?, WarfareModule?, CooldownManager?)
public VehicleSeatRestrictionService(ChatService chatService, TranslationInjection<VehicleTweaksTranslations> translations, ZoneStore? zoneStore = null, IPlayerService? playerService = null, WarfareModule? module = null, CooldownManager? cooldownManager = null)
Parameters
chatServiceChatServicetranslationsTranslationInjection<VehicleTweaksTranslations>zoneStoreZoneStoreplayerServiceIPlayerServicemoduleWarfareModulecooldownManagerCooldownManager
Fields
MaxAllowedHeightToExitVehicle
public const float MaxAllowedHeightToExitVehicle = 10
Field Value
Methods
AddInteractCooldown(WarfarePlayer, InteractableVehicle)
Add a cooldown for a player to enter vehicle.
public void AddInteractCooldown(WarfarePlayer player, InteractableVehicle vehicle)
Parameters
playerWarfarePlayervehicleInteractableVehicle
IsOnInteractCooldown(WarfarePlayer, InteractableVehicle)
Check if a player is on cooldown to enter vehicle.
public bool IsOnInteractCooldown(WarfarePlayer player, InteractableVehicle vehicle)
Parameters
playerWarfarePlayervehicleInteractableVehicle
Returns
TryEnterSeat(WarfareVehicle, WarfarePlayer, byte)
Runs all the checks needed to enter a vehicle without any feedback.
public VehicleChangeSeatsResult TryEnterSeat(WarfareVehicle vehicle, WarfarePlayer player, byte seat)
Parameters
vehicleWarfareVehicleplayerWarfarePlayerseatbyte
Returns
Remarks
Cooldowns are not considered.
TryExitSeat(WarfareVehicle, WarfarePlayer, byte)
Runs all the checks needed to exit a seat without any feedback.
public ChangeSeatsResult TryExitSeat(WarfareVehicle vehicle, WarfarePlayer player, byte fromSeat = 255)
Parameters
vehicleWarfareVehicleplayerWarfarePlayerfromSeatbyte
Returns
Remarks
Cooldowns are not considered.
TrySwapSeat(WarfareVehicle, WarfarePlayer, byte, byte)
Runs all the checks needed to swap seats in a vehicle without any feedback.
public VehicleChangeSeatsResult TrySwapSeat(WarfareVehicle vehicle, WarfarePlayer player, byte toSeat, byte fromSeat = 255)
Parameters
vehicleWarfareVehicleplayerWarfarePlayertoSeatbytefromSeatbyte
Returns
Remarks
Cooldowns are not considered.