diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp index 3a2e9f6dd..b3832e366 100644 --- a/src/simulation/elements/ARAY.cpp +++ b/src/simulation/elements/ARAY.cpp @@ -168,11 +168,11 @@ static int update(UPDATE_FUNC_ARGS) } else if (rt == PT_PAPR) { + // In reading/writing state? if (parts[r].tmp) { - if (parts[r].tmp & 0x10) + if (parts[r].tmp & 0x10) // Reading state { - // Read // End reading state early parts[r].tmp = 0; if (parts[r].life) @@ -180,9 +180,8 @@ static int update(UPDATE_FUNC_ARGS) break; } } - else + else // Writing state { - // Write parts[r].life = 1; parts[r].dcolour = 0xFF1A2222; } @@ -230,11 +229,11 @@ static int update(UPDATE_FUNC_ARGS) } else if (rt == PT_PAPR) { + // In reading/writing state? if (parts[r].tmp) { - if (parts[r].tmp & 0x10) + if (parts[r].tmp & 0x10) // Reading state { - // Read // End reading state early parts[r].tmp = 0; if (parts[r].life) @@ -242,9 +241,8 @@ static int update(UPDATE_FUNC_ARGS) break; } } - else + else // Writing state { - // Write parts[r].life = 0; parts[r].dcolour = 0; } diff --git a/src/simulation/elements/LDTC.cpp b/src/simulation/elements/LDTC.cpp index fd0281a51..7f194b5b1 100644 --- a/src/simulation/elements/LDTC.cpp +++ b/src/simulation/elements/LDTC.cpp @@ -158,6 +158,7 @@ static int update(UPDATE_FUNC_ARGS) { photonWl = 0x0; int bit = 0x1; + // Read one bit of the wavelength from successive particles while (TYP(rr) == PT_PAPR && bit <= 0x3FFFFFFF) { if (parts[ID(rr)].life) @@ -186,6 +187,7 @@ static int update(UPDATE_FUNC_ARGS) } if (TYP(r) == PT_PAPR) { + // Write each bit of the wavelength to successive particles int bit = 0x1; while (TYP(r) == PT_PAPR && bit <= 0x3FFFFFFF) { diff --git a/src/simulation/elements/PAPR.cpp b/src/simulation/elements/PAPR.cpp index dea58249c..141a31039 100644 --- a/src/simulation/elements/PAPR.cpp +++ b/src/simulation/elements/PAPR.cpp @@ -5,10 +5,10 @@ static int graphics(GRAPHICS_FUNC_ARGS); // Element overview: // 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: -// 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 // tmp2: Singe level @@ -39,7 +39,7 @@ void Element::Element_PAPR() Weight = 100; 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;