summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/PerkIndestructible.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_v1.0/Decompile/PerkIndestructible.cs')
-rw-r--r--Thronefall_v1.0/Decompile/PerkIndestructible.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Thronefall_v1.0/Decompile/PerkIndestructible.cs b/Thronefall_v1.0/Decompile/PerkIndestructible.cs
new file mode 100644
index 0000000..d03713e
--- /dev/null
+++ b/Thronefall_v1.0/Decompile/PerkIndestructible.cs
@@ -0,0 +1,24 @@
+using UnityEngine;
+
+public class PerkIndestructible : MonoBehaviour
+{
+ [SerializeField]
+ private Equippable indestructiblePerk;
+
+ private void Start()
+ {
+ if (PerkManager.IsEquipped(indestructiblePerk))
+ {
+ TaggedObject componentInChildren = GetComponentInChildren<TaggedObject>();
+ if ((bool)componentInChildren)
+ {
+ componentInChildren.RemoveTag(TagManager.ETag.PlayerOwned);
+ }
+ }
+ Object.Destroy(this);
+ }
+
+ private void Update()
+ {
+ }
+}