Skip to content

Commit

Permalink
Update 2.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Awbugl committed Dec 8, 2022
1 parent e475289 commit 2410725
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,25 @@ Reconstruct "Real Universe". Then leave a "GenesisBook".

### 最近更新介绍 | Recent update

- v2.2.5
+ 修复巨型建筑输出的原料增产点数消失的Bug


- v2.2.4
+ 调整了巨型抽水站的耗电与制作类型
+ 调整了氧的热值为900KJ
+ 允许巨型建筑输出原料

- v2.2.3
+ 添加巨型抽水站
+ 调整部分建筑的手动制造权限
+ 修复了一部分翻译错误

- v2.2.5
+ Fix a bug that causes the Mega Buildings raw material output point disappear


- v2.2.4
+ Adjust the power consumption and production type of the Mega Pump
+ Adjust the heat value of oxygen to 900KJ
+ Allow Mega Buildings to output raw materials

- v2.2.3
+ Add Mega Pump
+ Adjust some buildings to allow product manually
+ Fix some translation errors

----

<details>
Expand Down Expand Up @@ -112,6 +111,10 @@ Reconstruct "Real Universe". Then leave a "GenesisBook".
<details>
<summary>展开查看</summary>

- v2.2.5
+ 修复巨型建筑输出的原料增产点数消失的Bug


- v2.2.4
+ 调整了巨型抽水站的耗电与制作类型
+ 调整了氧的热值为900KJ
Expand Down Expand Up @@ -297,6 +300,10 @@ free to communicate with us.
<details>
<summary>Details</summary>

- v2.2.5
+ Fix a bug that causes the Mega Buildings raw material output point disappear


- v2.2.4
+ Adjust the power consumption and production type of the Mega Pump
+ Adjust the heat value of oxygen to 900KJ
Expand Down
16 changes: 9 additions & 7 deletions src/Patches/MegaAssemblerPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ private static void UpdateOutputSlots(
}
else
{
var entityId = traffic.beltPool[slotdata[index1].beltId].entityId;
var cargoPath = traffic.GetCargoPath(traffic.beltPool[slotdata[index1].beltId].segPathId);
var beltComponent = traffic.beltPool[slotdata[index1].beltId];
var cargoPath = traffic.GetCargoPath(beltComponent.segPathId);
if (cargoPath != null)
{
var index2 = slotdata[index1].storageIdx - 1;
Expand All @@ -547,14 +547,15 @@ private static void UpdateOutputSlots(
if (itemId > 0 && __instance.served[index3] > 0)
{
var num2 = __instance.served[index3] < maxPilerCount ? __instance.served[index3] : maxPilerCount;
if (cargoPath.TryInsertItemAtHeadAndFillBlank(itemId, (byte)num2, 0)) __instance.served[index3] -= num2;
if (cargoPath.TryInsertItemAtHeadAndFillBlank(itemId, (byte)num2, (byte)__instance.incServed[index3])) __instance.served[index3] -= num2;
}
}
}
}

if (itemId > 0)
{
var entityId = beltComponent.entityId;
signPool[entityId].iconType = 1U;
signPool[entityId].iconId0 = (uint)itemId;
}
Expand Down Expand Up @@ -703,12 +704,13 @@ public static void UIRecipePicker_RefreshIcons(
// ReSharper disable once ForCanBeConvertedToForeach
for (var index1 = 0; index1 < dataArray.Length; ++index1)
{
if (dataArray[index1].GridIndex >= 1101 && history.RecipeUnlocked(dataArray[index1].ID))
var gridIndex = dataArray[index1].GridIndex;
if (gridIndex >= 1101 && history.RecipeUnlocked(dataArray[index1].ID))
if (___filter == ERecipeType_1.None || ContainsRecipeType(___filter, dataArray[index1].Type))
{
var num1 = dataArray[index1].GridIndex / 1000;
var num2 = (dataArray[index1].GridIndex - num1 * 1000) / 100 - 1;
var num3 = dataArray[index1].GridIndex % 100 - 1;
var num1 = gridIndex / 1000;
var num2 = (gridIndex - num1 * 1000) / 100 - 1;
var num3 = gridIndex % 100 - 1;
if (num2 >= 0 && num3 >= 0 && num2 < 7 && num3 < 17)
{
var index2 = num2 * 17 + num3;
Expand Down
2 changes: 1 addition & 1 deletion src/ProjectGenesis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ProjectGenesis : BaseUnityPlugin, IModCanSave, IMultiplayerModWithS
{
public const string MODGUID = "org.LoShin.GenesisBook";
internal const string MODNAME = "GenesisBook";
internal const string VERSION = "2.2.4";
internal const string VERSION = "2.2.5";

// ReSharper disable once MemberCanBePrivate.Global
internal static ManualLogSource logger;
Expand Down

0 comments on commit 2410725

Please sign in to comment.