Couple electronics ideas

  • randalserrano
    18th Jul 2011 Member 0 Permalink
    true, but it is very bulky. lol
  • LuaWeaver
    18th Jul 2011 Member 0 Permalink
    @randal,
    True. But to make it more realistic. In a thread in previous I had made, I state that I like things realistic, and pressure can be turned into electricity and so can heat.
  • Neospector
    18th Jul 2011 Member 0 Permalink
    @LuaWeaver (View Post)
    It's pretty easy to make a power plant look realistic. I can use portals to disguise the detector, myself.

    Also, Not many things in Powder Toy will be realistic.
  • boxmein
    18th Jul 2011 Former Staff 0 Permalink
    Try cutting them all down to one element. A DTCT element. It gets the right-clicked element when drawn, and if it's either HEAT, COOL, AIR or VACU, it sets its tmp respectively. The tmp sets the type of loop that is run on each frame.

    int update_DTCT(UPDATE_FUNC_ARGS, int sr) {
    if(parts[i].type == PT_DTCT) {
    /* This code goes to draw particle function
    if(sr == SPC_HEAT || sr = SPC_COOL || sr == SPC_VACUUM || sr == SPC_AIR) {
    switch sr {
    case SPC_HEAT : parts[i].tmp = 1; break;
    case SPC_COOL : parts[i].tmp = 2; break;
    case SPC_VACUUM : parts[i].tmp = 3; break;
    case SPC_AIR : parts[i].tmp = 4; break;
    default : parts[i].tmp = 0; break;
    // - Or something similar -
    }*/ // The below code is for the update loop
    if(parts[i].tmp == 1)
    if(parts[i].temp > 1273.15f) /* Sparking code */
    else if(parts[i].tmp == 2)
    if(parts[i].temp < 100.0f) /* Sparking code */
    if(parts[i].tmp == 3)
    if(pv[y/CELL][x/CELL] < -50.0f) /* Sparking code */
    else if(parts[i].tmp == 4)
    if(pv[y/CELL][x/CELL] > 50.0f) /* Sparking code */

     
    What about such? (or similar)