-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix environmentEnjoyer, add godmode debug setting, WIP camerashake an…
…d staminascript
- Loading branch information
Showing
8 changed files
with
157 additions
and
42 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using Comfort.Common; | ||
using EFT; | ||
using UnityEngine; | ||
|
||
namespace CWX_MegaMod.ChadMode | ||
{ | ||
public class CameraShakeScript : MonoBehaviour | ||
{ | ||
private CameraClass _camera; | ||
|
||
private void Awake() | ||
{ | ||
_camera = CameraClass.Instance; | ||
} | ||
|
||
public void StartTask() | ||
{ | ||
if (_camera == null) | ||
{ | ||
MegaMod.LogToScreen("Camera object was null, not changing Camera shake", EMessageType.Error); | ||
return; | ||
} | ||
|
||
// _camera.EffectsController.enabled = !MegaMod.CameraShake.Value; | ||
// also does this | ||
// _camera.Camera.GetComponent<PrismEffects>().useVignette = !MegaMod.CameraShake.Value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Comfort.Common; | ||
using EFT; | ||
using UnityEngine; | ||
|
||
namespace CWX_MegaMod.ChadMode | ||
{ | ||
public class GodModeScript : MonoBehaviour | ||
{ | ||
private GameWorld _gameWorld; | ||
private Player _player; | ||
private float _oldHealthCoef; | ||
private float _newHealthCoef = 0; | ||
private float _oldSafeFallHeight; | ||
private float _newSafeFallHeight = 999999f; | ||
|
||
private void Awake() | ||
{ | ||
_gameWorld = Singleton<GameWorld>.Instance; | ||
_player = _gameWorld.MainPlayer; | ||
_oldHealthCoef = _player.ActiveHealthController.DamageCoeff; | ||
_oldSafeFallHeight = _player.ActiveHealthController.FallSafeHeight; | ||
} | ||
|
||
public void StartTask() | ||
{ | ||
if (_player == null) | ||
{ | ||
MegaMod.LogToScreen("Player object was null, Not changing Damage coef", EMessageType.Error); | ||
return; | ||
} | ||
|
||
if (MegaMod.GodMode.Value) | ||
{ | ||
_player.ActiveHealthController.SetDamageCoeff(_newHealthCoef); | ||
_player.ActiveHealthController.RemoveNegativeEffects(EBodyPart.Common); | ||
_player.ActiveHealthController.RestoreFullHealth(); | ||
_player.ActiveHealthController.FallSafeHeight = _newSafeFallHeight; | ||
} | ||
else | ||
{ | ||
_player.ActiveHealthController.SetDamageCoeff(_oldHealthCoef); | ||
_player.ActiveHealthController.FallSafeHeight = _oldSafeFallHeight; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters