예제 #1
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_tile_types(self, x, y, z):
        tt = TileTypes40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadTileTypes(self._map_ptr, ux, uy, uz, tt) > 0:
            return tt
        else:
            return None
예제 #2
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_features(self, x, y, z):
        lf = c_short()
        gf = c_short()

        ux, uy, uz = _uintify(x, y, z)

        libdfhack.Maps_ReadFeatures(self._map_ptr, ux, uy, uz, byref(lf), byref(fg))

        return (lf, gf)
예제 #3
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_occupancy(self, x, y, z):
        o = Occupancies40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, o) > 0:
            return o
        else:
            return None
예제 #4
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_temperatures(self, x, y, z):
        t = Temperatures()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, t) > 0:
            return t
        else:
            return None
예제 #5
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_region_offsets(self, x, y, z):
        bi = BiomeIndices40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadRegionOffsets(self._map_ptr, ux, uy, uz, byref(bi)) > 0:
            return bi
        else:
            return None
예제 #6
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_block_flags(self, x, y, z):
        bf = BlockFlags()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadBlockFlags(self._map_ptr, ux, uy, uz, byref(bf)) > 0:
            return bf
        else:
            return None
예제 #7
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_tile_types(self, x, y, z):
        tt = TileTypes40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadTileTypes(self._map_ptr, ux, uy, uz, tt) > 0:
            return tt
        else:
            return None
예제 #8
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_designations(self, x, y, z):
        d = Designations40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, d) > 0:
            return d
        else:
            return None
예제 #9
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_temperatures(self, x, y, z):
        t = Temperatures()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, t) > 0:
            return t
        else:
            return None
예제 #10
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_occupancy(self, x, y, z):
        o = Occupancies40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz, o) > 0:
            return o
        else:
            return None
예제 #11
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_block_flags(self, x, y, z):
        bf = BlockFlags()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadBlockFlags(self._map_ptr, ux, uy, uz,
                                         byref(bf)) > 0:
            return bf
        else:
            return None
예제 #12
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_region_offsets(self, x, y, z):
        bi = BiomeIndices40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadRegionOffsets(self._map_ptr, ux, uy, uz,
                                            byref(bi)) > 0:
            return bi
        else:
            return None
예제 #13
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_designations(self, x, y, z):
        d = Designations40d()

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDesignations(self._map_ptr, ux, uy, uz,
                                           byref(d)) > 0:
            return d
        else:
            return None
예제 #14
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_features(self, x, y, z):
        lf = c_short()
        gf = c_short()

        ux, uy, uz = _uintify(x, y, z)

        libdfhack.Maps_ReadFeatures(self._map_ptr, ux, uy, uz, byref(lf),
                                    byref(fg))

        return (lf, gf)
예제 #15
0
파일: maps.py 프로젝트: sizeak/dfhack
    def read_dirty_bit(self, x, y, z):
        bit = c_int(0)

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDirtyBit(self._map_ptr, ux, uy, uz, byref(bit)) > 0:
            if bit > 0:
                return True
            else:
                return False
        else:
            return None
예제 #16
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def read_dirty_bit(self, x, y, z):
        bit = c_int(0)

        ux, uy, uz = _uintify(x, y, z)

        if libdfhack.Maps_ReadDirtyBit(self._map_ptr, ux, uy, uz,
                                       byref(bit)) > 0:
            if bit > 0:
                return True
            else:
                return False
        else:
            return None
예제 #17
0
파일: maps.py 프로젝트: sizeak/dfhack
 def write_block_flags(self, x, y, z, block_flags):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteBlockFlags(self._map_ptr, ux, uy, uz, block_flags) > 0
예제 #18
0
파일: maps.py 프로젝트: nickrart/dfhack
 def read_spatter_veins(self, x, y, z):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_ReadSpatterVeins(self._map_ptr, ux, uy, uz)
예제 #19
0
파일: maps.py 프로젝트: sizeak/dfhack
 def write_global_feature(self, x, y, z, global_feature = -1):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteGlobalFeature(self._map_ptr, ux, uy, uz, c_short(global_feature)) > 0
예제 #20
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_dirty_bit(self, x, y, z, dirty):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteDirtyBit(self._map_ptr, ux, uy, uz,
                                            c_int(dirty)) > 0
예제 #21
0
파일: maps.py 프로젝트: sizeak/dfhack
 def write_temperatures(self, x, y, z, t):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz, t) > 0
예제 #22
0
 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))
예제 #23
0
파일: maps.py 프로젝트: nickrart/dfhack
 def read_veins(self, x, y, z):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_ReadStandardVeins(self._map_ptr, ux, uy, uz)
예제 #24
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_occupancy(self, x, y, z, o):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz,
                                                byref(o)) > 0
예제 #25
0
파일: maps.py 프로젝트: raoulxq/dfhack
 def is_valid_block(self, x, y, z):
     return libdfhack.Maps_isValidBlock(self._map_ptr, *_uintify(x, y,
                                                                 z)) > 0
예제 #26
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))
예제 #27
0
 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))
예제 #28
0
파일: maps.py 프로젝트: sizeak/dfhack
 def write_designations(self, x, y, z, o):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz, o) > 0
예제 #29
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_block_flags(self, x, y, z, block_flags):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteBlockFlags(self._map_ptr, ux, uy, uz,
                                              block_flags) > 0
예제 #30
0
파일: maps.py 프로젝트: nickrart/dfhack
 def read_frozen_veins(self, x, y, z):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_ReadFrozenVeins(self._map_ptr, ux, uy, uz)
예제 #31
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_tile_types(self, x, y, z, tt):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteTileTypes(self._map_ptr, ux, uy, uz, tt) > 0
예제 #32
0
파일: maps.py 프로젝트: sizeak/dfhack
 def is_valid_block(self, x, y, z):
     return libdfhack.Maps_isValidBlock(self._map_ptr, *_uintify(x, y, z)) > 0
예제 #33
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_temperatures(self, x, y, z, t):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz,
                                                t) > 0
예제 #34
0
파일: maps.py 프로젝트: sizeak/dfhack
 def write_tile_types(self, x, y, z, tt):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteTileTypes(self._map_ptr,  ux, uy, uz, tt) > 0
예제 #35
0
파일: maps.py 프로젝트: sizeak/dfhack
 def write_dirty_bit(self, x, y, z, dirty):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteDirtyBit(self._map_ptr, ux, uy, uz, c_int(dirty)) > 0
예제 #36
0
 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))
예제 #37
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_designations(self, x, y, z, d):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz,
                                                byref(d)) > 0
예제 #38
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))
예제 #39
0
파일: maps.py 프로젝트: raoulxq/dfhack
    def write_global_feature(self, x, y, z, global_feature=-1):
        ux, uy, uz = _uintify(x, y, z)

        return libdfhack.Maps_WriteGlobalFeature(self._map_ptr, ux, uy, uz,
                                                 c_short(global_feature)) > 0
예제 #40
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))
예제 #41
0
 def write_occupancy(self, x, y, z, o):
     ux, uy, uz = _uintify(x, y, z)
     
     return libdfhack.Maps_WriteDesignations(self._map_ptr, ux, uy, uz, byref(o)) > 0