mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add getter and setter for destination in Peep
This commit is contained in:
parent
ed4d8b4552
commit
2bb5bb9988
|
@ -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) };
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue