Commit graph

2 commits

Author SHA1 Message Date
Griffin Smith
25a1c5ade3 Factor out an EntityAttributes type
Factor out a new EntityAttributes type from some of the methods of the
Entity class, to avoid the proliferation of 1-argument boolean methods
on the entity class that always have to be forwarded through the Entity
instance for SomeEntity if they have defaults (forgetting to do which
has wasted tons of my time up to this point). Currently blocksVision,
blocksObject, and collision are all in there.
2020-02-08 17:24:27 -05:00
Griffin Smith
32421916e0 Update the vision every time we step the game
Recalculate the character's lines of sight every time we step the game,
rather than just every time the character *moves*. I had originally
thought this was a non-contiguous lines-of-sight bug - which there's a
test disproving - but it actually turned out to be that actions like
eating or attacking would step the game forward (thus moving gormlaks)
without re-calculating the positions visible to the character.
2019-12-23 17:55:28 -05:00