Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Content/Items/SpaceWand.Operations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public static void OperateTile(Player player, int x, int y, HashSet<Point> tiles
// 物品放置的瓷砖就是位置对应的瓷砖则无需替换
if (!ValidTileForReplacement(item, x, y))
{
//取消物块的制动
originalTile.IsActuated = false;
// 至少还可以设置个斜坡
SetSlopeFor(placeType, blockType, x, y, tilesHashSet);
return;
Expand All @@ -95,6 +97,8 @@ public static void OperateTile(Player player, int x, int y, HashSet<Point> tiles
// PickItemInInventory(player, GetConditions(placeType), false, out int index);
HandleItemConsumption(player, indexOfItemBeingConsumed, itemsConsumed, usingTileWand);
SetSlopeFor(placeType, blockType, x, y, tilesHashSet);
//取消物块的制动
originalTile.IsActuated = false;
}
else
{
Expand All @@ -107,6 +111,8 @@ public static void OperateTile(Player player, int x, int y, HashSet<Point> tiles
// PickItemInInventory(player, GetConditions(placeType), false, out int index);
HandleItemConsumption(player, indexOfItemBeingConsumed, itemsConsumed, usingTileWand);
SetSlopeFor(placeType, blockType, x, y, tilesHashSet);
//取消物块的制动
originalTile.IsActuated = false;
}
}
}
Expand Down Expand Up @@ -151,4 +157,4 @@ private static void SetSlopeFor(PlaceType placeType, BlockType blockType, int x,
if (placeType is PlaceType.Soild && blockType is BlockType.Solid && !positions.Contains(new Point(x, y + 1)))
WorldGen.SlopeTile(x, y + 1);
}
}
}