Use in powder.h?

  • tommig
    31st Oct 2011 Member 0 Permalink
    On attempting to add elements to my mod, I have encountered a problem;
    I've found a section of the code called "use", which I don't undersatnd what it is and what value to put in

    Thanks
    Tommig
  • cctvdude99
    31st Oct 2011 Member 0 Permalink
    @tommig (View Post)
    Well, I have no idea what you are talking about as I kinda abandoned modding about 2 weeks ago.
    I've had a look through powder.h on the Git, and I have absolutely no idea what you are talking about... 0_o
  • tommig
    31st Oct 2011 Member 0 Permalink
    @cctvdude99 (View Post)
    There is nothing in the wiki, and all the values are either 0 or 1
    I'll check on Git
  • Neospector
    31st Oct 2011 Member 0 Permalink
    I believe use is replacing the "M" value, which determined whether or not the element appears in the menu.
  • tommig
    31st Oct 2011 Member 0 Permalink
    @Neospector (View Post)
    Nope, but I think I understand it!
    It is determining whether or not the element is a life type, all that have a 0 value are life types (and wind, but that seems to be removed!)
  • Neospector
    31st Oct 2011 Member 0 Permalink
    @tommig (View Post)
    You would be correct, except;
    {"RBDM", PIXPACK(0xCCCCCC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 1, 50, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 240, "Rubidium, explosive, especially on contact with water, low melting point", ST_SOLID, TYPE_SOLIDPROP_CONDUCTSPROP_LIFE_DEC, NULL, NULL},
  • tommig
    31st Oct 2011 Member 0 Permalink
    @Neospector (View Post)
    Nope, chuck testa!
    That's the weight value, the use value is 1
  • jacksonmj
    31st Oct 2011 Developer 0 Permalink
    It's whether the element is in use. The "use" column corresponds to ptypes[t].enabled. The life elements were all merged into PT_LIFE, and wind is now a tool instead of an element. Therefore those elements are disabled. If ptypes[t].enabled is 0, the element cannot be created with create_part or part_change_type.

    Sorry for the rather undescriptive label, I didn't want to re-indent each row to make the columns line up with a longer label.
  • tommig
    31st Oct 2011 Member 0 Permalink
    @jacksonmj (View Post)
    no problem, just the wiki needs updataing!