Mercurial > traipse_dev
comparison orpg/mapper/grid.py @ 228:24769389a7ba alpha
Traipse Alpha 'OpenRPG' {100612-01}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary (Preparing to close updates)
New Features:
New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order
Fixes:
Fix to InterParse that was causing an Infernal Loop with Namespace Internal
Fix to XML data, removed old Minidom and switched to Element Tree
Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread
Fix to metaservers.xml file not being created
author | sirebral |
---|---|
date | Sat, 12 Jun 2010 04:38:29 -0500 |
parents | b633f4c64aae |
children |
comparison
equal
deleted
inserted
replaced
225:2c6db2043764 | 228:24769389a7ba |
---|---|
404 self.isUpdated = False | 404 self.isUpdated = False |
405 return xml_str | 405 return xml_str |
406 else: return '' | 406 else: return '' |
407 | 407 |
408 def layerTakeDOM(self, xml_dom): | 408 def layerTakeDOM(self, xml_dom): |
409 if xml_dom.hasAttribute("color"): | 409 color = xml_dom.get('color') |
410 r,g,b = self.r_h.rgb_tuple(xml_dom.getAttribute("color")) | 410 if color != None: |
411 r,g,b = self.r_h.rgb_tuple(color) | |
411 self.set_color(cmpColour(r,g,b)) | 412 self.set_color(cmpColour(r,g,b)) |
412 #backwards compatible with non-isometric map formated clients | 413 #backwards compatible with non-isometric map formated clients |
413 ratio = RATIO_DEFAULT | 414 ratio = RATIO_DEFAULT if xml_dom.get("ratio") == None else xml_dom.get('ratio') |
414 if xml_dom.hasAttribute("ratio"): ratio = xml_dom.getAttribute("ratio") | 415 mode = xml_dom.get('mode') |
415 if xml_dom.hasAttribute("mode"): | 416 if mode != None: self.SetMode(int(mode)) |
416 self.SetMode(int(xml_dom.getAttribute("mode"))) | 417 size = xml_dom.get('size') |
417 if xml_dom.hasAttribute("size"): | 418 if size != None: |
418 self.unit_size = int(xml_dom.getAttribute("size")) | 419 self.unit_size = int(size) |
419 self.unit_size_y = self.unit_size | 420 self.unit_size_y = self.unit_size |
420 if xml_dom.hasAttribute("snap"): | 421 if (xml_dom.get("snap") == 'True') or (xml_dom.get("snap") == "1"): self.snap = True |
421 if (xml_dom.getAttribute("snap") == 'True') or (xml_dom.getAttribute("snap") == "1"): self.snap = True | 422 else: self.snap = False |
422 else: self.snap = False | 423 line = xml_dom.get('line') |
423 if xml_dom.hasAttribute("line"): | 424 if line != None: self.SetLine(int(line)) |
424 self.SetLine(int(xml_dom.getAttribute("line"))) | 425 |