- void Invalidate() noexcept { dirty_model = dirty_save = true; }
- void InvalidateModel() noexcept { dirty_model = true; }
- void ClearModel() noexcept { dirty_model = false; }
+ bool Generated() const noexcept { return generated; }
+ void SetGenerated() noexcept { generated = true; }
+ bool Lighted() const noexcept { return lighted; }
+ void ScanLights();
+
+ /// check for active blocks, should be called after
+ /// block data was modified by means other than SetBlock()
+ void ScanActive();
+
+ void Ref() noexcept { ++ref_count; }
+ void UnRef() noexcept { --ref_count; }
+ bool Referenced() const noexcept { return ref_count > 0; }
+
+ void Invalidate() noexcept { dirty_mesh = dirty_save = true; }
+ void InvalidateMesh() noexcept { dirty_mesh = true; }
+ void ClearMesh() noexcept { dirty_mesh = false; }