Why is ROCK resistant to DEST?

  • ArolaunTech
    21st Jan 2022 Member 0 Permalink

    Can someone show me what part of the TPT code makes ROCK resistant to DEST?

  • tommers
    21st Jan 2022 Member 0 Permalink

    i just tested this, its not resistant

  • ArolaunTech
    21st Jan 2022 Member 0 Permalink

    It is more resistant than QRTZ, which has a higher melting point than ROCK. So it is resistant. And something must be making the ROCK more resistant. My question is: what is that thing?

  • jacob1
    21st Jan 2022 Developer 0 Permalink
    The reason it is more resistant is that the DEST can't fall through ROCK.

    DEST has a very high Weight and will go through nearly any element
    https://github.com/The-Powder-Toy/The-Powder-Toy/blob/master/src/simulation/elements/ROCK.cpp#L30

    ROCK explicitly requests that DEST not be allowed to fall through it
    https://github.com/The-Powder-Toy/The-Powder-Toy/blob/master/src/simulation/Simulation.cpp#L2466

    It's pretty obscure and during code review I removed that line not understanding what it did. A big reason DEST is so powerful is because of its high weight that lets it get into solid objects and destroy them from the inside.
  • boiiplay
    21st Jan 2022 Banned 0 Permalink
    This post is hidden because the user is banned
    Edited once by boiiplay. Last: 21st Jan 2022
  • ArolaunTech
    22nd Jan 2022 Member 0 Permalink

    Ok, then is it possible to change the "can_move" array?

     

    EDIT: I was trying to make an element DEST resistant, and I found out you can just change the "Weight" property to 102 (it's a solid so it doesn't matter anyway)

    Edited 2 times by ArolaunTech. Last: 22nd Jan 2022
  • jacob1
    22nd Jan 2022 Developer 0 Permalink
    @ArolaunTech (View Post)
    Why? This is a feature of ROCK. It's one of the only DEST-resistant elements (the only one to do so intentionally)