- for pos in range(length ** 2):
- if 'v' == chr(world_db["Things"][0]["fovmap"][pos]):
- fov[pos] = world_db["MAP"][pos]
- for i in range(3):
- draw_visible_Things(fov, i)
+ ord_v = ord("v")
+ for pos in [pos for pos in range(length ** 2)
+ if ord_v == world_db["Things"][0]["fovmap"][pos]]:
+ fov[pos] = world_db["MAP"][pos]
+ length = world_db["MAP_LENGTH"]
+ for id in [id for tid in reversed(sorted(list(world_db["ThingTypes"])))
+ for id in world_db["Things"]
+ if not world_db["Things"][id]["carried"]
+ if world_db["Things"][id]["T_TYPE"] == tid
+ if world_db["Things"][0]["fovmap"][
+ world_db["Things"][id]["T_POSY"] * length
+ + world_db["Things"][id]["T_POSX"]] == ord_v]:
+ type = world_db["Things"][id]["T_TYPE"]
+ c = ord(world_db["ThingTypes"][type]["TT_SYMBOL"])
+ fov[world_db["Things"][id]["T_POSY"] * length
+ + world_db["Things"][id]["T_POSX"]] = c