Where's the element files?

  • Videogamer555
    31st Jan 2013 Member 0 Permalink
    I'm looking at GIthub https://github.com/FacialTurd/The-Powder-Toy and I can't find the element files in any form (such as fire.c, fire.h, or fire.cpp) Nor can I find the file that contains the table of properties and transition states for the elements. Any help would be GREATLY appreciated, since I need to find the properties of a particular element for reference, as I create a new element using the LUA functionality.
  • boxmein
    31st Jan 2013 Former Staff 0 Permalink
    @Videogamer555 (View Post)
    The table of properties is now in every element's own file. The game has been rewritten and with it came a few good and a few bad things. The code is far less pretty now, though elements have their content in one place.
    The element files are here: https://github.com/FacialTurd/The-Powder-Toy/tree/master/src/simulation/elements
    And their IDs might be in one of the
    //#TPT-Directive
    comments. Otherwise, the ID is assigned by chance.
  • jacob1
    31st Jan 2013 Developer 0 Permalink
    the element id's are only after the //#TPT-Directive thing, this is one part I don't really like. The full list is only available after you compile it in the generated files. And it can't be auto generated, but you don't need the id's for lua anyway so this part doesn't matter.

    I forgot where the table of properties and states are, but somewhere in src/simulation probably in a .h file. But they are also listed in the wiki under the elements api page. Also see the incomplete guide to adding elements, there is a .cpp file linked there that explains what each property does, if you want to know.