Ejemplo n.º 1
0
        public override bool NewRightClick(int i, int j)
        {
            LostKey lostKey = KeyItemManager.Get <LostKey>();

            if (!lostKey.Unlocked && !opening)
            {
                opening = true;
                i      -= Main.tile[i, j].frameX / 18;
                j      -= Main.tile[i, j].frameY / 18;
                lostKey.Unlock(new Point(i + 1, j + 1).ToWorldCoordinates(0, 0));
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            string type = args[0];

            switch (type)
            {
            case "ulk-k":
                KeyItemManager.Get <LostKey>().Unlock(caller.Player.Center);
                break;

            case "lk-k":
                LostKey obj = KeyItemManager.Get <LostKey>();
                typeof(KeyItem).Property("Unlocked").SetValue(obj, false);
                break;

            default:
                caller.Reply("Not a thing");
                break;
            }
        }