summaryrefslogtreecommitdiff
path: root/Scenes/PlateKey.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes/PlateKey.gd')
-rw-r--r--Scenes/PlateKey.gd15
1 files changed, 15 insertions, 0 deletions
diff --git a/Scenes/PlateKey.gd b/Scenes/PlateKey.gd
new file mode 100644
index 0000000..33c563b
--- /dev/null
+++ b/Scenes/PlateKey.gd
@@ -0,0 +1,15 @@
+extends Plate
+
+export(NodePath) var door_path
+
+onready var door : Door = get_node(door_path) setget set_door
+
+func activate():
+ if door == null or door.is_open:
+ return
+
+ door.add_action("cor_open", [0.2])
+
+func set_door(value : Door):
+ door = value
+ door_path = value.get_path()