예제 #1
0
 internal void ToggleSceneLightControlTick()
 {
     if (Controls.ToggleTdl.IsDisabledJustPressed() && Game.IsControlPressed(0, Control.CharacterWheel))
     {
         ToggleScl();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.SceneLights, _extras.SceneLights.GetData());
     }
 }
예제 #2
0
 internal void ToggleWarningLightControlTick()
 {
     Controls.ToggleWrnL.Disable();
     if (Controls.ToggleWrnL.IsDisabledJustPressed())
     {
         ToggleWrnLights();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.WRNL, GetWarningLightsData());
     }
 }
예제 #3
0
 internal void ToggleSecondaryLightControlTick()
 {
     Controls.ToggleSecL.Disable();
     if (Controls.ToggleSecL.IsDisabledJustPressed())
     {
         ToggleSecLights();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.SECL, GetSecondaryLightsData());
     }
 }
예제 #4
0
 internal void ToggleCruiseLightControlTick()
 {
     if (_extras.PrimaryLights == null)
     {
         return;
     }
     Controls.ToggleCrsL.Disable();
     if (Controls.ToggleCrsL.IsDisabledJustReleased() && !Game.IsControlPressed(0, Control.CharacterWheel) && ELS.CurrentInputMode == InputMode.MouseAndKeyboard)
     {
         ToggleCrs();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.PRML, GetPrimaryLightsData());
     }
 }
예제 #5
0
 internal void ToggleLightStageControlTick()
 {
     Controls.ToggleLstg.Disable();
     if (!Controls.ToggleLstg.IsDisabledJustPressed())
     {
         return;
     }
     if (ELS.CurrentInputMode == InputMode.MouseAndKeyboard && !Game.IsControlPressed(0, Control.CharacterWheel) || (ELS.CurrentInputMode == InputMode.GamePad && Global.AllowController))
     {
         ToggleLightStage();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.Stage, CurrentStage);
     }
     else
     {
         ToggleLightStageInverse();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.Stage, CurrentStage);
     }
 }
예제 #6
0
 internal void ChangeWarningPatternControlTick()
 {
     if (_extras.WarningLights == null)
     {
         return;
     }
     Controls.ChgPattWrnL.Disable();
     if (!Controls.ChgPattWrnL.IsDisabledJustPressed())
     {
         return;
     }
     if (!Game.IsControlPressed(0, Control.CharacterWheel))
     {
         IncrementWarningPattern();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.WarningPattern, CurrentWrnPattern);
     }
     else
     {
         DecrementWarningPattern();
         RemoteEventManager.SendLightEvent(ElsVehicle, DataNames.WarningPattern, CurrentWrnPattern);
     }
     ElsUiPanel.PlayUiSound("sirenclickoff");
 }
예제 #7
0
        internal void ToggleTakedownLightControlTick()
        {
            Controls.ToggleTdl.Disable();
            if (ELS.CurrentInputMode == InputMode.MouseAndKeyboard && !Game.IsControlPressed(0, Control.CharacterWheel))
            {
                return;
            }
            if (Controls.ToggleTdl.IsDisabledJustPressed())
            {
                ToggleTdl();
                var dic = new Dictionary <string, object>();
                if (_extras.TakedownLights != null)
                {
                    dic.Add(DataNames.TakedownLights, _extras.TakedownLights.GetData());
                }
                if (SpotLight != null)
                {
                    dic.Add(DataNames.Spotlight, SpotLight.GetData());
                }

                RemoteEventManager.SendLightEvent(ElsVehicle, dic);
            }
        }