diff --git a/Acid.cs b/Acid.cs index e2c5626..443f6e8 100644 --- a/Acid.cs +++ b/Acid.cs @@ -1,11 +1,18 @@ +using System; 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; + } } diff --git a/Carepackage.cs b/Carepackage.cs index b22fa25..88db7de 100644 --- a/Carepackage.cs +++ b/Carepackage.cs @@ -2,21 +2,26 @@ 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"; } } 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; } } 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;