Mercurial > traipse_dev
comparison orpg/mapper/background.py @ 236:9230a33defd9 beta
Traipse Beta 'OpenRPG' {100616-00}
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 (Closing/Closed)
New Features:
New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order
New to Server GUI, can now clear log
Updates:
Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence.
Update to Browser Server window. Display rooms with ' " & cleaner
Update to Server. Handles ' " & cleaner.
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
Fix to Single and Double quotes in Whiteboard text
Fix to Background images not showing when using the Image Server
Fix to Duplicate chat names appearing
Fix to Server GUI's logging output
Fix to FNB.COLORFUL_TABS bug.
author | sirebral |
---|---|
date | Wed, 16 Jun 2010 03:06:20 -0500 |
parents | 13054be69834 |
children |
comparison
equal
deleted
inserted
replaced
226:b29454610f36 | 236:9230a33defd9 |
---|---|
209 self.isUpdated = False | 209 self.isUpdated = False |
210 return xml_str | 210 return xml_str |
211 else: return '' | 211 else: return '' |
212 | 212 |
213 def layerTakeDOM(self, xml_dom): | 213 def layerTakeDOM(self, xml_dom): |
214 type = BG_COLOR | 214 bg_type = xml_dom.get("type") |
215 color = xml_dom.getAttribute("color") | 215 urlpath = xml_dom.get('path') |
216 logger.debug("color=" + color) | 216 color = xml_dom.get("color") |
217 path = urllib.unquote(xml_dom.getAttribute("path")) | 217 |
218 logger.debug("path=" + path) | 218 if urlpath != None: |
219 # Begin ted's map changes | 219 path = urllib.unquote(xml_dom.get("path")) |
220 if xml_dom.hasAttribute("color"): | 220 logger.debug("path=" + path) |
221 r,g,b = self.r_h.rgb_tuple(xml_dom.getAttribute("color")) | 221 |
222 if color != None: | |
223 logger.debug("color=" + color) | |
224 r,g,b = self.r_h.rgb_tuple(color) | |
222 self.set_color(cmpColour(r,g,b)) | 225 self.set_color(cmpColour(r,g,b)) |
223 # End ted's map changes | 226 |
224 if xml_dom.hasAttribute("type"): | 227 if bg_type != None: |
225 type = int(xml_dom.getAttribute("type")) | 228 logger.debug("type=" + bg_type) |
226 logger.debug("type=" + str(type)) | 229 bg_type = int(xml_dom.get("type")) |
227 if type == BG_TEXTURE: | 230 if bg_type == BG_TEXTURE: |
228 if path != "": self.set_texture(path) | 231 if path != "": self.set_texture(path) |
229 elif type == BG_IMAGE: | 232 elif bg_type == BG_IMAGE: |
230 if path != "": self.set_image(path, 1) | 233 if path != "": self.set_image(path, 1) |
231 elif type == BG_NONE: self.clear() | 234 elif bg_type == BG_NONE: self.clear() |
232 if xml_dom.hasAttribute('local') and xml_dom.getAttribute('local') == 'True' and os.path.exists(urllib.unquote(xml_dom.getAttribute('localPath'))): | 235 if xml_dom.get('local') == 'True' and os.path.exists(urllib.unquote(xml_dom.get('localPath'))): |
233 self.localPath = urllib.unquote(xml_dom.getAttribute('localPath')) | 236 self.localPath = urllib.unquote(xml_dom.get('localPath')) |
234 self.local = True | 237 self.local = True |
235 self.localTime = int(xml_dom.getAttribute('localTime')) | 238 self.localTime = int(xml_dom.get('localTime')) |
236 if self.localTime-time.time() <= 144000: | 239 if self.localTime-time.time() <= 144000: |
237 file = open(self.localPath, "rb") | 240 file = open(self.localPath, "rb") |
238 imgdata = file.read() | 241 imgdata = file.read() |
239 file.close() | 242 file.close() |
240 filename = os.path.split(self.localPath) | 243 filename = os.path.split(self.localPath) |