1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00

Remove FOR_ALL_PEEPS/GUESTS/STAFF macros

Replaced with an EntityList iterator

Fix formatting

Fix nullptr issues
This commit is contained in:
duncanspumpkin
2020-06-10 17:54:34 +01:00
parent c45a0536eb
commit 6ed17b4ff9
24 changed files with 173 additions and 266 deletions

View File

@@ -437,13 +437,12 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv)
{
if (argv[0] == "list")
{
Peep* peep;
int32_t i;
FOR_ALL_STAFF (i, peep)
for (auto peep : EntityList<Staff>(SPRITE_LIST_PEEP))
{
auto name = peep->GetName();
console.WriteFormatLine(
"staff id %03d type: %02u energy %03u name %s", i, peep->StaffType, peep->Energy, name.c_str());
"staff id %03d type: %02u energy %03u name %s", peep->sprite_index, peep->StaffType, peep->Energy,
name.c_str());
}
}
else if (argv[0] == "set")