aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default/textures/default_nc_side.png
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-02-12 22:51:38 +0100
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2013-02-13 02:06:36 +0400
commitb1019a88ba9c0822d60d3f4a74d745c69be8a79b (patch)
tree070941a15547a280cafb119b6020850cac17e404 /games/minimal/mods/default/textures/default_nc_side.png
parent8e69b9cb261c503c5fb461086439aed28e434d19 (diff)
downloadminetest-b1019a88ba9c0822d60d3f4a74d745c69be8a79b.tar.gz
minetest-b1019a88ba9c0822d60d3f4a74d745c69be8a79b.tar.bz2
minetest-b1019a88ba9c0822d60d3f4a74d745c69be8a79b.zip
Fix to on_rightclick not able to change wielded_item
Diffstat (limited to 'games/minimal/mods/default/textures/default_nc_side.png')
0 files changed, 0 insertions, 0 deletions
n> exit('You need to have the Python sqlite3 module.') path = "../world/" paths = [] # sectors2 gets to try first if os.path.isdir(path + 'sectors2/'): paths.append('sectors2') if os.path.isdir(path + 'sectors/'): paths.append('sectors') if not paths: exit('Could not find sectors folder at ' + path + 'sectors2/ or ' + path + 'sectors/') def parseSigned12bit(u): u = int('0x'+u, 16) return (u if u < 2**11 else u - 2**12) def parseSigned16bit(u): u = int('0x'+u, 16) return (u if u < 2**15 else u - 2**16) def int64(u): while u >= 2**63: u -= 2**64 while u <= -2**63: u += 2**64 return u # Convert sector folder(s) to integer def getSectorPos(dirname): if len(dirname) == 8: # Old layout x = parseSigned16bit(dirname[:4]) z = parseSigned16bit(dirname[4:]) elif len(dirname) == 7: # New layout x = parseSigned12bit(dirname[:3]) z = parseSigned12bit(dirname[4:]) else: print('Terrible sector at ' + dirname) return return x, z # Convert block file to integer position def getBlockPos(sectordir, blockfile): p2d = getSectorPos(sectordir) if not p2d: return