From d7d6c53b83b6d7dad8fb3c828903e713520ee2df Mon Sep 17 00:00:00 2001 From: Xuc Pan Date: Fri, 24 May 2024 00:26:09 +0800 Subject: [PATCH] fix: :bug: repairwormhole --- logic/GameClass/GameObj/Map/Map.cs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/logic/GameClass/GameObj/Map/Map.cs b/logic/GameClass/GameObj/Map/Map.cs index 93cda5f2..f61ef210 100755 --- a/logic/GameClass/GameObj/Map/Map.cs +++ b/logic/GameClass/GameObj/Map/Map.cs @@ -81,22 +81,9 @@ public IOutOfBound GetOutOfBound(XY pos) { return (Ship?)GameObjDict[GameObjType.Ship].Find(gameObj => (teamID == ((Ship)gameObj).TeamID) && playerID == ((Ship)gameObj).PlayerID); } - - public static bool WormholeInteract(Wormhole gameObj, XY Pos) - { - foreach (WormholeCell cell in gameObj.Cells) - { - if (GameData.ApproachToInteract(cell.Position, Pos)) - return true; - } - return false; - } public GameObj? OneForInteract(XY Pos, GameObjType gameObjType) { - return (GameObj?)GameObjDict[gameObjType].Find(gameObj => - ((GameData.ApproachToInteract(gameObj.Position, Pos)) || - (gameObjType == GameObjType.Wormhole && WormholeInteract((Wormhole)gameObj, Pos))) - ); + return (GameObj?)GameObjDict[gameObjType].Find(gameObj => GameData.ApproachToInteract(gameObj.Position, Pos)); } public GameObj? OneInTheSameCell(XY Pos, GameObjType gameObjType) {