예제 #1
0
    def __init__(self, resource):
        self.is_file = False

        if isinstance(resource, str):
            from pynwn import ContentObject
            co = ContentObject.from_file(resource)
            self.gff = Gff(co)
            self.is_file = True
        else:
            self.container = resource[1]
            self.gff = Gff(resource[0])
예제 #2
0
파일: door.py 프로젝트: PsiOmegaDelta/pynwn
 def __init__(self, resource, instance=False):
     self._scripts = None
     self._vars = None
     self.container = None
     self.is_instance = instance
     if not instance:
         if isinstance(resource, str):
             from pynwn import ContentObject
             co = ContentObject.from_file(resource)
             self.gff = Gff(co)
         else:
             self.container = resource[1]
             self.gff = Gff(resource[0])
     else:
         self.gff = resource
예제 #3
0
    def __init__(self, resource):
        self.is_file = False
        self.reply_cache = None
        self.entry_cache = None

        if isinstance(resource, str):
            from pynwn import ContentObject
            co = ContentObject.from_file(resource)
            self.gff = Gff(co)
            self.is_file = True
        else:
            self.container = resource[1]
            co = resource[0]
            self.gff = Gff(co)

        self._resref = co.resref
예제 #4
0
    def __init__(self, resource, instance=False):
        self._scripts = None
        self._vars = None
        self.container = None

        self.is_instance = instance
        if not instance:
            if isinstance(resource, str):
                from pynwn import ContentObject
                co = ContentObject.from_file(resource)
                self.gff = Gff(co)
            else:
                self.container = resource[1]
                self.gff = Gff(resource[0])
        else:
            self.gff = resource
예제 #5
0
파일: dialog.py 프로젝트: jd28/pynwn
    def __init__(self, resource):
        self.is_file = False
        self.reply_cache = None
        self.entry_cache = None

        if isinstance(resource, str):
            from pynwn import ContentObject

            co = ContentObject.from_file(resource)
            self.gff = Gff(co)
            self.is_file = True
        else:
            self.container = resource[1]
            co = resource[0]
            self.gff = Gff(co)

        self._resref = co.resref