From a4b1421b63dca3109f2f9f8dbe2feaee5f3e7d3d Mon Sep 17 00:00:00 2001 From: darkrose Date: Sun, 17 Aug 2014 21:23:37 +1000 Subject: [PATCH] fix bug with sticky pistons lifting water, reduce minimum light requirement for solarpanels a bit --- src/content_nodemeta.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp index 835e7d9..4215738 100644 --- a/src/content_nodemeta.cpp +++ b/src/content_nodemeta.cpp @@ -2266,7 +2266,7 @@ NodeMetadata* SolarPanelNodeMetadata::clone() bool SolarPanelNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env) { MapNode n = env->getMap().getNodeNoEx(pos); - if (n.getLightBlend(env->getDayNightRatio()) < 13) { + if (n.getLightBlend(env->getDayNightRatio()) < 10) { m_energy = 0; return false; } @@ -2907,6 +2907,8 @@ bool PistonNodeMetadata::contract(v3s16 pos, v3s16 dir, bool sticky, ServerEnvir ContentFeatures &f = content_features(n); if (f.pressure_type == CST_SOLID) break; + if (f.liquid_type != LIQUID_NONE) + break; if ((!sticky || i) && f.pressure_type != CST_DROPABLE) break; v3s16 test_p; @@ -2936,6 +2938,8 @@ bool PistonNodeMetadata::contract(v3s16 pos, v3s16 dir, bool sticky, ServerEnvir ContentFeatures &f = content_features(n); if (f.pressure_type == CST_SOLID) break; + if (f.liquid_type != LIQUID_NONE) + break; if ((!sticky || i) && f.pressure_type != CST_DROPABLE) break; env->getMap().removeNodeWithEvent(p_next);