Skip to content

Commit

Permalink
Fix: Fix wrong copy position of TNT
Browse files Browse the repository at this point in the history
  • Loading branch information
whats2000 committed Sep 6, 2024
1 parent 524f0f0 commit c0f0c01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions Components/Manually.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,18 @@ private void ManuallyCalculatePearl(string key)

private void CopyGeneralDataToManuallyData()
{
var adjustPosition = Data.Pearl.Position.ToSurface2D().ToSpace3D();

// If the current direction is aligned with DefaultBlueDuper, Blue TNT stays in place
if ((Data.Direction & Data.DefaultBlueDuper) == 0)
{
// Blue TNT (BTNT) remains in its current position
_manuallyData.BTNT = GetTntPosition(Data.DefaultBlueDuper); // Fixed Blue TNT

// Red TNT (ATNT) moves to the opposite corner
_manuallyData.ATNT = GetOppositeTnt(Data.Direction, Data.DefaultBlueDuper); // Moving Red TNT
_manuallyData.BTNT = adjustPosition + GetTntPosition(Data.DefaultBlueDuper);
_manuallyData.ATNT = adjustPosition + GetOppositeTnt(Data.Direction, Data.DefaultBlueDuper);
}
else
{
_manuallyData.ATNT = GetTntPosition(Data.DefaultRedDuper);
_manuallyData.BTNT = GetOppositeTnt(Data.Direction, Data.DefaultRedDuper);
_manuallyData.ATNT = adjustPosition + GetTntPosition(Data.DefaultRedDuper);
_manuallyData.BTNT = adjustPosition + GetOppositeTnt(Data.Direction, Data.DefaultRedDuper);
}

// Copy the rest of the data
Expand Down
2 changes: 1 addition & 1 deletion wwwroot/assets/i18n/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AmountA": "TNT(A)数量 :",
"AmountB": "TNT(B)数量 :",
"BlueTNT": "蓝色阵列",
"CalculatePearlMomentum": "计算珍珠动能",
"CalculatePearlMomentum": "计算珍珠矢量",
"CalculatePearlTrace": "计算珍珠轨迹",
"CalculateTNTAmount": "计算TNT当量",
"CheckForUpdate": "检查更新",
Expand Down

0 comments on commit c0f0c01

Please sign in to comment.