home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move re-positioning of things in inventory to Thing code.
[plomrogue2-experiments]
/
new
/
plomrogue
/
mapping.py
diff --git
a/new/plomrogue/mapping.py
b/new/plomrogue/mapping.py
index c9398d47ef515f4d8e085005485b94fb82b450b9..0ec953d329befd0dd5e6ec93910e06e78ed69d7a 100644
(file)
--- 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
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 = []
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.
# 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:
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)):
circle_in_map = False
yx, _ = self.basic_circle_out_move(yx, 'RIGHT')
for dir_i in range(len(self.circle_out_directions)):