Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoWQ222 committed Apr 10, 2024
1 parent d0d0dfe commit 3566c4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions logic/Gaming/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public bool InstallModule(long teamID, long shipID, ModuleType moduleType)
if (!gameMap.Timer.IsGaming)
return false;
Ship? ship = gameMap.FindShipInPlayerID(teamID, shipID);
if (ship != null)
if (ship != null && ship.IsRemoved == false)
return moduleManager.InstallModule(ship, moduleType);
return false;
}
Expand Down Expand Up @@ -197,7 +197,7 @@ public bool Recycle(long teamID, long shipID)
if (!gameMap.Timer.IsGaming)
return false;
Ship? ship = gameMap.FindShipInPlayerID(teamID, shipID);
if (ship != null)
if (ship != null && ship.IsRemoved == false)
{
bool validRecyclePoint = false;
foreach (XY recyclePoint in teamList[(int)ship.TeamID].BirthPointList)
Expand All @@ -212,7 +212,7 @@ public bool Recycle(long teamID, long shipID)
{
return shipManager.Recycle(ship);
}
}
}
return false;
}
public bool Repair(long teamID, long shipID)
Expand Down

0 comments on commit 3566c4f

Please sign in to comment.