Skip to content

Commit

Permalink
Support updating from 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pragasette committed Mar 20, 2020
1 parent 7c6a22a commit f4fc071
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Scripts/Source/_p7NHR_PlayerAlias.psc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ Scriptname _p7NHR_PlayerAlias extends ReferenceAlias

_p7NHR_Quest Property PlayerQuest Auto

Event OnInit()
; if the alias is empty, the quest was started before the alias existed:
; this means the mod was updated since last game: let's fill the alias
; and refresh registrations manually
If !Self.GetReference()
Self.ForceRefTo(Game.GetPlayer())
PlayerQuest.RefreshRegistrations()
EndIf
EndEvent

Event OnPlayerLoadGame()
PlayerQuest.RefreshRegistrations()
EndEvent

0 comments on commit f4fc071

Please sign in to comment.