From 2fd787cc8ab007a97f787f7e89c248aca5c0b794 Mon Sep 17 00:00:00 2001 From: RusAnon Date: Mon, 3 May 2010 18:03:06 +1100 Subject: [PATCH] Some tweaks for Point --- dfhack/python/pydfhack/blocks.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dfhack/python/pydfhack/blocks.py b/dfhack/python/pydfhack/blocks.py index 6e02d3066..e62d8c4cf 100644 --- a/dfhack/python/pydfhack/blocks.py +++ b/dfhack/python/pydfhack/blocks.py @@ -10,7 +10,14 @@ class Point(object): self.block = block def get_block(self): - return Point(self.x/16, self.y/16, self.z, True) + if not self.block: + return Point(self.x/16, self.y/16, self.z, True) + else: + return self + + @property + def xyz(self): + return (self.x, self.y, self.z) def __repr__(self): b = ''