//private. called when onet block is moved, built, or destroyed. void World::ReEnlighten( const ushort i, const ushort j, const ushort k) { unsigned char l= LightRadius(i, j, k); if( l > 0 ) Shine( l ); SunShine(i, j); emit UpdatedAround(i, j, k, l + 1); }
void Active::UpdateLightRadius(const int old_radius) { if ( IsInside() ) return; const int radius = LightRadius(); if ( radius != old_radius ) { const XyzInt xyz = GetXyz(); World* const world = World::GetWorld(); world->Shine(xyz, -old_radius); world->Shine(xyz, radius); emit world->UpdatedAround(XYZ(xyz)); } if ( radius && old_radius == 0 ) { GetShred()->AddShining(this); } else if ( old_radius && radius == 0 ) { GetShred()->RemShining(this); } }