Add getter and setter for destination in Peep

This commit is contained in:
Matt 2021-02-10 19:27:31 +02:00
parent ed4d8b4552
commit 2bb5bb9988
No known key found for this signature in database
GPG Key ID: 6D4C24A61C93E208
2 changed files with 14 additions and 0 deletions

View File

@ -3381,3 +3381,14 @@ bool Peep::HasItem(ShopItem peepItem) const
{
return GetItemFlags() & EnumToFlag(peepItem);
}
void Peep::SetDestination(const CoordsXY& coords)
{
DestinationX = static_cast<uint16_t>(coords.x);
DestinationY = static_cast<uint16_t>(coords.y);
}
CoordsXY Peep::GetDestination() const
{
return CoordsXY{ static_cast<int16_t>(DestinationX), static_cast<int16_t>(DestinationY) };
}

View File

@ -766,6 +766,9 @@ public: // Peep
void GiveItem(ShopItem item);
bool HasItem(ShopItem peepItem) const;
void SetDestination(const CoordsXY& coords);
CoordsXY GetDestination() const;
// TODO: Make these private again when done refactoring
public: // Peep
bool CheckForPath();