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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user