From c27a9847173e6dd441c1fd4c55fc2419f6f6690d Mon Sep 17 00:00:00 2001 From: Rob <108140294+Robnewww@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:16:08 +0000 Subject: [PATCH 1/6] Update Acid.cs GUID support --- Acid.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Acid.cs b/Acid.cs index e2c5626..f1ecaf1 100644 --- a/Acid.cs +++ b/Acid.cs @@ -1,11 +1,19 @@ +using System; +using SDG.Unturned; using UnityEngine; namespace SDG.Unturned { - // Plays the specified effect when something collides with the Collider component on the base Game Object - // Destroys itself after one use and cannot be reset - public class Acid : MonoBehaviour - { - public ushort effectID; - } + // Plays the specified effect when something collides with the Collider + // component on the base Game Object + + // 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 e1e3a70f0bf85256f78b4c46fc2a589ea5be32ad Mon Sep 17 00:00:00 2001 From: Rob <108140294+Robnewww@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:29:44 +0000 Subject: [PATCH 2/6] Update Carepackage.cs landedEffectGuid added --- Carepackage.cs | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/Carepackage.cs b/Carepackage.cs index b22fa25..7f2bfef 100644 --- a/Carepackage.cs +++ b/Carepackage.cs @@ -1,22 +1,29 @@ +using System; +using SDG.Unturned; using UnityEngine; namespace SDG.Unturned { - // Requires a BoxCollider on the base Game Object - // When the Collider attatched to the base Game Object collides with anything it will spawn the specified barricade and effect #120 will play - // If the barricade is an InteractableStorage 8 random items from the item pool will be added - // After 10 minutes the carepackage will despawn + // Requires a BoxCollider on the base Game Object + // When the Collider attatched to the base Game Object collides with anything it will spawn the specified barricade and effect #120 will play + // If the barricade is an InteractableStorage 8 random items from the item pool will be added + // After 10 minutes the carepackage will despawn - // This will not make the Carepackage move on its own. To make an accurate carepackage add a rigidbody with gravity, 1 mass and 0.5 angular drag as well as a constant force object with a Y force value of 9.5 - // It is up to you to extract the parachute and light assets and whatever else - public class Carepackage : MonoBehaviour - { - // The barricade to spawn, by default it is the base game Carepackage barricade - // If you want it to fill with items it can be an interactable storage but it is not required - public ushort barricadeID = 1374; + // This will not make the Carepackage move on its own. To make an accurate carepackage add a rigidbody with gravity, 1 mass and 0.5 angular drag as well as a constant force object with a Y force value of 9.5 + // It is up to you to extract the parachute and light assets and whatever else + public class Carepackage : MonoBehaviour + { + // The barricade to spawn, by default it is the base game Carepackage barricade + // If you want it to fill with items it can be an interactable storage but it is not required + [Tooltip("Barricade you want to spawn")] + public ushort barricadeID = 1374; - // The Spawn Table id to use when filling the carepackage - // Might throw an error if your barricade is an interactable storage and the id is invalid - public ushort id; + // The Spawn Table id to use when filling the carepackage + // Might throw an error if your barricade is an interactable storage and the id is invalid + [Tooltip("Spawn Table ID")] + public ushort id; + + [Tooltip("Effect to play upon landing")] + public string landedEffectGuid = "2c17fbd0f0ce49aeb3bc4637b68809a2"; } } From fa22a0f92b5fb685bb72c250e41dc44f754f3c18 Mon Sep 17 00:00:00 2001 From: Rob <108140294+Robnewww@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:32:46 +0000 Subject: [PATCH 3/6] Update Flashbang.cs Color and Audio --- Flashbang.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Flashbang.cs b/Flashbang.cs index 4579b8d..dd10b78 100644 --- a/Flashbang.cs +++ b/Flashbang.cs @@ -1,10 +1,14 @@ -using UnityEngine; +using UnityEngine; namespace SDG.Unturned { - // Does what a flashbang does when the object is created at the end of the fuse length - public class Flashbang : MonoBehaviour - { - public float fuseLength = 2.5f; + // Does what a flashbang does when the object is created at the end of the fuse length + public class Flashbang : MonoBehaviour + { + public Color color = Color.white; + + public float fuseLength = 2.5f; + + public bool playAudioSource = true; } } From c22bc90433df1e5a9dba69ba4186f610caea6975 Mon Sep 17 00:00:00 2001 From: Rob <108140294+Robnewww@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:32:57 +0000 Subject: [PATCH 4/6] Update Carepackage.cs --- Carepackage.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Carepackage.cs b/Carepackage.cs index 7f2bfef..88db7de 100644 --- a/Carepackage.cs +++ b/Carepackage.cs @@ -1,5 +1,3 @@ -using System; -using SDG.Unturned; using UnityEngine; namespace SDG.Unturned From 37b72f0ef57c28e15c8c4ea57b6f3ba53d214dcf Mon Sep 17 00:00:00 2001 From: Rob <108140294+Robnewww@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:33:43 +0000 Subject: [PATCH 5/6] Update Acid.cs --- Acid.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Acid.cs b/Acid.cs index f1ecaf1..443f6e8 100644 --- a/Acid.cs +++ b/Acid.cs @@ -1,5 +1,4 @@ using System; -using SDG.Unturned; using UnityEngine; namespace SDG.Unturned From 358c2fe87f6525f753a55b8f95d4af95a7c504fd Mon Sep 17 00:00:00 2001 From: Rob <108140294+Robnewww@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:36:01 +0000 Subject: [PATCH 6/6] Update Grenade.cs --- Grenade.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Grenade.cs b/Grenade.cs index d0a743f..674dbd4 100644 --- a/Grenade.cs +++ b/Grenade.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine; using Steamworks; // Requires CSteamID.cs @@ -27,7 +28,10 @@ public class Grenade : MonoBehaviour public float objectDamage; - // Effect ID to play once exploded + // Effect GUID to play once exploded + public Guid explosionEffectGuid; + + // [[Obsolete] Effect ID to play once exploded public ushort explosion; public float fuseLength = 2.5f;