Element Falldowns

  • Sourec
    16th Jun 2015 Member 0 Permalink

    I've been going through the TPT code and have a pretty decent understanding of it, but the one thing I can't wrap my head around is the need for falldown values. I imagine there was some past need for them, but I honestly can't figure it out. Furthermore, they don't seem to do anything useful other than cause the occasional headache and exploit -- I've got a branch on my fork of TPT on GitHub that entirely removes falldown values by switching them out for the already-existing .State property (I did this on a whim as an experiment after seeing a developer comment about planning to remove them sometime) and... no change in particle behavior. Everything works just perfectly, identical to before. So what gives? Why are there falldown values?

    Edited once by Sourec. Last: 16th Jun 2015
  • Lord_Bowserinator
    16th Jun 2015 Member 0 Permalink

    Probably for the old TPT versions that actually needed it, so when new movement code (probably the STATE property) was added there was no use for it, but instead of deleting it it would just be easier to leave it. 

  • Sourec
    16th Jun 2015 Member 0 Permalink

    @Lord_Bowserinator (View Post)

     Yeah, it is the state property. The state property seems to control far more particle behavior now than just falldown. Falldown was only involved in a few key areas, notably GEL, collisions for STKM, and stuff with walls, as I remember it. There's some stuff about pressure that falldown is used for (I think), but nothing that state couldn't replace.

    Edited once by Sourec. Last: 16th Jun 2015
  • jacob1
    17th Jun 2015 Developer 0 Permalink
    Yes, .FallDown is entirely useless since .State can be used to determine everything falldown does. Both of these have existed almost forever so I have no idea why we have both. I plan to remove falldown and the TYPE_ properties later. Your branch shows how falldown isn't needed although I'd rather double check everything myself when I remove it.
  • ZXbatata123
    14th May Member 0 Permalink

    isn't it used on water equalisation?

  • jacob1
    15th May Developer 0 Permalink
    @ZXbatata123 (View Post)
    This thread is over 6 years old and contains outdated info now.

    The answer is that yes, .Falldown is used for water equalization. The plan was / would have been to replace it with something else like .State

    I believe I ultimately decided that the TYPE_ properties were best as they best reflected every state (solid, liquid, gas, powder, energy). I removed .State instead of .Falldown because it was used in the least amount of places. .Falldown and the TYPE_ constants may be merged one day.
    Edited once by jacob1. Last: 15th May