Handle dirty flag on unparented entities.
Parenting the entity should automatically dirty the parent.
This commit is contained in:
parent
c367941304
commit
ee078dd988
@ -217,11 +217,14 @@ class PCEntityRefBase(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dirty(self):
|
def dirty(self):
|
||||||
return self.chunk.dirty
|
if self.chunk:
|
||||||
|
return self.chunk.dirty
|
||||||
|
return True
|
||||||
|
|
||||||
@dirty.setter
|
@dirty.setter
|
||||||
def dirty(self, value):
|
def dirty(self, value):
|
||||||
self.chunk.dirty = value
|
if self.chunk:
|
||||||
|
self.chunk.dirty = value
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def blockTypes(self):
|
def blockTypes(self):
|
||||||
@ -312,11 +315,14 @@ class PCTileEntityRefBase(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def dirty(self):
|
def dirty(self):
|
||||||
return self.chunk.dirty
|
if self.chunk:
|
||||||
|
return self.chunk.dirty
|
||||||
|
return True
|
||||||
|
|
||||||
@dirty.setter
|
@dirty.setter
|
||||||
def dirty(self, value):
|
def dirty(self, value):
|
||||||
self.chunk.dirty = value
|
if self.chunk:
|
||||||
|
self.chunk.dirty = value
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def blockTypes(self):
|
def blockTypes(self):
|
||||||
|
Reference in New Issue
Block a user