forked from oerkki/voxelands
fix bug with sticky pistons lifting water, reduce minimum light requirement for solarpanels a bit
This commit is contained in:
parent
ce6518ab43
commit
a4b1421b63
|
@ -2266,7 +2266,7 @@ NodeMetadata* SolarPanelNodeMetadata::clone()
|
||||||
bool SolarPanelNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env)
|
bool SolarPanelNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env)
|
||||||
{
|
{
|
||||||
MapNode n = env->getMap().getNodeNoEx(pos);
|
MapNode n = env->getMap().getNodeNoEx(pos);
|
||||||
if (n.getLightBlend(env->getDayNightRatio()) < 13) {
|
if (n.getLightBlend(env->getDayNightRatio()) < 10) {
|
||||||
m_energy = 0;
|
m_energy = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2907,6 +2907,8 @@ bool PistonNodeMetadata::contract(v3s16 pos, v3s16 dir, bool sticky, ServerEnvir
|
||||||
ContentFeatures &f = content_features(n);
|
ContentFeatures &f = content_features(n);
|
||||||
if (f.pressure_type == CST_SOLID)
|
if (f.pressure_type == CST_SOLID)
|
||||||
break;
|
break;
|
||||||
|
if (f.liquid_type != LIQUID_NONE)
|
||||||
|
break;
|
||||||
if ((!sticky || i) && f.pressure_type != CST_DROPABLE)
|
if ((!sticky || i) && f.pressure_type != CST_DROPABLE)
|
||||||
break;
|
break;
|
||||||
v3s16 test_p;
|
v3s16 test_p;
|
||||||
|
@ -2936,6 +2938,8 @@ bool PistonNodeMetadata::contract(v3s16 pos, v3s16 dir, bool sticky, ServerEnvir
|
||||||
ContentFeatures &f = content_features(n);
|
ContentFeatures &f = content_features(n);
|
||||||
if (f.pressure_type == CST_SOLID)
|
if (f.pressure_type == CST_SOLID)
|
||||||
break;
|
break;
|
||||||
|
if (f.liquid_type != LIQUID_NONE)
|
||||||
|
break;
|
||||||
if ((!sticky || i) && f.pressure_type != CST_DROPABLE)
|
if ((!sticky || i) && f.pressure_type != CST_DROPABLE)
|
||||||
break;
|
break;
|
||||||
env->getMap().removeNodeWithEvent(p_next);
|
env->getMap().removeNodeWithEvent(p_next);
|
||||||
|
|
Loading…
Reference in New Issue