More resist-related comments.

This commit is contained in:
Saveliy Skresanov 2024-01-02 18:23:19 +07:00
parent 929b7ee525
commit c352b08d86
8 changed files with 10 additions and 8 deletions

View File

@ -115,7 +115,7 @@ static int update(UPDATE_FUNC_ARGS)
parts[ID(r)].tmp2 += 5; parts[ID(r)].tmp2 += 5;
parts[ID(r)].life = 1000; parts[ID(r)].life = 1000;
break; break;
case PT_RSST: case PT_RSST: //Destroy RSST
if(!rx && !ry) if(!rx && !ry)
{ {
sim->kill_part(ID(r)); sim->kill_part(ID(r));

View File

@ -66,7 +66,7 @@ static int update(UPDATE_FUNC_ARGS)
parts[ID(r)].life = 10; parts[ID(r)].life = 10;
return 1; return 1;
} }
else if (TYP(r) == PT_GEL) else if (TYP(r) == PT_GEL) //GLOW + GEL = RSST
{ {
sim->kill_part(i); sim->kill_part(i);
sim->part_change_type(ID(r),x+rx,y+ry,PT_RSST); sim->part_change_type(ID(r),x+rx,y+ry,PT_RSST);

View File

@ -62,6 +62,7 @@ static int update(UPDATE_FUNC_ARGS)
int under = pmap[y][x]; int under = pmap[y][x];
int utype = TYP(under); int utype = TYP(under);
//Randomly kill GRVT inside RSSS
if((utype == PT_RSSS) && sim->rng.chance(1, 5)) if((utype == PT_RSSS) && sim->rng.chance(1, 5))
{ {
sim->kill_part(i); sim->kill_part(i);

View File

@ -172,7 +172,7 @@ static int update(UPDATE_FUNC_ARGS)
ct_under = parts[ID(r)].ctype; ct_under = parts[ID(r)].ctype;
tmp_under = parts[ID(r)].tmp; tmp_under = parts[ID(r)].tmp;
//If there's a correct ctype set, use it //If there's a correct ctype set, liquefy into it
if(ct_under > 0 && ct_under < PT_NUM) if(ct_under > 0 && ct_under < PT_NUM)
{ {
sim->create_part(ID(r), x, y, ct_under); sim->create_part(ID(r), x, y, ct_under);
@ -182,7 +182,7 @@ static int update(UPDATE_FUNC_ARGS)
parts[ID(r)].ctype = tmp_under; parts[ID(r)].ctype = tmp_under;
} }
else else
sim->part_change_type(ID(r), x, y, PT_RSST); sim->part_change_type(ID(r), x, y, PT_RSST); //Default to RSST if no ctype
sim->kill_part(i); sim->kill_part(i);

View File

@ -114,7 +114,7 @@ static int update(UPDATE_FUNC_ARGS)
ct_under = parts[ID(r)].ctype; ct_under = parts[ID(r)].ctype;
tmp_under = parts[ID(r)].tmp; tmp_under = parts[ID(r)].tmp;
//If there's a correct ctype set, use it //If there's a correct ctype set, solidify RSST into it
if(ct_under > 0 && ct_under < PT_NUM) if(ct_under > 0 && ct_under < PT_NUM)
{ {
sim->create_part(ID(r), x, y, ct_under); sim->create_part(ID(r), x, y, ct_under);
@ -124,7 +124,7 @@ static int update(UPDATE_FUNC_ARGS)
parts[ID(r)].ctype = tmp_under; parts[ID(r)].ctype = tmp_under;
} }
else else
sim->part_change_type(ID(r), x, y, PT_RSSS); sim->part_change_type(ID(r), x, y, PT_RSSS); //Default to RSSS if no ctype
sim->kill_part(i); sim->kill_part(i);

View File

@ -101,7 +101,7 @@ static int update(UPDATE_FUNC_ARGS)
else change = 0.0f; else change = 0.0f;
parts[uID].temp = restrict_flt(parts[uID].temp + change, MIN_TEMP, MAX_TEMP); parts[uID].temp = restrict_flt(parts[uID].temp + change, MIN_TEMP, MAX_TEMP);
break; break;
case PT_RSSS: case PT_RSSS: //Destroy RSSS
{ {
sim->kill_part(uID); sim->kill_part(uID);
sim->kill_part(i); sim->kill_part(i);

View File

@ -48,6 +48,7 @@ void Element::Element_RSSS()
static int update(UPDATE_FUNC_ARGS) static int update(UPDATE_FUNC_ARGS)
{ {
//Block air like TTAN
sim->air->bmap_blockair[y/CELL][x/CELL] = 1; sim->air->bmap_blockair[y/CELL][x/CELL] = 1;
sim->air->bmap_blockairh[y/CELL][x/CELL] = 0x8; sim->air->bmap_blockairh[y/CELL][x/CELL] = 0x8;

View File

@ -69,7 +69,7 @@ static int update(UPDATE_FUNC_ARGS)
parts[i].life = 54; parts[i].life = 54;
else if (ct == PT_SWCH) else if (ct == PT_SWCH)
parts[i].life = 14; parts[i].life = 14;
else if (ct == PT_RSST) else if (ct == PT_RSST) //RSST disappears at the end of its spark cycle
{ {
sim->kill_part(i); sim->kill_part(i);
return 1; return 1;