X-Git-Url: https://plomlompom.com/repos/?p=plomrogue2-experiments;a=blobdiff_plain;f=new%2Fplomrogue%2Fmapping.py;h=0ec953d329befd0dd5e6ec93910e06e78ed69d7a;hp=c9398d47ef515f4d8e085005485b94fb82b450b9;hb=3b7db36664e8989b106d8975d7a115e8a872b473;hpb=df8bf97e70c415e95166851e16e19d4ac7acfee1 diff --git a/new/plomrogue/mapping.py b/new/plomrogue/mapping.py index c9398d4..0ec953d 100644 --- a/new/plomrogue/mapping.py +++ b/new/plomrogue/mapping.py @@ -146,6 +146,7 @@ class FovMap: def __init__(self, source_map, yx): self.source_map = source_map self.size = self.source_map.size + self.fov_radius = (self.size[0] / 2) - 0.5 self.terrain = '?' * self.size_i self[yx] = '.' self.shadow_cones = [] @@ -236,11 +237,14 @@ class FovMap: # would lose shade growth through hexes at shade borders.) # TODO: Start circling only in earliest obstacle distance. + # TODO: get rid of circle_in_map logic circle_in_map = True distance = 1 yx = yx[:] #print('DEBUG CIRCLE_OUT', yx) while circle_in_map: + if distance > self.fov_radius: + break circle_in_map = False yx, _ = self.basic_circle_out_move(yx, 'RIGHT') for dir_i in range(len(self.circle_out_directions)):