mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 20:53:28 +08:00
try to fix connection bug in feature Cut Conveyor Belt
This commit is contained in:
@@ -6,6 +6,15 @@ public static class FactoryFunctions
|
||||
{
|
||||
ref var belt = ref cargoTraffic.beltPool[beltId];
|
||||
if (belt.id != beltId || belt.outputId <= 0) return;
|
||||
|
||||
// Clear entity connection
|
||||
var factory = cargoTraffic.factory;
|
||||
factory.ReadObjectConn(belt.entityId, 0, out var isOutput, out var otherObjId, out var otherSlot);
|
||||
if (isOutput && factory.entityPool[otherObjId].beltId == belt.outputId) {
|
||||
factory.ClearObjectConnDirect(belt.entityId, 0);
|
||||
factory.ClearObjectConnDirect(otherObjId, otherSlot);
|
||||
}
|
||||
// Alter belt connections
|
||||
var (i0, i1, i2) = (belt.rightInputId, belt.backInputId, belt.leftInputId);
|
||||
cargoTraffic._arrInputs(ref i0, ref i1, ref i2);
|
||||
cargoTraffic.AlterBeltConnections(beltId, 0, i0, i1, i2);
|
||||
|
||||
@@ -64,7 +64,7 @@ public static class PlayerPatch
|
||||
{
|
||||
EnhancedMechaForgeCountControl.Enable(EnhancedMechaForgeCountControlEnabled.Value);
|
||||
HideTipsForSandsChanges.Enable(HideTipsForSandsChangesEnabled.Value);
|
||||
ShortcutKeysForStarsName.Enable(ShortcutKeysForAstrosNameEnabled.Value);
|
||||
ShortcutKeysForStarsName.Enable(ShortcutKeysForStarsNameEnabled.Value);
|
||||
AutoNavigation.Enable(AutoNavigationEnabled.Value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user