From 330284158278f15d7a41789e1fbca8f8b099dd4a Mon Sep 17 00:00:00 2001
From: Victor Andrade de Almeida <vct.a.almeida@gmail.com>
Date: Sun, 17 Jul 2022 03:32:32 -0300
Subject: Improve damage pressure plate

---
 Scenes/PlateKey.tscn | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'Scenes/PlateKey.tscn')

diff --git a/Scenes/PlateKey.tscn b/Scenes/PlateKey.tscn
index f90a645..14c3fbc 100644
--- a/Scenes/PlateKey.tscn
+++ b/Scenes/PlateKey.tscn
@@ -3,7 +3,7 @@
 [ext_resource path="res://Scenes/PlateKey.gd" type="Script" id=1]
 
 [sub_resource type="CubeMesh" id=1]
-size = Vector3( 0.9, 0.05, 1 )
+size = Vector3( 0.9, 0.05, 0.9 )
 
 [sub_resource type="SpatialMaterial" id=2]
 albedo_color = Color( 0.34902, 0.541176, 0.835294, 1 )
@@ -11,7 +11,6 @@ albedo_color = Color( 0.34902, 0.541176, 0.835294, 1 )
 [node name="PlateKey" type="Spatial"]
 script = ExtResource( 1 )
 valid_symbols = [ "1", "2", "3" ]
-door_path = null
 
 [node name="Mesh" type="MeshInstance" parent="."]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.025, 0 )
-- 
cgit v1.2.3


From e5a6000694f2f27d3eac1c77b79dfd792bd9f14e Mon Sep 17 00:00:00 2001
From: Victor Andrade de Almeida <vct.a.almeida@gmail.com>
Date: Sun, 17 Jul 2022 03:56:24 -0300
Subject: Improve key pressure plate

---
 Scenes/PlateKey.gd   | 5 +++++
 Scenes/PlateKey.tscn | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

(limited to 'Scenes/PlateKey.tscn')

diff --git a/Scenes/PlateKey.gd b/Scenes/PlateKey.gd
index 1342469..aa3bb8b 100644
--- a/Scenes/PlateKey.gd
+++ b/Scenes/PlateKey.gd
@@ -1,13 +1,18 @@
 extends Plate
 
 export(NodePath) var crystal_path
+export(Color) var active_color
 
 onready var crystal : Crystal = get_node(crystal_path) setget set_crystal
+onready var mesh : MeshInstance = $Mesh
 
 func activate(entity : Entity, dungeon):
 	if crystal == null or crystal.is_active:
 		return
 
+	var material = mesh.get_active_material(0)
+	material.albedo_color = active_color
+
 	crystal.add_action("cor_activate", [0.2])
 
 func set_crystal(value : Crystal):
diff --git a/Scenes/PlateKey.tscn b/Scenes/PlateKey.tscn
index 14c3fbc..53b56c8 100644
--- a/Scenes/PlateKey.tscn
+++ b/Scenes/PlateKey.tscn
@@ -3,14 +3,16 @@
 [ext_resource path="res://Scenes/PlateKey.gd" type="Script" id=1]
 
 [sub_resource type="CubeMesh" id=1]
-size = Vector3( 0.9, 0.05, 0.9 )
+size = Vector3( 1, 0.05, 1 )
 
 [sub_resource type="SpatialMaterial" id=2]
-albedo_color = Color( 0.34902, 0.541176, 0.835294, 1 )
+resource_local_to_scene = true
+albedo_color = Color( 0.231373, 0.654902, 0.839216, 1 )
 
 [node name="PlateKey" type="Spatial"]
 script = ExtResource( 1 )
 valid_symbols = [ "1", "2", "3" ]
+active_color = Color( 0.290196, 0.415686, 0.572549, 1 )
 
 [node name="Mesh" type="MeshInstance" parent="."]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.025, 0 )
-- 
cgit v1.2.3