1

Added RegisterPersistentStorage

This commit is contained in:
Eddoursul 2022-07-08 22:21:36 +02:00
parent 11311399ce
commit adb77dd4d9
3 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -73,6 +73,15 @@ namespace Papyrus::PapyrusFunctions
} }
} }
inline void RegisterPersistentStorage(RE::StaticFunctionTag*,
RE::TESObjectREFR* ref)
{
if (ref) {
ArtifactTracker::g_persistentStorage->AddForm(ref);
ArtifactTracker::g_persistentMap[ref->formID] = ref;
}
}
inline void Bind(VM& a_vm) inline void Bind(VM& a_vm)
{ {
BIND(Load); BIND(Load);
@ -93,5 +102,7 @@ namespace Papyrus::PapyrusFunctions
logger::info("Registered GetPlayerFollowers"sv); logger::info("Registered GetPlayerFollowers"sv);
BIND(GetCurrentContainer); BIND(GetCurrentContainer);
logger::info("Registered GetCurrentContainer"sv); logger::info("Registered GetCurrentContainer"sv);
BIND(RegisterPersistentStorage);
logger::info("Registered RegisterPersistentStorage"sv);
} }
} }

View File

@ -183,3 +183,5 @@ ObjectReference function GetCurrentContainer() native global
function SyncCellStorage() native global function SyncCellStorage() native global
Actor[] function GetPlayerFollowers() native global Actor[] function GetPlayerFollowers() native global
function RegisterPersistentStorage(ObjectReference ref) native global