From 55751377f97b5ec53cc070bbfdd455604657f384 Mon Sep 17 00:00:00 2001 From: Thom <47935791+Spebby@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:21:09 -0700 Subject: [PATCH 1/4] Update DeadzoneVolume.cs Updated to use new features added in 2024's Vehicle Update preview branch. --- DeadzoneVolume.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/DeadzoneVolume.cs b/DeadzoneVolume.cs index caa06e1..e7d8e3f 100644 --- a/DeadzoneVolume.cs +++ b/DeadzoneVolume.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace SDG.Framework.Devkit { @@ -6,5 +6,19 @@ namespace SDG.Framework.Devkit // BoxCollider must have 'isTrigger' set to True public class DeadzoneVolume : MonoBehaviour { + [SerializeField] + private EDeadzoneType _deadzoneType; + + [SerializeField] + private float _unprotectedDamagePerSecond; + + [SerializeField] + private float _protectedDamagePerSecond; + + [SerializeField] + private float _unprotectedRadiationPerSecond = 6.25f; + + [SerializeField] + private float _maskFilterDamagePerSecond = 0.4f; } } From 71419e3a10eaf7add71ad0f25ea71d4adff3281b Mon Sep 17 00:00:00 2001 From: Thom <47935791+Spebby@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:21:38 -0700 Subject: [PATCH 2/4] Update DeadzoneVolume.cs indentation fix --- DeadzoneVolume.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/DeadzoneVolume.cs b/DeadzoneVolume.cs index e7d8e3f..7a43741 100644 --- a/DeadzoneVolume.cs +++ b/DeadzoneVolume.cs @@ -7,18 +7,18 @@ namespace SDG.Framework.Devkit public class DeadzoneVolume : MonoBehaviour { [SerializeField] - private EDeadzoneType _deadzoneType; - - [SerializeField] - private float _unprotectedDamagePerSecond; - - [SerializeField] - private float _protectedDamagePerSecond; - - [SerializeField] - private float _unprotectedRadiationPerSecond = 6.25f; - - [SerializeField] - private float _maskFilterDamagePerSecond = 0.4f; + private EDeadzoneType _deadzoneType; + + [SerializeField] + private float _unprotectedDamagePerSecond; + + [SerializeField] + private float _protectedDamagePerSecond; + + [SerializeField] + private float _unprotectedRadiationPerSecond = 6.25f; + + [SerializeField] + private float _maskFilterDamagePerSecond = 0.4f; } } From f3b02804a38a21bb67a6d2d215aeb6f58d8b4ad3 Mon Sep 17 00:00:00 2001 From: Thom <47935791+Spebby@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:22:10 -0700 Subject: [PATCH 3/4] Update Acid.cs updated to have GUID support --- Acid.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Acid.cs b/Acid.cs index e2c5626..a1a73a3 100644 --- a/Acid.cs +++ b/Acid.cs @@ -6,6 +6,10 @@ namespace SDG.Unturned // Destroys itself after one use and cannot be reset public class Acid : MonoBehaviour { + public Guid effectGuid; + + // Kept because lots of modders have been using this script in Unity, + // so removing legacy effect id would break their content. public ushort effectID; } } From f7ec1a63c7da48cd3518fabaa8082d0bcb2960e6 Mon Sep 17 00:00:00 2001 From: Thom <47935791+Spebby@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:30:09 -0700 Subject: [PATCH 4/4] oxygen volume :) --- OxygenVolume.cs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 OxygenVolume.cs diff --git a/OxygenVolume.cs b/OxygenVolume.cs new file mode 100644 index 0000000..1fca347 --- /dev/null +++ b/OxygenVolume.cs @@ -0,0 +1,34 @@ +using UnityEngine; + +namespace SDG.Unturned +{ + // The New Volumes use the Scale of the GameObject as the Size for the Volume, No Colliders Required + // This Volume Script should be attached to an Empty GameObject with Tag and Layer :: Trap + // To Visualize the Size of the Volume Temporarily Attach either a BoxCollider or a SphereCollider. Making sure that the Collider Component uses the default Radius ( 0.5 ) or Size ( 1 1 1 ) + public class OxygenVolume : MonoBehaviour + { + public bool isBreathable + { + get + { + return this._isBreathable; + } + set + { + if (!base.enabled) + { + this._isBreathable = value; + return; + } + this._isBreathable = value; + } + } + + [SerializeField] + private bool _isBreathable = true; + + public ELevelVolumeShape Shape; + + public float falloffDistance; + } +} \ No newline at end of file