PT_CSCN to PT_METL

  • um3k
    22nd Aug 2010 Member 0 Permalink
    Which part of the code determines that PT_CSCN and PT_HSCN do not conduct to metal?
  • Xenocide
    22nd Aug 2010 Former Staff 0 Permalink
    from what I've seen and can understand, its more the lack of coding that says CSCN/HSCN can't conduct to METL.

    Look around line 2293 (from what I can tell) if you speak C
  • um3k
    22nd Aug 2010 Member 0 Permalink
    Ok, I see that. I've already duplicated and changed that part for my new element, but for some reason, it still conducts to metal. Hmm...
  • Xenocide
    22nd Aug 2010 Former Staff 0 Permalink
    This is just a complete guess:

    r = pmap[y+ny][x+nx]
    rt = parts[r>>8]

    if ((t==PT_SPRK && rt.type==PT_XXXX) && rt.type != PT_METL){
    rt.life = 0;
    rt.type = rt.ctype;
    }

    Going to need someone else with a bit more coding experience really...
  • um3k
    22nd Aug 2010 Member 0 Permalink
    It's weird, because there is no place in the script where CSCN/HSCN and METL have their interactions explicitly defined. In fact my new element is pretty much CSCN/HSCN without the temperature effects, so I've copied and pasted the code, making the appropriate changes, yet the behavior is not as I expected. There must be something I'm overlooking,
  • um3k
    22nd Aug 2010 Member 0 Permalink
    Well, I apparently made it work, but don't ask how, because I have no clue.
  • triclops200
    22nd Aug 2010 Former Staff 0 Permalink
    well, fopr one it is PT_WIRE not PT_METL.
  • um3k
    22nd Aug 2010 Member 0 Permalink
    No, someone changed it to PT_METL in the latest source, and changed PT_METL to PT_STNE.