This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LicenseTooThrill's profile picture

[1.7.10]CCEdu - "Undo Last Program" does not restore gravel.

Started by LicenseTooThrill, 06 August 2015 - 03:39 AM
LicenseTooThrill #1
Posted 06 August 2015 - 05:39 AM
VERSION:
ComputerCraftEdu1.7.4
combined with
ComputerCraft1.7.4

DESCRIPTION:
When using a Beginner's Mining Turtle, fallen gravel (and possibly also sand, since it falls) is not restored after pushing "Undo Last Program"

EXPECTED RESULT:
Undo Last Program returns the turtle to the starting position and restores all blocks that it had broken. However, it does not seem to restore gravel that has fallen during the course of the program running.

REPRODUCTION STEPS:
Place the turtle, and 1 block in front of it, place a stone block with any number of gravel blocks atop the stone block.
Program the turtle as such:
while turtle.detect() do
turtle.dig()
os.sleep(1)
end
turtle.forward()

Finally, run the program and wait for it to finish, or at least wait for it to break the stone block so that 1 or more gravel blocks fall.

Now go into the remote and press, "Undo Last Program".
The stone block will be restored, but not the gravel.

SCREENSHOT/VIDEO:
– I don't believe this bug needs a screenshot, however, I will be further testing several things:
1. does static gravel restore?
2. Does static and falling sand restore?
3 For step 2, if yes, it's a gravel issue. If static does, falling does not, it's a falling block issue.
3.5 If both restore, move to step 4.
4. Do static and falling blocks from the XtraBlocks mod restore?
4.5 if not, this simply indicates that falling blocks do not restore.
5. If all sand restores, and XtraBlocks falling restores, then it's an issue exclusively with falling gravel.
6. Eat pizza
Cranium #2
Posted 06 August 2015 - 04:20 PM
I believe this is just something that can't be done with code. A turtle can't place the gravel first, then stone underneath it. The program runs under the assumption that it would have to dig its way through these blocks, and assumes that anything outside of what it has dug is solid.
biggest yikes #3
Posted 06 August 2015 - 05:40 PM
A turtle can't place the gravel first, then stone underneath it.
The idea is if the turtle breaks stone with gravel on top (not bottom), so the gravel falls where the stone was, and then uses the undo button, the stone is restored but not the gravel.
Edited on 06 August 2015 - 03:40 PM
LicenseTooThrill #4
Posted 07 August 2015 - 01:47 AM
I just assumed that the restoral process was done by creating a temporary schematic of all blocks changed by the turtle, but not the player. But if the stone breaks and the gravel falls, maybe that isn't considered a change by the turtle, but just a change by the game engine. More a design oversight then, I guess.
Bomb Bloke #5
Posted 07 August 2015 - 08:37 AM
I'd assume it's the same deal with water source blocks generated by the script's actions.