diff --git a/includes/powder.h b/includes/powder.h index 541b282e6..8f1cd56c3 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -313,6 +313,7 @@ int graphics_EMP(GRAPHICS_FUNC_ARGS); int graphics_LIGH(GRAPHICS_FUNC_ARGS); int graphics_FIGH(GRAPHICS_FUNC_ARGS); int graphics_ELEC(GRAPHICS_FUNC_ARGS); +int graphics_WIRE(GRAPHICS_FUNC_ARGS); #define UPDATE_FUNC_ARGS int i, int x, int y, int surround_space, int nt // to call another update function with same arguments: @@ -641,7 +642,7 @@ static const part_type ptypes[PT_NUM] = {"PBCN", PIXPACK(0x3B1D0A), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Powered breakable clone", ST_NONE, TYPE_SOLID, &update_PBCN, &graphics_PBCN}, {"GPMP", PIXPACK(0x0A3B3B), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_POWERED, 0.0f +273.15f, 0, "Changes gravity to its temp when activated. (use HEAT/COOL).", ST_NONE, TYPE_SOLID, &update_GPMP, &graphics_GPMP}, {"CLST", PIXPACK(0xE4A4A4), 0.7f, 0.02f * CFDS, 0.94f, 0.95f, 0.0f, 0.2f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 55, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Clay dust. Produces paste when mixed with water.", ST_SOLID, TYPE_PART, &update_CLST, &graphics_CLST}, - {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, NULL}, + {"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE}, {"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB}, {"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmans.", ST_NONE, 0, &update_FIGH, &graphics_FIGH}, //Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description diff --git a/src/elements/wire.c b/src/elements/wire.c index d4225a550..e48e13179 100644 --- a/src/elements/wire.c +++ b/src/elements/wire.c @@ -38,3 +38,30 @@ int update_WIRE(UPDATE_FUNC_ARGS) { parts[i].ctype=1; return 0; } + +int graphics_WIRE(GRAPHICS_FUNC_ARGS) +{ + if (cpart->ctype==0) + { + *colr = 255; + *colg = 204; + *colb = 0; + return 0; + } + if (cpart->ctype==1) + { + *colr = 50; + *colg = 100; + *colb = 255; + //*pixel_mode |= PMODE_GLOW; + return 0; + } + if (cpart->ctype==2) + { + *colr = 255; + *colg = 100; + *colb = 50; + //*pixel_mode |= PMODE_GLOW; + return 0; + } +}