Commit graph

3 commits

Author SHA1 Message Date
67e8ceefa3 Update licence notice to 2017. 2017-01-30 14:56:16 +00:00
952a8af9c6 Register things that need the world size as observers to WorldGrid.
Character and WorldViewport get notified when the world size is set.
This way even if world size never changes they still get notified
about the proper world size as soon as that information is ready,
be it during instantiation or registration. Previously I was having
trouble because at the point where Character was instantiated, the
world size was not known yet. As such, I had to call a
character.update_world_size() function after it became available. The
same happened for the viewport, and this looked a bit too brittle
from the programmer's perspective. Now you just instantiate the
Character and things get sorted out automatically.
2017-01-27 16:07:50 +00:00
19889313e2 Make a ConstrainedPosition helper class.
Use the new class to replace the ad-hoc code in worldviewport.
2017-01-26 17:37:12 +00:00