Fixed side input consistency issue when a turtle upgrade is removed (#743)

This commit is contained in:
Ronan Hanley 2021-06-01 19:12:35 +01:00 committed by GitHub
parent 02695aea51
commit c40a13558c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -624,7 +624,11 @@ public void setUpgrade( @Nonnull TurtleSide side, ITurtleUpgrade upgrade )
// This is a separate function to avoid updating the block when reading the NBT. We don't need to do this as
// either the block is newly placed (and so won't have changed) or is being updated with /data, which calls
// updateBlock for us.
if( owner.getLevel() != null ) owner.updateBlock();
if( owner.getLevel() != null )
{
owner.updateBlock();
owner.updateInput();
}
}
private boolean setUpgradeDirect( @Nonnull TurtleSide side, ITurtleUpgrade upgrade )

View File

@ -5,7 +5,7 @@
import dan200.computercraft.ingame.api.checkComputerOk
class TurtleTest {
@GameTest(required = false)
@GameTest
suspend fun `Unequip refreshes peripheral`(context: TestContext) = context.checkComputerOk(1)
/**