public bool ShouldBlockSmartInteract(SmartInteractScanSettings settings) { int tileTargetX = Player.tileTargetX; int tileTargetY = Player.tileTargetY; if (!WorldGen.InWorld(tileTargetX, tileTargetY, 10)) { return(true); } Tile tile = Main.tile[tileTargetX, tileTargetY]; if (tile == null) { return(true); } if (tile.active()) { switch (tile.type) { case 4: case 33: case 334: case 395: case 410: case 455: case 471: case 480: case 509: case 520: return(true); } } return(false); }
public bool ProvideCandidate(SmartInteractScanSettings settings, out ISmartInteractCandidate candidate) { candidate = null; if (!PotionOfReturnHelper.TryGetGateHitbox(settings.player, out var homeHitbox)) { return(false); } float distanceFromCursor = homeHitbox.ClosestPointInRect(settings.mousevec).Distance(settings.mousevec); _candidate.Reuse(distanceFromCursor); candidate = _candidate; return(true); }
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) { return(true); }