예제 #1
0
 def Fix(self, atom):
     icon_state = atom.properties['icon_state'].value
     new_atom = Atom(self.STATE_TO_TYPE[icon_state])
     if 'dir' in atom.mapSpecified:
         new_atom.setProperty('dir', atom.getProperty('dir'),
                              PropertyFlags.MAP_SPECIFIED)
     return new_atom
예제 #2
0
 def Fix(self, atom):
     newtype = atom.path
     if atom.path == ATMOSBASE+'/pipe/simple/insulated':
         icon_state = ''
         if 'icon_state' in atom.properties:
             icon_state = atom.properties['icon_state'].value
         newtype = self.STATE_TO_TYPE.get(icon_state, ATMOSBASE+'/pipe/simple/insulated/visible')
     new_atom = Atom(newtype)
     if 'dir' in atom.mapSpecified:
         # Normalize dir
         direction = int(atom.getProperty('dir', 2))
         if direction == 3:
             direction = 1
         elif direction == 8:  # Breaks things, for some reason
             direction = 4
         elif direction == 12:
             direction = 4
         new_atom.setProperty('dir', direction, PropertyFlags.MAP_SPECIFIED)
     return new_atom
예제 #3
0
 def Fix(self, atom):
     newtype = atom.path
     if atom.path == '/obj/machinery/networked/atmos/pipe/simple/insulated':
         icon_state = ''
         if 'icon_state' in atom.properties:
             icon_state = atom.properties['icon_state'].value
         newtype = self.STATE_TO_TYPE.get(icon_state, '/obj/machinery/networked/atmos/pipe/simple/insulated/visible')
     new_atom = Atom(newtype)
     if 'dir' in atom.mapSpecified:
         # Normalize dir
         direction = int(atom.getProperty('dir', 2))
         if direction == 3:
             direction = 1
         elif direction == 8:  # Breaks things, for some reason
             direction = 4
         elif direction == 12:
             direction = 4
         new_atom.setProperty('dir', direction, PropertyFlags.MAP_SPECIFIED)
     return new_atom
예제 #4
0
 def Fix(self, atom):
     icon_state = atom.properties['icon_state'].value
     new_atom = Atom(self.STATE_TO_TYPE[icon_state])
     if 'dir' in atom.mapSpecified:
         new_atom.setProperty('dir', atom.getProperty('dir'), PropertyFlags.MAP_SPECIFIED)
     return new_atom
예제 #5
0
파일: dmm.py 프로젝트: Boggart/ByondTools
 def changeMarker(ln):
     a = Atom('/obj/effect/byondtools/changed')
     a.setProperty('tag','{}:{}'.format(currentpatch,ln),flags=PropertyFlags.MAP_SPECIFIED)
     return a
예제 #6
0
 def changeMarker(ln):
     a = Atom('/obj/effect/byondtools/changed')
     a.setProperty('tag',
                   '{}:{}'.format(currentpatch, ln),
                   flags=PropertyFlags.MAP_SPECIFIED)
     return a