RIME type transformation

  • Empoliam
    2nd Jan 2013 Member 0 Permalink

    I am trying to add a way of turning lava into obsidian by cooling it to a certain temperature, without the lava returning to its original state. An example of what i would like to happen is the way WRTV turns to RIME instead of ICE when it touches an absolute zero surface. How can i do this?

     

    I have mostly been learning from existing code,but i have not found a solution in my searches.

  • NF
    2nd Jan 2013 Member 0 Permalink

    Obsidian is not a element on The Powder Toy. Off Topic: I'm getting better at coding and i'm going to add Obsidian "OBSI"

  • Empoliam
    2nd Jan 2013 Member 0 Permalink

    @NUCLEAR_FOX (View Post)

    I know. Obsidian is a part of my own mod.

    Btw, i don't plan on releasing my own mod, so if you want my existing code to make your life a bit easier, i can send it you. It has no functions other than being a more durable, less acid-resistant glass. But it's there if you want it.

  • jacob1
    2nd Jan 2013 Developer 2 Permalink
    @NUCLEAR_FOX (View Post)
    ...

    @Empoliam (View Post)
    find
    else if (t==PT_WTRV) {
    if (pt<273.0f) t = PT_RIME;
    else t = PT_DSTW;
    }
    in simulation.cpp. This is the code like the one you want. A bit below, in the LAVA if statement, find
    if (s) {
    t = parts[i].ctype;
    and add this below it:
    if (pt<273.0f) t = PT_obsidian;
    And I think this should work
  • Empoliam
    2nd Jan 2013 Member 0 Permalink

    @jacob1 (View Post)

     Thank you for this.

     EDIT:

    Nope, didn't work. Back to the drawing board.

  • jacob1
    2nd Jan 2013 Developer 0 Permalink
    @Empoliam (View Post)
    are you sure? I got lava when less than 0C to turn into DMND like this with just one line. I added that line below the t = parts[i].ctype