Implement/match LegoPlantManager::CreatePlant (#1039)

* Implement/match LegoPlantManager::CreatePlant

* Update names

* Fix name

* Fix

* Fix
This commit is contained in:
Christian Semmler
2024-06-18 13:35:03 -04:00
committed by GitHub
parent 1a46d370ec
commit e507f42717
13 changed files with 242 additions and 179 deletions

View File

@@ -54,9 +54,9 @@ LegoWorldPresenter::~LegoWorldPresenter()
{
MxBool result = FALSE;
if (m_entity) {
MxS32 scriptIndex = ((LegoWorld*) m_entity)->GetScriptIndex();
PlantManager()->FUN_10026360(scriptIndex);
AnimationManager()->LoadScriptInfo(scriptIndex);
MxS32 worldId = ((LegoWorld*) m_entity)->GetWorldId();
PlantManager()->LoadWorldInfo(worldId);
AnimationManager()->LoadWorldInfo(worldId);
BuildingManager()->FUN_1002fa00();
result = ((LegoWorld*) m_entity)->VTable0x5c();
}
@@ -438,7 +438,7 @@ void LegoWorldPresenter::ParseExtra()
if (KeyValueStringParse(output, g_strWORLD, extraCopy)) {
char* worldKey = strtok(output, g_parseExtraTokens);
LoadWorld(worldKey, (LegoWorld*) m_entity);
((LegoWorld*) m_entity)->SetScriptIndex(Lego()->GetScriptIndex(worldKey));
((LegoWorld*) m_entity)->SetWorldId(Lego()->GetWorldId(worldKey));
}
}
}