1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Introduce EntityId and refactor everything

This commit is contained in:
ζeh Matt
2022-02-12 23:31:06 +02:00
parent 9322f415a9
commit d7f5003943
97 changed files with 476 additions and 388 deletions

View File

@@ -482,7 +482,7 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv)
if (int_valid[0] && int_valid[1])
{
Peep* peep = GetEntity<Peep>(int_val[0]);
Peep* peep = GetEntity<Peep>(EntityId::FromUnderlying(int_val[0]));
if (peep != nullptr)
{
peep->Energy = int_val[1];
@@ -501,7 +501,7 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv)
console.WriteLineError("Invalid staff ID");
return 1;
}
auto staff = GetEntity<Staff>(int_val[0]);
auto staff = GetEntity<Staff>(EntityId::FromUnderlying(int_val[0]));
if (staff == nullptr)
{
console.WriteLineError("Invalid staff ID");
@@ -519,7 +519,7 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv)
}
EntertainerCostume costume = static_cast<EntertainerCostume>(int_val[1]);
auto staffSetCostumeAction = StaffSetCostumeAction(int_val[0], costume);
auto staffSetCostumeAction = StaffSetCostumeAction(EntityId::FromUnderlying(int_val[0]), costume);
GameActions::Execute(&staffSetCostumeAction);
}
}