diff --git a/Source/Client/Managers/DeepScribeManager.cs b/Source/Client/Managers/DeepScribeManager.cs index c04d92b8..f8cb5418 100644 --- a/Source/Client/Managers/DeepScribeManager.cs +++ b/Source/Client/Managers/DeepScribeManager.cs @@ -1183,6 +1183,7 @@ private static void GetMapTerrain(MapData mapData, Map map) IntVec3 vectorToCheck = new IntVec3(x, map.Size.y, z); mapData.tileDefNames.Add(map.terrainGrid.TerrainAt(vectorToCheck).defName.ToString()); + mapData.tilePollutions.Add(map.pollutionGrid.IsPolluted(vectorToCheck)); if (map.roofGrid.RoofAt(vectorToCheck) == null) mapData.roofDefNames.Add("null"); else mapData.roofDefNames.Add(map.roofGrid.RoofAt(vectorToCheck).defName.ToString()); @@ -1271,6 +1272,7 @@ private static void SetMapTerrain(MapData mapData, Map map) mapData.tileDefNames[index]); map.terrainGrid.SetTerrain(vectorToCheck, terrainToUse); + map.pollutionGrid.SetPolluted(vectorToCheck, mapData.tilePollutions[index]); } catch { Logger.Warning($"Failed to set terrain at {vectorToCheck}"); } diff --git a/Source/Server/Managers/Actions/Online/OnlineMarketManager.cs b/Source/Server/Managers/Actions/Online/OnlineMarketManager.cs index 648f6cfa..557568a9 100644 --- a/Source/Server/Managers/Actions/Online/OnlineMarketManager.cs +++ b/Source/Server/Managers/Actions/Online/OnlineMarketManager.cs @@ -70,10 +70,13 @@ private static void AddToMarket(ServerClient client, MarketData marketData) private static void RemoveFromMarket(ServerClient client, MarketData marketData) { ItemData toGet = Master.marketFile.MarketStock[marketData.indexToManage]; + int reservedQuantity = toGet.quantity; toGet.quantity = marketData.quantityToManage; marketData.transferThingBytes = new List() { Serializer.ConvertObjectToBytes(toGet) }; ItemData itemData = Master.marketFile.MarketStock[marketData.indexToManage]; + itemData.quantity = reservedQuantity; + if (marketData.quantityToManage == 0) ResponseShortcutManager.SendIllegalPacket(client, "Tried to buy illegal quantity at market"); else if (itemData.quantity > marketData.quantityToManage) itemData.quantity -= marketData.quantityToManage; else if (itemData.quantity == marketData.quantityToManage) Master.marketFile.MarketStock.RemoveAt(marketData.indexToManage); diff --git a/Source/Shared/Misc/CommonValues.cs b/Source/Shared/Misc/CommonValues.cs index 22074775..d7a7bb1f 100644 --- a/Source/Shared/Misc/CommonValues.cs +++ b/Source/Shared/Misc/CommonValues.cs @@ -2,6 +2,6 @@ namespace Shared { public static class CommonValues { - public readonly static string executableVersion = "1.5.0"; + public readonly static string executableVersion = "24.6.7.1"; } } \ No newline at end of file diff --git a/Source/Shared/PacketData/MapData.cs b/Source/Shared/PacketData/MapData.cs index 9aab92df..15fe12b0 100644 --- a/Source/Shared/PacketData/MapData.cs +++ b/Source/Shared/PacketData/MapData.cs @@ -22,6 +22,7 @@ public class MapData public List tileDefNames = new List(); public List roofDefNames = new List(); + public List tilePollutions = new List(); //Things