2022-06-16 12:02:24 +00:00
|
|
|
Scriptname ETR_TrackNewItems extends ReferenceAlias
|
|
|
|
|
|
|
|
Actor Property PlayerRef Auto
|
|
|
|
|
|
|
|
FormList Property ETR_ItemsNew Auto
|
|
|
|
FormList Property ETR_ItemsFound Auto
|
|
|
|
FormList Property ETR_ItemsStored Auto
|
|
|
|
FormList Property ETR_PersistentStorageList Auto
|
2022-06-21 20:10:12 +00:00
|
|
|
FormList Property ETR_FoundAndStored Auto
|
2022-06-16 12:02:24 +00:00
|
|
|
|
2022-06-22 13:37:42 +00:00
|
|
|
GlobalVariable Property ETR_NotifyNewArtifact Auto
|
|
|
|
|
2022-06-16 12:02:24 +00:00
|
|
|
|
|
|
|
event OnInit()
|
|
|
|
OnPlayerLoadGame()
|
|
|
|
endevent
|
|
|
|
|
|
|
|
|
|
|
|
event OnPlayerLoadGame()
|
|
|
|
|
|
|
|
AddInventoryEventFilter(ETR_ItemsNew)
|
|
|
|
|
|
|
|
if skse.GetPluginVersion("Ahzaab's moreHUD Plugin") >= 30800
|
|
|
|
ahzmorehud.RegisterIconFormList("dbmNew", ETR_ItemsNew)
|
|
|
|
ahzmorehud.RegisterIconFormList("dbmFound", ETR_ItemsFound)
|
|
|
|
ahzmorehud.RegisterIconFormList("dbmDisp", ETR_ItemsStored)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if skse.GetPluginVersion("Ahzaab's moreHUD Inventory Plugin") >= 10017
|
|
|
|
ahzmorehudie.RegisterIconFormList("dbmNew", ETR_ItemsNew)
|
|
|
|
ahzmorehudie.RegisterIconFormList("dbmFound", ETR_ItemsFound)
|
|
|
|
ahzmorehudie.RegisterIconFormList("dbmDisp", ETR_ItemsStored)
|
|
|
|
endif
|
|
|
|
|
2022-06-22 13:27:49 +00:00
|
|
|
if SKSE.GetPluginVersion("QuickLootRE") >= 292
|
|
|
|
QuickLootRE.RegisterNewItemsList(ETR_ItemsNew)
|
|
|
|
QuickLootRE.RegisterDisplayedItemsList(ETR_ItemsStored)
|
|
|
|
QuickLootRE.RegisterFoundItemsList(ETR_ItemsFound)
|
|
|
|
endif
|
2022-06-21 20:10:12 +00:00
|
|
|
|
2022-06-16 12:02:24 +00:00
|
|
|
; Rebuild all lists to avoid discrepancies, stale data, and broken records
|
|
|
|
|
|
|
|
ETR_ItemsStored.Revert()
|
2022-06-22 00:52:12 +00:00
|
|
|
ETR_Functions.AddArtifactsToList(ETR_PersistentStorageList, ETR_ItemsStored)
|
2022-06-16 12:02:24 +00:00
|
|
|
|
|
|
|
ETR_ItemsFound.Revert()
|
2022-06-22 00:52:12 +00:00
|
|
|
ETR_Functions.AddArtifactsToList(PlayerRef, ETR_ItemsFound, ETR_ItemsStored)
|
2022-06-22 08:28:12 +00:00
|
|
|
ETR_Functions.AddArtifactsFromFollowersToList(ETR_ItemsFound, ETR_ItemsStored)
|
2022-06-16 12:02:24 +00:00
|
|
|
|
|
|
|
ETR_ItemsNew.Revert()
|
2022-06-21 20:10:12 +00:00
|
|
|
ETR_Functions.AddAllFormsToList(ETR_ItemsNew, 41, ETR_FoundAndStored)
|
2022-06-22 00:52:12 +00:00
|
|
|
ETR_Functions.AddAllFormsToList(ETR_ItemsNew, 32, ETR_FoundAndStored)
|
|
|
|
ETR_Functions.AddAllFormsToList(ETR_ItemsNew, 27, ETR_FoundAndStored)
|
2022-06-22 08:59:20 +00:00
|
|
|
ETR_Functions.AddAllFormsToList(ETR_ItemsNew, 26, ETR_FoundAndStored)
|
2022-06-16 12:02:24 +00:00
|
|
|
|
|
|
|
endevent
|
|
|
|
|
|
|
|
|
|
|
|
event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
|
|
|
|
|
|
|
|
ETR_ItemsNew.RemoveAddedForm(akBaseItem)
|
|
|
|
ETR_ItemsFound.AddForm(akBaseItem)
|
|
|
|
ETR_ItemsStored.RemoveAddedForm(akBaseItem)
|
|
|
|
|
2022-06-22 13:37:42 +00:00
|
|
|
if ETR_NotifyNewArtifact.Value
|
|
|
|
Debug.Notification("New artifact acquired: " + akBaseItem.GetName())
|
|
|
|
endif
|
2022-06-16 12:02:24 +00:00
|
|
|
|
|
|
|
endevent
|