Rename Peep::staff_mowing_timeout to StaffMowingTimeout

This commit is contained in:
Tulio Leao 2020-05-31 17:21:06 -03:00 committed by Gymnasiast
parent 231b704fa7
commit 0e170d40d4
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
4 changed files with 9 additions and 9 deletions

View File

@ -244,7 +244,7 @@ private:
// Staff energy determines their walking speed
newPeep->energy = 0x60;
newPeep->energy_target = 0x60;
newPeep->staff_mowing_timeout = 0;
newPeep->StaffMowingTimeout = 0;
newPeep->staff_id = staffIndex;

View File

@ -3170,7 +3170,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result)
if (type == PEEP_TYPE_STAFF && !GetNextIsSurface())
{
// Prevent staff from leaving the path on their own unless they're allowed to mow.
if (!((this->staff_orders & STAFF_ORDERS_MOWING) && this->staff_mowing_timeout >= 12))
if (!((this->staff_orders & STAFF_ORDERS_MOWING) && this->StaffMowingTimeout >= 12))
{
peep_return_to_centre_of_tile(this);
return;

View File

@ -706,7 +706,7 @@ struct Peep : SpriteBase
union
{
uint8_t time_on_ride;
uint8_t staff_mowing_timeout;
uint8_t StaffMowingTimeout;
};
// 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc
uint8_t DisgustingCount;

View File

@ -611,7 +611,7 @@ int32_t Staff::HandymanDirectionRandSurface(uint8_t validDirections)
*/
bool Staff::DoHandymanPathFinding()
{
staff_mowing_timeout++;
StaffMowingTimeout++;
uint8_t litterDirection = INVALID_DIRECTION;
uint8_t validDirections = staff_get_valid_patrol_directions(this, NextLoc);
@ -622,7 +622,7 @@ bool Staff::DoHandymanPathFinding()
}
Direction newDirection = INVALID_DIRECTION;
if (litterDirection == INVALID_DIRECTION && (staff_orders & STAFF_ORDERS_MOWING) && staff_mowing_timeout >= 12)
if (litterDirection == INVALID_DIRECTION && (staff_orders & STAFF_ORDERS_MOWING) && StaffMowingTimeout >= 12)
{
newDirection = staff_handyman_direction_to_uncut_grass(this, validDirections);
}
@ -1242,7 +1242,7 @@ void Staff::UpdateMowing()
*/
void Staff::UpdateWatering()
{
staff_mowing_timeout = 0;
StaffMowingTimeout = 0;
if (sub_state == 0)
{
if (!CheckForPath())
@ -1305,7 +1305,7 @@ void Staff::UpdateWatering()
*/
void Staff::UpdateEmptyingBin()
{
staff_mowing_timeout = 0;
StaffMowingTimeout = 0;
if (sub_state == 0)
{
@ -1386,7 +1386,7 @@ void Staff::UpdateEmptyingBin()
*/
void Staff::UpdateSweeping()
{
staff_mowing_timeout = 0;
StaffMowingTimeout = 0;
if (!CheckForPath())
return;
@ -1785,7 +1785,7 @@ static int32_t peep_update_patrolling_find_grass(Peep* peep)
if (!(peep->staff_orders & STAFF_ORDERS_MOWING))
return 0;
if (peep->staff_mowing_timeout < 12)
if (peep->StaffMowingTimeout < 12)
return 0;
if (!(peep->GetNextIsSurface()))