Updated comments and element description

This commit is contained in:
Rebmiami 2023-12-13 06:24:18 -05:00
parent 39b811e52c
commit c0f248c6db
3 changed files with 11 additions and 11 deletions

View File

@ -168,11 +168,11 @@ static int update(UPDATE_FUNC_ARGS)
} }
else if (rt == PT_PAPR) else if (rt == PT_PAPR)
{ {
// In reading/writing state?
if (parts[r].tmp) if (parts[r].tmp)
{ {
if (parts[r].tmp & 0x10) if (parts[r].tmp & 0x10) // Reading state
{ {
// Read
// End reading state early // End reading state early
parts[r].tmp = 0; parts[r].tmp = 0;
if (parts[r].life) if (parts[r].life)
@ -180,9 +180,8 @@ static int update(UPDATE_FUNC_ARGS)
break; break;
} }
} }
else else // Writing state
{ {
// Write
parts[r].life = 1; parts[r].life = 1;
parts[r].dcolour = 0xFF1A2222; parts[r].dcolour = 0xFF1A2222;
} }
@ -230,11 +229,11 @@ static int update(UPDATE_FUNC_ARGS)
} }
else if (rt == PT_PAPR) else if (rt == PT_PAPR)
{ {
// In reading/writing state?
if (parts[r].tmp) if (parts[r].tmp)
{ {
if (parts[r].tmp & 0x10) if (parts[r].tmp & 0x10) // Reading state
{ {
// Read
// End reading state early // End reading state early
parts[r].tmp = 0; parts[r].tmp = 0;
if (parts[r].life) if (parts[r].life)
@ -242,9 +241,8 @@ static int update(UPDATE_FUNC_ARGS)
break; break;
} }
} }
else else // Writing state
{ {
// Write
parts[r].life = 0; parts[r].life = 0;
parts[r].dcolour = 0; parts[r].dcolour = 0;
} }

View File

@ -158,6 +158,7 @@ static int update(UPDATE_FUNC_ARGS)
{ {
photonWl = 0x0; photonWl = 0x0;
int bit = 0x1; int bit = 0x1;
// Read one bit of the wavelength from successive particles
while (TYP(rr) == PT_PAPR && bit <= 0x3FFFFFFF) while (TYP(rr) == PT_PAPR && bit <= 0x3FFFFFFF)
{ {
if (parts[ID(rr)].life) if (parts[ID(rr)].life)
@ -186,6 +187,7 @@ static int update(UPDATE_FUNC_ARGS)
} }
if (TYP(r) == PT_PAPR) if (TYP(r) == PT_PAPR)
{ {
// Write each bit of the wavelength to successive particles
int bit = 0x1; int bit = 0x1;
while (TYP(r) == PT_PAPR && bit <= 0x3FFFFFFF) while (TYP(r) == PT_PAPR && bit <= 0x3FFFFFFF)
{ {

View File

@ -5,10 +5,10 @@ static int graphics(GRAPHICS_FUNC_ARGS);
// Element overview: // Element overview:
// PAPR (Paper) is a flammable solid element that can be colored by certain other elements. // PAPR (Paper) is a flammable solid element that can be colored by certain other elements.
// Additionally, it can be read and written to by ARAY. // Additionally, it can be read and written to by ARAY and LDTC.
// Property usage: // Property usage:
// life: Written color value. Uses same format as dcolour. // life: Whether or not the particle is marked
// tmp: Temporary read/write state for ARAY interaction // tmp: Temporary read/write state for ARAY interaction
// tmp2: Singe level // tmp2: Singe level
@ -39,7 +39,7 @@ void Element::Element_PAPR()
Weight = 100; Weight = 100;
HeatConduct = 80; HeatConduct = 80;
Description = "Paper. Flammable, readable, writable."; Description = "Paper. Flammable, can be marked by BCOL or deco. Lets non-solids through when unmarked.";
Properties = TYPE_SOLID | PROP_NEUTPENETRATE; Properties = TYPE_SOLID | PROP_NEUTPENETRATE;