Skip to content

Commit

Permalink
Append Phobos version info to game sav file
Browse files Browse the repository at this point in the history
fix typo from previous commit
  • Loading branch information
chaserli committed Mar 3, 2024
1 parent 230b774 commit dd201d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/Ext/Rules/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI)

Nullable<AnimTypeClass*> droppod_trailer {};
droppod_trailer.Read(exINI, GameStrings::General, "DropPodTrailer");
droppod_trailer = droppod_trailer.Get(AnimTypeClass::Find("SMOKEY")); // Ares convention
if (!droppod_trailer.Get())
this->DropPodTrailer = droppod_trailer.Get();
this->DropPodTrailer = droppod_trailer.Get(AnimTypeClass::Find("SMOKEY"));// Ares convention
this->PodImage = FileSystem::LoadSHPFile("POD.SHP");

this->Buildings_DefaultDigitalDisplayTypes.Read(exINI, GameStrings::AudioVisual, "Buildings.DefaultDigitalDisplayTypes");
Expand Down
3 changes: 1 addition & 2 deletions src/New/Type/Affiliated/DroppodTypeClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ DEFINE_HOOK(0x4B5B70, DroppodLocomotionClass_ILoco_Process, 0x5)
__assume(iloco != nullptr);
auto const lThis = static_cast<DropPodLocomotionClass*>(iloco);
auto const pLinked = lThis->LinkedTo;
auto const linkedExt = TechnoExt::ExtMap.Find(pLinked);
const auto podType = linkedExt->TypeExtData->DroppodType.get();
const auto podType = TechnoTypeExt::ExtMap.Find(pLinked->GetTechnoType())->DroppodType.get();

CoordStruct oldLoc = pLinked->Location;

Expand Down
6 changes: 6 additions & 0 deletions src/Phobos.Ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@ DEFINE_HOOK(0x67E826, LoadGame_Phobos, 0x6)
DEFINE_HOOK(0x67D04E, GameSave_SavegameInformation, 0x7)
{
REF_STACK(SavegameInformation, Info, STACK_OFFSET(0x4A4, -0x3F4));

Info.InternalVersion = Info.InternalVersion + SAVEGAME_ID;
strncat(Info.ExecutableName.data(),
" + Phobos " FILE_VERSION_STR,
Info.ExecutableName.Size - sizeof(" + Phobos " FILE_VERSION_STR)
);

return 0;
}

Expand Down

0 comments on commit dd201d3

Please sign in to comment.