Magic

Magic

190k Downloads

Undoing and pistons

martdamp opened this issue ยท 2 comments

commented

Hey Nathan,

we found another bug, when a block connected to a piston gets displaced and if the piston then extends, then when the block undo's then the piston will drop.

martdamp

A list of pictures showing what happens.
The move that we used while testing:

earth_test:
    icon: stone
    actions:
        cast:
        -   class: ChangeContext
            target_offset: 0,1,0
            actions:
            -   class: Cylinder
                radius: 2
                actions:
                -   class: Brush
                    brush: erase
                    actions:
                    -   class: ModifyBlock
            -   class: Delay
            -   class: Cylinder
                radius: 3
                actions:
                -   class: Brush
                    brush: erase
                    actions:
                    -   class: ModifyBlock
            -   class: Delay
            -   class: Cylinder
                radius: 4
                actions:
                -   class: Brush
                    brush: erase
                    actions:
                    -   class: ModifyBlock
    parameters:
        target: block
        destructible: earth
        falling: true
        delay: 50
        undo: 4000
        direction: 0,1,0
        speed: 0.2
        thickness: 1
        y_size: 1
commented

Just wanted to let you know I saw this but don't have any ideas yet, this may be tricky to fix.

commented

I decided to fix this by having the piston retract when the spell's undo fires.

This could leave machines in an inconsistent state, but I think it is the best I can do. The only other alternative I could think of was to skip undoing the block the piston extended into, but then that block would be lost.

Will be fixed in 6.9.21