mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 08:35:55 +00:00
24 lines
No EOL
611 B
C#
24 lines
No EOL
611 B
C#
using Cirno.Scripts.Controllers;
|
|
|
|
namespace Cirno.Scripts.Interactables;
|
|
|
|
public partial class RogueliteDoorLock : Switch
|
|
{
|
|
public RoomConnection Connection { get; set; }
|
|
|
|
public override bool Activate(ActivationType activationType = ActivationType.Toggle)
|
|
{
|
|
base.Activate(activationType);
|
|
|
|
if (!MeetsRequirements()) return false;
|
|
|
|
Connection.FromDoor.Activate(activationType);
|
|
Connection.ToDoor.Activate(activationType);
|
|
|
|
InventoryManager.Instance.RemoveItem("GRAY_KEY", 1);
|
|
|
|
this.QueueFree();
|
|
|
|
return true;
|
|
}
|
|
} |