Additional PAPR behavior
This commit is contained in:
parent
5613bf70f5
commit
09f86ff962
@ -1094,6 +1094,10 @@ int Simulation::eval_move(int pt, int nx, int ny, unsigned *rr) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PT_PAPR:
|
||||||
|
// May allow PAPR to block particles when marked? Or would that be too contrived?
|
||||||
|
result = 2;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// This should never happen
|
// This should never happen
|
||||||
// If it were to happen, try_move would interpret a 3 as a 1
|
// If it were to happen, try_move would interpret a 3 as a 1
|
||||||
|
@ -185,6 +185,10 @@ void SimulationData::init_can_move()
|
|||||||
//SAWD cannot be displaced by other powders
|
//SAWD cannot be displaced by other powders
|
||||||
if (elements[movingType].Properties & TYPE_PART)
|
if (elements[movingType].Properties & TYPE_PART)
|
||||||
can_move[movingType][PT_SAWD] = 0;
|
can_move[movingType][PT_SAWD] = 0;
|
||||||
|
|
||||||
|
// Let most non-solids pass through PAPR
|
||||||
|
if (elements[movingType].Properties & (TYPE_GAS | TYPE_PART | TYPE_LIQUID))
|
||||||
|
can_move[movingType][PT_PAPR] = 2;
|
||||||
}
|
}
|
||||||
//a list of lots of things PHOT can move through
|
//a list of lots of things PHOT can move through
|
||||||
// TODO: replace with property
|
// TODO: replace with property
|
||||||
|
@ -8,8 +8,8 @@ static int graphics(GRAPHICS_FUNC_ARGS);
|
|||||||
// Additionally, it can be read and written to by ARAY.
|
// Additionally, it can be read and written to by ARAY.
|
||||||
|
|
||||||
// Property usage:
|
// Property usage:
|
||||||
// life: Temporary read/write state for ARAY interaction
|
// life: Written color value. If dcolour is not black, it gets copied here. 1 bit alpha
|
||||||
// tmp: Written color value. If dcolour is not black, it gets copied here. 1 bit alpha
|
// tmp: Temporary read/write state for ARAY interaction
|
||||||
// tmp2: Singe level
|
// tmp2: Singe level
|
||||||
|
|
||||||
void Element::Element_PAPR()
|
void Element::Element_PAPR()
|
||||||
@ -58,6 +58,7 @@ void Element::Element_PAPR()
|
|||||||
|
|
||||||
static int update(UPDATE_FUNC_ARGS)
|
static int update(UPDATE_FUNC_ARGS)
|
||||||
{
|
{
|
||||||
|
// Char when above burning temperature
|
||||||
if (parts[i].temp > 450 && parts[i].temp >= parts[i].tmp2)
|
if (parts[i].temp > 450 && parts[i].temp >= parts[i].tmp2)
|
||||||
{
|
{
|
||||||
parts[i].tmp2 = (int)parts[i].temp;
|
parts[i].tmp2 = (int)parts[i].temp;
|
||||||
@ -73,7 +74,6 @@ static int update(UPDATE_FUNC_ARGS)
|
|||||||
if (np >= 0)
|
if (np >= 0)
|
||||||
{
|
{
|
||||||
parts[np].life = 70;
|
parts[np].life = 70;
|
||||||
// parts[np].temp = parts[i].temp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,6 +82,7 @@ static int update(UPDATE_FUNC_ARGS)
|
|||||||
|
|
||||||
static int graphics(GRAPHICS_FUNC_ARGS)
|
static int graphics(GRAPHICS_FUNC_ARGS)
|
||||||
{
|
{
|
||||||
|
// Darken when burnt
|
||||||
float maxtemp = std::max((float)cpart->tmp2, cpart->temp);
|
float maxtemp = std::max((float)cpart->tmp2, cpart->temp);
|
||||||
if (maxtemp > 450)
|
if (maxtemp > 450)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user