コード例 #1
0
ファイル: maps.py プロジェクト: NonRealDeveloper/dfhack
 def read_local_features(self):
     f = libdfhack.Maps_ReadLocalFeatures(self._map_ptr)
     feature_dict = {}        
     f_arr = check_pointer_cache(f, False)
     
     if f_arr is not None:
         for node in f_arr:
             c = node.coordinate.xyz
             coord = MapPoint(c.x, c.y, c.z)
             f_list = [node.features[i] for i in xrange(node.feature_length)]
             feature_dict[coord] = f_list
     
     return feature_dict
コード例 #2
0
ファイル: maps.py プロジェクト: raoulxq/dfhack
    def read_local_features(self):
        f = libdfhack.Maps_ReadLocalFeatures(self._map_ptr)
        feature_dict = {}
        f_arr = check_pointer_cache(f, False)

        if f_arr is not None:
            for node in f_arr:
                c = node.coordinate.xyz
                coord = MapPoint(c.x, c.y, c.z)
                f_list = [
                    node.features[i] for i in xrange(node.feature_length)
                ]
                feature_dict[coord] = f_list

        return feature_dict
コード例 #3
0
 def get_thread_ids(self):
     return check_pointer_cache(libdfhack.Process_getThreadIDs(self._p_ptr))
コード例 #4
0
 def read(self, address, length):
     return check_pointer_cache(
         libdfhack.Process_read(self._p_ptr, address, length))
コード例 #5
0
ファイル: maps.py プロジェクト: NonRealDeveloper/dfhack
 def read_world_constructions(self, x, y, z):
     ux, uy, uz = _uintify(x, y, z)
     
     return check_pointer_cache(libdfhack.Maps_ReadWorldConstructions(self._map_ptr, ux, uy, uz))
コード例 #6
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_color(self):
     self.color = check_pointer_cache(libdfhack.Materials_getColor(self._mat_ptr))
コード例 #7
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_plant(self):
     self.plant = check_pointer_cache(libdfhack.Materials_getPlant(self._mat_ptr))
コード例 #8
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_organic(self):
     self.organic = check_pointer_cache(libdfhack.Materials_getOrganic(self._mat_ptr))
コード例 #9
0
 def read_hotkeys(self):
     return check_pointer_cache(libdfhack.Gui_ReadHotkeys(self._gui_ptr))
コード例 #10
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_organic(self):
     self.organic = check_pointer_cache(
         libdfhack.Materials_getOrganic(self._mat_ptr))
コード例 #11
0
ファイル: maps.py プロジェクト: raoulxq/dfhack
    def read_vegetation(self, x, y, z):
        ux, uy, uz = _uintify(x, y, z)

        return check_pointer_cache(
            libdfhack.Maps_ReadVegetation(self._map_ptr, ux, uy, uz))
コード例 #12
0
ファイル: maps.py プロジェクト: raoulxq/dfhack
    def read_world_constructions(self, x, y, z):
        ux, uy, uz = _uintify(x, y, z)

        return check_pointer_cache(
            libdfhack.Maps_ReadWorldConstructions(self._map_ptr, ux, uy, uz))
コード例 #13
0
ファイル: maps.py プロジェクト: raoulxq/dfhack
    def read_grass_veins(self, x, y, z):
        ux, uy, uz = _uintify(x, y, z)

        return check_pointer_cache(
            libdfhack.Maps_ReadGrassVeins(self._map_ptr, ux, uy, uz))
コード例 #14
0
ファイル: maps.py プロジェクト: NonRealDeveloper/dfhack
 def read_vegetation(self, x, y, z):
     ux, uy, uz = _uintify(x, y, z)
     
     return check_pointer_cache(libdfhack.Maps_ReadVegetation(self._map_ptr, ux, uy, uz))
コード例 #15
0
ファイル: process.py プロジェクト: NonRealDeveloper/dfhack
 def get_thread_ids(self):
     return check_pointer_cache(libdfhack.Process_getThreadIDs(self._p_ptr))
コード例 #16
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_tree(self):
     self.tree = check_pointer_cache(
         libdfhack.Materials_getTree(self._mat_ptr))
コード例 #17
0
ファイル: process.py プロジェクト: NonRealDeveloper/dfhack
 def read(self, address, length):
     return check_pointer_cache(libdfhack.Process_read(self._p_ptr, address, length))
コード例 #18
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_plant(self):
     self.plant = check_pointer_cache(
         libdfhack.Materials_getPlant(self._mat_ptr))
コード例 #19
0
 def get_screen_tiles(self, width, height):
     return check_pointer_cache(libdfhack.Gui_getScreenTiles(self._gui_ptr, width, height))
コード例 #20
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_race_ex(self):
     self.race_ex = check_pointer_cache(
         libdfhack.Materials_getRaceEx(self._mat_ptr))
コード例 #21
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_tree(self):
     self.tree = check_pointer_cache(libdfhack.Materials_getTree(self._mat_ptr))
コード例 #22
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_color(self):
     self.color = check_pointer_cache(
         libdfhack.Materials_getColor(self._mat_ptr))
コード例 #23
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_race_ex(self):
     self.race_ex = check_pointer_cache(libdfhack.Materials_getRaceEx(self._mat_ptr))
コード例 #24
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_other(self):
     self.other = check_pointer_cache(
         libdfhack.Materials_getOther(self._mat_ptr))
コード例 #25
0
ファイル: materials.py プロジェクト: raoulxq/dfhack
 def _get_other(self):
     self.other = check_pointer_cache(libdfhack.Materials_getOther(self._mat_ptr))
コード例 #26
0
ファイル: maps.py プロジェクト: NonRealDeveloper/dfhack
 def read_grass_veins(self, x, y, z):
     ux, uy, uz = _uintify(x, y, z)
     
     return check_pointer_cache(libdfhack.Maps_ReadGrassVeins(self._map_ptr, ux, uy, uz))