예제 #1
0
 public override void MouseOver(int i, int j)
 {
     if (!KeyItemManager.Get <LostKey>().Unlocked&& !opening)
     {
         Main.LocalPlayer.showItemIconText = "Lost Chest";
         Main.LocalPlayer.noThrow          = 2;
     }
 }
예제 #2
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);
        }
예제 #3
0
 public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
 {
     frameXOffset = 0;
     if (KeyItemManager.Get <LostKey>().Unlocked)
     {
         frameYOffset = 2 * 38;
     }
     else if (opening)
     {
         frameYOffset = 1 * 38;
     }
     else
     {
         frameYOffset = 0;
     }
 }
예제 #4
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;
            }
        }
예제 #5
0
 public override bool HasSmartInteract() => KeyItemManager.Get <LostKey>().Unlocked;