Skip to content

Commit

Permalink
Entity manager will always return current map node for around key
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegis committed Oct 2, 2020
1 parent 1e35cfa commit 7b1c39f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion Kaeshi/Kaeshi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ static void Main(string[] args)

var entityManager = new EntityManager();
entityManager.AddVisibleObject("yourself", hero);
entityManager.AddVisibleObject("around", map.GetCurrentLocation());

var commandParser = new CommandParser(entityManager);

Expand Down
4 changes: 4 additions & 0 deletions Kaeshi/Modules/EntityManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public void AddVisibleObject(string key, IVisible visibleObject)

public IVisible GetVisibleObject(string key)
{
if("around".Equals(key))
{
level.GetCurrentLocation();
}
if (visibleObjects.TryGetValue(key, out var retVal))
return retVal;

Expand Down

0 comments on commit 7b1c39f

Please sign in to comment.